As I am recently building multiple robots at once (Hexapod, Rover and some other projects you can read on my blog) I was running out of Servo’s and wanted to buy a few more. At the end of 2017 Robotis has released a new series of Servos which I believe are intended to replace the trusted AX/MX series I have been using before.

I thought it was a good idea to acquire a few of the new servos to use in one of my new robot designs. In targeted the XL430-W250T servos which should be the equivalent of the AX12A servos from the previous generation. I bought in total 6 servos and tried to connect and control them using the same setup as I had before. In this post I want to detail out a few of the challenges I faced on controlling these servos.

Powering up

The first simple challenge I had was to simply connect the servos. With the AX12 servo’s I used a USB2AX stick to control the servos using the Dynamixel 1.0 protocol. This worked great on the old servos and I was hoping this was all backwards compatible also in terms of powering the servos. It turns out Robotis has made some changes that make it difficult to 1 on 1 swap the servos if you are upgrading from the AX12.

The main challenge is simply the connector, it’s still TTL based hardware but the connector has been swapped to a more universal JST plug. This does mean all my existing accessoires are useless like hubs, power supply etc. I am sure that once these servo’s become more mainstream this will change. I solved this by purchasing these converter cables that on one end have the old connectors and the other end use the new JST plugs.

After plugging in the servo’s to my old SMPS power board and the hubs, the servo’s came to life. I used the windows Robotis Servo Manager on first initialisation to set a unique Servo ID. It worked mostly like the old servo’s however some parameters have moved and have wider address spaces (4 vs 1 or 2 bytes on the old servos).

Dynamixel 2.0 Protocol

This brings me to the Dynamixel 2.0 protocol, this protocol is a newer iteration but based on the same principles as the old protocol. You send packages directed to either a specific servo (identified by the ID) or broadcast to all the servos. For each package you send you get a response package from that one servo, for example requesting the position, temperature and other properties.

Java on Raspberry PI

I have written a small library I can use to control the servos from my Raspberry PI in Java which also includes a dashboard for using and controlling the servos. For those that are interested it can be found on github here: https://github.com/renarj/robo-sdk

If you want to start the library please make sure you have maven and Java 8 or higher installed on your raspberry PI or other device (Mac is also tested and working, assume Windows works as well).

From the root of the git repository fire up the following command

mvn -f dynamixel-web/pom.xml spring-boot:run -Ddynamixel.port=/dev/tty.usbmodem1441 -Ddynamixel.baudrate=57600 -Dprotocol.v2.enabled=true

For the dynamixel.port please enter your com port connecting your USB2AX or other USB controller connected to your Dynamixels. In case you are using the new Dynamixel X series (or XL320) please set the protocol.v2.enabled startup flag to ‘true’ and set the approriate baudrate (default is 57600, but dynamixels out of the box are set to 1MBit, but the serial library I use cannot handle this on a Mac/Raspberry PI).

Once the software is started it should show the following line Robot construction finished

After starting you can acess the servo control dashboard on the following url:

http://localhost:8080

Note: Please replace localhost with the correct IP if running remotely

The Dashboard should show roughly the following:



Conclusion

I hope the above library will help people who want to use the new Dynamixel X servos in Java, it was a bit of exploring to get it to work, but all in all it is very familiar if you are already using the older Dynamixel Servos. As always I love using the Dynamixel servos and seeing this new series being available with some additional control parameters is really great news. Hope to use these in a lot more upcoming experiments going forward.

Feel free to use / share / fork / copy my Library for controlling these servos here: https://github.com/renarj/robo-sdk