# IR Blaster Resistor Calculation for IR LED (breaking ohm's law?)

We are trying to build IR Blaster based on schematics provided by Tuya. I believe Tuya based IR blasters sells hundred of thousands per month if not millions. So I am quite sure that their schematics are perfect. However, I failed to understand the calculation for the resistor values they used for IR LED (both for single LED and 2 LEDs in series).

For Single LED driven using 8050 NPN they have used 12 Ω resistor while driving LED from 5 V rail. Here are the schematics:

Source

When I do the calculation for current as below

Vs - VLed -Vce(sat) / Resistance = (5-1.45-.5)/12 = 254 mA

I get 254 mA current that will pass through IR LED. However, when checking the datasheet of IR LED, its continuous current is only 80 mA.

I am trying to understand on what basis their engineers decided to use 12 Ohm resistor instead of
(5 - 1.45 - .5) / 80 mA = 38 Ω?

Why It is important to know is because we are using IR LED with forward voltage of 1.2 V and continuous current 100 mA with BC817-40 NPN transistor. If we do standard calculations for, we get a value of around 33 Ω to be used. And if we use 33 Ω our range is nowhere near to the range in which Tuya recommended transistor, resistor, and LEDs are used.

I understand that when sending code it will not be all one, there will a pattern of zeros and ones. So LED will not be high all the during say 25 ms pulse. But making assumption of transmitted data can lead to LED blow up.

Can someone please enlighten Why instead of 38 Ω approx. they used 12 Ω for single LED or say 5.6 Ω for 2 LED in series?

I am attaching all relevant documents to answer the query.

XYC-IR5C940AC-X4 (Specs)

Source

Full schematics:

Source

The simple answer is, the LED isn't driven with 254mA DC, it's driven with pulses of 254mA.

And as the LED datasheet says, it can handle pulses of 1A, when individual ulses are less than 100us, and the average duty of pulses is less than 1%.

From there on, we need to do some hand-waving to come up with sensible short term and long term average.

Generally most consumer IR protocols have a carrier frequency of 36..40 kHz. Only one I know without a carrier is an ancient protocol by ITT with very short pulses anyway.

Each wave of carrier is thus at most 28 microseconds long, and depending on the protocol, the carrier duty cycle is not even 50% on/off but usually 1/3 or 1/4 (33% or 25%), so with a continuous carrier, the LED is passing 254mA at most 33% of the time or on average, at most 85mA as DC average.

OK, but that's very different from having less than 1% duty of 1A pulses that are max 100 microseconds. It means that for each max 100 us pulse that heats up the LED there must be a gap of at least 9900 us between pulses. Well, 1% of 1A is a long term average of 10mA.

The difference is that with higher current, the voltage is also higher, so the heating power is not linear with the current only.

However, if we assume e.g. Philips RC5 protocol which is Manchester coded, the carrier is 50% of the time on an off, so during a burst of data the long term average is only 42mA. And as the data bursts are usually 14 bits long and thus takes 25ms to send and repeated evry 113ms, there is transmissions with long term average current of less than 10mA.

So as long as the carrier does not send cumulatively too much heating power into LED, the LED will have ample time to cool down between carrier pulses and gaps between transmissions.

250mA peak currents should not be an issue.

• Thanks for the detailed explanation. Really appreciate it Commented Jul 19 at 12:40

The LED isn't driven continuously. It is driven with a 'carrier' (typically 38 kHz) that is lower duty cycle. The LED can tolerate higher currents when pulsed this way. 250 mA peak isn't unreasonable for an 80 mA continuous LED if the duty cycle is kept below 30%.

250 mA is still below the max pulsed current of 1 A.