Electronic – Limiting torque on a DC motor

circuit-protectionservo

I'm developing a small knob that can be controlled by both the user and a microcontroller. My current design is a modified servo. I'm removing most of the gearing to keep the motor's torque low. I'm using the pot to keep track of knob location and an H-bridge to drive the motor.

If the user tries to turn the knob while the microcontroller is also trying to turn the motor, I'd like to maintain constant torque and not let the current spike. Essentially I want to let the user "win" but I don't want to turn off the motor or damage it.

Do I need protection circuitry here, or is a motor fine with being forced backward while it's trying to run forward? This is my first non-trivial use of a servo, and I'm still learning how they and DC motors work.

Best Answer

You can apply a voltage opposite the direction the motor is turning as long as you don't exceed the maximum power of the motor and driving components. Depending on the motor, and the speed, and the torque, you may or may not need protection circuitry.

You will also have to consider that working with the back-EMF rather than against it, the motor current can get very high, very fast. This happens any time you decrease the average drive voltage faster than friction will slow the motor; applying full reversed voltage is just the most extreme case. Consider that if you allow the user to command rapid direction changes, under some conditions you will experience regenerative braking. If your power supply can't also be a power sink, and the power of the other loads in the circuit is less than the power extracted from the motor, then your supply rail voltage will be driven up and bad things will happen. Including a crowbar might be good protection, or you might want to switch on a power resistor to convert this energy into heat when necessary.

One approach you can take is to detect the back-EMF of the motor, then limit the difference of the average voltage you apply to the motor. Once you have detected and compensated for back-EMF, the motor is effectively a resistor, and by limiting the voltage across it you also limit the current, by ohm's law. This effectively gives you an simple but effective, open-loop, current/torque limited control with very little additional complexity. You can even use the on resistance of your MOSFETs to detect current.

The reason this is easier than just measuring and controlling the current directly is that you can directly calculate the voltage necessary to reach your target current, rather than finding it with a PID controller or such. Plus, you get speed information.