Problems with Servo Example

Hi all,

Sorry for my poor English, I'm just a silly russian bear :blush:

I'm playing with official Arduino Uno + Sensor Shield + One servo + W8 64bit + Com5 port and I'm trying to run a sketch from Examples/Servo/Sweep. This is what I've got:

IDE 1.0.4
The servo works fine for about 4-6 cycles then totally stops or goes crazy to one side. After this unplanned behavior the servo starts work fine for the next 4-6 cycles.

IDE 1.5 and all newer versions:
The servo always moves chaotically, it looks like the random skipping of delay values. On each servo turn, the onboard LED blinks a bit.


Is there any solutions how to fix this?

Thank you.

If you are powering a servo from the +5V pin, don't do that. They can easily draw more power than the Arduino can provide causing resets and other glitches. Servos generally need 4 to 6V power and may draw as much as 1 Amp.

If you are using a separate power source for the servo I would suspect a wiring error. RED goes to the + side of the power supply. BLACK goes to the Arduino GROUND and the - side of the power supply. WHITE/YELLOW goes to your Arduino output pin.

Thank you, johnwasser.