Author Topic: Make BJT transistor 2N3904 act as a switch  (Read 1100 times)


Make BJT transistor 2N3904 act as a switch
« on: January 18, 2017, 09:55:45 PM »
Let's say you're given a circuit diagram as follows:

See the 2N3904 datasheet
I want to find R1 and R2 so that forward voltage drop across the LED is 2V with an overdrive factor of at least 2.

Current of 25mA from a source which outputs 0 or 5V through an output resistance of 610 is given. Beta ranges from 50 - 300

So here's my approach. Since we want to find beta forced with ODF of 2,


Since source current = 25mA, we know this is the current going into the base, so Ib = 25mA.

Then I can find Ic at saturation which is given by

βforced=Icsat/Ib which leads to IcsatforcedIb
βforced=IcsatIb which leads to Icsat=βforcedIb

Since we want a forward voltage drop of 2 across the LED, voltage at Vn can be found by


We know at saturation Vce = 0.2v, which is Vc

We can then simply find R2 by ohms law since we know the current and voltage at each end of R2



That seems like a really small resistance to put at collector, but moving on, we can write a KVL in the lower loop to find R1 like so


Solving the above equation gives me R1 = -438 ohms.

Something is definitely not right, I can't have negative resistance here. Where did I go wrong?

Rob Strand

Re: Make BJT transistor 2N3904 act as a switch
« Reply #1 on: January 18, 2017, 11:16:53 PM »
βforced=Icsat/Ib which leads to Icsat=βforcedIb
βforced=IcsatIb which leads to Icsat=βforcedIb

You can't calculate Icsat from a given base current as the load determines the collector current.  For a saturated switch you can't force the collector current to be a certain value by setting the base current.

The steps are:
- You have to start by specifying the desired collector current, Ic, first.   That determines R2.
   Use Vcesat from the datasheet.
- Then compute Ib for that Ic; usually based on HFE_min.
- Then increase Ib by the overdrive factor.
- Then finally calculate the R1. 
   Assuming VBE = 0.65 to 0.7V, or better, extract more exact value from the datasheet.

See if you can do it.

If you get negative R1 that means to 610 ohm is limiting the base current more than you like.  The solutions are reduce the 610ohm, use a higher gain transistor, decrease the overdrive factor.

BTW:  putting LEDs in parallel doesn't always workout so well, one might be bright and the other dim.

Use this datasheet:
« Last Edit: January 18, 2017, 11:20:10 PM by Rob Strand »
The mind often distorts without gain.