Optical Rotation Encoder on an R/C Servo

By Art LeBouthillier

This article was published in the March 1999 issue of The Robot Builder.

Remote control model airplane servos have become popular as drive motors among roboticists because they provide a low-cost, easily-available gear motor with a built-in digital speed controller. When modified, they permit the rotational speed of their output shafts to be controlled with a simple digital pulse-width modulated signal. Although easily controlled, they are often difficult to get accurate, high-speed feedback on their actual speed. One can easily utilize a cheap, reflective optosensor to detect the speed of these modified R/C Servos.

The Omron EE-SY124 [Digikey OR520-ND] is a cheap, tiny Infrared LED and phototransistor reflective sensor packaged in a tiny 4-pin DIP which is approximately .100” wide X .200” long (fig. 5). Because of its small size, it can easily be mounted inside of a servo in order to detect the motion of the gears.

Servo Mechanics

The gear train of many servos consists of a five-gear arrangement where there is a gear on the output of the drive motor, three intermediary gears and a final output shaft gear.

In this application, we will add reflective foil to the 2nd Intermediate Gear and position the photosensor so that it detects the reflective foil as it passes in front of the sensor while the gear is rotating. The 2nd Intermediate Gear contains a wide cylindrical region between its input and output gears.

This region is smooth enough that aluminum foil reflectors can be glued to it such that the sensor can provide a measurable feedback of rotation rate.


Adding Reflectors

Remove the second intermediate gear from the servo. Cut a small strip of aluminum foil that will cover the middle smooth area of the gear parallel to the rotational shaft. This strip should be about .200” wide and 1” long. Test fit the aluminum strip on the gear. Using a cyanoacrilate (Crazy) glue, tab down one end of the aluminum strip to the gear. Make sure that the shiny surface of the aluminum foil is facing away from the gear. Be careful not to get the glue all over the place, especially not on the gear teeth. Rub glue evenly on the smooth surface all the way around. Finish tacking down the aluminum to the gear so that there is a smooth expanse of aluminum all around the middle area. Trim away any excess foil.

Using a razor-sharp hobby knife, cut eight lines equally spaced around the foil parallel to the shaft axis. Be sure to cut cleanly so that each octant is of equal size. Again using the hobby knife, peel off the alternating regions of aluminum foil so that there are four regions of equal size foil reflectors equally spaced from each other.

Installing the Optosensor

The optosensor is assembled in a 4-pin DIP package which is about 0.100” wide by 0.200” long. The leads are long enough that they can fit through the servo gearhouse casing. In order to do this, reassemble the gears into their housing and identify the shaft axis of the 2nd  intermediate gear. Scratch a line on the outside of the housing so that you can identify where this is after the gears are removed. Additionally, notice the position of the foil surface on the 2nd  intermediate gear. You will need to identify where the legs of the optosensor can be drilled so that the housing of the Omron EE-SY124 does not touch any of the gears.

Drill four 0.040” (No. 60 drill) holes equally around the shaft axis of the 2nd  intermediate gear and aligned such that the sensor will not touch any gears when re-assembled.

Push the pins of the optosensor through the drilled holes and bend the leads back to hold in place.

Reassemble your servo. You may now solder wires to your optosensor to attach it to your electronic circuitry. I have found that a small dab of cyanoacrilate glue fastening the wires to the case where they are soldered to the optosensor helps mechanically hold the wires so that they don’t bend or break its leads.