Page started Sept 5 2005.
Updated April 22 2006.

Making a cheap optical rotary encoder.
 
  This is just description of an idea.
  With some experiments.
  I have not tried the whole idea out yet.
  There might be problems i do not know about.

   I made drawings of an 20 centimeter encoder wheel with 200 lines, and one with 500 lines.
   (I should have made 50 mm, instead of 20 cm.
   With QCad on linux.
 
make-encoder-200-lines-20cm-1.dxf
  make-encoder-500-lines-2.dxf

   
Reduced the scale to 50 mm wheels.
  
Print a lot of the encoder wheels on a transparent sheet, or have it done at a copyshop.
   I have 12 50 mm 500 line encoder wheels on one A4 sheet.

    This is the resulting transparent 500 lines 50 mm encoder wheel.
make-encoder-500-lines-50mm-1.png

    This is a close up of the transparent 500 lines 50 mm encoder wheel.

make-encoder-500-lines-50mm-close-up-1.png



   Then cut a circle of 40 millimeter from the side of a CD.
   Then glue the 50 millimeter transparent sheet wheel on this 40 mm plastic disc.
   The wheel with lines will stick out 5 millimeter on each side.
   This is the area where the LED's and the lightsensors will count the lines.
    Perhaps glue two encoder wheels on top of each other to get a even higher darkness of the lines.

  Making a mask.

   The light bundle between the LED and sensor might be wider then the lines on the encoder.
   Then you need a mask.

   My UNTESTED idea is to do it this way.
    It might not work with all LED and sensor combinations.

   Take one of the extra
transparent encoder wheels you printed.
   Make a hole in the middle to fit the motor axis tightly.
   Put this encoder wheel, and ONLY this encoder wheel, on the axis.
   Put the LEDs and the sensors in the proper place.
   Put a current through the first LED.
   Measure the sensor output.
   Turn the encoder wheel to the point where you get the best sensor output where the most light gets through.
   Now glue the encoder wheel to the output sensor in this best position.
   (Or is it better to glue it to the LED ??)
   Wait until the glue is dry and strong.
 
   Now put a current through the second LED.
   Measure the output of the sensor.
   Adjust the position of the second LED and sensor to get the best sensor output.
   Glue the encoder wheel to the sensor in the best position.
   Wait until the glue is dry and strong.
   All the above might be easier said then done :-)

   Now cut the rest of the encoder wheel away.
   Leaving only the two parts glued to the sensors.

   Now place the encoder wheel to the servo motor axis.
   
   Well, thats the plan.
   The UNTESTED PLAN :-)
   Gonna take a long time before i get to it :-))

The electronics i plan to use

encoder-circuit.png

encoder-pcb.png

The EAGLE files:
encoder-buhler-1.61.050.005.zip