Go Down

Topic: Continuous Servo Control (Read 4522 times) previous topic - next topic

surspot

I found a continuous servo from Hitec (the HS-7955TG) and for the life of me i cant figure out how to control the speed of it using the arduino. It originally came with a potentiometer hooked up to the side of it, so in all there were 6 cables. a standard set of Yellow/Red/Black, that I imagine is how you do hobby programming of resolution if youre using their proprietary field programmer. Then the other set of 3 ran to a small potentiometer that controlled speed and direction depending on how far it was turned in either way of the roughly 270 degrees. What i would like to do (and please correct me if this is even possible) is send a signal from the arduino that might mimic the signal from the potentiometer so that i can accurately map it for control of the servo using a joystick.

Ive had this servo lying around from a friends leftover hobby supplies and id like to see if i can use this one because it has great torque and a decent speed. Ive tried writing everything from analogWrite, servo.write, servo.writeMicroseconds, and i cant seem to get the servo to react in any way. As a side test i powered the servo, and powered a spare potentiometer separately from the pwr/gnd coming out of the servo, then connected the signal out from the pot to the original cable for the signal on the servo, and got it to work just fine. so i thought it might then be possible to mimic that output from the arduino, allowing me to take any potentiometer input, remap the values for accuracy and output them to the servo.

the spec sheet for the servo lists these:
Pulse duration is from .9ms to 2.1ms with 1.5ms as centre. Pulse refresh is 50hz/20ms


an end all solution would be to purchase a 180 degree servo then modify it myself so i dont have to mess with trying to figure out this manufacturer's potentiometer business, but since i already had the servo, these tests are essentially free. If i left out any important info, please let me know.

thanks!

Chagrin

You would use the Servo Library; sending it a signal of "0 degrees" with Servo.write (or 900ms with Servo.writemicroseconds) will turn it full speed in one direction, and "180 degrees" is full speed in the opposite direction.

When you send it a signal for 90 degrees the servo should be stationary. If it's not THEN you use the external potentiometer and adjust it until it stops. To emphasize, the potentiometer is only there to fine tune the midpoint; in all other respects it's just like any other servo.

For the red/black/yellow wires on the servo, the red connects to 5V, black to GND, and the yellow to one of your digital pins on the Arduino (see the documentation).

surspot

brilliant! and for some reason the whole time i thought you needed the potentiometer to control the servo... shows how much i knew about continuous servos   :smiley-roll-blue: works like a charm now, thanks Chagrin!

Go Up