Another DIY h-bridge project that might be worth a read.
Here is the second version.
This has a built in dead-band when switching directions. The p-channel mosfet will charge very fast (Vgs = 0), while the discharge (Vgs = -12V) is very slow, ~ 1000 times slower, only counting the off region on the fet, not the full charge. Meaning when you change the motor direction both p-channel mosfets are off for ~1mS.
The p-channels are not going to do any rapid switching they are going to stay in high saturation for the given direction, and the n-channel being the higher spec is the driver.
Notice that the transistor base for p-channels are of inverse logic, a high means the p-channel is off.
That is one of the possible down sides to this, is that on power up both p-channels start to turn on.
This shouldn't matter for 2 reasons, first the charge time is much slower then the the gate logic, which will correct one of the gates. Second the n-channels are still in the off state, current will not flow, so even if the p-channels somehow both open, its just a electronic braking circuit for a very short period of time.
I've picked the gate logic to supply at least 20mA, the transistors will saturate at 5mA base, making it suitable to drive the transistors from them. Logic gate inputs at most take 1mA (more like uA), sharing a line with the transistors shouldn't matter.
Edit: ignore the first AND gate, that would only force it into the reverse direction, I'll rethink that part of the logic.
And that little dot under the 1M, thats a ground, its suppose to be a mirror image to the other side.
Hmmm, the transistor logic might not work as I first thought, that might actually only drive the p-channel gates to about -7V.
For the regulator: LM1084
Junction-to-Case 3-Lead TO-220: Control Section/Output Section 0.65/2.7 °C/W
I assume that "/" is to represent the difference between heat sink and not heat sink.
At 14W x 2.7 = 37.8 C, which seems perfectly fine considering its 150C max.
Attached is its power chart.
I don't see an issue.
On the schematic even if the gate is only driven to -7V it makes little difference. All the power calculations where base on the lowest end specs possible for everything and it still came out with tons of room to spare.
The AND logic that mixes the EN signal in has been changed to 3 input, low battery signal will be fed into that, making the first one shown not required.
Is there anything wrong with this schematic logic?
P.S Some people seem to be confused about my unwillingness to blindly accept answers. You seem overly accustomed to answer questions to people that have absolutely no idea what they are doing, and some seem to resent feedback and discussion. If you tried that on job where you refused to have discussions and feedback when designing and troubleshooting, you'd probably be fired. Maybe that's why someone is so grumpy?
untitled.bmp (240 KB)
harddrive123:
Here is the second version.This has a built in dead-band when switching directions. The p-channel mosfet will charge very fast (Vgs = 0), while the discharge (Vgs = -12V) is very slow, ~ 1000 times slower, only counting the off region on the fet, not the full charge. Meaning when you change the motor direction both p-channel mosfets are off for ~1mS.
The p-channels are not going to do any rapid switching they are going to stay in high saturation for the given direction, and the n-channel being the higher spec is the driver.
You seen to be using emitter-followers for the high-side level shifting, which cannot work.
The load is on the collector for switching, just as it is on the drain for a FET switching.
Emitter follower cannot have voltage gain, which is a necessity for level shifting from 5V
to 12V if you consider it.
A 1M gate resistor is hopelessly large(*), start with a few k and make it smaller if needs be.
The standard circuit is basically like this:

