I am trying to build a robotic arm as a small project because I am new to this whole thing.
For starters I took the servo motor MG996R (what maybe was a mistake ) and ran into problems pretty quick. When I load the code that i used for the SG90 motors the motor, it just does weird things.
I figured it had something to do with the power supply of the motor because it still was getting its current from the Arduino 5V pin itself and that there might not have been enough Ampere etc..
When I connected it to another Power supply that I can change like i want I put it around 6-7V. But when I did that the wire got hot and there still was no sign of correct movements.
So whats the Problem here, do I need to buy better cables for these Servos to work?
And how do I provide a power source for multiple of these at the same time ? Are there any good and easy options to power multiple servos at the same time ?
Show us a good schematic of your proposed circuit.
Show us a good image of your ‘actual’ wiring.
Give links to components.
In the Arduino IDE, use CtrlT or CMDT to format your code then copy the complete sketch.
Use the </> icon from the ‘reply menu’ to attach the copied sketch.
Mostly likely you have an inadequate power supply. For that servo, you need a separate power supply capable of providing at least 3 Amperes. A 4xAA battery pack with fresh or fully charged cells will work for a short while.
#include <Servo.h>
Servo myservo; // erzeugt ein Servomotor-Objekt
// maximal können acht Servomotor-Objekte erzeugt werden
int pos = 0; // Variable, die die Servoposition (Winkel) speichert
void setup() {
myservo.attach(10); // an welchem Pin ist der Servomotor angeschlossen
}
void loop() {
for (pos = 0; pos < 180; pos += 1) { // von 0 bis 180 Grad, in Schritten von einem Grad
myservo.write(pos); // sagt dem Servomotor, in welche Position sich drehen soll
delay(15); // wartet 15 Millisekunden
}
for (pos = 180; pos >= 1; pos -= 1) { // und das gleiche zurück
myservo.write(pos);
delay(15);
}
}
It is a code that i copied to simply test the servos.
I didnt use the Breadboard for these as it seemed pointless for that exact reason it was just there because I used it for a joystick sort of thing earlier.
So I may have damaged my servos ? Hm that sucks but whatever.
And the wirres itself cannot lead to a Problem ?