SG90 Servo Issue

Hi… Im facing an issue with my sg90 servo… Im currently making a obstacle avoidance robot and wanted to test the motor but its acting abnormally/irrationally. Apart from the code not working, it is also behaving weiredly whenever i touch the connection between the female wires of the the servo and the male jumper wires(connecting to the arduino).

I have not connected any additional component… Have given 5 volt usb supply to the servo from the IO pins…But havent got any idea for the malfunction.

BTW im a newbie… So plz keep your comments simple…

What do you mean by "the IO pins"? The normal digital pins can only handle 40mA max current...and that's nowhere near enough for a servo. Please say EXACTLY what pins you have the servo connected to.

Even the 5V power pin cannot really provide enough current for a servo though you might get away with it for a small servo like the SG90 if there is no real load on it. You should really power the servo from something like 4 x AA batteries not from the Arduino.

Steve

Have given 5 volt usb supply to the servo from the IO pins.

Don't do that, you will damage your computer and/or the Arduino.

Use a separate 4xAA battery pack for the servo, and connect the negative battery lead to the Arduino ground.

5v was provided from the power pin and the io pin was just used to control the motor... as for the problem,this is the link to the video

https://drive.google.com/file/d/1t8IoSd1u3_RY8CQ55SCttV2GbK3_l8Js/view?usp=drivesdk

Even if i disconnect the io pin, the servo still rotates provided that i press the connection.

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

It looks like you have a faulty connection in one of the two leads supplying power the the servo.

The servo will jump about like that if just power is applied, erratically.

The jumper wire pins may not be thick enough to make good contact with the servo socket contacts.

Thanks.. Tom... :slight_smile: