Transistor type 2n3904 would not saturate(maybe?)

Thread Starter

pancake95

Joined Feb 13, 2019
25
Hello, I am new to the site and to transistors. So I have read about the transistors few articles already and watched few tutorials(about the formulas of determining Ibmax and showing some example circuits)and decided that I have some small knowledge to build a simple circuit. I use 6v lead acid battery, transistor 2n3904, two resistors(300 Ohms, one for base of the transistor and one for the led that I try to lit), LDR at max resistance 50kOhms and one led with Imax=25mA. I have chosen resistor with resistance 300 Ohms for the base, because I calcula ted that with 6 volts I will have current at the base around 20mA and this will be enough to saturate the transistor making it possible for current to flow from the collector to the emitter.
I have looked at the datasheet of the transistor too, in order to check for Icmax, which is 200mA. I have calculated Ibmax at beta 20 and got 10 mAmps and at 6 volts I get that I need 600 ohms resistor.
So thought using something like 300 Ohms(the closest to 600 I had) will be okay, also I have 2 kOhms but I am afraid that this might let too less current in the base
The problem though is that the led is not being lit/glowing.
Am I wrong in the calculations ?
Datasheet that I have used: http://html.alldatasheet.com/html-pdf/11470/ONSEMI/2N3904/365/2/2N3904.html
Can you please tell me if I have made some of the readings wrongly(Vbe = 0.65V, Icmax= 200mA, hfe= 20, should I always take the lowest value of the hfe to determine resistor on the base) ?
The circuit that I have realized already in physical model on breadboard:

mycircuit2.png

P.S. I have tried the same with 2 kOhms resistor(just from desperation, thinking that I give too much current with 300 ohms and this might fry the transistor) The result is the same(the led or the load in the case is not being lit)
Also if you know good books about transistors, their working and formulas explained simply, I am open for suggestions(the articles are not enough in-debt).
 

djsfantasi

Joined Apr 11, 2010
9,160
a) What is the Vf rating of the LED? This value is needed to calculate the resistor value.

At 25mA, (more on this later), a 300Ω resistor will drop 7.5V. Since you have a 6V supply, there is insufficient voltage for the LED.

To get the proper resistance value, you use this equation.

R = (6.0 - (Vf+0.65)) / 0.025

I don’t recommend that you use the Imax current for the LED. Use Ityp or somewhat lower. Replace .025 with these values for current.

Show us the LED values for Ityp and Vf.

Start there and see what happens. There may be more.
 

ElectricSpidey

Joined Dec 2, 2017
2,774
300 ohms in the collector should give you about 6-7mA if it’s a white LED, But my guess is the LDR is not reaching a low enough resistance at the light level you are using.
 

djsfantasi

Joined Apr 11, 2010
9,160
300 ohms in the collector should give you about 6-7mA if it’s a white LED, But my guess is the LDR is not reaching a low enough resistance at the light level you are using.
That’s the part of the problem to which I was referring when I said “There may be more”. I wanted to see if the LED lit at all.
 

BobTPH

Joined Jun 5, 2013
8,942
The rule of thumb for putting a transistor into saturation is to have the base current 1/10 of the collector current. Here, the collector current is the current required by LED, not the max colector current of the transistor.

If we know the Vf and desired current of the LED, we can compute the series resistor and the base resistance. The base resistance is the on resistance of the LDR plus any series resistance you add.

Bob
 

dl324

Joined Mar 30, 2015
16,911
Presumably, you want the LED to be on when light is shining on the LDR. What is it's resistance at the lowest light level you want for the LED to be on?

For 2N3904, you should use a beta of 10 to saturate the transistor. If you used a higher beta transistor, e.g. BC547, you can use 20. Use whatever is listed in the datasheet. For 2N3904, that's 10.

Assuming 2V for the LED voltage, you'll have about 13mA collector current. You need 0.13mA 1.3mA base current. So, now we're to needing to know the resistance of the LDR at the light level that the LED is to be turned on.

EDIT: Corrected base current.
 