(*) At switching frequencues the gate is basically floating and capacitive coupling
back from the drain could cause malfunction or even Vgs to be exceeeded.
It is wrong, I did notice the problem after the fact but not for the reasons that I think you mean.
If you notice that because its emitter follower, and driving it on 5V base, the emitter is going to be ~4.3V.
12-4.3 = 7.7V drop
Which means we now have 4.3V at the mosfet base, and the 240 ohm resistor on the collector is a current limiter. I will either need to increase the 240 to reduce the power dissipated, or make sure its properly wattage rated. This affects the charge time but it doesn't matter its still vastly smaller then a 1M.
That means we have a source voltage of 12, and a gate voltage of 4.3 ---> Vgs = -7.7V . Not quiet max saturation but still very strong drive.
The fundamental problem is in that when the transistor is on its driving the mosfet on Vgs= -7V, when its off its driving the mosfet even harder Vgs = -12V. :~
As I said before the 1M is to create a time lag when changing motor direction to avoid mosfet shorting , the mosfet will turn off ~1000 times faster then it turns on. There is no application that would require you to change the motor direction faster then 0.1 sec.
I've actually spent the last few days looking up part specs and re-running the calculations, I'm just going to use a op-amp drivers for the gates far simpler in the long run.
My gut says I don't need to use the op-amps designed for high capacitance loads (almost no distortion), and as long as it can supply the proper current it will work fine.
You fail to understand - the emitter followers mean the p-channel MOSFETs
cannot turn OFF...
You need to translate a 0--5V swing at the output of the Arduino pin to
a 12V -- 2V swing at the gate of the p-channel MOSFET (to give it a full
10V drive).
This means both gain of 2 or -2 and a voltage offset are needed. emitter follower gives unity
gain only and a shift of 0.7V..
You fail to understand - the emitter followers mean the p-channel MOSFETs
cannot turn OFF...
The fundamental problem is in that when the transistor is on its driving the mosfet on Vgs= -7V, when its off its driving the mosfet even harder Vgs = -12V.
emitter follower gives unity gain only and a shift of 0.7V..
If you notice that because its emitter follower, and driving it on 5V base, the emitter is going to be ~4.3V.
5-0.7 = 4.3V ![]()
You didn't read my post at all did you =(
The design is flawed, I kind of just sketched that together in 5 min. I don't make claim that it would work as is, as I stated before.
12V -- 2V swing at the gate of the p-channel MOSFET (to give it a full 10V drive).
You can drive it harder then 10V it just won't net you any noticable efficiency, as long as your under the absolute Vgs that they spec, your fine.
Here is my v3 design, I'm using op-amps to drive the mosfets. See attached.
- the op-amps are sourced from 12V (same as the motor source).
- I'm aware that I could use a NAND gate, finally design will depend on how easily I can find IC sets to match.


Which opamps though? Can they drive their outputs to both rails? Why
choose opamps instead of comparators or MOSFET drivers? - [being the devil's advocate :)]
LM7322
I could use a comparator, however a 10 sec search on digikey has found none that can match that voltage or current.
The point is a comparator does fast switching on the output, opamps
specifically don't do fast switching due to the need for stability in
negative-feedback circuits. Many opamps don't like the inputs being
too far apart in voltage too, a little advertised property.
Comparator: LM339, upto 36V supply, 16mA sink current only though.
MIC4420 driver, 4.5 to 18V supply, standard 5 or 3.3V logic input, up to
6A of output drive. Fast.
Without a doubt a driver is the more suitable in design.
Even though a pulse of 8A at 12V is a lot of power, by my calculation 8.25nS switch time, and even at max 125KHz which is 8uS period, its off 99.999% of the time.
But in reality you only need 50mA to drive at 1uS, and the PWM is more likely to be 100uS period.
I can use low side drivers for p-channels on high side; its the same logic as n-channel just inverted, but that's turning into a lot of support chips when you consider other gate logic to support it. I plan to put 2 motor drivers on one board thats a lot of chips
You never see that many support chips on hobbyist motor drivers.
You think its because they just ignore half the design rules from the spec sheets and it only works cause the outputs self current limit without blowing up and they don't care if they drive the motor mosfets in the most in-efficient manner possible?
If I was designing an H-bridge of this sort of size I'd just reach for the trusty
FAN7388 to do all the MOSFET driving (its 3 high-low drivers in one package),
so the component count would be:
4 n-MOSFETs
1 driver chip
2 bootstrap caps
1 decoupling cap for driver
2 bootstrap schottky diodes
[ and some motor supply decoupling too, probably ]
However the FAN7388 is SMT only, so you'd need to be able to handle that.
Current sensing is also a very good thing to have if running from big
batteries.
That chip is clearly designed for 3 phase applications, given its pulse current limit of ~300mA , that highly suggests its geared for 60Hz switching loads. If I'm going to bother I might as well try to do a proper driver + mosfet match.
2x Si4564DY (p+n channel)
4x FAN3122TMX (1 per gate)
Plus associated caps and logic gates.
I'm pretty sure I don't need the drivers for the p-channel as they only switch with the direction change signal but in the end its either use them with a cap for pulse current sourcing or a equally sized (comparator/op-amp with resistor for current limiting).
I've been double checking my logic but I'm all but certain that the logic I posted before does supply a small dead-band when switching direction. Regardless of direction (0-->1 or 1 -->0) the gate that was 0 becomes 1 (mosfet is off) and the other one that was 1 cannot go to a 0 (on) until the other one is done switching making the dead-band about equal to the propagation delay of the NAND (15-25nS).


