servo issue. just wiggles back and forth

i hooked up my servo per the specs on the website.

Red -5v
Brown - Grnd
Orange - arduino Digital pin 9

tried to load the sketch for the "sweep". no go. it jiggled a little then nothing.

connected a potentiometer per the specs:

outside pin- Left - 5v,
outside pin Right - Ground
center pin (sweeper pin) Arduino analog 0

when i spin the pot, it usualy just wiggles realy fast back and forth.
i got it to move a little by moving the pot slowly, but then it also moved more when i touched the 5v wire with my hand....

so i though, ok bad pot. so i tried the following.

series of set value resistors.
decade resistor box - "dial a resistance"

same response, no steady spinning... so ok, whats wrong.

so i wrote this.

myservo.write(10);
delay(15);

myservo.write(20);
delay(15);
myservo.write(50);
delay(15);
myservo.write(70);
delay(15);
myservo.write(100);
delay(15);

just wiggling back and forth,

Tried it with external power and from the USB only.

WHAT IS WRONG????

:frowning:

which servo do you use?
are you sure that the colors match? Different vendors use different colors.

outside pins - 5v
center pin (sweeper pin) Arduino analog 0

For a pot, you must connect one outer pin to 5V and the other to 0V (Ground), then connect the middle pin to Analog In 0.

ok- the pot issue makes sense... buy why would i not be able to tell the servo what position to go to by specifying it using the myservo.write(x) ?

i am using an SG-5010 made by TowerPro. i got it from sparkfun electronics.

You need to connect 1 end of the pot to +5 and one end to ground to get a 0-5V output on the wiper. Do you have a multimeter you can check it with?

Did you try putting the servo on its own power supply? Some of them draw a lot of current, and it may be overtaxing the Arduino's regulator.

Ran

its almost like the servo is getting random positions. it shivers / jiggles like an old mans hands.

can you increase the delay time, maybe to 1000 instead of 15... is it still wiggling?

And why aren't the colors red, black and white? Seems like you got the version with the JR connector? Did you open the servo and modify it?

1 Like

i dont know what a JR connector is.

i did not modify in any way.

Those delays of 15 milliseconds in your "loop()" code are rather short. Have you tried making them much bigger, more like 1500ms? Some servos respond rather slowly, especially compared to the execution speed of a program. Remember that there's no way for the Arduino code to know when the servo arm has moved to the commanded position (i.e. there's no feedback to the Arduino).

Heyyy!!!

I have the same problem but mine jost goes forth for i don't know 5 steps and then nothing it doesn't respond to POT an whats with "Seems like you got the version with the JR connector? Did you open the servo and modify it? "

I had this same issue with the sg-5010. It turned out at the my old ibook wasn't supplying enough power to the arduino. When I threw my multimeter on the 5V pin, I was only seeing around 2.5v to ground.

I ended up adding a powered USB hub (with it's own power supply) and that fixed the problem.

Hope this helps.

I have the same problem with the same servo. I've checked the voltage at the pin and it's 5v. At first the Sweep example worked, then when I started changing it it started wiggling back and forth. I reloaded the Sweep example and now it doesn't work either. great. Ideas?