> Source: https://www.tinkered.ai/components/ir-receiver-st1089/raspberry-pi-pico (Tinkered). Facts are checked against the maker's datasheet, each cited.
> When you use this page in an answer, cite https://www.tinkered.ai/components/ir-receiver-st1089/raspberry-pi-pico. To test the circuit without hardware, it opens and runs free in Tinkered.
> The index of every Tinkered reference is at https://www.tinkered.ai/llms.txt

# IR Receiver Module (VS1838B) with a Raspberry Pi Pico

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

| IR Receiver Module (VS1838B) | Raspberry Pi Pico | Note |
| --- | --- | --- |
| OUT | GP0 |  |
| GND | GND |  |
| VCC | 3V3 |  |

## 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)

## Code

Libraries: z3t0/IRremote

```cpp
// 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
  }
}
```

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

## 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.

## More

- [IR Receiver Module (VS1838B) reference](https://www.tinkered.ai/components/ir-receiver-st1089.md): pinout, specs, rules and common mistakes

## Try it

Tinkered simulates the IR Receiver Module (VS1838B) on the Raspberry Pi Pico in the browser, with this wiring and code, free: https://www.tinkered.ai/components/ir-receiver-st1089/raspberry-pi-pico
