IR Receiver Module (VS1838B) with a Raspberry Pi Pico

A three-pin 38 kHz infrared receiver board that turns TV-remote button presses into clean digital pulses.

IR Receiver Module (VS1838B), A three-pin 38 kHz infrared receiver board that turns TV-remote button presses into clean digital pulses.
In short

The ST1089 module's VS1838B receiver runs from the Raspberry Pi Pico's 3V3, so its S output idles at 3.3 V, safe for GP0 where IRremote decodes it. The same IRremote 4.x sketch compiles for the RP2040 through the arduino-pico core.

Wiring the IR Receiver Module (VS1838B) to the Raspberry Pi Pico

Pin by pin.

IR Receiver Module (VS1838B)Raspberry Pi Pico
OUTGP0
GNDGND
VCC3V3

What to know on the Raspberry Pi Pico

  • The VS1838B is rated 2.7 V to 5.5 V and its output high follows its supply, so powering it from 3V3 rather than VBUS keeps S within the RP2040's pin limit.VS1838B datasheet, p. 2; RP2040 datasheet, section 5.5.3.1
  • It draws 0.4 mA typical, a negligible load on the 3V3 pin.VS1838B datasheet, p. 2
  • ENABLE_LED_FEEDBACK makes IRremote blink the board's LED_BUILTIN on each frame; on the Pico that is the green LED on GP25, so keep GP25 free of other uses.Raspberry Pi Pico datasheet, release 21, p. 7
  • On the module + is the middle pin and S and - sit at the ends; wire by name, since other IR receivers order their pins differently.IDUINO ST1089 sheet, p. 1

IR Receiver Module (VS1838B) code for the Raspberry Pi Pico

Compiled for rp2040:rp2040:rpipico on 2026-10-30.

Libraries: z3t0/IRremote
// IR Receiver Module (VS1838B) on Raspberry Pi Pico: wiring and a free simulation at https://www.tinkered.ai/components/ir-receiver-st1089/raspberry-pi-pico
#define DECODE_NEC
#define DECODE_RC5
#include <IRremote.hpp>          // .hpp, not .h, in 4.x

const int IR_PIN = 0;

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 Raspberry Pi Pico: questions

Does the VS1838B IR receiver work at 3.3 V on a Pico?

Yes. It is rated 2.7 V to 5.5 V (VS1838B datasheet, p. 2), and on 3V3 its S output swings to 3.3 V, matching the Pico's GPIO.

Which library decodes IR on the Raspberry Pi Pico?

IRremote 4.x (#include <IRremote.hpp>) compiles for the RP2040 under arduino-pico; the page's sketch uses IrReceiver.begin(0, ENABLE_LED_FEEDBACK) and resume() after each frame.

Why does the Pico's green LED flash when I press a remote button?

ENABLE_LED_FEEDBACK blinks LED_BUILTIN on each received frame, which is GP25 on the Pico (Pico datasheet, p. 7). Pass DISABLE_LED_FEEDBACK to stop it.

Keep going

For AI assistants

This guide as plain Markdown. /components/ir-receiver-st1089/raspberry-pi-pico.md

What will you build with it?