This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DRV8816: Brake vs Coast operation for PWM motor control

Part Number: DRV8816

Hello

I was looking into a motor driver to driver two separate brushed DC motors for a toy helicopter drone. My DC motors have a current requirement of 2.3A at about 8.4V. I only need the motor to spin in one direction for my two co-axial motors. 

DRV8816 seems like a good fit for me. Im trying to achieve speed control by varying the average voltage on the motor windings. So PWM seems like a good idea, but I have a few questions about PWM implementation for speed control. 

From the data sheet I see three modes when operating as Dual brushed motor -------- Off (coast), Forward and Brake. 

During PWM , forward operation for the HIGH duration of PWM makes sense but I'm not sure whether I need brake or coast for the off duration of the PWM. Would this be brake or off? Whats the difference from a physical speed control point of view? 

If I need brake I will connect PWM to the IN pin and EN always high, but

if I need coast, I will connect PWM to the EN pin and IN always high. 

Wondering if someone can give me insights on which operation to use for speed control of motor using PWM for varying average DC voltage across windings? 

Thanks

Raghu

  • Hi Raghu,

    Say you have a period of 20kHz, and you want to control speed to 50% PWM (0.5 * 8.4 V = 4.2 V across motor windings) and in FORWARD.

    What you would need to do is, for the 50% ON time of the PWM period, drive the outputs in FORWARD.

    Now, after the 50% is where things get interesting. You can either set the outputs to OFF, or COAST. COAST means the motor coasts to a stop; the motor stops moving at a slower pace then in BRAKE, or you can set the outputs to BRAKE, which will stop motor at a slower pace then in COAST. Note that, if you want to maintain your motor at a certain speed, you would want it to coast to a stop during your PWM period, not stop it.

    There is much more details to how this works. Below is an app note that can explain to you in more detail how these current recirculation methods work.

    http://www.ti.com/lit/an/slva321/slva321.pdf

  • Hi Hector

    Thank you for the explanation and the app note. Its a good read. The app note describes the decay of current as a function of the voltage across the inductor during the OFF phase. This makes total sense. But it does not mention the relationship between rate of decay and motor speed. So some confusion remains for me. I have detailed my thoughts below.

    I have a half bridge trying to spin a motor in one direction. I am not using the H bridge configuration. 

    Condition 1 ---> If I have my output to OFF or coast, I will have the body diode of the DRV8816 conducting the current. The drop across the diode in 1.4V at 2.8A from section 6.5 in the data sheet. 

    Condition 2 ---> If I have my output to BRAKE mode, I will have the LS FET conducting the current. The drop across this will be IxRds which is 2.8A x 0.7ohm = 1.96V (Rdson from section 6.5 in data sheet) 

    The drop across diode is same as drop across inductor during the reverse conduction phase for both conditions. 

    So the brake condition has more voltage across the inductor than the coast condition.

    So the rate of current decay is more in the brake condition. E = L di/dt

    Hence the average current in the inductor is more in the coast condition because its rate of decay is less. 

    So the coast condition would be more favorable to maintain my motor at a certain speed. 

    However if the RDSon of the FET would have been lower to allow lower drop across the FET/inductor than the body diode, the favorable condition would be brake right? 

    Please let me know my thinking is correct. 

    Thanks

    Raghu

  • Hi Raghu,

    One point must be discussed:

    1. So the brake condition has more voltage across the inductor than the coast condition.

      So the rate of current decay is more in the brake condition. E = L di/dt

      1. Rate of current decay in BRAKE is Slow Decay, which decays current slower and voltage faster than in Fast Decay (COAST). Bear with me here:
        1. On DC motors, a counter-electromotive force, called Back EMF, develops as the motor rotates. Slow Decay (BRAKE) offers a short to the winding, which in turn collapses the Back EMF. This collapse of the counter-electromotive force results in a rapid rotor stop.

          Remember that current is maintained in the coils, and torque is a function of current. The current in the winding produces the torque that opposes rotor motion and, since voltage is tied to the speed of the motor, that opposing torque assists in stopping the motor (BRAKE).

          On the other hand, on Fast Decay, the motor COASTs to a stop as the stored energy is gradually dissipated. The current is not maintained in the coil; the current continues its flow back from where it came (e.g. bulk capacitors). Hence why the name COAST is tied to Fast Decay.

  • Hi Hector

    Thanks for the explanation. I did not even consider the back emf acting there. Had to think about it for a while but now it all makes sense.  

    One last question. If I am driving two DC Motors using the half bridge configuration, can the DRV8816 supply both motors at 2.8A or is it 2.8A total the whole chip? Guessing thermal dissipation would be the limiting factor because from the data sheet, it certain that the FETs can handle that.

    Thanks

    Raghu

  • Hi Raghu,

    It is 2.8 A peak for each half-bridge. 

  • Hi Raghu,

    You would want to put it in brake mode if you want the PWM to work effectively.

    Case 1: (Coasting); just for an example, lets say you're operating at 50% Duty Cycle. During the On time, the motor would accelerate and during the off time, your motor speed would more or less remain the same depending on friction and aero drag. In the next cycle, it would accelerate more and keep on doing that until it strikes a balance between the energy added in the on time and the energy dissipated in the off time. The rotor speed would be heavily dependent on friction.

    Case 2: (Braking); You can find plenty of resources on Class A chopper to understand it better. Here, during the off cycle you would freewheel the motor current. Even though the current flowing through the motor will drop during the off time, your speed will be deterministic given by Duty Cycle * RPM_max. The non-linearities can be better handled by your control law in this case.

    Thanks and Regards,

    Avish Gupta

  • Hi Hector 

    Thank you for the reply. Thats perfect. 2.8A for each bridge is ideal for my application.

    Hi Avish

    Thank you for the reply. I was doing a bit of reading on this topic and one thing that I got was that if the PWM frequency is much higher than the inductor resistance LR time constant, then it does not really matter whether we are coast or brake mode. The motor back emf  is dominant across the windings only after all the current in the inductor is drained. And this back emf is shorted across the FET in brake mode which brings the motor to a halt. But in coast mode, the body diode turns off and the motor still coasts due to inertia. 

    But if the current discharging time constant is much larger than the PWM frequency which is mostly the case in motors, it seems to me that both modes will almost be identical. In one case the inductor current is draining across the body diode and in another case across the FET. Apart from the RDSon here, I do not see much difference. I would love to get your thoughts on this. 

    Thanks

  • Hi Raghu,

    Agreed, in one case the freewheeling element is you diode and in the other its the FETs.

    With the diodes, the path involves backfeeding current into the source.

    Can you share what's there at the input of the driver, any overcurrent switches or regulators? Share the part numbers or the topology if you can.

    Thanks,

    Avish

  • Hi Raghu,

    When you feel you have enough information to move forward, reply to this thread that it can be closed. Thank you and you too, Avish. Good discussion.

  • Hi Avish

    For the input to the driver, I am just using a STM32 micro with its pins in PWM mode to the DRV. So just looking to use the DRV to run two motors of my helicopter in just one direction. So running the DRV as two seperate half bridges for speed control 

    -Raghu

  • Thank you Hector for answering all my questions. Appreciate all your quick responses. 

  • Hi Raghu,

    By input, I meant power input.

    If it's directly powered through battery, it shouldn't be a problem. But if there's a regulator in between, there are a few things which need to checked.

    Thanks,

    Avish

  • Hi Avish

    Im powering from a 2S li-ion battery, but I think I know what you mean if running from a regulator. Load regulation, transient responseand current capability spec of the regulator right? 

    -Raghu