Preview build — page text is a draft awaiting human review. Code badges come from real compiles. The flasher is real but not yet hardware-tested; the Playground is still a preview.

VS1838B IR receiver (38 kHz)

VS1838B / KY-022 38 kHz IR receiver pinout, wiring on 3.3 V and 5 V boards, decoding NEC remote codes with IRremote, and common problems.

GPIO

Community draft — report a mistake

CategorySensor
InterfaceGPIO
Voltage2.7–5.5 V
Typical price₹30

3.3 V or 5 V? Power it from your board's logic voltage; OUT is an active-LOW signal at VCC level.

The VS1838B demodulates 38 kHz infrared bursts from TV and AC remotes into a clean digital signal. The IRremote library turns that into protocol + address + command values (NEC is the most common for cheap remotes).

It’s the easiest way to add remote control to a project — relay boards, fans, LED strips, robots.

Bare vs module. The bare 3-leg receiver is OUT, GND, VCC facing the dome. The KY-022 module adds an LED and a resistor and labels its pins — use those labels.

Prices are indicative (Oct 2026) and vary by seller.

Pinout

PinWhat it does
OUTDemodulated signal: LOW while a 38 kHz IR burst is received
GNDGround
VCC2.7–5.5 V supply

Library

IRremote by Armin Joachimsmeyer (shirriff, z3t0)
Arduino IDE → Library Manager → search the name above. Each guide lists the exact version we compile against.

Use it with

Common errors

Random codes with no remote pressed

Sunlight and CFL/LED lighting cause noise. Add a 100 Ω resistor in VCC and 4.7–10 µF from VCC to GND near the receiver.

Wrong pin order — receiver gets hot

Facing the dome, legs down, the bare VS1838B is OUT, GND, VCC. KY-022 modules print S, −, + (or similar) — follow the labels, they vary.

Codes differ from tutorials

Library versions changed the API. With IRremote 4.x use IrReceiver.decode() and print decodedIRData.command.

↑↓ to move · Enter to open