1
\$\begingroup\$

I have a NPN transistor MMBT2222ALT1G which I want to use to control a red LED (Uf=2V, If=22mA). VCC = 5V and my microcontroller is operating on 3.3V.

Schematic

I calculated the R24 resistor for the LED - it should be about 136.36 ohm, so I picked 150 ohm.

I'm not sure if I calculated R23 correctly... Are these values for my transistor correct?

  • Vbe = 1.2
  • Vce = 0.3
  • hFE = 210
\$\endgroup\$
8
  • \$\begingroup\$ Why 0.3 V? Shouldn't it be 2V? Then (5 V - 2 V) / 150 ohms = 20 mA \$\endgroup\$ Commented Oct 26, 2016 at 21:41
  • 1
    \$\begingroup\$ @Defozo You take the 5 V supply rail, subtract the 2 V for the LED, subtract the \$V_{CE}\$ for the BJT (0.3 V is fine), and this is what's left for the resistor to drop. Divide that voltage by your 22 mA figure for the LED, since what flows through the LED must also flow through the resistor. (Or use 20 mA if you prefer, I suppose.) \$\endgroup\$ Commented Oct 26, 2016 at 21:43
  • \$\begingroup\$ @ThePhoton I think the LED drops 2 V, too? ;) \$\endgroup\$ Commented Oct 26, 2016 at 21:45
  • \$\begingroup\$ @jonk, you are right. I am typing faster than I'm thinking. \$\endgroup\$ Commented Oct 26, 2016 at 22:48
  • 1
    \$\begingroup\$ @jonk, sorry, it's beyond my knowledge to design such a thing in 15 minutes or less. OP, if you want such a thing first search old questions to see what's been asked before, and if you still have questions feel free to post a new question rather than change your existing one in a way that makes existing answers not fit. \$\endgroup\$ Commented Oct 26, 2016 at 23:02

1 Answer 1

4
\$\begingroup\$

I wouldn't use those numbers.

  1. Vbe = 1.2 V. This is very high. Based on Figure 11 in the datasheet you linked, you should expect somewhere between 0.6 and 0.8 V.

  2. hFE = 210. This value is for forward active mode. For switching applications, you should try to operate the device into saturation. hFE falls dramatically in saturation, and in fact we normally define saturation as the point where hFE falls to some low-ish value, like hFE = 10 or so. I'd use hFE = 10 when designing this circuit.

Note: In general you shouldn't design a circuit that depends on hFE having a specific value. If operating in forward-active, you should allow for hFE to vary from the datasheet minimum value up to infinity and still have a working circuit. In saturation you will basically be driving the BJT to have the hFE you want, but you must choose a value well below the forward-active value.

\$\endgroup\$
7
  • \$\begingroup\$ So if we assume Vbe = 0.8 V and hFE = 10, then the resistor would be equal to about 430R? \$\endgroup\$ Commented Oct 26, 2016 at 21:35
  • 1
    \$\begingroup\$ @Defozo I get \$R_{24}=\frac{(5-2-0.3)\:\textrm{V}}{22\:\textrm{mA}}= 122\:\Omega\$. So I'd probably use \$120\:\Omega\$. For the base resistor, I get \$R_{23}=\frac{(3.3-0.8)\:\textrm{V}}{2.2\:\textrm{mA}}= 1140\:\Omega\$. I'd be comfortable using \$1200\:\Omega\$. \$\endgroup\$ Commented Oct 26, 2016 at 21:40
  • \$\begingroup\$ If I have a blue and green LEDs (Uf=2,5V and 3,3V, If=22mA) as well and I would replace my red LED with one of these, then the base resistor should still remain the same? \$\endgroup\$ Commented Oct 26, 2016 at 21:55
  • \$\begingroup\$ How about connecting 4 RGB LEDs? Is this design OK? imgur.com/a/sk3Db \$\endgroup\$ Commented Oct 26, 2016 at 22:22
  • 1
    \$\begingroup\$ @Defozo Cool! Hopefully now, The Photon will update his answer and now design you a universal driver to drive anything from a single 20 mA red LED to groups of up to 4 RGB LEDs with each LED requiring 1 A, doing so with separate high efficiency switching supplies for each of the separate voltages needed. (Or... perhaps the answer is no?) \$\endgroup\$ Commented Oct 26, 2016 at 22:53

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.