Self-made H-Bridge? Not that easy - need some tips

Hello there!

EDIT: there is an NPN-only based attempt here: https://forum.arduino.cc/index.php?topic=734543.msg4944098#msg4944098

I don’t have an H-Bridge IC at home, ordered some but thought, how hard could it be? It’s just a bunch of transistors and diodes, right? Not for me (Q leading to this one).

I have a circuit that works more or less but I made some “sacrifices” along the way.

On the diagram, I marked the main current with lime line. There is a blue line that indicates that the right switch is on, right PNP and NPN transistors have voltage on their bases. Right PNP is off, right NPN is on.

I have a biig problem though. I introduced 3 diodes D1-3 (not flyback diodes, they come later).

D2, D3: they were needed to make sure that in initial state, when current flows from Emitter->Base of the PNP transistors, and neither switch is on, the NPN transistors remain off. But with that, I have a voltage drop of 0.7V to base of PNP from the switch, therefore, I won’t ever be able to switch off the PNP completely due to big enough potential difference between E-B.
D1: to work around the problem of PNP not switching off completely, I put in another diode, D1. This however means, that the max voltage I can work with is VCC-0.7, I’m not too happy about.

Q: is there a way to get rid off the Diodes in such a way that the behavior of the circuit doesn’t change?

CIRCUIT SIMULATION HERE

The only place you need a diode is across the motor to prevent back EMF.
Remove the diodes and put one across the motor (diode power rating should match load power)

There is nothing simple about an H-bridge. Shoot through is a common problem that needs to be
dealt with. Matching device rating with load rating is also a requirement. Where did you get this
H-bridge design ?

Well, I kinda YOLOd it :smiley: I read the concepts of it and tried to come up with a circuit. Figured, if I can make something similar work, I understand the concept enough to throw all that away and just keep buying ICs.

Matching ratings will come when I actually can design a working circuit. I'm playing around with few dollar parts from batteries, not that worries about ratings or damaging components.

If I removed the diodes, like you said, there would be shoot through, making the circuit not work. Now that I know it's called shoot through, Googling ftw.

raschemmel:
The only place you need a diode is across the motor to prevent back EMF.
Remove the diodes and put one across the motor (diode power rating should match load power)

Well that's not going to work in an H-bridge, since the motor is driven in either direction...

For an H-bridge you need 4 diodes, which is easy with MOSFETs as power-MOSFETs all have
body-diodes built in. However for BJTs, Darlingtons and IGBTs you have to add them.

Shoot-through is a major pitfall for an H-bridge, its better to drive each direction separately,
not each half-H-bridge separately, I reckon. Here's a circuit I've used for a BJT H-bridge:

Note I've swapped over two transistors from the normal way an H-bridge is drawn, which in
retrospect is a bit confusing.

For BJTs you have to size the base resistors appropriately to the actual load current (assume
the base current is about 5 to 10% of the full-load motor current).

Note how a full-bridge rectifier neatly provides 4 diodes in one package (this circuit was built
on a tiny SMT circuit board in fact).

Since the two inputs control forward and reverse respectively, you just have to ensure a few microseconds
dead-time between changing from forward to reverse or vice-versa.

mightnotshort:
Q: is there a way to get rid off the Diodes in such a way that the behavior of the circuit doesn't change?

Use schottky diodes for D2 and D4, and change those 10k resistors to something more sensible for the current needed, 1mA into the base gives about 15mA to the motor!

You can then probably lose D1, or at least make it schottky and lose less voltage.
You still have a deadtime problem - you have no deatime...
[/quote]

A rule of thumb for switching bipolar transistors is to assume a (forced) gain of ~10. Stated differently you base current should be approximately 1/10 your collector current requirements.

Yes, 4 diodes . You are correct. I forgot that.
It’s actually a full wave bridge rotated 90 degrees CCW with the AC connections on the left and right instead of the top and bottom. You can actually use a full wave bridge module if you have one, by replacing the AC source with a motor. You can see both the motor in the first circuit and AC source in the second circuit are connected to the same nodes.
Take the diodes in the H-bridge circuit and redraw it with one connection node at the Vcc end and the GND
end and it is the same as the bridge rectifier in the other circuit , only rotated CCW 90 degrees.
You need one diode across each switching device, be it BJT or mosfet.

diode20.gif

raschemmel:
Yes, 4 diodes . You are correct. I forgot that.
It’s actually a full wave bridge rotated 90 degrees CCW with the AC connections on the left and right instead of the top and bottom. You can actually use a full wave bridge module if you have one, by replacing the AC source with a motor.

That is an excellent insight! I didn’t notice at first. I only thought of them as flyback diodes.

Version 2 - attempt failed 2 :slight_smile:

So, I thought, I’d go ahead and make a variant using only NPN transistors. The simulation can be found here: https://everycircuit.com/circuit/5240620714819584

Diagram attached.

While it works in the simation, I’ve thought of a couple of problems why this design wouldn’t work well:

  • Still no flyback diodes
  • Even if there were, there would be problem with the circuit because there is no path for current to flow after switching off both switches

Please make not of the difference of BJT diode models from above link/image.

With NPNs, after the motor has ran for a while, and I switch off both switches, there is nothing that would “soak up” the electric field in the inductors or path to ground. I’m guessing component damage? (Obviously I don’t know, I’m not an electrician, just learning)

With PNP, there is always a path from the motor to ground in the first, PNP based circuit.

I could expand the NPN based circuit with a NAND gate that would open when neither switch is on to create a path to ground. That could potentially solve that problem with 2 extra transistors.