Go Down

Topic: multiplexing 2-channel quadrature encoder together into 1 channel? (Read 990 times) previous topic - next topic


Since I do not care about motor direction, I want to multiplex  both channels of my quadrature encoder together so that I get 1 channel of double/total resolution. This is because I only want to use one interrupt pin on my microcontroller, and not have to use two interrupt pins to get max resolution. Any tips on what kind of hardware I could use to do this?


If it's a mechanical encoder, then I don't recommend that, because the quadrature format provides an easy way to eliminate the effects of contact bounce. If it's an optical encoder, then you need to pass the two signals into the inputs of an exclusive OR gate (e.g. 74HC86) and connect the output of that gate to the Arduino pin.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.


It's a hall effect encoder, actually.

I didn't realize it would be as simple as a XOR gate; thanks.


It could be that the delta t between the pulses will not have a 50% duty cycle anymore if you combine the signals. Depends on the distance between sensors.
Just for counting this is no problem, just be aware of it.
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)


Tieing but encoder signals together will give you no more information that using just one of the signals. Because of the nature of a quadrature signal you would wind up with a 25/75% duty cycle signal (00,10,11,01) which would not improve on the nice 50% duty cycle of 1 signal.

Go Up