Pololu Robotics & Electronics
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

How to decode an encoder?

I have an old gear motor from an electric scooter, about 30 years old or so. I have a handle on controlling the motor but need some help decoding the onboard encoder. It is a 24v motor with 6 leads, power, ground and 2 white and 2 yellow leads. I am using the Red/Black to control the motor which is working fine. What I am wondering is how I might get revolution data from what I think must be an encoder. Two of the wires seem to be connected, based on continuity between them. If that is the case, what would some guesses be on the other two?

Any help here would be greatly appreciated. Thanks.


Probably the most straightforward thing to do is try to obtain motor/encoder information directly from the electric scooter manufacturer, or try searching the Internet to see if anyone else has tinkered with that particular motor/encoder or something similar.

I suspect that there is a good chance that two of those leads are for power and ground, though with the color scheme you mentioned, which leads those are does not seem obvious. (You might double check for continuous or dashed stripes running down the length of the leads, which might help you further identify the leads.) If that is true, then the two remaining leads are probably the outputs of an incremental encoder. If you are not already familiar with various types of incremental encoder outputs, you might consider reading through this Wikipedia page about incremental encoders to get a good idea for what is out there and how it works.