Relays on motor outputs

I’m currently working on updating my R2D2 from a Sabertooth controller with brushed motors, to Q85 cycle motors and an odrive.

One of the things I did with the brushed motors was add a relay on one of the legs from the controller to the motor. This gave me not only the ability to disable the drives remotely, but also meant that if the power was removed (battery unplugged) then I could push the droid without fear of generating current and blowing the controller. I do want to use regen breaking rather than a breaking resistor.

So, the questions are:

  1. Can this be done with brushless and an odrive (breaking two of the three motor wires with a relay)
  2. Would it damage anything?

I’d be looking at putting two DPST automotive relays in place to do this. Probably just hardwired to the battery.

Firstly, what do you mean by “I do want to use regen breaking rather than a breaking resistor.” ? I don’t understand what you mean in this context.

I think it would be a bad idea to disconnect the motor under load, because any inductance in cabling and motor itself could cause a transient overvoltage. That said, I have fitted motor fuses to my ODrive and blown one of them without damage to the ODrive. Once.

It would also be a bad idea to short the motor windings under load, because the current controller might not react fast enough, and if the short-circuit inductance is low, it could cause a surge current within one PWM cycle which exceeds the MOSFET rating.

However, the ODrive is extremely unlikely to be damaged by motor back-EMF (ie by spinning the motors while it is switched off), unless you spin the motors significantly faster than 100% throttle ever would.

The best way would be to configure one of the GPIO pins as a “motor enable” pin. I’m not sure that this can be done with the mainline firmware yet though, but it’s a feature in development.

Regen braking, as in as the motor coasts to a stop it doesn’t dump the excess power generated by the motors into a big ol’ resistor, it dumps it back into the battery. (It will always be running on battery, never a PSU)

From the getting started guide:

Do I really need a power resistor? What values to choose?

If you don’t have a brake resistor, the ODrive will pump excess power back into the power supply during deceleration to achieve the desired deceleration torque. If your power supply doesn’t eat that power (which it won’t if it’s not a battery)

The motor would never be disconnected under load, except possibly in the case of a fuse blowing, which I hope to never do. :stuck_out_tongue:

The windings would never be shorted either, I intend to make them open circuit.

I’m thinking pushing the droid with no battery for a long distance (maybe 100+ meters) and not pushing that power back into the odrive.

I probably will use a GPIO pin to enable/disable motors via the controller for safety, but I’m talking relays so that if the battery is disconnected there is no way for the motors (or rather, generators in this state) to blow the electronics. In this case, connecting to the motor enable pin is not an option even if it was in the firmware.

I agree with this. If you keep the ODrive in idle mode, where it’s not trying to apply any power, it will be okay if you push it around. It may wake up due to the generated voltage, but it shouldn’t blow up or anything like that.

I would suggest that you use an emergency stop button (I would recommend to have one anyway), the kind that stays pressed until you twist it to reset. Make it so that when pressed, it connects the nRST pin to GND on J2 of the ODrive. This will force the ODrive to be disabled even if you have a startup routine set.

1 Like