Last edited:

Audioguru

Joined Dec 20, 2007
11,248
Why do you want the LED to light when there is bright sunlight shining on the LDR? Most people light an LED when the surroundings are dark.

Just now I measured the resistance of two LDRs that have a diameter of 10mm. I am surprised that their resistances are almost the same because their resistances have a wide range. In sunlight behind a window with the sun fairly low in the sky, they measure 41k ohms. In the middle of summer outdoors at noon last year they measured less than 1k ohms. Their resistance in the dark is many Meg ohms.

Your 2.0V to 2.6V red LEDs with the 300 ohms resistor from 6V and with a 0.25V saturated transistor draw a current of 10.5mA to 12.5mA.
The datasheet for the 2N3904 transistor shows that it saturates well when its base current is 1/10th the collector current.
The 1.25mA of base current needs a total resistance of (6V - 0.75V)/1.25mA= 4.2k ohms that your LDR might or might not produce.
An LDR with a larger diameter will probably have a lower resistance when lighted.

Since the base of the transistor has no resistor to ground to conduct away leakage current (especially if the transistor is heated by the sun) then the LED might be very dim when it should be turned off.
 

Reloadron

Joined Jan 15, 2015
7,515
Generally a resistor is placed in series with your LDR. You may wish to give this a read in addition to the fine information provided. You want your transistor to saturate acting like a switch depending on if you wist to detect dark or light. The link shows this.

Ron
 

djsfantasi

Joined Apr 11, 2010
9,160
Generally a resistor is placed in series with your LDR. You may wish to give this a read in addition to the fine information provided. You want your transistor to saturate acting like a switch depending on if you wist to detect dark or light. The link shows this.

Ron
Agreed. But IMHO, you have to subtract the low resistance of the LDR from the calculated base resistor. Otherwise you may not get sufficient current to saturate the transistor.
 

Audioguru

Joined Dec 20, 2007
11,248
Obviously the guy at "Give This A Read" did not know that his base current is much too low for the transistor to saturate.
But if the base current is higher then the LDR must be more sensitive for the transistor to turn off.
 

MisterBill2

Joined Jan 23, 2018
18,463
The LED can illuminate some without the transistor being saturated. One thing to do is to be sure that the transistor is not defective, and that the resistor values are correct. And I would try a 120 ohm resistor
 

Thread Starter

pancake95

Joined Feb 13, 2019
25
The rule of thumb for putting a transistor into saturation is to have the base current 1/10 of the collector current. Here, the collector current is the current required by LED, not the max colector current of the transistor.

If we know the Vf and desired current of the LED, we can compute the series resistor and the base resistance. The base resistance is the on resistance of the LDR plus any series resistance you add.

Bob
Hello, is the base current 1/10 of the collector current like constant value for all transistors or only for this exact type ? Also I got the Vf of the LED Vf=2,85 volts at Vcc= 6,56 volts. With the resistor protecting the LED with 300 ohms I calculated the current at which the LED glows is 12mA. Also the LED is blue, if this helps because for every color there are aproximate Vf. The LED did not came with datasheet so I can not say exact values of Imax, but I believe it is 25mA, because the seller at the shop said he thinks it is that. Can you please provide me some resource with simple explanation of formulas for determining what resistor to get for the base and other valuable formulas for transistors? Because the book that I read and the tutorials I read only describe how the transistors work and provide sample circuits with transistors, but the only formula I get often is beta = Ic / Ib but I think there should be other too except just for beta and alpha. Also why are there few betas in the book that I read is written, because of the different conditions ? Like Ic = 0,1mA ? But isn't the base current that controls the amplification ?!?! Also example from the book that I read: "
Let’s assume that we want the LED to light in response
to a digital signal line when it goes to a HIGH value of
+3.3V (from its normal resting voltage near ground). Let’s
assume also that the digital line can provide up to 1mA
of current, if needed. The procedure goes like this: first,
choose an LED operating current that will provide adequate
brightness, say 5mA (you might want to try a few
samples, to make sure you like the color, brightness, and
viewing angle). Then use an npn transistor as a switch (Figure
2.9), choosing the collector resistor to provide the chosen
LED current, realizing that the voltage drop across the
resistor is the supply voltage minus the LED forward drop
at its operating current. Finally, choose the base resistor to
ensure saturation, assuming a conservatively low transistor
beta (β ≥ 25 is pretty safe for a typical small-signal transistor
like the popular 2N3904).
"
How do they know that beta must be 25 or more ?
And somewhat magically without explanation they have chosen 10kOhms resistor for the base, based on what calculations ??
P.S. Sorry for the late reply, but one of the probes on my multimeter broke and I had to get new one in order to measure Vf on the LED
The book that I read is The Art of Electronics, the qoute is from page 76
 

