Author Topic: H-bridge DC motor driver with OPAMP as gate driver?  (Read 1756 times)

0 Members and 1 Guest are viewing this topic.

Offline suku

  • Contributor
  • Posts: 43
  • Country: hu
H-bridge DC motor driver with OPAMP as gate driver?
« on: June 24, 2019, 05:21:00 pm »
I'm designing a circuit where I drive a 12V 500mA DC brushed motor using a H-Bridge MOSFET IC (DMHC3025LSD or really any suitable FET pair).

https://hu.mouser.com/datasheet/2/115/DMHC3025LSD-709448.pdf

I designed simple opamp based driver circuit that will take a GPIO output from 5V microcontroller and output the gate signals for the FETs.



DRIVER_P1, DRIVER_P2, DRIVER_N1 and DRIVER_N2 are connected to the microcontroller. Pullup and Pulldown reistors are to make sure that the motor won't start while the microcontroller is in reset state. I will add zener clamps to make sure not to damage the GPIO pin with the 12V.

MOTOR+ and MOTOR- are connected to the DC motor

VDD+12V is +12V.
VSS+12V is the Ground for the 12V supply.
VREF is 2V.

Design goals: Low cost, high reliability operation, reliable supply chain for the components.

Will this circuit work well? What are some things to look out for when designing motor drivers? Should I use integrated motor driver chip? I'm looking for any feedback!
 Thanks.
« Last Edit: June 24, 2019, 05:32:18 pm by suku »
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 11910
  • Country: us
  • DavidH
Re: H-bridge DC motor driver with OPAMP as gate driver?
« Reply #1 on: June 24, 2019, 06:50:50 pm »
There is nothing inherently wrong with that if you do it right unless you need better performance.  Operational amplifiers make slow comparators and they become even slower when driving the relatively high input capacitance of power MOSFETs.

The LM324 is tame enough to work well as a comparator if the result is fast enough for you.  I would put low value series resistors between the LM324 outputs and the power MOSFET gates to limit the current at the expense of a little bit of speed.  In through hole designs, these resistors would also help with layout.

If the LM324 does not pull up far enough to its positive supply to completely shut off the p-channel power MOSFETs, then add a pull-up resistor to its output.
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 2626
  • Country: de
Re: H-bridge DC motor driver with OPAMP as gate driver?
« Reply #2 on: June 24, 2019, 08:11:34 pm »
Is this for static drive, or do you intend PWMing the motor?
Also, why the diodes? The MOSFETs already have reverse diodes.

 

Offline suku

  • Contributor
  • Posts: 43
  • Country: hu
Re: H-bridge DC motor driver with OPAMP as gate driver?
« Reply #3 on: June 24, 2019, 08:23:20 pm »
I want to be able to PWM the motor. Does that require any special consideration?
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 14592
  • Country: gb
  • 0999
Re: H-bridge DC motor driver with OPAMP as gate driver?
« Reply #4 on: June 24, 2019, 08:30:35 pm »
If the LM324 does not pull up far enough to its positive supply to completely shut off the p-channel power MOSFETs, then add a pull-up resistor to its output.
But then that problem could be shifted to the negative side of the bridge.

The easiest fix is to replace it with a comparator, such as the LM339 (note the different pin-out) and a pull-up resistor from each gate to +12V.

I want to be able to PWM the motor. Does that require any special consideration?
The LM324 will not do for PWM. The MOSFETs will switch very slowly, which will cause them to get very hot. You need a proper gate drive IC, such as the TC4468.
http://www.farnell.com/datasheets/2124840.pdf?_ga=2.221062353.878591148.1561408095-1107606318.1553553996
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 2626
  • Country: de
Re: H-bridge DC motor driver with OPAMP as gate driver?
« Reply #5 on: June 24, 2019, 08:57:53 pm »
I want to be able to PWM the motor. Does that require any special consideration?

Yes, certainly! What PWM frequency are you aiming for?
How fast do you intend to change direction of the motor?
Which kind of motor is it (PMDC, of course, but quality, speed etc.)?

 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 11910
  • Country: us
  • DavidH
Re: H-bridge DC motor driver with OPAMP as gate driver?
« Reply #6 on: June 24, 2019, 09:07:23 pm »
Also, why the diodes? The MOSFETs already have reverse diodes.

It is sometimes important to prevent the body diodes from conducting because their reverse recovery time causes shoot through current when the other MOSFET turns on.  This is not a problem in all applications.

