Switch 3.3 V supply to motor with 5 V control from Arduino using only BJT

Hi,

This one has me stumped and no doubt it’s due to my lack of knowledge about transistors.

Background: I bought a pager motor with a maximum rated voltage of 4 V (and 80 mA max current) which I intend to drive at 3.3 V. I already have an L239D dual H-bridge, but the supply voltage needs to be greater than 4.5 V and the motor supply voltage cannot be smaller than the logic voltage. The voltage sources at my disposal are 12 V and 5 V.

Goal: Use the Arduino’s 5 V digital output to switch 3.3 V supply for a motor.
Stretch goal: Use this solution to build my own H bridge from NPN and/or PNP transistors and diodes.

Restrictions: I want to do this using only one transistor, either NPN or PNP. I have resistors and other common components; I do not want to solve this by buying a different type of transistor, a relay, an H bridge IC or resorting to a fundamentally different approach. Perhaps someone will show me why one transistor is not really a good solution, and I’ll face the fact that I need to look for another way of turning on the motor. If that is the case, I’ll almost certainly look for an H bridge that can have a motor supply down to 3.3 V, and I’ll use a stiff voltage divider to bring the Arduino’s 5 V digital out to 3.3 V for the H bridge IC.

My attempt at a solution (on paper): I have drawn a schematic and attached the photo. Please suggest a better circuit if this one is off the mark. The idea behind this attempt is that if R1 is close to R2 and they are both large compared to Rb, I should get around 2.5 V in the middle of the divider when the Arduino’s output is high. I can then pick Rb to get enough current for saturation (say 40 mA for safety)… and that’s where I grind to a halt, because I feel I’m overlooking something.

Going back to basics, I have identified the following 5 equations at my disposal:

V1 = R1 i1
V2 = R2 i2
V2 = Rb ib + 0.6 V
Vin = V1 + V2
i1 = i2 + ib

I consider Ib and Vin to be known quantities. Fiddling with these 5 equations for 7 unknowns gives me:

Vin (R2/R1) + Ib(Rb - R2) - 0.6 V = 0

Have I missed an equation? Hm. Anyway, I am willing to use R1 ~ R2 = R to get closer to determining a value for Rb. To wit:

Rb = (Vin - 0.6 V - Ib R)/Ib

However, there is one thing that I haven’t used. The quantity in the numerator above must be positive, since Rb must be positive. This leads to:

R < (Vin - 0.6 V)/Ib

or

R < (5 V - 0.6 V)/(40 mA)
< 110 Ohm.

With R = 110 Ohm I find that Rb = 0. (If R is smaller, Rb > 0). Does this really mean that I can just make a 110/110 Ohm voltage divider, connect the base to the middle, and get 40 mA flowing into the base? This feels wrong.

And again, I feel that I am missing something. Could someone please point out the flaws in my reasoning or analysis? This is probably a very simple task to solve, but I lack the experience to know what design to choose. Thank you in advance.

10268526_10154150527390285_5033228261214758616_n.jpg

I thought of a much simpler solution: put equal resistors on either side of the motor and use it with the L239D H bridge. Calculate R for max current to ensure two voltage drops of 0.75 V each from 5 V. And there you have it, 3.5 V across the motor in steady state.

I have 10 ohm resistors available, so I tested this with 20 ohm on either side and 10 ohm on either side. I get a steady state current of about 40 and 80 mA respectively. I'm not sure what will happen with frequent stops and reversals using my H bridge, but at $2.75 a pop for the motors, I can afford to find out. If anyone educated in these matters wants to enlighten me, please go ahead!

You just use one resistor on the base of the transistor to set the base current, no need for
a voltage divider. Set the base current to guarantee saturation, typically 1/20th to 1/10th
of collector current through the base will saturate a BJT.

Again to limit motor current a single resistor in series with the motor will be fine, using two
is unnecessary.

You don't need R1 or R2, just connect the Arduino pin to Rb (which should be about 220 Ohms).

Thank you MarkT and fungus for your replies, I appreciate it.

On eliminating R1 and R2: I probably should have explained that I added them because I was concerned I would end up with the base voltage higher than the collector voltage when I applied 5 V (since, up to that point, VCE is only 3.3 V), which I believe would result in current flowing through that junction and probably a dead or degraded transistor. From what you have both said, it sounds like I am mistaken. Could you please point out how to show that this won’t happen?

On using two resistors on either side of the motor when used with the L239D H bridge IC: Now that you mention it, duh! Thank you for pointing this out. =)

paulwb:
On eliminating R1 and R2: I probably should have explained that I added them because I was concerned I would end up with the base voltage higher than the collector voltage when I applied 5 V (since, up to that point, VCE is only 3.3 V), which I believe would result in current flowing through that junction and probably a dead or degraded transistor. From what you have both said, it sounds like I am mistaken. Could you please point out how to show that this won’t happen?

The voltage at the base won’t be 5V - measure it and see!

I added them because I was concerned I would end up with the base voltage higher than the collector voltage when I applied 5 V (since, up to that point, VCE is only 3.3 V)

The whole point of saturation is that the Vce is as small as possible, so the base voltage
should and does exceed the collector voltage in saturation (Vce(sat) can be as low as
0.03V in a modern super-beta transistor - the 2N2222 is a poor performer by comparison).

The datasheet shows the Vce(sat) figures for a couple of cases, one being
Ic=0.5A, Ib=50mA. So we can conclude the base current can be as high as
50mA without damage and that Ib = Ic/10 is a reasonable rule of thumb for
saturating the 2N2222.

MarkT:

I added them because I was concerned I would end up with the base voltage higher than the collector voltage when I applied 5 V (since, up to that point, VCE is only 3.3 V)

The whole point of saturation is that the Vce is as small as possible, so the base voltage
should and does exceed the collector voltage in saturation (Vce(sat) can be as low as
0.03V in a modern super-beta transistor - the 2N2222 is a poor performer by comparison).

MarkT, thank you for this reply. It cleared things up for me. One less knowledge gap about transistors that has survived in my head for years. Cheers!

fungus:

paulwb:
On eliminating R1 and R2: I probably should have explained that I added them because I was concerned I would end up with the base voltage higher than the collector voltage when I applied 5 V (since, up to that point, VCE is only 3.3 V), which I believe would result in current flowing through that junction and probably a dead or degraded transistor. From what you have both said, it sounds like I am mistaken. Could you please point out how to show that this won’t happen?

The voltage at the base won’t be 5V - measure it and see!

Thanks fungus, that is actually a very good approach. I’ll give it a shot, especially after understanding what’s going on thanks to MarkT’s reply. =)

Cheers!