Text by Alex Brown and Richard T. Vannoy II
Photos by Richard T. Vannoy II, email@example.com
Members, San Diego Robotics Society
This document describes the steps required to modify a Cirrus CS-60 2BB servo for continuous rotation and to install a photodetector chip to provide an optical encoder.
This modification procedure is directed towards the CS-60BB servo because that's what we chose to use. It has a clear plastic case, making it easy to see how and where to install the encoder sensor, and it has a full 360 degree gear wheel, allowing it to be modified for continuous rotation. Also the transparent case allows you to verify the output gear has a complete set of teeth before you purchase it. There are many other servos which can be similarly (not identically) modified. If it is desired to use another Cirrus part number servo, beware of the fact that some Cirrus servos do not have a full set of teeth on the output gear. They only have the teeth necessary to provide for the normal 200 degrees or so of rotation, and hence are not modifiable for continuous rotation. Unsuitable part numbers include the CS-50 and the CS-400BB. A nice feature of the CS-60 and 80 series is that the case is transparent and you can verify Parts and tools required:
2 Servos, Cirrus CS-60 2BB Hi-Torque
2 Omron Ultra-Compact Reflective Sensor, EE-SY124; Digikey Part Number OR520-ND
Very small Phillips screwdriver
Hot glue gun
Soldering iron with low wattage setting
MODIFICATION FOR CONTINUOUS ROTATION
1. Remove the output wheel on the output shaft (if installed). Reinstall the screw into the output shaft.
2. Remove the four housing screws from the bottom corners of the servo.
3. Split the case at the line just below the gears and the mounting flanges. The servo case can also be split at the bottom where the wires enter. Try to avoid doing this since you don't need to and it's just one more thing to put together. The output gear will remove with the top of the case. The rest of the gears stay with the bottom of the case.
4. In the lower case, beneath where the output gear rested, you will see a gear with a brass, flatted shaft in the center with a white plastic clip around the brass shaft. This white clip is the coupling between the output gear and the position potentiometer on the other end of the brass shaft. The pot can be seen looking through the side of the transparent case. Remove the white coupling clip. This disconnects the potentiometer so that it will not turn as the servo output turns.
5. Some servo hacks require the pot to be removed and replaced by resistors. In this case, removal is not necessary. However, The pot must be moved to and locked into its center position. Do this by manually rotating the brass shaft to determine its limits, then rotate the shaft to the center between those limits. REMEMBER THE AMOUNT OF FORCE IT TAKES TO TURN THE POT! Later, after it is super glued, youll want to make sure it wont turn, but you do not want to put too much force on the shaft. Try to get close to the center, but extreme accuracy is not necessary. Your driving software will compensate for any offset by the value it uses for zero speed (which would nominally be a 1.5 millisecond pulse).
6. To ensure that the pot doesn't turn away from the center position, place a drop of super glue so that it will run down the brass shaft. CAUTION: be very careful not to get any glue into the ball bearing.
7. Let the super glue dry awhile and then verify the brass shaft no longer rotates. Turn with just a little more force than you needed above to turn the pot. Dont turn too hard or you will just break the super glue bond, and you will have to super glue again.
8. Using the screw in the output shaft (or any other suitable implement, press the output shaft and gear out of the bearing in the upper housing.
9. On the side of the output gear, you will observe a plastic tab sticking out. This tab, in conjunction with tabs on the upper housing, prevents the output shaft from rotating beyond the normal +/- 100 degrees. This tab must be removed from the gear to allow continuous rotation. (The tabs on the upper housing do not have to be removed.) Use whatever tool you feel comfortable with to cut it off. Wire cutters, a Dremel tool grinder and an Exacto knife were all found useful. Look at the gear from the side and insure that none of the tab protrudes above the level of the large gear, or out from the shaft. CAUTION: Wear protective eyewear for this operation. Particularly if you use wire cutters, the piece of plastic may fly off a very high speed.
In the photos below, the tab is present in the left photo, seen just above the gear teeth on the right side of the shaft, and the tab is removed in the right photo.
10. Press the output shaft back into the upper housing. Verify that it can now rotate freely.
11. This completes the standard hack for continuous rotation. If this is all you want, then reassemble the housing. Place the servo top upside down and place the proper white gear inside the top and below the installed gear.
INSTALLATION OF ENCODER
Observe the gear train on the lower (main) housing. The gear which is located at the bottom of the opposite end of the gear case from the output shaft has a flat shoulder on it about 0.2 inches wide. This is where the encoder will be installed. Reflective segments will be placed on the flat shoulder, and a detector will be attached to the inside surface of the housing at the side of the upper housing immediately adjacent to the shoulder. You should decide which side of the housing you want the encoder to be installed. As its pins and wiring protrude from the housing, the resulting bump prevents the servo from being mounted flat on that side. If you intend to mount two such servos on their sides to drive wheels on opposite sides of your robot, you probably want to put the encoder on one side of one servo and the opposite side of the other servo. This way, they can both lie flat while the drive shafts are both pointing either out or in.
12. Remove the gears from the lower half of the case (remembering where they go. They only work one way, but why have to figure that out again.)
13. Take the gear with the flat shoulder and clean it to remove all traces of lubricant from the shoulder area so that glue will stick to this area. We used warm soapy water and a toothbrush.
14. Cut a piece of aluminum foil, as wide as the shoulder and a couple inches long.
15. Use super glue to attach the tip of the foil to the shoulder in such a way that can easily and evenly pull the foil the rest of the way around the circular shoulder during the next step.
16. After waiting for the first spot of glue to dry, brush more super glue around the rest of the shoulder and pull the foil smoothly around and hold in place until the glue sets. Let it dry well.
17. Trim the extra length of foil, and any excess foil that may extend above the shoulder. Be careful not to tear any of the foil on the shoulder.
18. Reassemble the gears and reinstall the top housing (without putting the four screws in). Lay the servo on its side with the side on which the encoder is to be installed pointing up. Lay the detector chip on the side of the servo such that it is centered on the axis of the shouldered gear and is located between the gears above and below the shoulder.
19. Use your own favorite method to put marks on the servo housing where the four leads of the detector should pass through the housing. We used a piece of paper, and put four small dots at the correct spacing at the bottom of the reflector. Then we carefully cut out the center of the four dots so we could place the paper on the case side and mark the four spots.
20. Drill .040 inch holes (#60 drill) for each of the leads.
21. Insert the detector chip into the four holes from the inside of the housing. Bend pins a little on the outside to hold the chip in place. Note: In order to remember which pin is which on the chip after the housing is closed, we chose to always mount the chip with the bevelled corner facing toward the output gear. This will work on either side of the servo and facilitate wiring later. If you mess up or forget which way they are installed, no problem. One side is a phototransistor and the other an LED (diode) so reading and reversing your ohmmeter on all combinations will yield a low-one-way and high-the-other-way reading. When you have the positive (RED) meter lead on a pin where you got the low reading, the positive (RED) lead is now on the LED anode, and the other lead the LED cathode. From the spec sheet that comes with the sensor, the orientation of the phototransistor can be properly determined.
22. Reassemble the gears and upper and lower housings (without screws) and see if the chip is properly centered on the shoulder. It should be close to the centerline of the gear and not touching either of the two gears above and below it.
23. If it looks OK, apply a little glue down the holes from the outside to hold the chip in place.
Next, the foil on the shouldered gear must be modified to provide dark and reflective segments for the photocell to detect.
24. We divided the shoulder into 8 segments, 4 dark, 4 reflective. One method of doing this is to stretch a piece of paper around the shoulder, marking the length of the circumference on the paper. Then taking the paper, flattening it out, measuring the length of the circumference, dividing that by 8 and placing marks on the paper showing the divisions. The paper can then be rewrapped around the shoulder and the marks transferred to the shoulder.
25. You have several choices as to how to do the division. You can just cut out alternating segments of foil; leaving 4 foil segments alternating with 4 plastic segments. Or you can paint black paint over the foil for four alternating segments. Or, you can cut the foil off as before, and then paint the plastic segments black. We installed the foil, then painted alternate 45 degree segments flat black.
26. Reassemble the housing, install the mounting screws and the mechanical changes are complete.
The photo below shows the completed, painted 45 degree segments on the gear. Focus on the upper, left portion of the servo photo. You should see four vertical bands of color in the order black, silver, white, black. The white is actually a reflection from the camera flash in the silver section. The silver and white areas together form one of the four 45 degree silver segments. The black bands on the left and right are part of the 45 degree black painted segments on the flat side of the gear.
PREPARING THE ENCODER WIRING
Once the servo is reassembled, it is time to prepare the encoder sensor wiring.
27. Soldering the sensor pins are the most delicate part of this task. The pins are very thin, and they protrude very little from the case, so you have very little to work with. It is best if you use a low wattage soldering iron, or if yours has several settings, to go to the lowest heat setting, around 15-20 watts. Normal solder is usually much too thick, so get some of the thinner solder that usually comes in little plastic tube dispensers. Solder the four pins to four different colored wires. 24 to 30 gauge wire is best.
28. Once the wires are soldered, gently run the four wires down the side of the case in the direction of the main servo wire ribbon cable. We ran the wires in an S shape (see photo) to provide a little strain relief in the event the wires get pulled. Use a small piece of tape (electricians tape in the photo) to hold the wires in place temporarily.
29. Where the sensor wires meet the servo ribbon cable, use a small tie wrap to secure all wires in a bundle.
30. Next, remove the temporary tape, and use your hot glue gun to lay a covering trail of hot glue over the sensor wires. This does several things. It helps to physically protect the sensor solder connections, and it keeps the sensor wires running along the servo laying flat and out of the way.
31. You are now ready to wire and test your new encoded servo!