problem with servo

When I attached the servo as said in this tutorial:
http://playground.arduino.cc/Learning/SingleServoExample
,I encountered a problem. As soon as I connect the servo, either it keeps on rotating continuously or the Arduino gets disconnected from the computer.

Any help is welcome

130209-001340.jpg

As soon as I connect the servo, either it keeps on rotating continuously or the Arduino gets disconnected from the computer.

If the servo in the second picture is your servo, it probably requires more power than the arduino can supply to it. You probably need an external power supply for your servo.

I applied.
Connected the ground from the servo's GND to Arduino's GND & the GNd of my 9v cell.
The 9V cell's VCC goes to the servo's +ve terminal.
Still I have the illogical, serial data independent complete rotation problem. Though the Arduino doesn't get disconnected now.

Below is a typical servo power setup. All the 9v battery is doing is wasting your $$$. It may also damage your servo. Use 4 1.5v rechargable batterys to get ~6v or a wall powered 6v supply.

Thanks; it worked with 6 volt :Ds. But why it was troubling with 9volts? I thought it have an internal pullup resistor in the circuit! :~

dattasaurabh82:
Thanks; it worked with 6 volt :Ds. But why it was troubling with 9volts? I thought it have an internal pullup resistor in the circuit! :~

If "it" is the servo, most servos are rated for 4.8v-6v operation. Higher voltages may cause erratic operation or damage the servo.

So initially when I was driving it from the board, it current was the limitation? hmm; got it now.

Hey , i am facing a similar problem , i have given a 5volts (stepped down from 12 volts ) to the board , the 9g servo runs properly but i have a 60g avionic servo , if i connect it in the same way and try ,the servo starts once and then stops , also can someone explain the improper rotation with these servos , i am really out of ideas and a bit frustrated .( i used the library , sweep sketch )

Sanath, I'm not sure from your description how you have it wired- do you have the servo getting power from Arduino or its own power as shown in zoomkat's picture?

My starting point for any servo "funnies" has become: give the servo its own power even if it's a small servo, and see if the problem goes away.