Need help with dual H bridge (5A each) circuit and pcb design - Page 1
Forum section: electronics / projects

author: OM222O
author_rank: Frequent Contributor
timestamp: July 31, 2018, 12:51:39 pm
content: Hello, I am designing an H bridge circuit to control 2 motors, each requiring a direction and an enable signal (can be PWM). The morots we're currently using have 4.5A stall current, but I want the motor driver to be scaled up, so I chose the IRFZ44NPBF (N channel) and IRF4905PBF (P channel) which give a theoretical max current of 50 amps per motor. The bridge needs to be driven from a micro controller with 3.3V output pins, so I decided to use optocouplers (782-CNY74-4H ) for protection. We will also be using a 3S Lipo battery (9.0-12.6 voltage range, 54A maximum output).I also decided to add some logic and passive components in order to prevent the mosfets on the same side from being shorted, using a circuit like this:The resistor + capacitor + diode allow a short fall time (fast edge) but a long rise time (slow edge) while changing directions and I've successfully tested the model as shown here(The enable signals are set permanently high and the direction signal is changing):as you can see, the green led has turned off, before the red one comes on and vice versa, so the circuit seems to be working fine. where I started running into problem, was when I decided to simulate the mosfets. The threshold voltage is said to be 2 to 4volts (or -2 to -4) so I used the worst case scenario (4V) to run the simulation (I also used an NPN transistor to simulate the optocoupler). Assuming battery is at nominal voltage (11.1v) the P channel mosfet seems to be functioning correctly:(simulation can be found athttp://tinyurl.com/yd2b95te)but I have no idea why the N channel doesn't seem to work ... I'm getting 2.74 on the gate instead of the expected 11.1v and therefore the mosfet is not turning on:(simulation can be found athttp://tinyurl.com/yckfqgfb)Here's the full bridge design by the way:I have 2 questions now:1) How can I fix the issue with the N channel mosfet not turning on?2) Is there a way to do the inversion (N channel needs to be pulled high when P channel is being pulled low) using the optocpuplers themselves, or should I go with inverting the signal using the logic chip and activating the opto with that signal?also if anybody can suggest a better design, it would be really helpful, thanks a lot.

author: max_torque
author_rank: Super Contributor
timestamp: July 31, 2018, 01:49:35 pm
content: Do you need to use descrete components for a particular reason? (cost or because it's a study project etc??)There are loads of off-the-shelf H bridge (and half bridge) IC's that can do 5A (or more) at low cost and are super simple to use, and tend to include a lot of useful safety such as over temperature, over current and short circuit protection, or things like current feedback or state sensing etc.Infineon do a large range of very robust designs that can operate up to around 40V(if you need to roll your own solution for some reason, then ignore this post, otherwise, if you just want something to work in the shortest time, go with an OTS integrated solution!)

author: langwadt
author_rank: Super Contributor
timestamp: July 31, 2018, 01:58:11 pm
content: why not use one of the numerous H-bridge ICs out there? everything included and protected against most abuse

author: Siwastaja
author_rank: Super Contributor
timestamp: July 31, 2018, 02:00:57 pm
content: What's C3? You are either charging this capacitor with unlimited current, or shorting this capacitor with unlimited current all the time.

author: mikerj
author_rank: Super Contributor
timestamp: July 31, 2018, 04:10:20 pm
content: You are driving the N channel MOSFET gate via an emitter follower, so the gate voltage will be one Vbe below your 3.3v logic level. The MOSFET is just barely starting to conduct.As Siwastaja says, remove that 10u capacitor across the motor unless you want to be blowing up your H bridge when you use PWM speed control.

author: OM222O
author_rank: Frequent Contributor
timestamp: July 31, 2018, 10:58:43 pm
content: It's a study project and also a start for designing high current PCBs, so off the shelf ICs or even boards are not an option here. It will cost more than already available boards as well but again, that's not the goal. I'm just interested in fixing the issues I talked aboutThis is the design that I was recommended by many people, so my bridge design is based off of this (I just don't need how to drive it using optocouplers that I have):Edit: I think I can use a PNP after the optocouplers in order to drive the N channel mosfet, but I don't know how efficient it would be

author: Siwastaja
author_rank: Super Contributor
timestamp: August 01, 2018, 05:51:07 am
content: If you want to PWM at all, you need gate drivers that can supply high currents (amperes, with resistance of just a few ohms) both directions, high and low. Pullups and pulldowns simply don't work to switch large MOSFETs.You may want to look at bootstrap half bridge gate drivers. They are nice basic building blocks, and using two gives you a H bridge, and offers shootthrough protection, while still keeping you in control mostly. This allows you to work with N-channel devices only, which are much better and cheaper, and using only one type of power device simplifies the BOM as well.If you really want to do this fully discrete and can't accept even gate drivers, it's going to be fairly complex and PITA to design.

author: OM222O
author_rank: Frequent Contributor
timestamp: August 01, 2018, 06:07:57 am
content: can you give me some examples of the gate drivers? do I need to make a bootstrap circuit or does the driver do it automatically? We need to select the mosfets and logic chips, but how they are driven does not matter in this case.Edit: We will be driving the enable line with a PWM signal of 40-80KHz with 20-95% Duty cycle

author: Siwastaja
author_rank: Super Contributor
timestamp: August 01, 2018, 06:34:21 am
content: https://www.digikey.fi/products/en/integrated-circuits-ics/pmic-gate-drivers/730?k=&pkeyword=&pv1930=2&FV=ffe002da&quantity=0&ColumnSort=0&page=1&stock=1&nstock=1&pageSize=100With your low voltage, you have a lot to choose from! For example,https://www.diodes.com/assets/Datasheets/DGD0506A.pdfThis does a lot automatically. I wouldn't bother with optoisolation. So you need the FETs, gate drivers, the bootstrap capacitor (and the diode if it's not integrated; this part does have it), small gate series resistors to tame the rise/fall times in moderation (around 10 ohms as a ballpark - this is 1000 times less than the 10k you have now driving the gate!) and your microcontroller - and that's it.You'd still need current sense if you want a robust solution. With small or inefficient motors (< 50W, say; stall currents below 10A), you can do without, but otherwise, it's a pretty much a must, and pays for itself (so you won't need to oversize the MOSFETs to handle the stall current in all conditions). Efficient motors can have stall currents so high that you need toactivelylimit the current by quickly sensing it and adjusting your PWM in very quick response (microsecond scale) to avoid blowing the MOSFETs (or needing to design in stupidly large MOSFETs just to handle this current you'll never want in actual operation).Note that the limitation with the bootstrap gate drivers is that you can't run continuous "high" level (upper FET on). You need to periodically refresh the bootstrap capacitor by driving the low level. If you are using PWM anyway, this means limiting the duty cycle to some 99%.

author: OM222O
author_rank: Frequent Contributor
timestamp: August 01, 2018, 06:55:20 am
content: It seems like a good idea, but why not use optocouplers? is there a downside to isolating the logic circuit from the power circuit?and how should I implement current sensing? just a shunt resistor and a simple op amp circuit? or another IC?

author: Siwastaja
author_rank: Super Contributor
timestamp: August 01, 2018, 07:46:51 am
content: Cost, complexity, larger number of things that can go wrong if you don't know how to design them correctly (optocouplers proving surprisingly difficult and complex parts for beginners over and over again!)If youdoreally want optoisolation, I'd consider integrated optoisolation gatedrivers, with isolated power supply for them as well!This is, if you build a few hundred watt extra low voltage motor driver which is tightly integrated in one physical place, there simply is very little need for galvanic isolation anywhere.If done correctly, there are of course no functional downsides.One way to do current sensing without affecting efficiency too much is to use a small-value current sense resistor, amplified by current sense amplifier with enough bandwidth (such as INA213, which is neatly bidirectional for sensing current in both directions), then brought out to your MCU's analog comparator pin (if one exists), or an external comparator. This can easily generate you an interrupt allowing you to turn off the FETs and/or adjust the PWM duty cycle quickly.With motors, this is fairly easy, since they have enough inductance that a 100kHz bandwidth and 10µs reaction time is just fine and often, even slower is acceptable. Heck, you can often do it quick enough with just a cheapo MCU ADC (the slowest parts, such as AVR's 10 ksamples/s, may still be too slow). Compared to this, with switch mode converters, OTOH, you need to really think about the speed of current sensing.Measuring the current gives you an additional feature, which isveryusable: create a feedback loop to regulate current, and you have a nice torque setting, which is often more useful than a speed setting, or the raw PWM setting.

