Skip to content

Wiring: IR

IR is the classic proxy job: a device with only a remote, in a spot the hub can’t blast.

An IR LED driven through a transistor from a GPIO. Don’t drive the LED straight off a pin — IR LEDs want more current than a GPIO should source.

IR transmit: a GPIO switching an infrared LED through a transistor 100 Ω + IR LED → device 1 kΩ GPIO ESP32 dev board 3V3 TX RX GND 2N2222 B C E
The GPIO only switches the transistor; the LED's current comes from 5 V through the 100 Ω resistor, so the pin never sources it.

Place the LED where it can see the device’s receiver (or tape it over the window).

A 38 kHz IR receiver module (TSOP-style, three pins):

IR receive: a 38 kHz TSOP receiver module on a GPIO OUT → GPIO input ESP32 dev board 3V3 TX RX GND IR receiver 38 kHz VCC OUT GND
Three wires. The module does the demodulating; the GPIO just reads its output.

Use it to learn codes (via the IR driver) or to use an old remote as an input.