The most reliable ir remote library for arduino development in 2026 is the IRremote library for standard projects, while IRMP (Infrared Multi Protocol Decoder) is superior for complex, multi-protocol commercial applications. This guide is designed for embedded systems engineers, hobbyist makers, and IoT developers integrating infrared communication into microcontroller projects.
Top Infrared Remote Libraries for Arduino
IRremote: The Standard Choice
Maintained by Armin Joachimsmeyer, the Arduino IRremote library remains the default choice for most makers. It natively supports NEC, Sony, and RC5 protocols. The library requires approximately 2048 bytes of SRAM on an Arduino Uno, leaving sufficient memory for basic logic operations. It operates optimally with a 38 kHz carrier frequency, which matches the vast majority of consumer electronics remotes.
IRMP: The Multi-Protocol Powerhouse
Developed by Frank Meyer, the Infrared Multi Protocol Decoder is engineered for universal compatibility. IRMP can decode and process more than 40 distinct infrared protocols simultaneously without prior configuration. This makes it indispensable for universal remote cloning or commercial home automation hubs where the exact remote model is unknown. The trade-off is a higher memory footprint, consuming roughly 4500 bytes of SRAM during active multi-protocol scanning.
IRremote vs IRMP: Feature Comparison Matrix
Selecting the correct library depends on your project constraints. Use this decision framework to match your hardware capabilities with library requirements.
| Feature | IRremote | IRMP |
|---|---|---|
| Target Audience | Hobbyists, Students | Commercial, Universal Hubs |
| Simultaneous Protocols | 1 (Configured) | 40+ (Automatic) |
| SRAM Usage (Arduino Uno) | ~2048 bytes | ~4500 bytes |
| ESP32 Hardware Timer | Supported | Supported |
| Raw Signal Sending | Yes | Yes |
How to Decode and Send Infrared Signals
Hardware Setup and Pin Configuration
Infrared communication relies on light pulses outside the visible spectrum, typically peaking at a 940 nm wavelength. You must connect a TSOP-series receiver to a digital input pin and an infrared LED to a PWM-capable output pin. Ensure your logic levels match; an Arduino Uno operates at 5 Volts, while an ESP32 requires 3.3 Volts logic shifting to prevent damaging the microcontroller.
Decoding Unknown Remote Protocols
Infrared Carrier Frequency: The base oscillation rate, usually 38 kHz, upon which the digital data pulses are modulated to prevent ambient light interference.
When encountering an unsupported remote, use the raw dump utility included in both libraries. This tool records the exact microsecond timing of the high and low pulses. You can then analyze this raw timing data to manually construct a custom transmission array, bypassing the need for a named protocol definition.
Frequently Asked Questions
How do I choose between IRremote and IRMP for my Arduino project?
Choose IRremote if you are building a simple robot or single-device controller where memory is limited and the remote protocol is known. Choose IRMP if you are building a universal learning remote or a smart home bridge that must accept commands from dozens of different manufacturer remotes.
Can I use an Arduino infrared library with ESP32 microcontrollers?
Yes. Both IRremote and IRMP fully support the ESP32 architecture. The ESP32 utilizes its hardware LEDC (LED Control) peripheral to generate the precise 38 kHz PWM signals required for infrared transmission, offloading the work from the main CPU cores.
Why is my Arduino IR receiver returning unknown hash values?
Unknown hash values occur when the receiver detects valid infrared pulses but cannot match the timing pattern to its internal database of known protocols. This usually indicates a proprietary protocol, a damaged remote, or severe ambient light interference saturating the receiver diode.
Next Steps and Implementation
Integrating an ir remote library for arduino transforms basic microcontrollers into responsive, wireless control nodes. IRremote provides the fastest path to deployment for standard applications, while IRMP delivers unmatched protocol coverage for complex environments. Your immediate next step is to wire a TSOP4838 receiver to digital pin 11, upload the IRrecvDump example sketch, and map the hexadecimal codes from your physical remote.






