View Full Version : AX-12 Servos with Arduino

01-23-2012, 05:25 PM
Hey all,
I've been trying (unsuccessfully) to control the Dynamixel AX-12 servos with an Arduino Uno. I've been using this Serial libraryhttp://savageelectronics.blogspot.com/2011/08/actualizacion-biblioteca-dynamixel.html, but it isn't working with me. When I try to tell it to move with "Ax12.move(1, 512)" the light on the servo just blinks at me. So is it correct to assume that the blinking light means that the servo isn't understanding the message? And how would I have to change it to understand?
My whole code:

#include "Dynamixel_Serial.h"

void setup()

if(Ax12.ping(1) != 0)

void loop()
Ax12.move(1, 512);

01-23-2012, 06:21 PM
Did you add the 74LS241 logic IC to turn the full-duplex UART of the Arduino Uno into the half-duplex UART of the dynamixel bus? If you don't find the schematic on his site, it is definitely located in the AX-12.pdf datasheet on the Dynamixel product page in the trossen shop. Without the external circuit, you would have to use the software trick like the arbotix (short the TXD and RXD pins together, then enable the TXD circuitry and disable the RXD circuitry during transmission and reverse it during receipt).

01-23-2012, 06:28 PM
Yes, I do have that set up exactly as it is shown on the website. That is why I'm so puzzled.

01-23-2012, 06:48 PM
To add to the puzzlement, I can use the "Ax.12.ledStatus" command to turn the LED on and off reliably.

01-23-2012, 06:59 PM
What are you powering the AX-12's with? I initially tried to use NiMH 9V batteries for getting the basics working. I had one of one brand that would work, and the other brand wouldn't wouldn't (and it took a week for me to think of trying to use the former)... it was probably a problem of the batteries not being able to supply the current needed.

01-23-2012, 07:54 PM
I actually just had that same thought about half an hour ago! That would seem to be the only logical answer. I was just using a standard 9V, just because that's what I always use, not even thinking that it was the battery's problem.

01-24-2012, 10:31 AM
If you're going to be using AX-12's, I'd definitely recommend a 3S Lipo and a 3S battery monitor and a good charger. Ya, it's an investment :)