Go Down

Topic: Running Dynamixel on Arduino Due (Read 3 times) previous topic - next topic



I am a robot enthusiast and have been working on arbotix controller for the past 6 months. As you may know, the robotcontroller can readily talk and control dynamixel motors. I am stepping up my project now and am needing a faster processor. I came to know about the arduino due and am interested in working with it. However, i am not sure if i will be able to control the dynamixel motors from the due. Not sure if it has the 3 pin ttl ports to control the motors. Can someone please clarrify. and if yes, what needs to be done other than using the bioloid and ax-12 libraries. Any help is much appreciated



The Due does not have a TTL output, so if you want one or three then you need to buffer the output.


I am using the Mega to control two MX-64T servos. I see no reason why it cannot be used on the Due in the same fashion.

Here is how it's done. First, the AX-12 library didn't work. You can still #include it to get the #defines. However, I just copied the #define block and changed the compliance constants to the PID values in the correct registers. Next, copy the AX routines for register read8, write8, and write16 to appropriately name functions in your sketch. Once you have these written, you can create other functions by just writing to the appropriate registers. You won't need that many.

On the hardware side, the Mega serial1 port is used with the baud set to 57,600, the servos default. You can go much higher but I had no need to do so, therefore, have no idea where the upper limit lies. The servos have a specific set of baud values set by a series of constants. The match is not perfect but within the tolerance of RS232.

There was also a strange problem in the wiring of the half-duplex line. Fortunately, it can be fixed with a single 1K resistor. I found that I could talk to the servos but not receive any data back. The problem is that the sender in the servo cannot overcome the pullup effect of the Mega TX1 line. This can be solved with a 1K resistor between the Mega TX1 and RX1 pins. The 1K is then in series with the TX1 line going out but the input impedance of the servo receiver is high so no net effect. On receive, the 1K resistor is a pullup which the servo can overcome.

My application is a stable platform for aerial photography so I need only two servos, roll and pitch. The tilt signal comes from an ADXL345 accelerometer breakout board on I2C. The two servos are daisy chained and fed through a single cable. I like the Dynamixel servos due to their high torque, absolute position sensing, high angular resolution, and digital communication.


I think that I can help you with your problem. There is a new board called CM-900 is from ROBOTIS (Bioloid, Darwin-OP) and they are giving this board for beta-testing you just need to pay the shipment to your place!
Enter to this forum:


Create an account and ask for one! you only need to explain one of your projects and they will send it to you :)
Hope it helps! it's a good option for Ax and Rx/Mx Dynamixel series.


I have been playing around with trying to use an Arduino Due to try to control some Robotis AX-12 servos.  I am currently trying it by using an AX-12 CDS55xx Driver board by DFRobot (http://www.dfrobot.com/index.php?route=product/product&filter_name=dynamixel&product_id=579#.UUisLsrCs3g)

I am not sure if their board will try to drive the RX line at 5v or not, but I am going through a TTL Level converter chip on my Shield.

The problem I am running into is I don't believe the USARTs on the Due can run the Dynamixels at their full buss speed of 1000000.
That is, if I understand the baud rates on the Due, when  I ask for a baud rate of 1000000, the actually generated baud rate is: 84000000/(n*16). Best fit n=5, so actual baud rate is: 1050000 so off by about 5%,
which is not close enough.  I believe the spec for the servos is it can handle a delta of up to 3%

I believe if I wish to continue down this route, I could potentially reprogram the servos to run at a baud rate of 666666, as you can set the baud rate to 2000000/(n+1).  On the Due, the closest to this would be I believe on the due to the nearest  baud rate would be  at 656,250 or ((656250-666666)/666666)*100=-1.56% which may work...

Suggestions?  Also my quick look over the the Due code base, my impression is I may have to fiddle with the Baud rate I pass in as I think it only truncates a division of the baud into the CPU speed.  It does not do any rounding...


Go Up