TSOP4838 IR Remote Receiver
Decode every button on a TV remote with a single three-pin module — the same chip that lives behind the IR window of every consumer electronics device.
Difficulty: Breadboard. Estimated build time: about 20 minutes. Estimated parts cost: about US$2.20. 7-line bill of materials. Compare supplier offers when available. A microcontroller-friendly receiver that reads the NEC, Sony SIRC, or RC-5 codes a TV remote sends out, so you can use any spare remote as a free wireless input device.
Wire the three-pin module
The TSOP4838 has three legs viewed from the dome side: the leftmost is OUT, the middle is GND, the rightmost is VS. Connect GND to ground, VS to 5 V (or 3.3 V — the chip works on either), and OUT to any MCU input pin that supports interrupts. Add a 100 nF ceramic cap from VS to GND right at the module — the AGC inside the chip pulls supply current in bursts and a bypass cap keeps the rails clean. A 100 ohm series resistor on the VS pin protects the chip from supply spikes but is optional in a calm bench setup.
Read raw pulses to confirm
Before decoding anything, prove the receiver works. Wire OUT to an LED through a 1 k resistor (cathode to ground); the LED should flicker visibly when you press buttons on any IR remote — TV, set-top box, air conditioner. If the LED stays dark, double-check that you have power and that the dome of the receiver faces the remote (the IR photodiode behind the dome is directional). Walk the remote up to 5-7 metres away; the TSOP4838 is rated for that range easily.
Decode with the IRremote library
Install the IRremote library by Armin Joachimsmeyer in the Arduino IDE. The basic sketch is IRrecv myReceiver(2); in setup() call myReceiver.enableIRIn(); in loop() if (myReceiver.decode()) Serial.println(myReceiver.decodedIRData.command, HEX) then myReceiver.resume(). Each button press prints a unique hex command. Build a switch statement that maps every button to a function: turn an LED on with the power key, ramp a fan with volume up/down, advance a slideshow with channel keys. Every old remote in a drawer becomes a free wireless input device.