Servo motor problem

I’m using 6 servo motor and i’m connect the arduino with power supply 5v 3A and connected the servo motors with extrenal power supply 5v and 10 A but when i try to move the motor simultaneously didn’t work well if i play with more than 2 servo motor.
Servo motor used :
Mg996r 2
FS5109M 2
Ds319Mg 2
And for programming i use the normal library servo.h
With servo.write();

The problem is if i use more than 2 servo motor the system doesn’t work well at all and i can’t get any stable motion , can anyone help me?

What exactly does "didn't work well" mean? Do all servos move? What are they doing that is not what you expect?

Please post the code you are using and a circuit diagram showing how everything is connected.

Steve

Is the servo power supply ground (- terminal) connected to Arduino ground and Arduino power supply ground?

Assuming you have the ground in place as asked in #2, and that 10A is enough for those 6x servos, I'm going to take a wild guess that your code (unfortunately invisible to us, see #1) is not co-ordinating the movement among the servos to "get any stable motion".

I've never tried to co-ordinate 6 servos, but I imagine it's quite tricky. My guess is there's a lot of blocking in your code, where maybe you wait for one servo's movement to finish before the next one starts. That will make the motion of your device (whatever it is... maybe a walking insect thingy or an arm with a grabber?) very jerky.

Solution to that (but as I said, in the absence of seeing your code it's a guess) is to redo the code to share out the movements across the servos in short slices of time.

But let's wait until you provide more details.

#include <Servo.h>

Servo servo1;
Servo servo2;
Servo servo3;
Servo servo4;
Servo servo5;
Servo servo6;

int i = 0;

void setup() {
servo1.attach(2);
servo2.attach(3);
servo3.attach(4);
servo4.attach(5);
servo5.attach(6);
servo6.attach(7);
}

void loop() {
for (i = 0; i < 180; i++) {
servo1.write(i);
servo2.write(i);
servo3.write(i);
servo4.write(i);
servo5.write(i);
servo6.write(i);
delay(10);
}
for (i = 180; i > 0; i--) {
servo1.write(i);
servo2.write(i);
servo3.write(i);
servo4.write(i);
servo5.write(i);
servo6.write(i);
delay(10);
}

}

with arduino mega and power supply for mega 5v and 3A and external power for servo motor and the ground is common between Arduino's power supply and servo's power supply.

Looks to me that should work ok for any number of servos in principle, so I reckon you don't have enough current if it stops working after 2 servos.

I wonder how it's all physically hooked up? The power supply might be willing to provide 10A but if you eg have it all on breadboard, that might be the problem.

i'm use this for power instead of breadboard.

item_L_43476517_1fc3e9c530c2c.jpg

Perhaps it's time you got your meter out and checked the voltage available at each servo and checked the total current draw.

Just to be certain though, you have a set-up something like this and the power for the servos can provide 10A?

i check it now with Ammeter and the voltage , current provided well.

How much current is being drawn when all the servos are moving (or trying to :wink: ) at once?

Can you snap some pictures of your project and post them here?
Often that helps us identify problems in your physical connections.

Hi,

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html .

Thanks.. Tom... :slight_smile: