Sports Biomechanics Lab > Blog > Encoder woes
Personal tools

Encoder woes

by Dale Lukas Peterson — last modified Feb 15, 2011 11:35 AM

Optical encoders deliver 0V or 5V, but can't source much current.

The encoders on the wheels of the robotic bicycle (US Digital H5) are pretty simple -- you power them with 5.0V and they give you two 5.0V digital square wave outputs, one phase shifted from the other by 90 degrees.  The rising and falling edges of these signals correspond to the motion of the transmissive/reflective edges of a disc moving past a precision optical sensor, and allow for accurate measurement of angular displacement or angular rate.

The problem is that these two signals can only source about 40 uA (yes, only 40e-6 Amps!) at 5.0V.  What this means in practice is that you can't really count on the encoder to drive a clean 5.0V high signal without some help.  Pull-up resistors of 2.7k-3.3k ohm's are supposed to help, but I found that they still didn't trigger the inputs on the level converter I am using to convert the 5.0V to 3.3V so the encoder signals could be used by a 3.3V logic devices.  

The solution, I hope, is to use a device called a line driver.  They basically enable the encoders to source or sink up to 20 mA, a healthy .  The model I have ordered is the US Digital PC4, and I hope this will allow for reliable level shifting of the encoder signals to 3.3V so they can be processed by the Atmel AVR microcontroller.  The PC4 also provides some power supply decoupling capacitors for the encoder, ensuring it gets a clean 5.0V supply, which should help stabilize its operation.

Document Actions
Add comment

You can add a comment by filling out the form below. Plain text formatting.

Please enter your name.
Enter the word