Results 1 to 3 of 3

Thread: Dynamixel control using nothing but an Uno

  1. Talking Dynamixel control using nothing but an Uno

    Hi! This is just something I'm playing around with, but I thought you guys might be interested. Basically, I'm working on direct control of Dynamixel servos (I'm working with AX-12As, 18As, and XL-320s) from an Arduino Uno using a single digital pin per set of servos, with absolutely no additional hardware/chips/anything. Right now I've got reliable back-and-forth communications with a single AX-12A at 1,000,000bps. Note that this does not use the single available hardware UART, so you can run it while connected to a host computer. I'm implementing this having previously controlled the servos from a Mega 2560 with custom Dynamixel libraries, where I was using the bonus hardware UARTs with an external buffer to drive AX-12s and XL-320s simultaneously: the idea here is to duplicate that functionality with an even simpler (and cheaper) set up.

    This is essentially just a specialised implementation of software serial, with the send/receive code written in inline avr-gcc assembly and tuned to run at precisely 1mbps. This speed turns out to be a sweet-spot for the technique: at 16MHz there are 16 clock cycles to play with for each pin read/write, which is just enough to get the job done without wasting too much time waiting for pulses to arrive. This is all possible because the Dynamixel protocols don't allow the servos to fire off packets without a request being sent first, so there's no need to be watching for input at all times.

    Anyway here's a shot of a ping working. Channel 0 is obviously the serial line, you can see the outbound ping instruction followed shortly by the response. Triggering the send to having the response in a buffer takes around 0.2ms (dependent on how the servos are configured), with interrupts being blocked for a chunk of that (and much longer the receive falls through to a timeout). Channel 1 is just another pin I'm using for debug/analysis

  2. #2

    Re: Dynamixel control using nothing but an Uno

    with the send/receive code written in inline avr-gcc assembly
    That's hard-core! I like it!

    Pretty sure millis() and micros() and other Arduino framework utilities will go drifting off while you keep interrupts disabled, but with this low-level approach, you probably aren't particularly dependent on those anyway :-)

  3. Re: Dynamixel control using nothing but an Uno

    Pretty cool !Do you intend to do something specific with it, or is it more for the challenge/fun?
    Personal blog:
    USB2AX documentation:

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Dynamixel torque control using N.m
    By Roque in forum DYNAMIXEL & Robot Actuators
    Replies: 6
    Last Post: 09-11-2016, 11:51 AM
  2. Question(s) Control Dynamixel MX28R via rs485
    By tony0 in forum DYNAMIXEL & Robot Actuators
    Replies: 0
    Last Post: 07-11-2016, 04:01 AM
  3. Replies: 7
    Last Post: 01-10-2016, 03:14 AM
  4. PID Control for Dynamixel servos using Arbotix-M
    By navidahmeduom in forum Arbotix, Microcontrollers, Arduino
    Replies: 6
    Last Post: 05-20-2015, 10:15 AM
  5. Closed loop control of Dynamixel AX-12+ ?
    By ngom52 in forum DYNAMIXEL & Robot Actuators
    Replies: 4
    Last Post: 03-07-2010, 02:52 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts