I want to use a high power IR LED such as a Vishay TSAL6200 with a 3.3V ATmega328P. Since an output pin of that MCU can provide 'just' up to 20 mA I can't directly connect that LED but have to connect some transistor circuit. So the goal is to drive the LED with 200 mA, under a 38 kHz PWM scheme (say, 23 % to 50 % or so duty cycle).
What I figured from reading up on transistors is that in order to use a transistor for on/off switching I should saturate its base.
The 2N2222 transistor seems to be a common choice and allow for sufficient switching power. And it should be saturated when the base (I_B) is powered with 1/10 th of the collector power (I_B). Thus, for my use case, I_B should be 20 mA, right?
Looking at the ATmega328P output voltage figures (Figure 35-23, page 608) I understand that I should use V_OH (i.e. 2.2 V) when calculating the base resistor. Ok, the figure is for VCC = 3 V and not 3.3 V but perhaps this is close enough. Is this a fair approach?
Also, when computing the base/LED resistor values, I understand that I should subtract the voltage drop in the transistor. Looking at some datasheets/posts I think the drop is 0.6 V for that transistor.
So in my calculations I'm using the following variables:
VCC = 3.3 V # circuit voltage
I_LED = 200 mA # TSAL6200 LED peak forward current
I_B = 20 mA # 2N2222 transistor base current
V_F = 1.45 V # LED forward voltage
V_OH = 2.2 V # ATmega328P output pin voltage at 20 mA
V_BE(sat) = 0.88 V # Base/emitter voltage drop at I_C=0.2 A when saturating
V_CE(sat) = 0.15 V # Collector/emitter voltage drop at I_C=0.2 A when saturating
So I arrived at this schematic:
simulate this circuit – Schematic created using CircuitLab
I calculated the resistor values like this:
R1 = (V_OH - V_BE(sat) / I_B = 66 Ohm
=> P1 = (V_OH - V_BE(sat)) * I_B = ~ 0.03 W
R2 = (VCC - V_F - V_CE(sat)) / I_LED = 8.5 Ohm
=> P = (VCC - V_F - V_CE(sat)) * I_LED = 0.34 W
See also an onsemi 2N2222A datasheet (i.e. Figure 2 and Figure 3 on page 3) for the used transistor parameters.
My main question regards power efficiency of such a circuit - can it be improved?
For example, is there perhaps another transistor part which saturates at lower current and thus would save some energy?
Is leakage current (when the output pin connected to the base is low) something to worry about? Or do such transistors usually have low leakage current?
Or are there more power efficient IR LEDs?
Re: Logic Level MOSFETS The consensus in the answers is to use a LL Mosfet for switching the IR LED for better power efficiency. Thus, I've searched a bit around and found a few candidates:
Part Package LL R_DS(on) I_D@V_GS=3.3V Q_g(nC) Notes
IRF3708PbF TO-220AB 14.5 mOhm/V_GS=2.8V 100 A 24 obsolete
IRLB8721PbF TO-220AB not tabulated/plotted 10 A 7.6 sold by adafruit for 3.3V logic
FQP30N06L TO-220 not tabulated/plotted 10 A 15 sold by sparkfun for 3V logic
IRLZ44NPbF TO-220AB not tabulated/plotted 30 A 48
PSMN022-30PL TO-220AB 40 mOhm/V_GS=3.3V(plot) 10 A 4.4
PSMN4R3-30PL TO-220AB 7 mOhm/V_GS=3.3V (plot) 80 A 19
IRL40B209 TO-220AB 6 mOhm/V_GS=3.3V (plot) 30 A 180
IRLB8314PbF TO-220AB 6 mOhm/V_GS=3.3B (plot) 100 A 40
So I filtered for through-hole parts, for easier experimentation (e.g. on bread boards). Unfortunately, this excludes many parts when targeting a logic level of <= 3.3 V.
Sources I used:
- forum/stackexchange answers that include concrete recommendations
- Diodes' parametric search
- Vishay's parametric search)
- Nexperia's parametric search
- Infineon/IFR's parametric search
- ST parametric search
- Microchip - I couldn't find a good parametric search
What surprises me is that Adafruit/Sparkfun are marketing the IRLB8721PbF/FQP30N06L explicitly also for 3.3 V logic levels when their datasheet doesn't specify a a R_DS(on) value for that level!
After RTFMing a bunch on MOSFETS, useful selection criteria seem to be:
- V_GS(th) is below 3.3 V (necessary condition)
- R_DS(on) is specified in a table for V_GS <= 3.3V, or
- a R_DS(on)/V_GS plot contains a data point for V_GS <= 3.3V
- otherwise, it's unclear if the Mosfet even fully switches at the 3.3 V logic level
- the total gate charge Q_G(tot): smaller is better (-> faster switching)
This process is a bit tricky, since only a few tabulate R_DS(on) for lower V_GS values. And the R_DS(on)/V_GS plot is usually relatively small and the curve often just starts at 3.3 V or so.
The IRF3708PbF looks like a good match because it has R_DS(on) tabulated for 2.8 V but it's EOL/obsolete. Also its Q_G is higher than others (i.e. it switches after 2.4 µs or so when limiting the output pin to 10 mA - i.e. 24 nC / 10**9 / 0.01 A = 2.4 µs
). With 38 kHZ PWM, this would move the duty cycle by 9 % of the pulse width.
A high R_DS(on) shouldn't be a problem, since it's in the order of milli-Ohms and if necessary we could even adjust the LED series resistor (R2). Vishay has some ll Mosfets with R_DS(on) tabulated for <= 2.5 V and very low Q_G - but only in crazy SMT packages.
Thus, further concentrating on Q_G, the PSMN022-30PL with Q_G=4.4 nC seems to be the best choice for the target circuit, in a convenient package. It's gate should be loaded in 0.4 µs then when limiting the output pin current to 10 mA.
I sketched the Mosfet circuit like this:
Design notes:
- The purpose of R1 is to limit the gate current to 10 mA in order to reduce RF noise when discharging and possibly other weird effect. Its value is smaller than the recommended 330 Ohm since the voltage at the ATmega328P output pin drops to 2.6 V when 10 mA is consumed from it.
- R3 is a pull-down resistor to avoid that the gate is in a undefined/floating state during microcontroller reset.
- the source of the Mosfet is connected to ground and the load is connected to the drain, the only useful configuration for such a Mosfet, as I understand
- R2 protects the LED such it's limited to 200 mA (i.e.
R2 = (VCC - V_F) / I_LED - R_DS(on) = (3.3 V - 1.45 V) / 0.2 A) - 0.04 Ohm
)
Re: power efficient IR LEDs The radiant intensity (I_e
in mW/sr
) (under a fixed current and pulse-width) seems to be the primary property of an IR LED that shows how efficient it is. IOW, the higher mW/sr
(at constant I_F and t_p) the better since you get more IR power under the same power budget. LEDs with a smaller angle of half intensity tend to have higher mW/sr
values, thus, the selected part should have a angle only as wide as necessary.
Of course, the wave-length must match the receiver, i.e. the peak spectral sensitivity of consumer IR receivers such as the TSOP4438 is at 940 nm to 950 nm.
A few candidates I found using above selection criteria:
Part I_e(mW/sr) deg(half) peak_wave(nm) I_F(mA) I_FM(mA) I_Fp(mA) V_F(V) V_F(V)@200mA V_F(V)@400mA
VSLY5940 600 3 940 100 200 400 1.65 1.8 2.25
SFH 4544 550 10 950 100 180 350 1.6 1.8 2.5
SFH 4545 550 5 950 100 199 410 1.5 1.6 1.8
TSAL6100 170 10 940 100 200 na 1.35 1.43 1.75
SFH 4546 130 20 950 100 199 400 1.5 1.6 1.75
HR5P-N4CA 115 15 940 100 na na 1.52 na na
HR5P-N4CB 121 15 940 100 na na 1.42 na na
TSAL6200 72 17 940 100 200 na 1.35 1.45 1.8
SFH 4547 50 30 950 100 199 400 1.5 1.6 1.9
I_FM -> tp/T = 0.5, tp = 100 μs
I_e -> IF = 100 mA, tp = 20 ms
V_F -> IF = 100 mA, tp = 20 ms
IFp -> D=0.2, tp=10^-5
Sources I've used:
Since these LEDs are high powered, the question of eye safety might come up. Looking at the datasheets those parts doesn't seem to reach one significant threshold (4 W/sr) for an extended time frame. It might be possible to reach that at 1 A with a low duty-cycle/high carrier frequency, but it seems for safety, one may consider the average intensity, then.
So, the SFH 4546 looks like a good trade-off between relatively high degree of half-intensity and still high radiant intensity. Also, when doing 38 kHz PWM, it's specified to be fine at 400 mA. The only difference to the SFH 4546-AWBW variant seems to be the guaranteed minimal radiant intensity (i.e. 112 mW/sr vs. 71 mW/sr).
Re: SMT MOSFETs When not being restricted to through-hole components, there is definitely more choice in suitable ll MOSFETs. The still (relatively) easily usable SMT packages in that context are perhaps SOT-23 and SOT-89 ones. Since breakout boards are available for those (a.k.a. surfboards, DIP adapters - cf. e.g. Adafruit/Sparkfun) they can also be used for prototyping, although it requires some extra intricate soldering.
A small selection of such components for comparison with above's TO-220AB ones:
Part Package LL R_DS(on) I_D@V_GS=3.3V Q_g(nC) Notes
PSMN022-30PL TO-220AB 40 mOhm/V_GS=3.3V(plot) 10 A 4.4 for comparison
PJA3436 SOT-23 680 mOhm/V_GS=2.5V 2.5 A 0.9 ESD protection
PJA3434 SOT-23 350 mOhm/V_GS=2.5V 0.750 A 1.4 ESD
DMN3730U SOT-23 560 mOhm/V_GS=2.5V 0.700 A 1.6 ESD
Si2300DS SOT-23 70 mOhm/V_GS=2.5V 0.4 A 2
AO3400 SOT-23 24 mOhm/V_GS=2.5V 0.5 A 6
TSM210N02CX SOT-23 25 mOhm/V_GS=2.5V 0.5 A 2.7
PMV30UN2 SOT-23 39 mOhm/V_GS=2.5V 1 A 6.2
So there are some parts available with even lower total gate charges.
And some parts feature internal ESD protection. Since the IRLED isn't an inductive load, the drain-source TVS diode looks superfluous. I'm not sure if the gate-source TVS diode is nice to have, in such a circuit - since I don't know how much of ESD one should expect. However, these parts have relatively higher R_DS(on) than others.
Curiously, the Panjit datasheets don't include safe operation area plots.