I am having trouble getting my servo motor to work. I have the correct wiring done (Brown- GND, Red-Vcc, Orange- PWM Arduino PIN).I then uploaded the 'Sweep' example on the arduino and made sure that orange wire is connected to pin 9. It does a clicking noise. I have read online that I may need an external power supply so I used 4 x 1.5V batteries giving out 6V and connected it to the servo red pin and it does the same clicking noise.
P.S. This is the first use of this servo - MG995 Tower Pro
I am using an Arduino MEGA 2560 powered through USB port
You must have the battery GND connected to the Arduino GND.
If you have the GND connected then it seems as if the gears in the servo might be locked up. When the power is disconnected it should normally be possible to move a servo arm very slowly with your fingers. If it does move then set the arm at the mid position and try it with the Arduino again.
It would be a good idea to have a second servo for comparison.
You need a separate power supply for the servo, do not use the Arduino 5V line it cannot provide enough
current and you risk pulling it down below 5V and resetting the Arduino or triggering USB port shutdown
in the host computer. Common the grounds.
In my case, I used MG996R servo. At first, I used 4x1.5V Alkaline Battery but the servo has some sound inside it and move a little, and after that cannot move at all. Next, i used AC-DC Power Adaptor (output DC 3V -12V and current 1200mA. I chose 6 V and now it works. But sometimes the servo jitters, i think it is because of the noise.