Stop at Loss of Serial Connection

General discussion of using Roboclaw motor controllers
Post Reply
jcicolani
Posts: 2
Joined: Thu Oct 27, 2016 1:08 pm
Stop at Loss of Serial Connection

Post by jcicolani »

Is there a setting that would stop the motors when the USB serial connection is lost?

I have a mobile robot using a Roboclaw 2x30 via USB to a Jetson TX1. I have been experiencing intermittent power failures to the Jetson which cause a shutdown of that board (it's a loose or bad solder job in the power distro board that's being addressed). However, when the USB connection is lost, the Roboclaw continues to execute the last command it received, which can leave me chasing a robot down the street.

What I need is a method of disabling the motors when the USB connection is lost. At the moment I am designing a complex power management system involving Arduinos, relays, and watchdog processes. The power management piece needs to happen anyway due to the boot up requirements for the Jetson board, but having that extra layer of protection would be good.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Stop at Loss of Serial Connection

Post by Basicmicro Support »

There isnt an explicit option to stop the last command when a new command hasnt been received(eg a timeout). However if youre Jetson board is loosing power you can use an I/O(set high by the Jetson which would reset to low on a power down/reset) or 3.3v/5v power from the Jetson to trigger the E-Stop pin. Pulling E-Stop low will stop the board. S3,S4 or S5 can be setup for E-Stop, latched or non-latched.

Alternatively, if you are using velocity commands(with encoders), you can switch to using the distance commands. If a new command is not received when the distance has been reached the unit would stop.

Post Reply