Synchronize and control two DC parallax 360 servo motors

Hi! I'm working on a bio-inspired projet with 2 Parallax 360 servo motors and in order to have a straight motion these two motors must rotate at the same velocity in counter phase. I use the servo.h library, entering the input command with writeMicroseconds() but despite entering the same input value, the two motors have different velocity.
This kind of servo motor is characterized by an encoder.
How can I solve the problem and synchronize the motors? I try to write a control system in Arduino using as state target the rotation of one motor so that the other could follow him but I didn't get a good result.

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html .
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks... Tom... :slight_smile:

Emiliano_24:
Hi! I'm working on a bio-inspired projet with 2 Parallax 360 servo motors and in order to have a straight motion these two motors must rotate at the same velocity in counter phase. I use the servo.h library, entering the input command with writeMicroseconds() but despite entering the same input value, the two motors have different velocity.
This kind of servo motor is characterized by an encoder.
How can I solve the problem and synchronize the motors? I try to write a control system in Arduino using as state target the rotation of one motor so that the other could follow him but I didn't get a good result.

Do you mean the Parallax 360 degree feedback servos?

You use the feedback. The command you send is not controlling angle, it controls motor drive level. You read the feedback signal to keep track of the total angle and use a control loop to adapt the drive level to the two servos.

Its documented here: