0
\$\begingroup\$

I have built an H-bridge with the following schematic.

w

My motor controls a wheel that I want to turn backwards and forwards. The voltages to the bases of the BJTs are supplied by an Arduino. the Motor has a 3V battery supply.I am worried that a supply voltage above 1.4 could cause cross conduction.

Everything is working fine except for one thing. When I press one of the switches (either to make the wheel turn forwards or backwards) it is as if current starts "leaking" and from that moment on the wheel always turns slowly forwards. If I hold it in position for some time it stops spinning but if I turn the wheel by hand, or touch one of the switches, it starts turning again.

If I press the switch to make the wheel/motor go forward, it only turns faster, and if I press the other switch it turns backwards (but suspiciously slowly!).

Does anyone have an idea what could cause this problem? Is it "normal" for transistors to leak current in this way when I'm working with such a low voltage supply?Is the circuit gallery circuit flawed?

Thanks in advance!

\$\endgroup\$
  • 1
    \$\begingroup\$ What value are the 4 x unlabelled resistors? What is the motor current when connected across the supply without any switches? What transistors are you iusing? They need to have enough current carrying capability to drive the motor and there has to be enough base current to saturate the transistors. \$\endgroup\$ – Russell McMahon Jan 2 '16 at 11:19
  • \$\begingroup\$ The unlabelled resistors are 100 ohm ones. The motor draws around 100mA (slightly less, around 98) when connected directly to the supply. The PNP transistors are 2N4403's and I use 2 different NPN transistors: BC182 & 2N3904. The BC182 only supports 100mA, the others are higher rated, but the motor doesn't really go above that... My Arduino supplies 5 Volts, with the resistors that should make 4.5 mA to the base, I'm not sure how to interpret the data sheets to tell if this is enough for saturation.. \$\endgroup\$ – eli6 Jan 2 '16 at 17:59
2
\$\begingroup\$

That circuit is going to leak big time. 1K is not enough base drive for anything but the smallest motors. Those unlabeled resistors would need to be 5 times more than that to avoid leaking

One way to prevent this leaking is to used a fixed voltage drop like a zener diode or LED so that all the voltages add up to more than the supply.

schematic

simulate this circuit – Schematic created using CircuitLab

red LEDs have about 1.6V drop, that combied with the two VBE drops will keep it under control, plus LEDs look neat :)

I have written 3.3V but this circuit should be good for anything from 2.8V to 4.2V

