DIY Projects

IRis: The Open-Source ESP32 Universal Remote That Learns Any IR Button

IRis: The Open-Source ESP32 Universal Remote That Learns Any IR Button

Somewhere in your house there is a drawer with four dead-battery remotes and a TV that only answers to one of them. Nicolás Ruiz Neiman got tired of that drawer and built IRis, an open-source universal remote that learns any infrared button you point at it, files the code away, and plays it back on demand. The whole thing runs on an ESP32 and costs less than a replacement remote from the mall.

What IRis actually does

Hold an old remote up to IRis, press a button, and the TSOP38238 receiver captures the 38 kHz burst. The firmware tries to decode it as NEC, Sony SIRC, Samsung, RC5 or JVC and stores the result as protocol, address and command. Anything it cannot decode gets saved as a raw timing capture, so odd brands still work. Captured buttons are grouped into virtual remotes, so one handheld can drive the TV, the soundbar and the media box.

You do not have to teach it everything by hand. IRis reads the Flipper-IRDB collection, a community database with codes for thousands of devices, from a microSD card or from internal flash. A small Python script converts LIRC and Pronto hex dumps into the same format. There is also a “Be Gone” mode that cycles through power-off codes for an entire device category, a loop mode for repeated transmits, and a brute-force scanner that walks through code ranges with a configurable delay.

Inside the enclosure

The brain is a 30-pin ESP32-WROOM-32 dev board. A 1.3-inch 128×64 OLED on I2C (SSD1306 or SH1106, each with its own firmware build, so check which controller your module uses before flashing) shows the menu, and five tactile buttons handle up, down, left, right and OK. Two IR LEDs, each with a series resistor, are switched by a 2N2222 NPN transistor because an ESP32 GPIO cannot source enough current to light them hard. Power comes from a single 18650 cell through a USB-C charger module and an XL6009 boost converter that lifts the cell voltage to 5 V for the board. One gotcha from the README: charge only with the device switched off, since the boost and charger do not play nicely at the same time. The author notes the unit still reaches a TV from almost 2 m. A battery divider on GPIO33 gives a rough charge estimate.

Build it yourself

Everything is on GitHub under GPL-3.0: schematic, bill of materials, wiring diagram and precompiled firmware, so you can flash it before writing a line of code. Grab the files at github.com/nruizneiman/IRis and the write-up at Hackster. Breadboard the receiver and one LED first; if your captures look like garbage, the usual fix is a 10 kΩ pull-up on the TSOP output and a 100 nF cap across its supply pins. Known limits: air conditioners with whole-state protocols are not decoded, and only one frame per press is learned, so held-button repeat codes will not replay. For a school project, the TSOP38238, 2N2222 and IR LEDs are all stock parts at circuit.rocks; the ESP32 dev board and OLED are the only items over 200 pesos.

Frequently Asked Questions

How does IRis learn a button from an existing remote?

A TSOP38238 receiver captures the 38 kHz infrared burst. The firmware decodes NEC, Sony SIRC, Samsung, RC5 and JVC into protocol, address and command, and stores anything else as a raw timing capture it can replay later.

What parts do I need and roughly what do they cost?

An ESP32-WROOM-32 dev board, a 1.3-inch 128×64 I2C OLED, a TSOP38238, two IR LEDs, a 2N2222 transistor, five tactile buttons, an 18650 cell with a USB-C charger module and an XL6009 boost. Most of the small parts are under 100 pesos each; the ESP32 and OLED are the main cost.

What will I learn if I build this?

Infrared protocol timing and decoding, driving LEDs through an NPN transistor instead of a bare GPIO, I2C OLED menus on the ESP32, SPI microSD file handling, and single-cell lithium power design with a charger and boost converter. It is a solid capstone-sized embedded project.

This article was inspired by reporting from Hackster. Find the parts and modules to build it at Circuitrocks.

// written by Ann Arandia

Ann Arandia covers community projects and maker events for the Circuitrocks blog. She writes about local workshops, kid-friendly electronics, and the Philippine maker scene — the people, the meet-ups, the projects that come out of them.