0
\$\begingroup\$

I'm attempting to set up an H-Bridge that can be controlled from 1 GPIO pin of an Arduino.

I tried setting up the following circuit with a lab power supply and noticed the following:

  1. When Vin was set to 5V, current was flowing through R5 to the right
  2. When Vin was set to 0V, the power supply read 2.0V (wasn't able to bring it down to 0V)
  3. When Vin was directly grounded, current was flowing through R5 to the left

I then tried changing Vin via a GPIO pin on an Arduino Uno, flipping every five seconds. I noticed the following:

  1. When Vin was set to high (5V), there was a voltage drop of 3.426-0.263=3.163V across R5 (going right). The GPIO read around 4.2V.
  2. When Vin was set to low (0V), there was a voltage drop of 0.889-5.033=-4.144V across R5 (going right). The GPIO read around 0.3V.
  3. When Vin was set to high, transistor Q4 got really hot.

I'm confused about a few things.

  1. Why was the power supply unable to provide 0V to Vin?
  2. Why was the Arduino unable to provide 0V and 5V for low and high?
  3. Why did Q4 get really hot when none of the others did?
  4. With the Arduino, why was the current in R5 smaller when Vin was high as compared to low when the circuit is symmetric?

Circuit schematic

Circuit simulation

( I(R5) is in the left direction )

\$\endgroup\$
4
  • \$\begingroup\$ Just for clarification, since you don't mention the actual part numbers you used, are those transistors you have in the schematic the part numbers you actually used or are you just using them to illustrate your circuit? \$\endgroup\$
    – Funkyguy
    Commented Sep 11, 2015 at 3:07
  • \$\begingroup\$ I did use two BC558s and two BC548s. \$\endgroup\$ Commented Sep 11, 2015 at 3:20
  • 1
    \$\begingroup\$ Note that R1 and R2 are useless. But that is moot because of what vini_i answered: when the input is unconnected (that is a situation you can't always avoid) this circuit shorts power to ground via Q2 and Q4. \$\endgroup\$ Commented Sep 11, 2015 at 6:35
  • \$\begingroup\$ Can you please give some hints as to why R1 and R2 are useless? Also, the input is always connected to a GPIO on the Arduino, though I suppose I could add a pull down/up resistor. \$\endgroup\$ Commented Sep 11, 2015 at 9:49

1 Answer 1

1
\$\begingroup\$

Q1 and Q3 are set up in a correct half bridge configuration. Q4 and Q2 are not because this configuration is conducive to shoot through. Q4 can source current out of the base and Q2 will sink it through its base. This will cause both Q4 and Q2 to be on at the same time. Also there would be no way to hold the setup completely off. You need at least 2 pins to drive a full H bridge.

\$\endgroup\$
2
  • \$\begingroup\$ In my current project I don't need an off state. Isn't Q2 off when Vin is low? \$\endgroup\$ Commented Sep 11, 2015 at 3:09
  • \$\begingroup\$ With the type of setup you have have for Q2 and Q4 it is difficult to guarantee that they are off and on. \$\endgroup\$
    – vini_i
    Commented Sep 11, 2015 at 11:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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