\$\endgroup\$
  • \$\begingroup\$ thanks for this! I used some various LEDs I had with around 1.6V drop and your circuit removed the "leaking" and the wheel doesn't spin forwards any more when I don't push any button. Though I can't really understand why it worked... The wheel is still slow when spinning backwards though and is sometimes slow to react, I guess there must be a problem with that specific part of the circuit... \$\endgroup\$ – eli6 Jan 2 '16 at 20:40
  • \$\begingroup\$ it could be that one of your transistors is broken. run it backwards for 10 seconds and see which bits get hot. \$\endgroup\$ – Jasen Jan 2 '16 at 20:46
  • \$\begingroup\$ Did you remove the 1k Ohm resistors in your circuit? Or are they still above the switch? When I replaced them with a lower( 100 ohm) resistor and used your 100 ohm ones in series when the switch is closed (before the LED's) the lagging stopped and it works perfectly... \$\endgroup\$ – eli6 Jan 2 '16 at 21:32
  • \$\begingroup\$ I left them out thinking you were intending to use a microcontroller or similar instead of switches, but yeah 1K is too high if the motor needs 100mA \$\endgroup\$ – Jasen Jan 3 '16 at 2:04
0
\$\begingroup\$

I want to add some more information related to Jasen's answer, and since I want to use a diagram, this needs to be a separate answer.

In order to understand why your transistors are leaking, let's take a closer look at one half of your H-bridge:

schematic

simulate this circuit – Schematic created using CircuitLab

Ignore R5 for the moment. Note that the base of Q1 can never be higher than 0.65 V, and that the base of Q3 can never be lower than Vcc - 0.65V. This means that there's always a voltage drop across R1 and R3, and therefore a current flowing through them.

When you short the junction to ground with SW1, all of this current flows through the switch, since there's now no voltage across R1. Q1 is cut off, since it gets no base current. Note that there's also current from R5 flowing through the switch.

However, when the switch is open, The current through R5 adds to the current through R1. The only way to make sure that Q3 cuts off is to make sure that the voltage drop across R5 is less than 0.65 V. The only way to do that with this circuit is to make sure that R5 is much smaller than R1.

All of this serves to illustrate why you need to have some basic test equipment when you're messing around with circuits at this level. If you had measured some of the voltages in the circuit with a simple multimeter with the switch both opened and closed, you would have immediately realized that things were not working as you expected, and possibly worked out why on your own.

\$\endgroup\$
0
\$\begingroup\$

It sounds as though one only of your switches is "leaking" at all times. If you have built the circuit correctly AND if the transistors are undamaged this should not happen.

Re Sw1 and Sw2.
Off is close close or open open.
Direction 1 is open close.
Direction 2 is close open.

With SW1 Sw2 open open, Mleft and Mright should both be at close to ground.

With SW1 Sw2 closed closed, Mleft and Mright should both be at close to Vcc.

In either of these cases the motor cannot turn. If it does turn the above voltages cannot be correct. Identify which voltage is wrong and then why - either base drive is not as expected or a transistor is damaged or the circuit is wrong. You should "easily" be able to find this by working through the above and then following up on the implications when a voltage is not as it should be.


ADDED

The extra information makes it clear what is happening:

The unlabelled resistors are 100 ohm ones. The motor draws around 100mA (slightly less, around 98) when connected directly to the supply. The PNP transistors are 2N4403's and I use 2 different NPN transistors: BC182 & 2N3904. The BC182 only supports 100mA, the others are higher rated, but the motor doesn't really go above that... My Arduino supplies 5 Volts, with the resistors that should make 4.5 mA to the base, I'm not sure how to interpret the data sheets to tell if this is enough for saturation..

Call the 4 x 100 Ohm resistors RLU RRU RLL RRL (R_left_upper, R_right_upper ...). 100 Ohms is too low in this context relative to the R5 & R6 1K resistors. Have Sw1 open and remove R6 for now. Then: with 3V supply, Q3b (Q3 base) will be about 0.6V below supply = 2.4V with 3V supply. Q1b = anout 0.6V. So V across RLu + Rll = (2.4 - 0.6) = 1.8V so I via RLu and Rll ~= V/I = 1.8/200 = 9 mA. This flows in both Q1 and Q2 base so they can support Beta x Ib collector current as "shoot through" current. If you now close Sw1 Q1 is off and Q3 on as intended. BUT if you open SW1 and re-add R6 the 1K is not enough to pull the centre point of RLu and RLl up enough to turn Q1 off. SO when a switch is open it's top transistor will be pulled into partial on-conduction mode.

Agh - about here I see that Dave Tweed has said what I am in the process of saying :-) :-(.
So more briefly.
To overcome the above effect the pullup must cause the divider if Rlu, Rll, R6 and the two base "diodes" to allow the pullup to turn Q3 off.
To do this you want R6 to pull RLu_b closer than ~= 0.6V from top supply. Roughly
(Vcc-Vbe_Q1) x R6 / R6 + Rll) < 0.6V.
With Vcc = 3V and VBe_Q1 = 0.6V (it will be close but different to this) then RLu < ~ 100 x 0.6/(3-0.6) = < 25 Ohms.
This is "rather low."
You can instead increase the 4 x 100 Ohms to some higher value and perhaps decrease R5, R6 somewhat.

BC182 datasheet here

At 100 mA motor current the BC182 has a nominal mean Beta (current gain) of 80 but that is at a high Vce - so say Beta is ~= 25.
For 100 mA IC you then need Ib = 4 mA.
When base current flows via pullup R6 and Rll and Q1b you want total resistance under.
R = V/I = (Vcc-Vbe)/I = (3-0.6)V/4mA = 600 Ohms.
That is R6 + RLl.
And you need R6 << Rll etc as above.
...

\$\endgroup\$
  • \$\begingroup\$ if those unlabeled resistors are less than about 4.7K he will have that problem, and 4.7K seems a bit on the high side if hes driving a motor \$\endgroup\$ – Jasen Jan 2 '16 at 11:17
  • \$\begingroup\$ @Jasen. Yes - I should have asked what value they were - and now have. It's more a amatter (I think) of whether he has enough drive for the motor current. \$\endgroup\$ – Russell McMahon Jan 2 '16 at 11:21
  • \$\begingroup\$ Please see my comment above for resitor values etc. Why is it that the BJT's leak when the resistor values to the base are too low (is that what you meant)? And maybe this is a stupid question, but what does Mleft and Mright mean? The motor circuits left and right? \$\endgroup\$ – eli6 Jan 2 '16 at 18:06

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.