I have build a simple motor control for a brushed DC motor for my robotic mower. The motor is feed with a PWM signal and when the cutter should stop you just pull the PWM signal low to stop the motor and pull a Brake-signal high to short the motor terminals for a quicker stop. It's working but it's a bit crude and I guess I should put a resistor in serial with the braking MOSFET to limit the heat build-up in the cutter-motor during braking. The circuit looks like this:

enter image description here

The downside is that it requires an additional brake-pin on my microcontroller and you must make sure, in the software, that the brake and PWM-pins never are High at the same time, because that would short-circuit everything.

So the question is if it would be possible to have it automatically brake if there where no PWM-signal available? Could this circuit do it?

enter image description here

Normally Q7 will be actively braking since R8 pulls gate High. When there is a PWM signal then R7 activate Q6 pulling gate on Q7 low to disabling brake. The problem is that it's a PWM-signal, if the motor was only supposed to be On or Off then I guess this circuit could work. But since the motor speed is adjusted by turning the driving MOSFET on and off quickly then the brake would kick in everytime the PWM-signal goes low, I only want the brake to kick-in if the PWM-signal is less than 1% duty cycle. That is the reason for C1, to keep base of Q6 high for the short periods when PWM-signal is low.

Is these correct assumptions? And how do I calculate the values of R7 and C1? I guess it depends on the PWM-frequency?


  • 1
    \$\begingroup\$ Such a circuit would require some form of memory to know whether a PWM signal was present or not. I would just do it in software. What's wrong with doing it in software? Software is used to prevent shoot-through (which this is similar to) all the time. Note that transistors can be half-on running as linear devices...which your circuit will do. Don't assume they will behave digitally if you are applying slow moving analog signals to their base/gate. \$\endgroup\$ – DKNguyen Aug 15 '19 at 23:29
  • \$\begingroup\$ You must design this with specs with tON,tOFF for both drivers .tOFF2 must be faster than tON1 and visa versa. This simply done with Ra//Rd+Diode tp C load to make tOFF2>tON1>tON2>tOFF1. Pick any values using base R’s diode and C \$\endgroup\$ – Tony Stewart EE75 Aug 15 '19 at 23:51
  • \$\begingroup\$ The way circuit 2 works, what would prevent shoot-through when the brake is engaged and you want to start sending pulses? \$\endgroup\$ – rdtsc Aug 16 '19 at 0:06
  • \$\begingroup\$ The 1st solution is good, just make sure you add a braking resistor. You have to make sure that brake signal is inactive during PWM in the software. \$\endgroup\$ – Marko Buršič Aug 16 '19 at 6:47
  • \$\begingroup\$ Well I'm just trying to free another pin from my MCU, but now I'm more into adding a MCP23017 to get more pins. Maybe I should just continue with the first solution where I have a small software delay after setting PWM=0 and brake=1 (and vice versa), instead of trying to emulate that with delay circuits that would just add component costs. Otherwise I have to choose matching FETs with correct tON and tOFF as @SunnyskyguyEE75 describes. \$\endgroup\$ – Henrik Östman Aug 16 '19 at 21:09

Your circuit is dangerous because when PWM is initially applied the brake is still on, which will cause a very large 'shoot-through' current that could damage the MOSFETs. If the brake MOSFET has lower resistance than the PWM FET then motor voltage may not ever rise high enough to switch the brake off.

To prevent shoot-through you need a circuit which adds a delay between switching one FET off and the other on, then the 'brake' FET can be turned on whenever the PWM signal is low. The 'brake' FET then takes over the job of the flyback diode. This is called 'active freewheeling' or 'synchronous rectification'. It has 3 advantages over a single MOSFET + diode:-

  1. A FET has lower voltage drop than a diode, so it is more efficient.

  2. Since the FET has a built-in body diode, you don't need an external diode to cover the short 'dead' time when both FETs are off.

  3. Whenever the PWM ratio is lowered the motor will 'brake' until it reaches the lower speed, rather than spin down freely. So braking is automatically applied even before the throttle reaches the 'off' position.

You can produce the required dead time by delaying the leading edge of each FET Gate drive by a few microseconds, or you could use a 'half-bridge' driver IC which has built-in delays.

Here's an example of a half-bridge driver using discrete components:-


simulate this circuit – Schematic created using CircuitLab

Q1, Q2 and Q3 produce a 12V square wave with high current capacity to drive the FET Gates. R3 and R4 (in conjunction with Gate capacitance) slow down the leading edge of each Gate drive waveform. D1 and D2 bypass R3 and R4 on trailing edges, so each FET turns off quickly before the other one turns on.

The values shown for R3 and R4 should be OK, but for optimum timing (smallest safe dead time) you may want to 'tune' them to suit the Gate capacitances of your FETs.

  • \$\begingroup\$ This would burn very fast and it would heat tremendously. The OP's 1st solution is better that this. \$\endgroup\$ – Marko Buršič Aug 16 '19 at 6:45
  • \$\begingroup\$ 100 mOhm is worse than 8,7 mOhm, also define your specs 1st before design such as my 1st comment \$\endgroup\$ – Tony Stewart EE75 Aug 16 '19 at 11:51
  • \$\begingroup\$ Thanks for all suggestions, it really got me thinking. \$\endgroup\$ – Henrik Östman Aug 16 '19 at 21:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.