I have designed this circuit to operate based off of the fact that when a transistor is in saturation mode it will behave as a switch when a voltage is applied at its base. The base voltage is greater than the emitter voltage, but the base voltage is greater than the collector voltage. The H-bridge is supposed to allow a path for a motor to be operated in one direction when a 3.3 V gpio pin is activated and then also to reverse the polarity when another gpio is activated on the second set of switches. This motor is being powered by a lithium ion battery of 3.7V. This circuit is not operating as it should and I am unsure as to why it isn't working. The green circuit shows the path for the top LED and the blue one shows the path to the bottom one. I used these LEDS to show the reverse polarity as you cant simulate a motor moving. I am unsure as to where I have gone wrong in this design. The top two transistors are in their forward active mode. VB is greater than VE but less than VC. With the VBE Junction in forward bias with the VBC junction in reverse. The bottom transistors that supply the path to ground are in saturation however as the VBC and VBE junctions both being forward biased. I would think that since these top two transistors are in active mode they would still allow current to flow, just current that is proportional to the base current. Is there a reason that I am overlooking that is causing this to not function as expected. I am trying to use these switches to provide power to a load in both polarities. It would be nice to have all of these transistors in saturation as active mode will limit the power to this load somewhat. I have tried using a voltage divider and sending the split voltage to the collector node and this still doesn't cause the circuit to operate as I would think it would. Any help or suggestions would be appreciated. H-Bridge Attempt

I tried this implementation with pnp transistors and I cant seem to get it to work this way either. Is this the correct implementation? enter image description here

My third attempt adding pull down transistors

enter image description here

  • \$\begingroup\$ The problem is with the high-side NPN transistors. When the transistor starts conducting, its emitter voltage will rise, up until the Vbe is small enough to make the transistor stop conducting. You effectively cannot produce a voltage at the emitter higher than the GPIO output voltage minus 0.7V (Vbe). You either need a PNP transistor, or a P MOSFET, or some kind of IC. \$\endgroup\$ – Laszlo Valko Mar 16 '18 at 20:35
  • \$\begingroup\$ This wont work. What is your motor DC R of coil? \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Mar 16 '18 at 20:59
  • \$\begingroup\$ The load is a linear actuator data sheet is here s3.amazonaws.com/actuonix/Actuonix+L12+Datasheet.pdf \$\endgroup\$ – Gage Haas Mar 16 '18 at 21:12
  • \$\begingroup\$ The linear actuator will run off of the battery. I am simply just trying to use the Raspberry Pi GPIO to set a path for the current. The GPIO is capable of switching a transistor on, so I dont see why it isnt possible for it to switch two transistors. Could you please explain the issue with this then, cause I do not understand why it isnt working. \$\endgroup\$ – Gage Haas Mar 16 '18 at 21:17
  • \$\begingroup\$ I asked for DCR because Rb depends on this as Ic/Ib=10 is ideal. Did you mean the 6V rated part with a stall current of 0.46A? \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Mar 16 '18 at 21:23

I had a go with LT-spice to get a principle circuit. I started with two NPN transistors to get from 3V3 to 6Volts. Then I added a push-pull stage:

enter image description here

(The Pulse supplies simulate 3V3 GPIO pins)

The advantage is that a short from VCC direct to ground is prevented.
As mentioned MOSFET have lower Ron.

(It is now close to 1AM here, I hope I have made no make mistakes)

  • \$\begingroup\$ This Circuit worked perfectly. I didn't realize that I could allow the battery to turn on the transistors and then use the gpio to facilitate the path to ground. Thank you for the help, it's much appreciated. \$\endgroup\$ – Gage Haas Mar 17 '18 at 0:25

You will want to create a circuit more like the second. connect the bases of Q5 to Q3 and Q1 to Q4. and those corresponding bases to the gpio pins. (Note: this approach will not work using just switches unless you place a pull down resistor after the switch).

Another important note is that if you want to use a battery voltage higher than 3.3V (3.7V is pushing it) then you will need to put a level converter between the inputs of the hbridge and the gpio pins.

  • \$\begingroup\$ By pull down resistor do you mean that I would place a resistor before the load, or a resistor before the base as I have in the circuits above? \$\endgroup\$ – Gage Haas Mar 16 '18 at 21:22
  • \$\begingroup\$ I thought the whole purpose of using a transistor as a switch was to be able to use a smaller current / voltage to drive a higher one such as the battery. Why is this 3.7 volts an issue? The 1k resistor going to the base provides a current limiter to avoid damaging the transistor, and it's my understanding that when the current turns the transistor on then the emitter and collector short circuit allowing a path for the 3.7V battery to power the load? The pnps at the top would be in saturation since VE > VB < VC \$\endgroup\$ – Gage Haas Mar 16 '18 at 21:24
  • \$\begingroup\$ If you want a low voltage switch use a low RdsON FET. If you want to use transistor then allow Vce(sat) at Ic/Ib=10 or 10% of hFE \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Mar 16 '18 at 21:27
  • \$\begingroup\$ the reason you have to level convert the voltage is for the pnp transistor. because otherwise on a high output from the gpio pins (3.3V) you will still have a positive VEB on the pnp transistors (3.7V-3.3V = 0.4V). you would want the pull down between the switch and the base resistor. \$\endgroup\$ – Daniel Johnson Mar 16 '18 at 21:28
  • 1
    \$\begingroup\$ I am not sure what is in there. They talk about "an optional.... on-board micro controller". But if there is just a motor you will also need fly-back diodes. \$\endgroup\$ – Oldfart Mar 16 '18 at 21:34

How to power a BJT power switch


simulate this circuit – Schematic created using CircuitLab

Choose a high gain, low Vce(sat) transistor > load current.

  • \$\begingroup\$ For push pull you need the complement on the battery side with no crossover (shoot-thru) i.e. short circuit then add clamp diodes. Due to large currents needed and Vce(sat) MOSFETS work better with low Ron. \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Mar 16 '18 at 22:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.