The problem I am having is that I have not connected the load to the collector. How stupid of me... Anyway I shall continue trying to make this work without excessive wiring.davidcoton wrote: ↑Sun Dec 31, 2017 3:56 pmNice simulation! I'm not an H-bridge expert, so I may not be 100% correct in what follows, but I think you have some problems here.
First, the 100R resistor will severely limit the motor current, and probably cook itself.
A 3V3 base supply will never turn on the transistors with collectors at 5V unless the 100R is dropping most of the voltage.
You must of course ensure that the software can never, under any conditions, switch on the two top or the two bottom transistors together. Doing so would short the 5V supply, leading to the transistors behaving as three-legged fuses.
This is particularly hard at start-up, shut-down, and on changing direction. H-bridge drivers can use hardware to prevent this condition if there is a software error. One way is to use just two GPIOs, controlling the two 0V transistors directly. A bit more circuitry is used to derive a control signal for the high-side transistors (which might need to be PNP). This must take into account the switch-over period, preventing both transistors coming on together. I believe the commercial circuits use FETs rather than bipolar transistors.
For back EMF protection you need four diodes, clamping each side of the motor to the motor supply (5V and 0V). This assumes that the 5V supply can safely absorb the back EMF energy.
You might do well to look at the datasheets for commercially available integrated H-bridge controllers and see how they tackle these issues.
Users browsing this forum: No registered users and 19 guests