Is there a way of having e-stop behavior with an I/O of the ODrive board. In a similar fashion as Roboclaw boards? (see page 45: http://downloads.basicmicro.com/docs/roboclaw_user_manual.pdf)
The motor will lose torque with a very high degree of certainty if you pull (and hold) nRST pin low on header J2. The drive will also reboot.
Thanks for your answer, so there is currently no E-Stop function?
I think it would be really useful add an input dedicated to an E-Stop. It could be as simple as sending a 0 velocity command when a pin is low.
Once I will have a working setup and a bit of time I will try to add it to a custom firmware.
I agree that an e-stop, that doesn’t require you to recalibrate the encoder would be really useful.
There’s different types of E-stops. https://machinerysafety101.com/2010/09/27/emergency-stop-categories/?doing_wp_cron=1548126008.3579199314117431640625
You’re looking for a “Category 2” stop - bring things to a halt, and keep them there under power (Vel Desired = 0). Lower, you find the sentence: Category 2 stops are not permitted for emergency stop functions
Disconnecting power to the drive, or holding nRST low is the correct way to implement a Category 0 E-stop
That was a really nice read, thanks for linking it.
The way I’m used to motor controller e-stops, is that they turn-off the mosfets to the motor wires, or short them to each other. They leave the controller running but put it in an error state. In most emergency situations it is important to be able to read any sensors related to the motor (position and temperature for example).
Does cutting power to the motor, but not to the controller, full-fill the criteria for Category 0?
The implementation I’m describing is shown and described briefly in roboteq’s controller manual on page 38.
I am also looking for an emergency stop solution to stop the motors (Safe Torque Off) without powering off the Odrive (to be able to restart the system without having to recalibrate).
I was looking into 3 phase contactors to cut the current supply between the Odrive and the motor upon pressing the emergency stop button.
Regarding the sizing of such device if I set in odrive the current_lim to 15A can I assume that the max current that will go through one phase will be 15A ?
I’d also like to use one or two GPIO pins as a hardware EStop input, but I can’t see any way to configure the GPIO pins to do this, either in master, devel, or Wetmelon/RazorsEdge.
Ideally, I’d like to perform a category 1 stop by shorting all phases to GND.
I could try to implement this myself, but I don’t know if anyone else is working on it?
I notice there is a new flag in Wetmelon’s branch called ERROR_ESTOP_REQUESTED but it only gets set on a command message. It should be fairly easy to set it from GPIO?
Yeah it should be easy to set up a GPIO to do it. Of course doing this in firmware rather than a direct hardware line to the transistor drivers is less perfectly safe, but as long as you understand that I think you can do this.
Thanks for this. Yes, obviously a proper SIL-rated STO line direct to the FET drivers would be a more reliable stop, but a firmware-based EStop would still give a high degree of reliability, given that a brushless motor cannot self-commutate. So if the software crashes, the worst it can do is burn out some motor windings (which itself can be mitigated with motor fuses). It’s still possible of course that the software can ignore the GPIO and still carry on computing the FOC algorithm, but it should be simple to demonstrate that this is extremely unlikely.
Actually some industrial drives are starting to implement STO this way, because it allows for more advanced safe-stop functions like category-2 stop (stop and hold position) or safe-velocity limits for robots with a ‘teach’ mode.
But compared to listening for stop commands over CAN/USB, or to a brushed-dc driver using a GPIO as an EStop (e.g. RoboClaw), this is much safer.