Reliably moving servos simultaneously?

I’ve got a Micro Maestro hooked up to two servos of the same model. (PowerHD 1501MG)
I need them both to move simultaneously.

I used the Control Centre to create a (1500ms, 2000ms), (2000ms, 1500ms) two-state sequence, with 1000ms/800ms delays between states.
When I run the sequence, the servos don’t reliably move at the same time. A video demonstrating;

I tried converting it to a script, but the behaviour is the same, even when the script starts automatically on power-up.

Is this considered normal?
Is there some recommended way of ensuring that servos move together?
I’ll next try to write a simple program to send serial commands, to see if that’s any better.
(Is there a reason why the Micro doesn’t support the ‘Set Multiple Targets’ command?)

Hello.

Thank you for posting that video. I have not tested the Maestro in an application like yours, so it’s hard for me to say if this is normal behavior. The sequence tab works by sending successive Set Target commands to the Maestro. Depending on the timing of the commands, one of the servo’s signals could easily change 20ms before the other, but that alone wouldn’t be enough to explain what you are seeing.

How are you powering the servos? If the power supply’s voltage drops significantly within 20ms of the first servo starting to move, then that could put the second servo at an even bigger disadvantage. I think I see a battery pack of some kind in the picture; is it freshly charged?

I suggest that you experiment with the Speed limit setting in the Status tab of the Maestro control center to see if setting a good speed limit can make the problem go away. I speed limit of 1 would almost certainly make the problem go away, but then the robot arm would move very slowly. It would be interesting to know how high the speed limit can go before this problem becomes noticeable.

(The Micro Maestro’s flash memory is pretty much full and there was less need for a Set Multiple Targets command because there are only 6 channels.)

–David

Hi David,

Firstly, the power source is a 4xAA battery holder, with alkalines. They might have a little less than a full charge. Measuring the power on the rail, it fluctuated from 5.3V no-load down to about 4V when both motors were moving. (using multimeter min/max)

Reducing the speed certainly seemed to help with reliability.
I think your power supply theory might be right; if I make the lower arm move rapidly, the upper arm will start to judder and move about on its own.
Any suggestions on a high-amperage 6VDC power supply?

As you might imagine, in practice the servos will be given many successive small movements to trace a linear path. The more they stay in ‘sync’ with one another, the faster I can move the servos, and the higher the performance.

Are the pulses to each channel all in the same phase?
If not, I guess it’s going to be impossible to guarantee that the motors move together. (As one motor will start moving before the other)
As you’ve said, the possibility of sequential “Set Target” commands going across a pulse boundary make it difficult as well.
Any other suggestions for making them move together? Would this be easier with a Mini 12?

I am not sure if it will help, but I suggest trying some 4xAA NiMH batteries. They should be able to provide more current. The nominal voltage would be 5.0 V, but it could be higher when they are fully charged. You can get them from us:
pololu.com/catalog/product/1003

No. For the Micro Maestro 6-channel controller, the servo pulses for each channel do not overlap; they are each transmitted during a specific time slot in the 20 ms servo period. On a Mini-Maestro 12, your servo pulses would be more likely to overlap, but it depends on how many channels you have enabled as servos and the current pulse widths.

I would be interested to know if you can get better performance by powering each servo from a separate battery pack. If you did that, I would think that this 20ms uncertainty would not be noticeable.

[quote]As you’ve said, the possibility of sequential “Set Target” commands going across a pulse boundary make it difficult as well.
Any other suggestions for making them move together? Would this be easier with a Mini 12?[/quote]

You might be able to get better performance out of the Mini Maestro 12 by using the Set Multiple Targets serial command, because that will guarantee that the pulse widths change in the same period. You would have to set the Maestro’s serial mode to “USB Dual Port” and write some software of your own to send that command to its virtual COM port.

However, I think the main thing you should do is use a speed limit on the servos.

–David

Thanks for your advice.
Once I have the power side sorted out (I’ll use a beefy power supply to ensure higher torque / reliability, and look at powering the motors separately) I’ll do some more testing and see how well it manages.

I’d be tempted to try and write some custom firmware to guarantee synchronised operation (support the Set Multiple operation, and start every servo pulse at the same moment) but that seems a bit extreme for now.