Overview
This is a fairly easy build, high power IR blaster driven by an ESP8266, but any microcontroller could drive it.
It controls various items in living room, TV, surround sound amp and 2 a multi colour globe and an LED bear light from the other side of the lounge. The trick was a MOSFET driver. Before was simply just a couple of IR led's and a resistor directly connected to an ESP pin. It worked, but didn't have enough range to operate everything.
Hardware
- Any microcontroller. ESP8266 was used here for its compatibility with Home Assistant
- IR emitter LEDs: 5 mm 940 nm (narrow beam). The more the merrier, but the current soon starts clocking up. Around 180mA per LED using this circuit at 5v
- MOSFET: logic friendly FQP30N06L is recommended and works really well even with the 3.3v output from the ESP devices. These MOSFETs are also used in another project 12v 5050 RGB strip lighting (I've yet to write this up)
I used a very questionable chineese IRF1404 which switches the load very well, but its not meant to switch at 3.3v. I don't recommend trying these. Its a bit of a lucky dip. Just get FQP30N06L - Resistors: 18–22 Ω, ≥1 W (1 per LED at 5 V), This will give ~160–200 mA per led peak.
- Power: 9-12v. If you want to run it straight from 5v, just remove the 5v regulator (see note below)
Circuit diagram
- 5v regulator with noise/ripple filtering capcitors, just as the datasheet recommends
- For each IR LED, 5v through a 22R resistor into the anode + of the LED. Cathode - connected to the drain of the MOSFET
- Gate: The GPIO signal when on switches on the MOSFETs gate. Drain and source go close to shorted, down to a few ohms, LED's are on
- R8 - 100K stops the LED's switching on if there is nothing connected to the gate. This is important because the LED's will burn out if they are on solid. They are being pushed hard for maximum performance. During normal operation, the GPIO pin is on for very short durations and the signal is modulated, so its only on 30-50% of the time reducing the risk of damage even more.

If you want to run this from a 5v power source, remove U1 5v regulator and connect straight to the 5V rail. I recommend you still include C1 and C2 capacitors though.
First powerup - important. Before powering up you need to watch the LED's through your phones camera. Switch power on, check the LEDs are not lit. If they are, power off immediately to avoid permanently damaging them.
To debug this, its probably worth disconnecting all the IR LEDs, and instead use a regular LED with around a 220R resistor. You can then find the failure point without damaging any LEDs.
ESPHome example - test code
IR transmitter test script. Add this to an ESP device. Choose your GPIO pin. GPIO5 was used here. Once flashed, watch the lights using the camera on your mobile phone whilst pressing the IR test button in Home Assistant.
# ----------------------------- IR transmitter ----------------------------- remote_transmitter: pin: number: D1 # GPIO5 carrier_duty_percent: 50%button: - platform: template name: "IR test button" on_press: - remote_transmitter.transmit_sony: data: 0x0000540A nbits: 15 repeat: times: 5 wait_time: 45ms
If your seeing the IR LED's flash, its working correctly. If the LED's are lit all the time, immediately disconnect the power. See the red text paragraph above.
Notes
- Carrier: The script above "carrier_duty_percent: 50%" - recommendations are that 38 kHz works for most devices. Sony needs ~40 khz. I've personally never changed it from 50%. Experiment for performance.
- Peak current: ~160–200 mA per LED. Again, the LEDs are being driven hard, but are being pulsed briefly so are fine with correct resistors. Go for 27R or 33R if you are concerned about overloading them, but the trade off is lower performance.
- Power: Remember, 200mA per LED soon clocks up. 6 LEDs = 1.2 amps or 6 watts very brief bursts. Make sure your PSU can cover this. Even the regulator is being pushed at these numbers, but again its brief bursts of power so will be ok.
- Coverage: More LEDs aimed at different zones beat one big beam in one direction.

