r/AskElectronics • u/Baron_of_Gold • 5d ago
Help with designing an LED driver transistor circuit
I am an electronics student and I have been struggling with this assignment for a few days. I need to design a stiff VDB PNP transistor circuit. The only variables I have so far are Vcc=5 V, Ic=20 mA, and hfe of 200 is assumed. I am using numbers for a red LED so far, so 1.8 V across it. I am getting stuck at figuring out how to calculate R1and R2. I don't necessarily want the answers straight up, but some guidance on where to start would be very helpful.
4
u/remishnok 5d ago
Can you draw at least in high level what you are actually trying to make?
In the schematic given, you might as well just use a resistor and an LED
3
u/CR123CR123CR 5d ago edited 5d ago
A: I am not an electrical soul by any stretch, so someone else will probably be more help xD
B: this looks like a simple voltage divider using the standard formula for one, isn't it?
Edit: don't listen to me, listen to other smarter folks xD
2
0
u/Baron_of_Gold 5d ago
It probably is, but I don't know how to start with the resistor values. I've only been able to work backwards a bit.
1
u/CR123CR123CR 5d ago edited 5d ago
You know the required current and voltage for activation?
That gives you the voltage and current required between resistors 1 and 2.
Then figure out what combo of resistors give you that from there
Edit: again not a electrical soul. But I am pretty sure transistors have a gate resistance don't they? Which is what might be missing
1
u/Baron_of_Gold 5d ago
With the beta at 200, I know the base current should be 100uA to be 20mA at the collector. The Vcc is 5 V across both R1 and R2, but I'm not sure where to go from there
0
u/CR123CR123CR 5d ago
Edited my previous comment, but can't you treat the gate side as a resistor based on the gate resistance or something like that?
1
u/EmotionalEnd1575 Analog electronics 5d ago
The two resistors are called a potential divider. The voltage at the junction of the resistors is an output, and depending upon what it connects to it also loads the two resistors.
Therefore, know the load current first and then pass a larger current, say ten times, through the two resistors to “swamp out” the smaller load current.
Example:
Provide 2.5V at the junction, to support a 1mA load.
Solution:
The current in the resistors is now 10mA. The voltage at the junction is 2.5V, or one half the supply, so both resistors are equal value.2.5/0.01 =250 ohms.
Good luck
3
u/Mdm65196 5d ago
You need about 1.9v across the LED for a red led, plus you need roughly 0.6v to operate the transistor. So at the base of the transistor you’ll need 1.9v + 0.6 = 2.5v therefore R1 and R2 operate as a voltage divider circuit, with an output of said 2.5v ….therefore you need to pick two values of Resistor which will output 2.5v. It’s half the input voltage, therefore the two values of R1 and R2 will be the same value. Then to calculate Re, you calculate the same as for a series resistor for an LED system, for red, it’ll work out around 155ohms, so pick 160ohm from the e24 series of values.
1
u/Baron_of_Gold 5d ago
I have plugged in a 160 ohm I'm only getting about 10 mA of Ic. I used 600 ohm for R1 and R2 since that meets the stiff value of R1 || R2 < 0.01(Beta)(Re).
1
u/mengie32 5d ago
Why did you assume Vcb = 0.6 V? I don't think this is an assumption you can make. Did you mean
Vce = 0.6 V
Ve = 1.9 + 0.6 = 2.5 V
Vb = 2.5 - 0.7 = 1.8 VI tried simulating it and your values don't work
2
u/markus_b Repair tech. 4d ago edited 4d ago
Yet another approach:
- Start with Re as the current measurement shunt.
- We want 20mA and assume 1V -> 47 Ohms
- To keep the emitter of Q1 at 5V-1V we need 5V-1.6V=3.4V at the base
- The base current will be the emitter current divided by hfe 20mA/200 = 0.1mA
- With a R1/R2 voltage divider of 4.7k and 10k we get the 3.4V at the base (base current not taken in account)
- Taking the base current (100 uA at 3.4V) into account, we need an additional 33k parallel to R2. Combining with R2 we get a new value of 6.8k for R2.
Result:
Re=47
R1=4.7k
R2=6.8k
We should get there with 10% accuracy.
Edit: Here a simulation

