Can the MX-106T servo be used directly in myRIO with uart support?

I want to control dynamixel servo with UART serial communication using Labview programming language.
I’m using -NI myRIO(FPGA-Real time linux) hardware.
-I am using MX-106T actuatuor.

I have a U2D2 card in my hand. I connected the MX-106 servo using the TTL pins on the U2D2 and then connected the usb output to the usb input of myRIO. In this way, I was able to control the servo without any problems. But I want to connect it directly to myRIO using the UART pins without usb.

Can I control the MX-106 (without any additional hardware) by connecting it to myRIO with UART pins?

If yes, how?

Every opinion given is worthy of respect

It is possible to communicate with your MX 106 directly over UART by implementing your own Half-Duplex converter for the myRIO.

thanks Jonathon

I guess there is no other way around that, right?

@alvise

I have just checked with myRIO web site and I had found that myRIO uses TTL (5V) logic on its UART port and this would match with the protocol for the DATA line of typical ROBOTIS Dynamixels:

image

If this is correct for your system, perhaps you could try this person’s approach (you’ll need to turn ON English Translation for your web browser as it is in Korean):

Basically, this person wired TX and RX lines together for his UART Port and this person claimed that this setup worked OK for his/her setup. So try at your own risk. Personally I prefer the extra hardware protection circuit provided by the U2D2.

Thanks for your suggestion.Yes I already tried the approach but it didn’t work.

I’m using U2D2 but I don’t want to use usb cable. For this I am trying to find a method or converter that can control dynamixel servo via UART.
Do you know of a converter with UART output as an alternative to U2D2?

Thank you very much roboteer
Thanks for your suggestion.Yes I already tried the approach but it didn’t work.

I’m using U2D2 but I don’t want to use usb cable. For this I am trying to find a method or converter that can control dynamixel servo via UART.

Do you know of a converter with UART output as an alternative to U2D2?

On your circuit, I did not see if the VDD pin is connected to a power source or not. Was the DXL powered at the proper voltage with the same ground? Just checking.

Amazon sells some short micro USB cables that I have used OK between my RPi4B on Linux and a U2D2:

https://www.amazon.com/Spater-Micro-USB-Cable-Motorola/dp/B01FSYBQ9Q

https://www.amazon.com/CableCreation-Charger-Compatible-Chromecast-Android/dp/B013G4EAEI

Also what software are you using? Dynamixel SDK on Linux? The Korean user was using Arduino software which needed another pin (a 3rd one) that does the Flow Control of the RX & TX lines for his setup to work properly. Do you have some equivalent control on your myRIO?

When I was using the Dynamixel SDK on RPi4B with the U2D2, I did not have to specify the Tx/Rx Flow Control pin because I think that the U2D2 does that process on its own PCB.

I do not know of any commercial UART-based Half-Duplex Converter that can replace the U2D2. The ROBOTIS e-manual gave the information for creating your own Converter from discrete components (see Jonathon’s post), if you want to go that way.

roboteer Thanks for your answer.
Yes, VDD cable was used but I didn’t need to show it.
I have more than one product and I don’t want to use a usb hub.
I am using the example here example.
Yes, I must have overlooked the use of a pin other than rx and tx, I still can’t see it.
I think it would be a little more helpful if there was an arduino code on how to use it.I think it uses the Rx tx pin for the normal UART protocol. Does it use the other pin as just ‘‘pull down’’ or ‘‘pull up’’ ?

I looked at the various VIs that come with the LabView API for the Dynamixel SDK which is set up in a similar manner to the C/C++ API that I am more familiar with. And the bad news is that both APIs are not exposed at a level low enough so that a user can manipulate the Rx/Tx Flow Control at will.

The Data Flow Control implemented on the U2D2 is explained some more here (and it won’t be easy to implement from scratch in software):

If you do not want to use a USB Hub then may be your other device can be hooked up to I2C or SPI? If not you don’t have a choice but to use a USB Hub on your myRIO.

Or another approach is to use an Arduino Board to control all your Dynamixels, such as an OpenRB-150 (OpenRB-150) - then you’ll have to use C/C++. In this case, the MyRIO can be used in a supervisory level talking to the OpenRB-150 via UART Ports on both sides? Just send ASCII packets back and forth? Of course, this approach comes with a Systemic Delay via the UART Ports that can’t be avoided.

The Arduino Library is called Dynamixel2Arduino and its C source code is available here:

UPDATE: ALSO I just remembered this article about a replacement for a U2D2 via a PCB, but it was for an RPi4B’s UART Port which operates at 3.3V (which is not a problem with myRIO).

Also read this follow-up post on the same issue:

Thanks for your answers.
After doing some research, I come to the conclusion that I should use a usb hub.Because connecting it directly is a bit challenging for me, I couldn’t create it no matter what I did. Creating a circuit like the one below seems like the most robust way, but I don’t have ‘‘74LVC2G241’’

Anyway, thank you for your help on this.

It won’t be related to this issue, but I have a small question, I don’t want to open a topic just for this question.

-Can I read alarm information or errors with protocol 1 for Dynamixel MX-106?

Now that you are using USB in Linux, you’ll need to look into the USB Latency issue also to get the most out of your U2D2 (see link below):

The ROBOTIS e-manual provides lots of information for the use of MX-106 (Protocol 1 or 2). You need to get used to consulting it for various trouble-shootings, see link below:

That is how I built my own knowledge. Nothing extraordinary really! :grinning:

Also, regarding using the USB Hub in Linux, once I got all my USB devices hooked up, I just used “dmesg” https://www.howtogeek.com/449335/how-to-use-the-dmesg-command-on-linux/ to figure out which “tty” Port is connected to which USB device. The U2D2 is an FTDI device.