View Full Version : Closed loop control of Dynamixel AX-12+ ?

03-06-2010, 04:49 AM
Hello everyone,

I'm currently working on a project that involving closed loop a simple robot arm, actuated by Dynamixel AX-12+ servos. My question is, how exactly do we perform a closed loop / PID control of these servos?
If it were just a simple motor, we'll simply control the input voltage/current to give us our desired control performance (settling time, damping, etc), whilst at the same time feeding back the the difference between the desired and present positions in order to minimise the positional errors.

There isn't a command to directly control the voltage/current supplied to the dynamixel servos; right now I feel that to perform such a control on these servos, I'll need to set them to the 'endless turn' mode and as mentioned in the manual, control the 'goal speed'.

Has anyone tried this method before, and can we still get positional feedback whist in the endless turn mode? I hope someone can share their opinion regarding this matter.

Thanks in advance!

03-06-2010, 06:13 AM
Yes, you can query an AX-12 in full rotation mode. I experimented with position feedback in full rotation mode a few years back. There is a 60-degree dead band (300-360) that you will have to negotiate. In addition, your software control will be a 100 times more complicated and timing intensive than simply taking advantage of the existing control system.

Dynamixels abstract the inner workings of the control system to make it easy for end users to drop a motor in their project. I would pick a different motor or use the existing Dynamixel control system as intended.

I suggest that you experiment with full rotation mode and come up with your own conclusion. Let me know if you need help.

03-07-2010, 12:45 PM
Thanks for the reply. Regarding the speed control of the Dynamixel servo, is it correct to say that it's controlled by pulse-width modulation?

From what I understand, by using PWM we're applying the same value of voltage and current all the time, but in pulses (switching on and off) to regulate the average power supplied to the servo. Contrast this with a simple resistive/potentiometer method where the voltage is controlled by varying the resistance in the system.

03-07-2010, 02:36 PM
No, the AX-12 uses a embedded system with an openly published instruction/status packet for angular positioning.

A standard servo uses PWM as a control signal to position the output shaft. The PWM signal does not power the motor! The V+ line powers the motor. The PWM control signal is compared to a one shot. The one shot's ON time is determined by a POT. The POT is mechanically connected to the DC motor's output shaft. The error is feedback into the control system and the motor moves to reduce the error.

03-07-2010, 02:52 PM
There are two PWM's going on in a RC servo. One to tell the servo the goal position and one used internally by its hbridge to control the speed of the motor without sacrificing torque.

An AX-12 uses PWM internally to control the speed of the motor, but it does not use PWM to tell the servo the goal position. Instead it uses a half-duplex serial connection with a protocol that is published in the AX-12 manual. http://forums.trossenrobotics.com/datacenter/robotis-19/ax-12-manualenglish-75/