Jetson Nano RoboClaw Control

General discussion of using Roboclaw motor controllers
Post Reply
scubadiv3r
Posts: 3
Joined: Mon Feb 03, 2020 12:05 pm

Jetson Nano RoboClaw Control

Post by scubadiv3r » Mon Feb 03, 2020 12:07 pm

Hello!
I'm currently attempting to control a chain of 2x30 roboclaws using my Jetson Nano over UART communications. Only having one in the bus isn't a problem, but once you add more to the bus it starts sending packets super slow and it leads to erratic motor control. I've gotten it working with a bunch chained together on Raspberry Pi using this tutorial just fine: https://resources.basicmicro.com/packet ... erry-pi-3/


I'm really struggling to figure out why it won't work on the Jetson Nano, there were some settings that needed to be configured on the Pi to do this, but I haven't found a way to do so on the Jetson, if it's even necessary: https://resources.basicmicro.com/config ... rial-port/


Anyone work with a Jetson Nano before? Thanks a ton

User avatar
Basicmicro Support
Posts: 1435
Joined: Thu Feb 26, 2015 9:45 pm

Re: Jetson Nano RoboClaw Control

Post by Basicmicro Support » Tue Feb 04, 2020 10:25 am

After talking with you on the phone yesterday I think we determined it was how the Jetson is using the timeout argument in the Open function in the python library. In the Open function we set a packet timeout of 1 second and a byte timeout(the char timeout) to .01seconds. The char timeout appears to always have priority on RPi and Windows systems.

After testing on the Jetson, we determined the packet timeout was triggering. This was set to a default of 1 second since it had no effect under previous testing. However on the Jetson this should be set much lower. Equal to the char timeout is probably appropriate(eg 0.01seconds).

scubadiv3r
Posts: 3
Joined: Mon Feb 03, 2020 12:05 pm

Re: Jetson Nano RoboClaw Control

Post by scubadiv3r » Thu Feb 06, 2020 2:46 pm

There were two things wrong with our Jetson Nano: the mA on a pin of a Jetson Nano was like, 1mA, way lower than a Pi or an Arduino. The Roboclaw UART line needs between 5-25mA, so we had barely enough to control one Roboclaw, but once we added more to the bus it just didn't have enough amps. Additionally we did need to change the timeout in the library to .01. We used a USB-TTYL converter to boost the amps of the UART line and it worked. Thanks a ton!

haj
Posts: 3
Joined: Thu Feb 13, 2020 2:39 am

Re: Jetson Nano RoboClaw Control

Post by haj » Thu Feb 27, 2020 5:25 am

Hey there, I am currently also trying to get my Jetson Nano to control 2 RoboClaws (Multi-Unit) over UART.

What was your setup like, @scubadiv3r? Did you have an external power source connected to each of the roboclaws or did you try to power them all over the jetson nano and was that the reason you didn't have enough current or was it that only the UART communication would require a higher current than 1mA?

I'm powering my roboclaws over an external battery and I am just wondering if I should setup the communication with the jetson nano via the J41 RXD and TXD pins or if I also should go for the USB-TTL solution.

Thanks in advance!

scubadiv3r
Posts: 3
Joined: Mon Feb 03, 2020 12:05 pm

Re: Jetson Nano RoboClaw Control

Post by scubadiv3r » Mon Mar 09, 2020 9:28 am

They were all powered externally from a known good power source, we've also tried powering the Jetson via barrel jack vs pins with no real change in results

User avatar
Basicmicro Support
Posts: 1435
Joined: Thu Feb 26, 2015 9:45 pm

Re: Jetson Nano RoboClaw Control

Post by Basicmicro Support » Mon Mar 09, 2020 10:46 am

Input power to the Jetson wont determine the output power of a single I/O pin. So how you power the board as long as it is reasonable for the power draw shouldnt matter. Teh above post mentions the Jetson has a drive current of 1ma. That is very low. In those cases you may need a buffer chip to convert the 1ma signal into something with a bit more oomph(usually 25ma).

astronav
Posts: 1
Joined: Fri Sep 25, 2020 8:10 pm

Re: Jetson Nano RoboClaw Control

Post by astronav » Fri Sep 25, 2020 8:13 pm

Sorry to bring this back alive, but there are very few resources out there for this! I am using a Jetson NX, but the boards are about the same (except my UART is coming out of ttyTHS0). I have verified my UART connection with a simple serial test. I have also configured my Roboclaw to use packetized serial at 115200 baud. I made the modification with regards to the timeout in the previous comments as well. I am not sure if the low current issue is my problem, but do you have information about how you boosted the power with a USB-TTL cable? That is the last thing I can think to try. Thanks!

User avatar
Basicmicro Support
Posts: 1435
Joined: Thu Feb 26, 2015 9:45 pm

Re: Jetson Nano RoboClaw Control

Post by Basicmicro Support » Mon Sep 28, 2020 8:17 am

What is the Serial signal from the Nanos, Voltage amplitude. Eg 3.3v? If it is 1.8v then you will need to add a buffer/level converter between the Nano and the Roboclaw(eg from the Nano TX to Roboclaw S1 pin). Roboclaw can only ready logic down to around 2v. 1.8v signals will not be "seen".

Post Reply