Skip to content
E

IR

Interfacing IR Transmit Kit with ESP32

What is the IR Transmit Kit?

A matched infrared LED and receiver pair used for building custom remote controls or simple line-of-sight communication links. The transmitter side is a standard IR LED driven with modulated pulses (typically 38kHz carrier) to encode a signal, while the receiver is a demodulating IR photodiode module (like the TSOP1738) that filters out ambient IR noise and outputs a clean digital signal a microcontroller can decode — the standard building block for replicating TV/appliance remote codes or sending simple short-range wireless signals between two line-of-sight devices.

Specifications

TransmitterStandard 5mm IR LED, typically driven at 38kHz carrier frequency to match common receiver modules
Transmitter operating voltageDriven from a digital GPIO pin (often through a transistor for higher current) at 3.3-5V logic levels
ReceiverIR demodulator module (e.g. TSOP1738/TSOP4838) tuned to a specific carrier frequency (commonly 38kHz)
Receiver operating voltage3.3V-5V DC depending on module
Range~5-10m line-of-sight typical for basic remote-control style use, shorter in bright ambient IR conditions (e.g. direct sunlight)
ProtocolsCommonly used with NEC, Sony SIRC, RC5, or raw pulse-timing protocols depending on the library/firmware used
InterfaceTransmitter: single digital output pin (often via a transistor driver for brighter/longer-range LEDs). Receiver: single digital input pin

IR Transmit Kit Pinout

PinNameDescription
1IR LED anodeConnect through a current-limiting resistor (and optionally a transistor for higher drive current) to a digital output pin
2IR LED cathodeConnect to ground (or transistor collector/drain if using a driver transistor)
3Receiver VCCPower, 3.3-5V DC depending on receiver module
4Receiver GNDGround
5Receiver OUTDemodulated digital signal output — connect to a digital input pin, typically read with an IR-remote decoding library

For reliable transmission range beyond a few centimeters, drive the IR LED through a small NPN transistor rather than directly from a GPIO pin, since a microcontroller pin usually can't source enough current for a bright, long-range IR burst; libraries like IRremote handle both the 38kHz carrier modulation on transmit and automatic demodulation-aware decoding on receive.

Setting Up IR Transmit Kit with ESP32

Library

IRremote by Armin Joachimsmeyer

Arduino IDE → Tools → Manage Libraries → search "IRremote"

Library guide

Wiring

Component pinESP32 pinNote
IR LED anodeGPIO4 (via 100Ω resistor; add a transistor driver stage for longer range)Direct GPIO drive works for short range
IR LED cathodeGND
Receiver VCC3.3V
Receiver GNDGND
Receiver OUTGPIO15

Example code

C++

IRremote's send and receive pins must be different GPIOs. Sending and receiving on the same board is mainly for testing round-trip decoding -- typical real use has one board sending and a separate one receiving.

Related Guides & Projects