IR Receiver Module (VS1838B) with an ESP32 DevKit V1
A three-pin 38 kHz infrared receiver board that turns TV-remote button presses into clean digital pulses.

The ST1089 module's VS1838B receiver runs from the ESP32 DevKit V1's 3V3, inside its 2.7 V to 5.5 V range, and its S pin goes to GPIO13. Powered from 3.3 V its output idles at the ESP32's own logic level, so no divider is needed.
Wiring the IR Receiver Module (VS1838B) to the ESP32 DevKit V1
Pin by pin.
| IR Receiver Module (VS1838B) | ESP32 DevKit V1 |
|---|---|
| OUT | GPIO13 (D13) |
| GND | GND |
| VCC | 3V3 |
What to know on the ESP32 DevKit V1
- Keep the module on 3V3, not VIN. Its output high follows its supply, 4.5 V minimum on a 5 V supply, which would exceed the ESP32's VDD + 0.3 V input limit.VS1838B datasheet, p. 2; Espressif ESP32 Series Datasheet v5.3, p. 52
- The ESP32 also has a hardware Remote Control peripheral (RMT) with eight channels built for sending and receiving IR signals, which libraries can use to capture remotes without CPU timing.Espressif ESP32 Series Datasheet v5.3, p. 38
IR Receiver Module (VS1838B) code for the ESP32 DevKit V1
Compiled for esp32:esp32:esp32 on 2026-10-30.
// IR Receiver Module (VS1838B) on ESP32 DevKit V1: wiring and a free simulation at https://www.tinkered.ai/components/ir-receiver-st1089/esp32
#define DECODE_NEC
#define DECODE_RC5
#include <IRremote.hpp> // .hpp, not .h, in 4.x
const int IR_PIN = 13;
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 Module (VS1838B) on the ESP32 DevKit V1: questions
Can I connect the VS1838B module to any ESP32 pin?
Any GPIO that can read an input works for OUT, including the input-only GPIO34 to GPIO39 (ESP32 datasheet, p. 61). The page uses GPIO13, which is not a strapping pin.
Why do I get only one code from my remote on the ESP32?
Call IrReceiver.resume() after every decode, as the page's sketch does; without it the receiver stays stopped.
Keep going
This guide as plain Markdown. /components/ir-receiver-st1089/esp32.md