0
\$\begingroup\$

I have the following circuit below. One of the restrictions I have is that I need to drive 4 LEDs using 9V. (sorry I forgot why 9V is not enough for all 4 LEDs in series so there's a drop voltage after the PNP and the LEDs Vf is not exactly 2V, maybe 2.1v or 2.2V which is normal based on the datasheet range of vf= 2v-2.4v), so I connected the 4 LEDs in parallel. Each LED has a Vf about 2V and operates at 20-23mA. I have one NPN and PNP transistor to drive the LEDs.

I know this might not be the best design, but I'll like to try this design in the best possible way. The 5V / 0V at Q2 is coming from the GPIO in the microcontroller. Connecting the LEDs in parallel Ic at Q1 needs to be at least 40mA output. In the circuit below I have R3 = 1k thus Ib at Q2 is about 4mA, and using a 10 gain Q2 Ic = 40mA, and using another R1 = 1k will decrease the Q2 Ib current to about 8mA and this becomes Ib at Q1 which will turn Q1 Ic to about 80mA twice as much the current needed to drive the LEDs at 20-23mA. I'm using a NPN 2n2222(2N2222 Datasheet and PNP 2N29072N2907 Datasheet.

I just wanted to know if the circuit below with the values I used is good enough to work? based on my calculations above. I calculated the values based on a 10 gain, is that correct to use based on the datasheets. What other resistor values could work to get at least 50ma at Ic of Q1

enter image description here

\$\endgroup\$
2
  • 2
    \$\begingroup\$ Just use two parallel strings of 2 series LEDs. Why you would use two parallel strings of 3 and 1 LEDs appears strange. \$\endgroup\$
    – Andy aka
    Sep 26 '21 at 10:06
  • \$\begingroup\$ Yes, I could do that too. The same output current of at least 40mA. \$\endgroup\$
    – Citi
    Sep 26 '21 at 20:24
1
\$\begingroup\$

I would put all 4 LEDS in parallel, each w their own resistor. Much more elegant and balanced. Also, draw your schematic with supplies inverted...much clearer. To turn on the PNP, you pull down the 1K with the NPN, and draw 8mA to GND. With a PNP gain of x100, it can support 8 x100mA going to LEDS...and you only need 100mA...so it turns ON hard..which is good as a switch.

The NPN has 0.5mA into the base when +5 is on. With NPN gain of say x100, it supports collector current of 0.5 x 100 = 50mA...much more than you need...you need 8mA...so NPN turns on hard...which is good for switching.

Use 330 1/4W resistors as shown.

Enjoy. enter image description here

\$\endgroup\$
6
  • \$\begingroup\$ You could also try all 4 LEDS in series...that gives 8V, and turn on the PNP hard...it should only drop 0.1V, so you have (9-8)/0.020 = 50 ohm, in series with the LEDs to current limit them to 20 mA. \$\endgroup\$ Sep 26 '21 at 8:39
  • \$\begingroup\$ Doesn't having 1k at NPN base give us around 4mA, because of the NPN voltage drop not 0.5mA into the base when +5 is on. \$\endgroup\$
    – Citi
    Sep 26 '21 at 22:35
  • \$\begingroup\$ However, having the resistor values set to 1k , at the bases of the transistors should be okay? \$\endgroup\$
    – Citi
    Sep 26 '21 at 23:01
  • \$\begingroup\$ Ooops..you are right. Base current is (5 - 0.7)/1k = 4.3mA. That is plenty to turn on NPN hard. I usually use 10k...you dont need that much base current as your collector is only pulling down 9mA from base of PNP...but no harm using 1k. \$\endgroup\$ Sep 27 '21 at 1:53
  • \$\begingroup\$ so making R3=10k will give about 0.4mA at Q2 Ib, then the max Ic current at Q2 will be about 4ma and Q1 Ic will then be around 40ma. So a lower resistor value at R3, will increase the Q1 IC max current, keeping the two 1k resistor values at bases of the transitors. \$\endgroup\$
    – Citi
    Sep 27 '21 at 2:37
0
\$\begingroup\$

Calculate the R5 = (9v - 4x2v) / 20mA = 50ohm (use 47ohm)

For Beta = 150

Calculate Q2_ib = 20mA / 150 = 133uA

Calculate R2 = (9v - 0.7v) / 133uA = 62Kohm (use 47k)

For R4 even 1Mohm should be enough, but it is not common to use such high values (except low power designs) due to noise affecting.

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ This is the better way to do this. The diodes being in parallel will have more even brightness, assuming they are the same color. If not then you'll likely want a string per diode color. R4 should be 100k - 500k but 47k will work. \$\endgroup\$
    – 65Roadster
    Sep 27 '21 at 5:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.