Thread Starter

pancake95

Joined Feb 13, 2019
25
Why do you want the LED to light when there is bright sunlight shining on the LDR? Most people light an LED when the surroundings are dark.

Just now I measured the resistance of two LDRs that have a diameter of 10mm. I am surprised that their resistances are almost the same because their resistances have a wide range. In sunlight behind a window with the sun fairly low in the sky, they measure 41k ohms. In the middle of summer outdoors at noon last year they measured less than 1k ohms. Their resistance in the dark is many Meg ohms.

Your 2.0V to 2.6V red LEDs with the 300 ohms resistor from 6V and with a 0.25V saturated transistor draw a current of 10.5mA to 12.5mA.

The datasheet for the 2N3904 transistor shows that it saturates well when its base current is 1/10th the collector current.
The 1.25mA of base current needs a total resistance of (6V - 0.75V)/1.25mA= 4.2k ohms that your LDR might or might not produce.
An LDR with a larger diameter will probably have a lower resistance when lighted.

Since the base of the transistor has no resistor to ground to conduct away leakage current (especially if the transistor is heated by the sun) then the LED might be very dim when it should be turned off.
My LED is blue with Vf of 2,85 volts at Vcc= 6,56 volts. With the resistor protecting the LED with 300 ohms. How do you know that the base current is 1/10th of the collector current ? My LDR at bright light(lightened with flashlight) is around 4kOhms.
 

dl324

Joined Mar 30, 2015
16,911
is the base current 1/10 of the collector current like constant value for all transistors or only for this exact type ?
The rule of thumb I was taught was to use beta=10 for saturation. I recently learned that BC547 specifies 20 because it's a higher beta transistor (not because it's BC; I've seen other BC transistors that specified a beta of 10).

From OnSemi:

upload_2019-2-19_12-36-56.png
upload_2019-2-19_12-37-15.png
upload_2019-2-19_12-37-38.png
Note that the Ic/Ib ratio is 10.

upload_2019-2-19_12-39-47.png
upload_2019-2-19_12-40-1.png
upload_2019-2-19_12-40-18.png
Note that Ic/Ib = 20.
 

Thread Starter

pancake95

Joined Feb 13, 2019
25
Presumably, you want the LED to be on when light is shining on the LDR. What is it's resistance at the lowest light level you want for the LED to be on?

For 2N3904, you should use a beta of 10 to saturate the transistor. If you used a higher beta transistor, e.g. BC547, you can use 20. Use whatever is listed in the datasheet. For 2N3904, that's 10.

Assuming 2V for the LED voltage, you'll have about 13mA collector current. You need 0.13mA 1.3mA base current. So, now we're to needing to know the resistance of the LDR at the light level that the LED is to be turned on.


EDIT: Corrected base current.
I read the datasheet(sorry for the noobishness), but I do not find Hfe to be 10. The lowest Hfe I found is 15 I think at Ic=100mA. So I calculate the base current based on the collector current needed for my load and not the Icmax ? So Icmax is just the value I should be aware of not to hit, I get that now. But still how should I know what beta to use in the different situations and why I see as lowest value only 15 or am I looking it from wrong side ?
 

Thread Starter

pancake95

Joined Feb 13, 2019
25
Top