Saturating a 3904

Thread Starter

stoopkid

Joined Mar 3, 2011
146
I'm trying to saturate a 3904 to drive 6 LEDs in parallel at about 65mA. So I gave a buffer of 35mA and called it .1A. The 3904 has an hFE of 250 and the circuit is 5V. So here is my equation for the base transistor:

5v / (0.1A / 250hFE) = 12.5Kohms

I went down to 10K because I don't have anything quite that close and I'm just prototyping. So it seems to me that the transistor should be fully saturated for this circuit. But I find that the LEDs are still brighter if I don't use a resistor at the base at all. Am I doing something wrong? Does it matter that I'm using the 3904 to switch the anode of the LEDs?(Unfortunately I cannot switch the cathode because the LED's are already grounded on the PCB they are mounted on. I only have access to the anode.) I realize this means there's a voltage drop before the LEDs but even taking that in to account, the LEDs are still brighter with no base transistor rather than 10K.

Thanks for any help.
 

#12

Joined Nov 30, 2010
18,224
Something is very wrong. What size resistor do you have in series with the LEDs?
None at all?
No wonder they aren't acting predictably. You're just asking for smoke.

You can't trust the gain of a transistor! It changes with temperature and it changes from batch to batch. Set your base drive to one tenth of the collector current and use resistors to control the LED current.

ps, make sure your LEDs are connected to a collector, even if you have to add a stage. If they are running off the emitter, you have built a voltage follower, not a saturated switch.
 

Thread Starter

stoopkid

Joined Mar 3, 2011
146
They all have their own resistor. I don't remember the exact value but it's around 200 or 300 ohms. They're blue LEDs.
 

#12

Joined Nov 30, 2010
18,224
OK. Now that I've guessed, and guessed wrong, try posting a drawing. We'll get this right in a jiffy.
 

Thread Starter

stoopkid

Joined Mar 3, 2011
146
So I understand that this is not how it should be wired, but I have no choice, I only have access to the anode. Whats happening is when a short the digital pin to the transistor base, it gets brighter. It would seem to me that shouldn't happen because with that value base resistor, it should already be saturated. Am I incorrect? The resistor measures 9.8Kohms to be exact.

Thanks
 

Attachments

#12

Joined Nov 30, 2010
18,224
I wasn't completely wrong. The way to get that final bit of voltage is to have the npn transistor pull down on the base of a pnp transistor so its collector drives the resistor/LED strings.

Connect the emitter of the npn to ground, leaving the LED strings un-connected.
The emitter of the pnp goes to +5 volts. Add a 47k resistor from +5 to the base, connect the base of the pnp transistor to the collector of the npn with a 4.7k resistor, connect the collector of the pnp to the LED strings.

The 4.7 k resistor could be as low as 1k and it wouldn't hurt anything.

Actually, running it the way you did won't hurt anything. You're only wondering about why an emitter follower doesn't saturate quite as well as a saturated switch.
 

Adjuster

Joined Dec 26, 2010
2,148
No, you have indeed got an inefficient voltage follower. With the transistor connected in common collector (aka emitter-follower) configuration as shown, even neglecting the base resistor drop, the emitter voltage will be no more than the input voltage less the transistor VBE, typically around 600mV for silicon. The input voltage may not even be exactly 5V to start with, and of course the base current flowing in 10kohms will give a big drop.

Please do as advised and use a common-emitter driver. A base drive current of one tenth of collector current is normally advised to guarantee good saturation. Never be tempted to assume the higher gain values which are quoted for substantial VCE, in non-saturated operation.

Edit: as usual, someone else beat geriatric here to it!
 

#12

Joined Nov 30, 2010
18,224
Are you referring to the pnp transistor described in post#6 or the pnp transistor that will conduct as a saturated switch when the available positive signal is applied to its base?
 

Audioguru

Joined Dec 20, 2007
11,248
hFE is spec'd when a transistor is a linear amplifier with plenty of collector-emitter voltage. Some transistors are spec'd when the collector-emitter voltage is 10V but for the 2N3904 transistor it is 1.0V.
The Collector-Emitter Saturation Voltage is spec'd when the transistor is a switch with the base current 1/10th the collector current.
But your transistor is an emitter-follower, not a switch. Since it is an emitter-follower then your series base resistor is not needed and simply throws voltage away.

If the transistor has an hFE of 200 and a load of 65mA then its base current is 65mA/200= 0.325mA. Then the 10k series base resistor wastes a voltage of 0.325mA x 10k= 3.25V and the base-emitter voltage of the transistor is another waste of 0.78V.

Without the series base resistor then the base will be high at almost +5V (or +3V if a TTL logic IC is used) and the emitter will be about 5V - 1V= 4V (or 2V). The transistor will have a collector-emitter voltage of about 1V so the hFE can be used to determine the base current.

Or you can use an NPN common-emitter transistor to drive a PNP common-emitter transistor used as a switch if you want.
 

Felo

Joined Feb 20, 2012
91
Hi, I usually over saturate my transistors, just to be in the safe side, so R3 and R4 are 1K and R2 10K.

I consistenly buy SMD 0805 resistors by the 10.000 pcs. those values never give me any trouble.
 

Ron H

Joined Apr 14, 2005
7,063
Hi, I usually over saturate my transistors, just to be in the safe side, so R3 and R4 are 1K and R2 10K.

I consistenly buy SMD 0805 resistors by the 10.000 pcs. those values never give me any trouble.
To get a forced beta of 10, R3 actually needs to be 540Ω (560 would be OK). R4 could be as high as 5.6k. It will generally work with R3=1k, but it is not good engineering practice.
 

Felo

Joined Feb 20, 2012
91
Here it is worth to mention that if the drive pulse = VCC then you don't need the PNP, unless that you need reversed logic to drive the load, normally I would use this setup if I want to control say a 12v load, with a 5v pulse as it is often the case with pic's
 
Top