AX-12A on U2D2 does not work

Hello,

now i have an U2D2 attached to my computer and an AX-12A behind it. I downloaded and installed the DynamixelSDK-3.7.31 and compiled the ping example (linux64).

Running the ping executable flashes the green TXD led at the U2D2 and leads to following output:

$ ./ping
Succeeded to open the port!
Succeeded to change the baudrate!
[TxRxResult] There is no status packet!

I have following settings (ping.c):

// Protocol version
#define PROTOCOL_VERSION 1.0 // See which protocol version is used in the Dynamixel

// Default setting
#define DXL_ID 1 // Dynamixel ID: 1
#define BAUDRATE 1000000
#define DEVICENAME “/dev/ttyUSB0” // Check which port is being used on your controller

(further lines of code unchanged)

Any hints why it does not work?

Sorry, I don’t have an U2D2, so may not be much help, hopefully someone from Robotis will be able to give you better advice. Also I have not been playing with the Dynamixel servos recently so I may be a bit rusty.

If me the things that I would look at or investigate include:
a) How are the servos powered? Do you have something like 12v connected to it(them)? When you connect power to the servo(s), do they blink once showing they have power?

b) When you say an AX-12A, I am assuming one. Is it brand new and as such default settings, like the baud is still at the 1000000 and ID of 1?

Again the program you mention will only work for servo ID#1 configured for 1000000 baud which are the defaults for AX-12

c) Is /dev/ttyUSB0 the correct device? Again I don’t know the U2D2, to know if it is using an FTDI chip or the like and as such creating a device name like /dev/ttyUSB0 or if it is like some other boards which may create a name like /dev/ttyACM0…

Likewise might you have multiple things that are plugged in that create /dev/ttyUSBx objects, in which case maybe your U2D2 is /dev/ttyUSB1?

Again sorry, I know I am just throwing darts

hello Kurt,
thank you for your answer, or better, for your questions.

a) it is exactly one servo and it is now powered up by a separate power supply (one of these small switching power supplies, which are put in a socket. It is adjusted now at 9V.) The Dynamixel does flash its LED, when powering up.
My setup is probably not the most beautiful, but it should work:

The cables are from dynamixel, the pcb just connects pin 1 with pin 1 and pin 3 with pin 3.
pin 2 (the middle one) is not connected.

Red is 9V, blue is GND. red is connected to pin 2 of the dynamixel, blue is connected with GDN of the dynamixel/U2D2 (the lowest pin at the pcb)

the green annotated wires should be data lines.

b) its exactly one, yes. But “brand new” is a good point! At first, I connected it with RS232 (12V), because I was not aware of the difference RS232/TTL. Tomorrow, I have access to a second dynamixel, which was definitely only connected to TTL. I will try it with that device again.
At least, it should have still its defaults, since I can not communicate with it.

c) device is /dev/ttyUSB0. By the way, I had to recompile the kernel with options for TTL-serial-modules enabled (gentoo). After booting into this kernel and plugging in the U2D2, the modules usbserial and ftdi_sio were loaded, and /dev/ttyUSB0 appeared. Additionally, if I start the ping executable, the green LED at the U2D2 flashes. So I am quite sure that there is everything o.k. But tomorrow I have access to a oscilloscope and will check the data wire, for being sure.

Well, and maybe there is another problem. Can I change the baud rate permanently at the device? because my SPS is not able to do 1000000, and it is intended to connect the dynamixel with the SPS…

If the TTL was hit with 12v… It would not surprise me if the communications chip or the like in the servo could have been damaged…

If you have not already done so, probably one of the steps I would do would be to try to run Robotis software, to see if it can talk to all of it…

Probably something like the Dynamixel Wizard:

Again it has been awhile since I played with it and a real long time since I played with the SDK.

As for setting the baud rate to servo… You can set a control table entry as you can see on their emanual.

Again it has been awhile. And for most of my time I ran with my own library code, which is not pretty, but was adapted from what was at Trossen Robotics (Interbotix) bioloid library which I then adapted…