IR Receiver (TSOP4838) with an Arduino Uno
A TSOP4838 infrared receiver module that demodulates 38 kHz remote-control signals into a clean digital output.

The bare TSOP4838 has an internal 30 kΩ pull-up to its own supply, so powered from the Arduino Uno's 5V its OUT idles at 5 V and pulls low on each burst, ready for any Uno input. Unlike a breakout, it has no filtering of its own, and the Uno's USB 5 V is not a quiet supply.
Wiring the IR Receiver (TSOP4838) to the Arduino Uno
Pin by pin.
| IR Receiver (TSOP4838) | Arduino Uno |
|---|---|
| OUT | D2 |
| GND | GND |
| VCC | 5V |
What to know on the Arduino Uno
- OUT's 30 kΩ pull-up goes to VS, so VS must be the Uno's 5V for OUT to reach the Uno's logic high; the receiver runs from 2.0 V to 5.5 V.Vishay TSOP48 datasheet rev 2.4, pp. 1 to 3
- Vishay's application circuit adds a resistor in series with VS and a capacitor from VS to GND to keep supply disturbances out of the receiver. On the Uno's USB-powered 5V, add them close to the part if the range is shorter than expected or codes are missed.Vishay TSOP48 datasheet rev 2.4, application circuit
- Wire by pin number, not position: pin 1 is OUT, 2 GND, 3 VS. The TSOP's order differs from many breakouts, so a breadboard copied from a module tutorial puts 5 V on the wrong pin.Vishay TSOP48 datasheet rev 2.4, p. 2
- The Uno's IRremote 4.x build claims Timer2: keep tone() out of the sketch and expect no PWM on D3 or D11.IRremote library documentation; Arduino language reference, tone()
IR Receiver (TSOP4838) code for the Arduino Uno
Compiled for arduino:avr:uno on 2026-10-30.
// IR Receiver (TSOP4838) on Arduino Uno: wiring and a free simulation at https://www.tinkered.ai/components/ir-receiver/arduino-uno
#define DECODE_NEC
#define DECODE_RC5
#include <IRremote.hpp> // .hpp, not .h, in 4.x
const int IR_PIN = 2;
void setup() {
Serial.begin(9600);
IrReceiver.begin(IR_PIN, ENABLE_LED_FEEDBACK);
}
void loop() {
if (IrReceiver.decode()) {
Serial.println(IrReceiver.decodedIRData.command, HEX); // e.g. 45
// also: .address, .protocol, .decodedRawData,
// .flags & IRDATA_FLAGS_IS_REPEAT
IrReceiver.resume(); // required
}
}
IR Receiver (TSOP4838) on the Arduino Uno: questions
How do I wire a TSOP4838 to an Arduino Uno?
Pin 1 (OUT) to D2 or any digital pin, pin 2 to GND and pin 3 (VS) to 5V (Vishay datasheet, p. 2). OUT has its own 30 kΩ pull-up, so no resistor is needed on the signal.
Why does my TSOP4838 miss codes on the Uno?
Supply noise is a common cause on a USB-powered Uno. Add the series resistor and decoupling capacitor from Vishay's application circuit at the receiver, and keep it away from switching parts.
Can I use tone() with the TSOP4838 on an Arduino Uno?
Not with IRremote 4.x, which uses Timer2 on the Uno, the timer tone() needs too.
Keep going
This guide as plain Markdown. /components/ir-receiver/arduino-uno.md