Struggling with servos

I’ve got an Uno board connected to a mearm. It uses 4 towerpro sg90 servos.

I’m guessing my problem is down to power but I don’t seem to be able to get it right.

I have tried many different configurations.

The best solution I have found isn’t recommended nor is it perfect but it is to run it off the USB port. This makes the servos function correctly but there is a lot of jitter when they idle and movement isn’t smooth.

I tied using the jack on the board and connected a 12V 6A supply, then connected the servos to the 5V output. This results in sporadic movement which doesn’t reflect what the servos have been programmed to do.

I’ve tried powering the board from 12V or from the USB port and then powering the servos via batteries. I initially tried 4 x 1.2V NiMh to give 4.8V but that again was sporadic so I tried 5 x 1.2V NiMh but that gave the same result. I connected the GNDs together when using 2 power supplies.

I’ve tried the servos individually with no improvement on the UNO. However I have tested them with a different board and they work fine with the other board (Not an UNO).

I’m using some code that came with the mearm and this allows control of the servos via two joysticks.

I’ve read quite a bit trying to find a solution - anything I’ve missed?

At the moment they are connected without any additional components. Do I need to add a resistor or capacitor in anywhere?

Powering the servos from 4 NiMh cells should work fine provided you have a connection between Arduino GND and servo GND.

Are the NiMh cells properly charged?

Don't power the servos THROUGH the Arduino board as they can draw too much current.

Make a pencil diagram showing all the connections and post a photo of it. Please don't do a Fritzing diagram or post a photo of the hardware.

...R

I tied using the jack on the board and connected a 12V 6A supply, then connected the servos to the 5V output. This results in sporadic movement which doesn't reflect what the servos have been programmed to do.

IS this a 12V 6A supply with a 5V USB output as well? USB is 0.5A normally.
You need a 5V supply of perhaps 4 to 6A output for four servos - you could measure the
max current consumption of one servo by stalling it (briefly - they overheat and die if
held stalled for a while) Then multiply by 4 and add a safety margin. Most reckon 1A
per servo is enough for standard servos. High torque versions may be 2 or 3A each though.

Robin2:
Powering the servos from 4 NiMh cells should work fine provided you have a connection between Arduino GND and servo GND.

Are the NiMh cells properly charged?

Don't power the servos THROUGH the Arduino board as they can draw too much current.

Make a pencil diagram showing all the connections and post a photo of it. Please don't do a Fritzing diagram or post a photo of the hardware.

...R

Yes the cells were charged properly, however I had made one mistake. I had left the analog joysticks connected to the same power strip as the servos , so they were taking external power - having moved that over it was better but still not right.

MarkT:
IS this a 12V 6A supply with a 5V USB output as well? USB is 0.5A normally.
You need a 5V supply of perhaps 4 to 6A output for four servos - you could measure the
max current consumption of one servo by stalling it (briefly - they overheat and die if
held stalled for a while) Then multiply by 4 and add a safety margin. Most reckon 1A
per servo is enough for standard servos. High torque versions may be 2 or 3A each though.

It was just a plain 12v supply from a plasma ball toy.

I've had a further play and having now made the power connection better by moving the inputs to the boards power supply I was able to make better tests.

I connected one servo at a time and rewrote the code to put in constraints for the values that could be sent to it to ensure correct operation.

I did the first one and tested it and it worked perfectly with no jitter, I connected up the next and did the same for that and had operation of 2 servos smoothly with very little jitter. The third went the same but when I connect the 4th they all start to jitter.

I've got a much bigger servo which was sitting spare so I connected that up in its place and I can operate 4 servos fairly smoothly using the battery power. However as soon as I connect that other micro servo up it all goes pear shaped.

Is it likely to just be a faulty servo or could I have somehow damaged it when messing with the power supplies?

Please read #7 and the rest below about posting problems for help. The servo could be damaged causing issues. Have you monitored the supply voltage using a multimeter while the issue is occurring? Below is how to power servos externally.

http://forum.arduino.cc/index.php/topic,148850.0.html

servo power.jpg

Thanks, I'm not sure I understand your reference to #7 in the forum rules however I will check the supply voltage.

Thanks for the diagram, it looks similar except for the pins that the servos are connected to.

I have them connected to 6,9,10,11 which were the ones in the sample code that came with the Mearm kit.