SG90 sounds, but no movement

Greetings!

Trying to do a mini project with just my uno and a microservo SG90. Only problem is the servo isn’t moving. I can hear something going on towards the bottom of the servo, but it doesn’t move. This sound is like an electrical hum. Any solutions or do I need to buy a new one?

Welcome to the forum

Please post the sketch that your are using, using code tags when you do. How is the servo powered and does it have any load on it ?

The servo is just hooked straight up to my Arduino, to the 5V pin. I’m working off of the basic Servo sketch (to test it before I begin the project)

That is not a sensible way to power a servo dues to the current requirements of a servo but should be OK for short term testing

Exactly which sketch are you using and which pin is being used for the servo data ?

Okay so should I have this project running for a few days on end, I’ll switch to an external source of power.


This is the sketch I’m using (came with the arduino kit), and it’s attached to pin #9

Did you miss the request to use code tags when posting the sketch ? You will, of course, read the advice from the following link to which you were directed when you joined the forum

https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum

In my experience the easiest way to tidy up the code and add the code tags is as follows
Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.

But the code shouldn’t be the issue, it’s a hardware problem. This is Arduino’s code.

Also thank you for such speedy replies, I never expected someone would get back to me this quickly.

1 Like

The code did not originate from Arduino. See the first comment in it. It is probably not the problem but it does worry me that the comments don't match the code. That is never an indication of good code

Ok I’ll tidy up the code. In the meantime, what do you think could be wrong with the hardware.

Also a little boneheaded on my part, I thought Elegoo and Arduino are the same.

It does sound like you have a bad servo

That is very likely to damage the Arduino. Power the servo separately (4xAA battery pack works), and don't forget to connect the grounds.

So are there any simple fixes or should I just replace it?

The servos are cheap. Buy a new one. If the first one turns out to be OK after all then you have a spare

If you are feeling adventurous then take the one you have apart and look for problems, they are simple enough

1 Like

Simplest fix: READ post #11.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.