Sheldon robot: motor encoder connections

The 9V geared motors fitted to the T300 tank, which forms the base vehicle for my Sheldon robot project, come fitted with encoders.

I’m not sure I need these, but they might be useful to have. But first I had to do a little simple reverse engineering to work out how to connect them. Each motor has a six-pin connector, and while the power wires for the motor are easy to identify (they are black and red), I wasn’t confident about the other four (white, yellow, orange and green).

Each encoder consists of two hall effect sensors mounted close together facing a magnet on the motor’s shaft. Each sensor has a 10KΩ resistor across the +5V supply and the output signal – ie, a pullup resistor.

The manual says that the six-pin connector on the motor has the following pins:

Power for motor GND for motor +5V for sensors GND for sensors Output signal for 1st hall effect sensor Output signal for 2nd hall effect sensor

The connections according to the manual

This should make it easy to map to the wires, but my confidence level that this information was reliable was shaken a tad by the fact that the connection the manual labels as VM (power for the motor) had the black wire attached and the connection labelled GM (ie, ‘GND’ for the motor) – had the red wire. That just didn’t feel right.

Now, +ve and GND connections for a DC motor are a tad arbitrary. After all, when you have two motors mounted in mirror configuration, as on this robot, to achieve forward motion you run one motor ‘forward’ and the other in ‘reverse’.

But still, this mismatch between labelling and the conventions for colour-coding cabling made me want to double check before I sent any power down any of the other cables.

The connections on the hall effect sensors are shown on the right. You can also see the 10KΩ pullup resistor.

The sensors have one side with bevelled edges, which should face towards the magnet.

The first thing I did was fire up the digital multimeter in continuity mode and buzzed out the centre pin, confirming that, indeed, it is connected to the yellow cable. So that positively identifies it as GND for the sensor.

I then buzzed out the left-hand pins (as seen in the diagram) for the two sensors to confirm that there is a direct connection between them. Only the power pins would be connected – the output pins are necessarily isolated from each other. So, yes, I confirmed that I had read the diagrams I found online correctly and those pins are indeed the +5V supply. I then checked continuity between these pins and the white cables.

(When checking continuity between pins and cables, I obviously checked all the cables each time to ensure there was no continuity where I thought there should be none.)

Finally, just to be thorough, I buzzed out the connections between the signal pins on the hall effect sensors and the remaining two wires.

What all this told me is that I needn’t have been so cautious. The connections are as they seemed (apart from the red and black wires being, in my mind, the wrong way around).

Power for motor GND for motor +5V for sensors GND for sensors Output signal for 1st hall effect sensor Output signal for 2nd hall effect sensor
Black Red White Yellow Orange Green

Still, better to err on the cautious side, I reckon.

The manual for the T300 doesn’t go beyond giving you the pinouts – there’s no hint as to how you go about these sensors. So my next step will be to do some experimenting with them.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.