# How do chopper driver work for stepper motor

While reading about motor drivers I'm getting somewhat confused on how commercial stepper motor driver actually work to regulate power going into motor windings.

Here's a few things that seems clear to me. H-Bridge drivers like l293d, l298 and others are constant voltage drivers in a way that if the motor try to pull 4 amps at 12v it will probably burn quickly those drivers.

A chopper driver should be able to keep a constant current to the motor. So if we use a 1.7A motor, the driver will regulate the voltage to the current is always around 1.7A.

I've read that one way to regulate the current would be to PWM the windings to regulate the voltage. I imagine a constant voltage power source of 50v could be regulated to 25v on average. Here I also read that the length of the PWM might matter so the motor doesn't flicker too much.

From what I understand, PWM is simply burst of 50v for a short period of time.

Now the thing I'm not sure is how the current is then regulated with PWM. If the voltage is sensed on an average. It might seem logical that Amps are also sensed as an average.

In other word, if a motor is pulling 6A but the motor if fed with a duty cycle of 50% we'd sense 3A.

Taking the l298 datasheet we can read this for the max current:

Peak Output Current (each Channel)

• Non Repetitive (t = 100μs) 3A
• Repetitive (80% on –20% off; t on = 10ms) 2.5A
• DC Operation 2A

From my understanding, the shorter the burst are, the more amp we can feed into the the driver. So if we were to configure PWM for 100μs we could at most 3A. In other words, we could have burst of 6A with a duty cycle between 0-50% on a 200μs cycle and not break the l298 chip.

Now if this is right, we have to put some sensing device at the output to measure how much current is consumed by the circuit. When the current is measured, we can adjust the duty cycle of our PWM to fit the constrains we chose.

So how risky this constant current power source is is how fast you can regulate the PWM to not burn anything. If we can only sense current at 300us this could leave a 100us at which the current could too high. It's probably a good thing to keep a good margin to prevent disaster if the PWM adjustment aren't reactive enough.

Note:

In short, this is just the basic Ohm law at play. As the motor resistance may change on load and that we fix the current to I. We have to compute the voltage for a fixed R and I. So all we have to do is sense the resistance of the motor. For example, if the motor with no load had 4.5ohm, the voltage should be set at 7.65V for a 1.7A current but if the load increase the resistance, to say 10ohm the voltage could be set to 17V and then for a resistance of 50ohm it could be set to 85V.

The chopper has a sense resistor that is used to measure the current. When the current is below setpoint, then the transistor is ON. If the current rises above the setpoint then the transistors are OFF. This so called chopper, it is a two position controller ON/OFF.

As you can see from the picture, the voltage is pulsed, meanwhile the current is continuous and it is flipping around setpoint value.

Any assumptions regarding PWM in your question is wrong. Even when outputting a PWM signal, the current is always continuous, not pulsed.

The motor doesn't change the resistance, it rather builds up the back EMF voltage when it is spinning. So that's why you need 7.65V for 1.7A at standstill, and you might need 17.65V for 1.7A when the motor generates 10V.

• Hmm, but how can the current be continuous when PWM output 0v. If we add a filter after the PWM to remove the voltage ripple, that could make sense. Oct 5 '17 at 15:10
• I read a bit on Back EMF, what it means is that when the motor stand still, the back EMF is low so at 12v I'd be pulling 2.66 amp with a 4.5ohm coil. Which explain why we have to reduce voltage without load. But as the motor start turning/pulsing, then Back EMF raise and that would reduce the voltage that can pass through it. So the formula would be V = (I * R) + BackEMF Oct 5 '17 at 15:30

The electrical motors have one more component that have to be taken under consideration, the inductance. In the case of current chopper the current rise time is determent by equation di/dt=V/L. Here di/dt is the current rise for period t, V is the voltage, and L is the inductance of the winding. For most applications you can assume that L does not change when motor is spinning but for high speeds (over 20000 rpm or so) you cannot make that assumption. Also, back EMF have a lot to do. The current chopper uses current shunt that measure the current and turns on/off a switch. For more details visit https://www.linearmotiontips.com/what-is-a-chopper-drive-for-a-stepper-motor/