So I'm trying to simulate a BJT switch for an LED.
Here's the detail and how I setup the simatiomln.
- Vsupply = 4.2 V
- LED UV Vf = 3.6 V
- Hfe = 100
Here's the simulation:
My calculations start from what I want to achieve: 20 mA for the LED. That makes Ic = 20 mA.
Calculate Ib needed for Ic = 20 mA:
Ic / Hfe = Ib = 20 / 100 = 0.2 mA.
Then calculate Rb for Ib = 0.2 mA:
Rb = Vrb / Ib = (Vsupply - Vbe) / Ib = (4.2 - 0.7) / 0.2 mA = 17k5
I'm assuming, because I set the forward voltage of the LED to 3.6 V, that the transistor (Vce) will take up the rest (4.2 - 3.6) = 0.6 V, and 0.6 V * 20 mA would burn into heat, but apparently it doesn't work like that.
What am I missing here? Am I setting it wrong, is there some variable that should be added to the simulation?
The goal is obviously 3.6 V @ 20 mA at LED.
One thing I notice though if change the Rb to 470R, I get 3.6 V drop in the LED, but Ic = 730 mA doesn't make sense.
I messed up my LED-UV model. turn out I need to set "Current at Above Voltage" to 20 mA. I don't even know what it means, I think it's related to LED working slope, it should be called "Current at Forward Voltage Above" so as not to confuse.
In my previous model, I just set the "Max Brightness Current" to 20 mA, and leaving "Current at Above Voltage" value to default 1 A.
Below is the final circuit (I would put the current limiting resistor later).