Electronic – Is this resistor for the base of the transistor calculated correctly

npnresistorsschematicstransistors

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

Best Answer

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.