author: OM222O
author_rank: Frequent Contributor
timestamp: August 01, 2018, 08:51:11 am
content: Thanks a lot. I just had 2 more questions:I don't know if the value of the bootstrap capacitor is important or not, so I just chose a sufficient voltage rated (10uF 30v tantalum) cap, does this affect the circuit in any meaningful way?and the DGD0506A seems to have integrated deadtime built in, does it mean I can remove the capacitor + diode + resistor on the logic chips which create this deadtime while changing direction? (I will be using a 10K res which is supposed to create 40-100ns of deadtime)

author: Siwastaja
author_rank: Super Contributor
timestamp: August 01, 2018, 09:00:42 am
content: Yes, remove any deadtime kludges. They are probably not working properly anyway. The chip does it automatically. With this particular Diodes part, you can usually configure the shortest deadtime available and even then it's quite long... Deadtimes too long seem to be a continuing trend on gate driver IC design, but oh well... It doesn't matter much here.If you wanted to use a gate drive that doesn't have deadtime insertion, then you'd most easily add the deadtime simply by using a microcontroller which has a deadtime feature on its PWM output - almost any modern controller have it.I tend to choose bootstrap capacitor so that it stores at least 20-30, preferably 50 times more charge than the Qg(tot) of the high-side MOSFET - try doing the math, this is a good simple excercise. This way, the voltage on the capacitor doesn't drop considerably when the gate is turned on (by transferring the charge from the bootstrap capacitor to the MOSFET gate). For such few hundred watt motor controller, the right ballpark would be around 100n...1u and a small & cheap ceramic will do just fine. You won't need 10u of capacitance.