IR receiver VS1838B + remote
read a remote control
A receiver for infrared light from a TV remote. Every button sends its own code, so you can use an old remote to control LEDs, motors or a menu.
Open the course →How it works
The remote flashes an IR LED at 38 kHz in a pattern (NEC protocol: a start pulse + 32 bits). The VS1838B filters only 38 kHz and gives a clean digital signal at its output (LOW while receiving). The IRremote library measures the pulse lengths and gives you the button code.
Pins and wiring
| Pin | What it is | Where it connects / why |
|---|---|---|
| OUT | Digital output (active LOW) | → GPIO (e.g. 15). |
| GND | Ground | → GND. |
| VCC | Supply | → 3V3. |
Specifications
Frequency38 kHz
Range~8–10 m
Supply2.7 – 5.5 V
ProtocolsNEC, Sony, RC5… (in software)
Tips and typical mistakes
- The bare VS1838B leg order is OUT-GND-VCC, but modules change it. Check the labels.
- Sunlight and some LED bulbs create noise — test in the shade.