If the LM324 does not pull up far enough to its positive supply to completely shut off the p-channel power MOSFETs, then add a pull-up resistor to its output.

But then that problem could be shifted to the negative side of the bridge.

It is probably never a problem anyway.  I had to find an old datasheet but the LM324 actively pulls up to within 1.2 volts.  I thought it was more like 2.5 volts.

Quote
I want to be able to PWM the motor. Does that require any special consideration?

The LM324 will not do for PWM. The MOSFETs will switch very slowly, which will cause them to get very hot.

You need a proper gate drive IC, such as the TC4468.

I agree; the LM324 will be too slow unless your PWM frequency is only kHz.

An LM339 quad comparator with pull-ups driving an NPN transistor and diode class-b output driver could work; an example of this type of driver is shown below.  Or an integrated drive like Suku suggests.
 

Offline suku

  • Contributor
  • Posts: 43
  • Country: hu
Re: H-bridge DC motor driver with OPAMP as gate driver?
« Reply #7 on: June 25, 2019, 09:50:47 am »
Thanks for the feedback guys, will replace the LM324 with something that will provide better drive capability. I'm also investigating the possibility of using cheap stepper motor driver as two channel dc motor driver.
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3397
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: H-bridge DC motor driver with OPAMP as gate driver?
« Reply #8 on: June 25, 2019, 10:41:24 am »
Another design of a "why not do it properly, if it can't be made improperly" type.

For "PWMing" a motor, where there is not a requirement for 100% duty cycle ratio (which rarely is really required), use just a couple of cheap half-bridge drivers, such as IRS2001 or any other from the thousands of similar ones. Done.

If you that much need to go even cheaper, then by using a couple of discrete transistors, make the bootstrap driver. 2 transistors minimum per mosfet required to do all the heavy-lifting from 3V MCU up to the high/low side gate.

//EDIT: Typos.

« Last Edit: June 25, 2019, 10:48:50 am by Yansi »
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 2626
  • Country: de
Re: H-bridge DC motor driver with OPAMP as gate driver?
« Reply #9 on: June 25, 2019, 09:54:44 pm »
Yes, certainly! What PWM frequency are you aiming for?
How fast do you intend to change direction of the motor?
Which kind of motor is it (PMDC, of course, but quality, speed etc.)?

You still haven't answered these questions.

If you select logic level MOSFETs for the low side, 74AC04 (2 x 2 in parallel plus inverter before) are perfect for low side drive.
For the upper side, static drive is enough for a normal PMDC drive system.

 

Offline Someone

  • Super Contributor
  • ***
  • Posts: 2518
  • Country: au
Re: H-bridge DC motor driver with OPAMP as gate driver?
« Reply #10 on: June 25, 2019, 11:13:00 pm »
Yes, certainly! What PWM frequency are you aiming for?
How fast do you intend to change direction of the motor?
Which kind of motor is it (PMDC, of course, but quality, speed etc.)?

You still haven't answered these questions.

If you select logic level MOSFETs for the low side, 74AC04 (2 x 2 in parallel plus inverter before) are perfect for low side drive.
For the upper side, static drive is enough for a normal PMDC drive system.
Agreed more information is needed to make better recommendations. For slow switching speeds discrete open collector transistor drivers and pull-ups are completely appropriate. An "old" standard part that can drive both sides is the cmos 4504, but depends on the other performance expected of the whole system.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 11910
  • Country: us
  • DavidH
Re: H-bridge DC motor driver with OPAMP as gate driver?
« Reply #11 on: June 26, 2019, 02:56:03 am »
If you select logic level MOSFETs for the low side, 74AC04 (2 x 2 in parallel plus inverter before) are perfect for low side drive.
For the upper side, static drive is enough for a normal PMDC drive system.

If the upper side needed to be PWMed also, then an elevated 74AC04 with a 5 volt zener shunt to control its supply voltage could be fed with a simple low output current level shifter.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 14592
  • Country: gb
  • 0999
Re: H-bridge DC motor driver with OPAMP as gate driver?
« Reply #12 on: June 26, 2019, 08:20:00 am »
As the motor is only 500mA, BJTs may also be an option
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3397
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: H-bridge DC motor driver with OPAMP as gate driver?
« Reply #13 on: June 26, 2019, 10:13:00 am »
500mA motor! Well... could have stated  that sooner (or have I missed it?)

Use an off-the-shelf H-bridge (with integrated drivers of course), unless pushing for low price badly.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 5579
  • Country: fr
