using a microcontroller to do the counting as he manually
rotates the motor shaft through, say, 100 revolutions and
then divides the total count by 100. This evens out any
errors in finding the zero position of the motor shaft which
would be a problem if he tried to count only one
revolution.

One last thing. While red+/black- is the usual power
wiring for this type of device, there are variants, especially
in custom devices — sometimes they obfuscate the wiring
on purpose. Sam should put a 1/4 watt resistor of perhaps
100 ohms in series with the power (red) lead and slowly
ramp up the voltage across red and black to about 5V. This
will limit the current to 50 ma and the power to 1/4 watt
in the event the power wiring is incorrect and he ends up
driving a short or near short. The encoder should be able
to survive reverse voltage if current is limited to this 50 ma
level; for a few seconds at least. If the circuit draws more
than 25 ma with less than, say, two volts across red to
black, he needs to disconnect power and re-evaluate.

Mark Lewus

Looking for a GIFT or maybe just something
special for yourself?
Check out the SERVO Webstore (pages 71-73) to
find all sorts of cool robotic items for sale!