Controlling an AX-12A servo with an Arduino UNO

Hi there,

I recently bought an AX-12A after checking the overall specs. Naive as I was, I thought it would simply involve me plugging it in like I do all other servos (i.e. PWM).

I was wrong - looking at the datasheet and a few websites it looks like it communicates using some kind of serial protocol that is 1MBps. There is a controller available for it but it seems to be unavailable (and over 100$).

Is there a way to send/receive serial using just one of the standard Arduino UNO ports at this speed? If so - how? Alternatively, is there some inexpensive chip/IC/interface I can put in between? I should mention I am constantly using the RX/TX ports already for various reasons so if they're in any way related it might not work. It seems like a pretty simple problem overall so I hope so.

Finally - if none of the above work, are there any high resolution servos that will work seamlessly with the Arduino UNO and that don't cost more than 50$?

Thanks a lot!

http://savageelectronics.blogspot.co.uk/2011/08/actualizacion-biblioteca-dynamixel.html seems to be a library for it.

Finally - if none of the above work, are there any high resolution servos that will work seamlessly with the Arduino UNO and that don't cost more than 50$?

What do you consider high resolution? Some previous post concerning the AX-12A.

https://www.google.com/search?as_q=AX-12A&as_epq=&as_oq=&as_eq=&as_nlo=&as_nhi=&lr=&cr=&as_qdr=all&as_sitesearch=http%3A%2F%2Fforum.arduino.cc%2Findex&as_occt=any&safe=images&tbs=&as_filetype=&as_rights=

Hi zoomkat,

Thanks for your response.

High resolution would be more than 0.5 degree accuracy and similar repeatability.

I checked many of those posts before posting here and most were addressing multiple AX-12A on an Arduino mega. I just want to control a single one on a UNO.

Best aedr

Hi MarkT,

Thanks - I had previously seen this but didn't pay attention to it because it was in a foreign language.

It seems like this one requires a 74LS241 on top of the Arduino. Should I assume there's no way to directly interface the Arduino?

Best aedr

Hello,

i have a problem with the library from the savage site. I downloaded it inserted it in my library folder and started an example program. But the arduino software does not seem to to recognize the library. Other programs work, other libraries that i inserted aren't recognized neither, and yes i tried to reinstall it and checked if it was the right folder. Is there any different mistake that i may have done? Thanks a lot for helping!

SandroV

There is a useful description of the dynamixel protocol here

http://www.servomagazine.com/uploads/issue_downloads/Unwinding_the_AX12.pdf

I implemented the recommended half-duplex circuit using a 74HC04 and 74HC126 as shown in the AX-12 documentation. I'm able to successfully control my AX-12 servos (with full 2-way communication) using the hardware serial port and the standard Arduino Serial library.

I've been running the serial port at the default 1M baud and have error free transmission and reply. I have not seen a single transmission or receive error in several days of testing (and yes I do check the packet checksum to detect any errors). Looks like the Arduino can handle 1M baud with no trouble.

I'm using a Mega but I expect Uno's or Nano's will work just as well.

jwahaus: I implemented the recommended half-duplex circuit using a 74HC04 and 74HC126 as shown in the AX-12 documentation. I'm able to successfully control my AX-12 servos (with full 2-way communication) using the hardware serial port and the standard Arduino Serial library.

I've been running the serial port at the default 1M baud and have error free transmission and reply. I have not seen a single transmission or receive error in several days of testing (and yes I do check the packet checksum to detect any errors). Looks like the Arduino can handle 1M baud with no trouble.

I'm using a Mega but I expect Uno's or Nano's will work just as well.

Do you mind to share your code? I would like to make my own code but not so sure how to use the hardware serial