Continuous Servo only spinning one direction-HELP!

So I have two different continuous servo motors, a HSR-1425CR and a Parallax continuous rotation.

I am trying to get just one to work with my arduino pro mini, but no matter what size of pulse I give them, or whre I set the pot on the Parallax, they only spin in one direction. I have tried any pulse size from 0.8 ms to 5.5 ms, mostly trying around the 1.5ms range, but still it spins only in one direction. I have powered the servo with a 9v battery through a 5v voltage regulator, and am sending the pulse with a peak to peak voltage of about 5v from the microcontroller.

How can I get them to spin the other way?
HELP!

do you have a scope or frequency meter you can use to determine the frequency of the pulses you are sending?

You want to start with a pulse of 1.5ms duration every 20ms, which is a frequency of 50hz.

this is neutral… servo stopped or very close to it. CW or CCW is just a few tenths of a ms from this. START with this.

what is the chip part number on you arduino, what is its crystal/oscillator frequency, and what is the clock divisor set to?

A bad, malformed, or corrupt pulse signal can make servos travel in one direction.

I have programed the arduino to output the following:
for (int i = 0; i<=200; i++)
{
digitialWrite(servopin, HIGH);
delay(1.25);
digitalWrite(servopin, LOW);
delay(18.75);
}

which should turn it one direction,

for (int i = 0; i<=200; i++)
{
digitialWrite(servopin, HIGH);
delay(1.5);
digitalWrite(servopin, LOW);
delay(18.5);
}

which should not spin it, and

for (int i = 0; i<=200; i++)
{
digitialWrite(servopin, HIGH);
delay(1.75);
digitalWrite(servopin, LOW);
delay(18.25);
}

which should spin it the opposite direction.
but it just spins one way at a constant speed for all three.

is there another way that I should be doing this?

I think that I would probably take some time and establish that the digitalWrite() function will really change the state of the pin you are trying to change, and that the delay() function is actually accurate and provides the amount of delay yopu have requested. the simplest way I can think of to do both tasks would be to connect an LED to the pin you have driving the servo and write a loop that sets the pin high for 500ms and low for 500ms. then count the number of times the LED flashes in say 1 minute’s time to see if you are really getting 500ms delays.

I connected the microcontroller to an oscilloscope, and it is outputting the correct voltage and siginals (if I request 1.5 ms high and 18.5 ms low, I get that). But still the servo only turns in the one direction. I have tried to vary the duty cycle, but it always just turns in one direction at a constant speed.

the arduino microcontroller is a pro mini - I dont see a specific part number or anything.

if it looks correct on a scope then I’d probably go for another servo to eliminate the possibility the servo didn’t get modified correctly. a replacement servo to test with doesn’t have to be continuous rotation though, a normal servo should go for the 0 degree position at 1.5ms pulse in 20ms frame. another way to test the servo would be to put it in a standard r/c receiver and see if you can control it’s operation from a radio.

Just a hunch, but try checking to see if the ground is connected from the board to the servo. If the ground is not making a good connection then weird things can happen…

1 Like

acutally yeah that was the issue…I was powering the microcontroller from a 9v battery, and the servo by a second 9v…so I created a common ground (connecting the two negitive sides of the batteries) and it works perfectly.
Thanks!!!

1 Like

I still got it!!! 8)

Now you know why we ask for pictures of the wiring when answering these sort of problems. I’m glad you got it going. :smiley:

:unamused:

@robotdude This saved me! I’ve spent 2 days trying to figure it out. I wish you all the money and luck imaginable!

1 Like