Nuevo driver para Dynamixel

Como estoy usando un Odroid-XU3 (y pronto voy a actualizarlo con un Odroid-XU4) con un adaptador USB2AX para conectar los servos Dynamixel MX-28, me ha estado molestando el retardo USB del adaptador.

El USB2AX es un dispositivo USB 1.1 y el USB 1.1 tiene un entramado de 1ms para transmitir y recibir data. Cualquier
comando dynamixel toma al menos 2ms lo cual no es aceptable. Incluso usando los comandos bulk de lectura y escritura (los que toman incluso más tiempo en la medida que conecto más servos) me gustaría cumplir con el ciclo de control de 8ms del programa original del DARwIn-OP y me estoy acercando al límite.

Por suerte, como se describe en foro odroid, el UART del Odroid se puede configurar a la especificación del bus Dynamixel (8 bit, 1 stop, No Parity) a 1Mbps e incluso hasta 3Mbps!!!

Por lo que estoy trabajando en un driver para implementar la interfaz serial TTL half-duplex de Dynamixel con sólo los pines RX and TX del Odroid (sin usar ningún pin de control para comandar el half-duplex). De esta forma, se pueden usar UARTs simples como la que tiene el Odroid, que no tiene una salida por hardware para indicar una transmisión en proceso (y no quiero usar un gpio controlado por software para evitar errores de timing).

Por ahora hice un prototipo TTL (la UART del Odroid es de 1.8V, mientras que el bus Dynamixel es de 5V), pero voy a continuar reduciendo esto con un micro-controlador.

TTL servo driver prototype
prototipo TTL de driver de servo

Antes de esto estaba trabajando en usar un UART SPI para reemplazar el USB2AX, pero eso se va a la basura ahora.

Testing new Dynamixel Driver

As I am using an Odroid-XU3 (and now I’ll be upgrading to an Odroid-XU4) with an USB2AX adapter to interface the Dynamixel MX-28 servos, I am getting annoyed by the USB delay of the adapter.

As the USB2AX is an USB 1.1 device and USB 1.1 has a 1ms time framing for transmitting and receiving data. Any Dynamixel commands takes at lease 2ms which is unacceptable. Even using bulk read and write instructions (which are taking longer time as I connect more servos) I would like to comply to the 8ms control loop in the original DARwIn-OP programming. So I am getting too close to the limit.

Luckily, as described in odroid forum, the Odroid’s UART interface can be setup to the Dynamixel’s bus specifications (8 bit, 1 stop, No Parity) at 1Mbps and all the way up to 3Mbps!!!

So I am working on a driver to implement the Dynamixel’s TTL half-duplex serial interface with just the RX and TX pins from the Odroid (without any control pin to command the half-duplex direction). This way it can be use with simple UARTs such as the one found on the Odroid which do not have a hardware output to signal an active transmission in progress (and I don’t want to use a software controlled gpio to avoid time mismatches).

So far I did a TTL prototype (Odroid’s UART is 1.8V while Dynamixel bus is 5V), but I’ll continue by shrinking this to a micro-controller soon.

TTL servo driver prototype
TTL servo driver prototype

Before this I was working on using an SPI UART to replace the USB2AX, but that is going to the trash now.