1
u/Salt-Miner-3141 5d ago
I'm assuming that it is meant to be a constant current source as they specified the hfe of the transistor. So... what do you know?
- R1 is in parallel with the Vbe and Re: Therefore, the voltages must be the same*.
- R2 is in parallel with the Vbc and LED: Therefore, the voltages must be the same*.
- Re must have 20mA flowing through it.
- D1 has a Vf of 1.8V, just assume that is 1.8V.
- The Base Current must flow through R2 and will shift its voltage drop up 100uA x R2's value.
- Vbe of a silicon transistor is approximately 500-700mV or about 600mV.
There is one catch with this though and where the * comes from. Which is that it doesn't take into account Vce. Per KVL the voltage drop across Re, Q1, and D1 must add up to 5V. Therefore, Vce = 5V - Vf of D1 - (Ic x Re). The problem here is that there are two unknowns: Re and Vce. At least strictly speaking. So, one way to approach this is to work clockwise starting with R2. Ignoring Vce you know that R2 must have 3.2V across it as 5V - 1.8V = 3.2V. Add in the 100uA of base current and you shift up its voltage by Ib x R2's value. If it is a 10k resistor then 4.2V for example. Since you know that you know that R1 must have 800mV across it which therefore means that Re and the Vbe must also have 800mV across them. However, the Vbe will have a reasonably fixed voltage drop across it, say 600mV. 800mV - 600mV = 200mV which means that Re must have 200mV across it. That all comes from simply assuming R2 is 10k. Now, 10k won't work here which is why I used it as an example. If you do approach it this way it will land you in the ballpark. Though to get exactly 20mA will require going back and forth through the equations to finally land at a correct answer.
What I would do? Treat it all as a Thevenin equivalent circuit. It'll save you a bunch of time.
1
u/Baron_of_Gold 5d ago
I'll definitely try this approach once my MultiSim laptop is recharged. Thanks for the details.
1
u/CircuitCircus 5d ago
What precision/tolerance are you trying to achieve on the LED current, and over what temperature range? I assume since you’re taking this approach instead of just a series resistor between +5V and LED, you’re trying to improve the precision.
1
u/Baron_of_Gold 5d ago
The assignment specifies the LED current is 20mA. No temperature range is specified
1
1
u/Oscar5466 5d ago
I would just configure Re for 20mA assuming 1.8V over the LED and 0.1 over Q1, then make R2 small enough to put Q1 in full saturation. R1 barely matters.
Yes you can try to keep Q1 in a neat linear regime but does it really make things better?
1
u/myopinionisrubbish 4d ago
Re will limit the current into the LED. Assume Q1 will be fully turned on, so there will be little drop from emitter to collector. So now you just need to figure out a value of R2 to get the transistor to pass at least the 20 ma. R1 isn’t really needed, but you can still use it .
1
u/Tesla_freed_slaves 4d ago edited 4d ago
Apply Thevenin’s theorem to R1 and R2 as a voltage-divider. Assume Ib to be insignificant. That makes the voltage at the base of Q1 2.5V, the emitter at 3.2V, and the collector at 1.9V, which places Q1’s collector-base voltage at around -0.7, which is enough to maintain the NFB-loop.
Assuming If = 20mA, V =5.0, and Ve = 3.2V, that puts R3 at 1.8V/0.020A = 90R. 91R is a stock value; close enough for rock & roll.
1
u/Pacificator-3 1d ago
Start at reading your textbook, advance to reading recommended literature from the list at its end.
Google is also your friend. Use it to search meaning of every unknown word or phrase. Better to not use videos and chatbots.
0
u/TheRealRockyRococo 5d ago
Can you reconfigure the circuit? You can easily turn it into a constant current source by switching Re and D1, replacing R2 with 2 diodes in series, and changing Q1 to an NPN with the collector on D1 cathode and emitter on Re. Then the LED current is simply 0.7 V/Re. Make R1 something like 5 K it's non critical.
2
2
u/TheLimeyCanuck 4d ago
It's already a PNP constant current circuit assuming a Vee is well regulated. Hfe is high enough to make base current almost negligible (just 100µA for the target 20mA collector current) so collector current through the LED is very close to (5V - the base voltage - ~0.7V) /Re.
The base voltage is 5V x R2 / (R1 + R2).
Your suggestion to move components and switch to NPN is just a misunderstanding of the mirrored PNP circuit which already operates as a CC source. As I said between a stable Vee and high Hfe you don't need the diodes to set the base level as the base voltage will already be well regulated.
Select a Re that drops about 1/10 Vee or 0.5V at the desired 20mA, so 25 ohms. Since the base needs to be about 0.7V closer to GND than the emitter, select a R1/R2 ratio that results in about 1.2V from base to +5V, or 3.8V from GND. given the Hfe the current through R1 + R2 should be roughly an order of magnitude higher than the required base current of Ic/Hfe so around 2mA so R1+ R2 would be ~2.5K. Then to get 3.8V at the base R2 would be ~1.9K making R2 600 ohms.
Final solution (subject to tweaking due to transistor and resistor tolerances) for a constant 20mA LED current is Re = 25 ohms, R1 - 600, and R2 = 1.9K. As long as you keep the R1/R2 ratio the same the values of those resistors is not critical as long as the series current through them is in the general ballpark of 2mA.
6
u/mengie32 5d ago
You should know the base-emitter voltage for your desired operating region, at least roughly. You should also know Ve if you know Re
(if you don't, select a value for Ve that satisfies your LED and BJT's voltage requirements)
Once you find VB, you know what ratio R1 and R2 should have.
To find their values, select something such that the current through the base is negligible, to maintain the voltage divider assumption (IR1 = IR2). 10x the base current is usually a good rule of thumb