Re: H-bridge DC motor driver with OPAMP as gate driver?
« Reply #14 on: June 26, 2019, 01:14:20 pm »
I really second the integrated solution, something like the Rohm BD6220F or BD6221F. A couple bucks. Integrated protections, dead-time, etc. I wouldn't bother doing that with a discrete approach unless there was an excellent reason.
 

Offline lordvader88

  • Frequent Contributor
  • **
  • !
  • Posts: 936
  • Country: ca
Re: H-bridge DC motor driver with OPAMP as gate driver?
« Reply #15 on: June 26, 2019, 06:19:09 pm »
Operational amplifiers make slow comparators and they become even slower when driving the relatively high input capacitance of power MOSFETs.

So if u had a common LM393 comparator vs  a common LM358 op-amp as a comp., how much difference is there ?

I think I only have a few comparators, I should get a few better ones for special projects.
 

Offline jmelson

  • Super Contributor
  • ***
  • Posts: 1636
  • Country: us
Re: H-bridge DC motor driver with OPAMP as gate driver?
« Reply #16 on: June 26, 2019, 07:03:15 pm »

So if u had a common LM393 comparator vs  a common LM358 op-amp as a comp., how much difference is there ?
The LM393 has no pull-up transistor, it is not designed to sink more than a few mA ouptut with a pull-up resistor.  The FET gate drivers I use from International Rectifier can source close to an amp and sink over 1 amp.  You need this to keep the transistors out of the linear region, where they do not perform well.

 

Offline lordvader88

  • Frequent Contributor
  • **
  • !
  • Posts: 936
  • Country: ca
Re: H-bridge DC motor driver with OPAMP as gate driver?
« Reply #17 on: June 26, 2019, 08:07:11 pm »
I have a few salvaged motors and controller/driver chips. Now I wish I save more boards. I want to make a few simple things like a remote IR curtain opener and light switch flicker. But not like Doc Brown cooking my breakfast.
 

Offline ahbushnell

  • Frequent Contributor
  • **
  • Posts: 600
  • Country: us
Re: H-bridge DC motor driver with OPAMP as gate driver?
« Reply #18 on: June 26, 2019, 11:43:25 pm »
There is a problem with the way the MOSFET's are installed.  Better check that.

Also as other people said opamps are not a good idea. 

andy
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 11910
  • Country: us
  • DavidH
Re: H-bridge DC motor driver with OPAMP as gate driver?
« Reply #19 on: June 27, 2019, 05:54:25 pm »
Operational amplifiers make slow comparators and they become even slower when driving the relatively high input capacitance of power MOSFETs.

So if u had a common LM393 comparator vs  a common LM358 op-amp as a comp., how much difference is there ?

The LM339/LM393 comparator is like 200 nanoseconds while the LM358/LM324 will take 12 microseconds just to slew its output *after* recovering from saturation.  So 100 times faster is not out of the question.

But an LM339/LM393 will require some kind of output driver which might be as simple as the example I gave or more likely an NPN/PNP emitter follower pair with a pull-up resistor.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 14592
  • Country: gb
  • 0999
Re: H-bridge DC motor driver with OPAMP as gate driver?
« Reply #20 on: June 27, 2019, 08:54:16 pm »
The example shown above is for a device with an open emitter output, which can only pull-up. The LM393 has an open collector output, so the circuit needs to be modified accordingly.
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3397
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: H-bridge DC motor driver with OPAMP as gate driver?
« Reply #21 on: June 28, 2019, 07:07:48 am »
If you go this far with boosting the output stage, why not simply  gtfo with the comparator and replace it with just a single small signal n-mos transistor with much better result?
 
The following users thanked this post: Someone

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 11910
  • Country: us
  • DavidH
Re: H-bridge DC motor driver with OPAMP as gate driver?
« Reply #22 on: June 28, 2019, 08:31:57 am »
If you go this far with boosting the output stage, why not simply  gtfo with the comparator and replace it with just a single small signal n-mos transistor with much better result?

I assumed there was some issue with the input voltage threshold needing to be more precise than the Vgs of a MOSFET would be.
 

Offline ArthurWozniak

  • Contributor
  • Posts: 6
  • Country: br
Re: H-bridge DC motor driver with OPAMP as gate driver?
« Reply #23 on: June 29, 2019, 12:40:04 am »
Hey,

Do you consider use DRV family?
There are complete solutions for small current DC motors such yours
If not, IR2104 gate driver is awesome

Best regards,
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf