Hacking A Servo For Continuous Rotation
If you’re building a robot, one of the first things that you need to
think about, is how you are going to propel it. There are many different
choices for this, including fans or propellers for a boat robot, props or
turbines for a flying robot, or legs for a walking robot. For those of us
who are making a wheeled robot, sometimes the task of getting geared
motors, making our own gear boxes, and setting up driver circuits
can be a bit overwhelming. So what do you do? Well, many people have found
the answer to this in the servo.
What is a servo? A servo is a box, about
1 1/2" by 2" that has 3 wires coming from the bottom and a shaft
coming out the top. Inside the servo is a controller board, feedback pot,
and a motor. Generally servos are using in model airplanes, for the
throttle and flaps. But the biggest problem with using servos in robotics,
is that they don’t turn in a full circle. Most servos have about 100 to
180 degree turn angle.
The pot turns with the shaft and tell the feedback
circuitry to stop when it reaches a certain point, also there is a tab
which prevents the shaft from turning 360 degrees or more. There are many
different places you can get servos, but one of the best places, in terms
of selection, is Tower Hobbies.
Servos can range in price from $9.99 for the Futaba 3003 servos from Tower
Hobbies up to $90 for ball bearing with loads of torque.
Servos are
controlled by a stream of pulses. This can be done with a Stamp quite
easily using the pulsout command or from an OOPic using the oServo object. The black servo wire is ground, the red
is positive, and the white is the control wire. Generally they are powered
with 4 to 6v, but you should make sure first. For the servos to work
properly they should have a common ground between the "-" servo
wire, and the "-" power terminal on the Stamp or microcontroller (I just hook it to
the "-" terminal on the battery). DON’T MIX THIS UP!! Doing so,
can effectively shoot upwards of 15v through your processor. Although the
Stamp manual says it can handle this, mine was fried when this happened.
To actually modify the servo, you first need to remove the top cover. Do
this by removing the long screws from the bottom of the package. Now take
the top off. You should now see a gear train with a large shaft at the
end. This is the shaft that the wheel or servo horn directly attaches to.
Take off this shaft. When you look at the underside of the shaft you
will see a "+" molded into the underside of the shaft. The tip
of the pot that is coming out of the servo fits into this "+"
and turns with the shaft. Our first task is to stop the pot from turning.
To do this take a drill with a bit about the size of the hole underneath
the servo shaft. Now drill out the "+," so there is as little
left as possible. The underside of the main shaft should be a tube without anything to cause the pot shaft to turn.
Now take a pair of nippers, Dremel tool, or a Xacto knife, and cut off
the plastic stop tab. Please wear some eye protection when
doing this because that little tab pops off like a bullet. I wouldn’t
recommend filling it down, because the grit may foul the gear train.
Next we need to establish the center pulsout command. Generally 150 is a
good center position. Enter the code below into the Stamp programmer.
start:
pulsout 7, 150 ‘7 is the pin that is being pulsed, and 150 is the pulse
goto start
Now, turn the pot shaft till your servo stops turning. The servo will now stop when you enter 150 go forward when its below 150, and backward when its above. Next put a drop of glue on the pot shaft to hold it in place. Don’t put the servo shaft on until the glue is fully dried. Once the glue has dried put the top and shaft back on. Now to test your servo enter the following in to the Stamp programmer.
x var byte
start:
for x = 1 to 300
pulsout 7, x
next
for x = 300 to 1
pulsout 7,x
next
goto start
Download and run
the program. If you servo and Stamp is properly set up then your servo
should start fast, slow down to a stop, reverse and gain speed, slow, and
repeat the process. If so, Congratulations!! You now have a working
propulsion system for your robot. There are many different type of wheels
and add on that you can get at your local hobby shop, or at Tower. I just
glued on some LEGO gears and wheels on my servos.
If is doesn’t work, CHECK AND SEE THAT THE STAMP IS HOT, then make
sure you giving it the right voltage, that its grounded to the stamp, and
that the stamp is putting out the pulse. Is this still doesn’t solve the
problem e-mail me or your robot e-mail loop of choice.
BASIC Stamp is a registered trademark
of Parallax, Inc
Read Similar Posts:
TrackBack URL



October 30th, 2008 at 8:43 pm
thanks, it worked on a vex standard servo.