I have just bought a MG90s tower pro servo for my school project and there is a problem. As soon as I connect my servo to the cnc shield or directly arduino, the whole arduino board turns off. I believe the motor is aking very high power. I even tried to power the motor with a 5v 2amps adapter, but still it turns off.I checked the resistance between the input wires and the wires to DC motor which was very high. As soon as I connected motor to external supply, there was a huge voltage drop. The voltage became almost negligible. DC motor was working fine alone. The servo hasn't even rotated for 1 degree. Please give me a quick solution as I am in a hurry for school deadline is coming. Should I buy a new servo or am I doing something wrong?
Please be quick.
Thank you.
Circuit diagram is below...]1
The code is below -
#include <Servo.h>
Servo name_servo;
int servo_position = 0;
void setup() {
name_servo.attach (9);
}
void loop() {
for (servo_position = 0; servo_position <=180; servo_position +=1){
name_servo.write(servo_position);
delay(10);
}
for (servo_position=180; servo_position >= 0; servo_position -=1){
name_servo.write(servo_position);
delay(10);
}
}