logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

IR Receiver Module Pinout Diagram Connection for Arduino, ESP32, VS1838B

User question

how to connect IR receiver module pinout diagram

Artificial Intelligence Response

Direct answer to the question

An IR receiver module normally has 3 pins:

VCC GND OUT/SIGNAL

You connect it like this:

IR Receiver Module Microcontroller / Arduino / ESP32
------------------ -------------------------------
VCC / + ----------> 3.3 V or 5 V
GND / - ----------> GND
OUT / S ----------> Digital input pin

For example, with an Arduino UNO:

IR Receiver Arduino UNO
----------- -----------
VCC --------> 5V
GND --------> GND
OUT/S --------> D2, D7, D11, or another digital pin

For an ESP32 / Raspberry Pi / 3.3 V board:

IR Receiver ESP32 / 3.3 V logic board
----------- -------------------------
VCC --------> 3.3V
GND --------> GND
OUT/S --------> GPIO input pin

The most important warning: do not assume the pin order without checking the markings or part number, because different IR receiver packages use different pinouts.


Detailed problem analysis

1. Typical IR receiver module pins

Most IR receiver modules, such as VS1838B, HX1838, TSOP38xx, KY-022, and similar modules, have three functions:

Pin name Meaning Connect to
VCC / + Power supply 3.3 V or 5 V
GND / - Ground System ground
OUT / S / DATA / SIG Digital output signal Microcontroller digital input

The output is usually active LOW. That means:

  • When no valid IR signal is detected, OUT is HIGH.
  • When IR pulses are detected, OUT pulses LOW.

So if you measure the OUT pin with a multimeter, it will usually sit near VCC when idle.


Common pinout diagrams

A. Breakout module / KY-022 style

Many Arduino-style IR receiver modules are labeled directly on the PCB:

Front/header view:
[ - ] [ + ] [ S ]
| | |
GND VCC SIGNAL

Connection:

KY-022 / IR Module Arduino
------------------ -------
- / GND -----------> GND
+ / VCC -----------> 5V
S / OUT -----------> Digital pin, e.g. D2

Some modules may instead be labeled:

[ S ] [ GND ] [ VCC ]

or:

[ OUT ] [ GND ] [ VCC ]

Therefore, always follow the silkscreen labels on the PCB.


B. Bare VS1838B / HX1838 style receiver

If you have the bare black 3-pin receiver, hold it with the rounded lens/dome facing you and the pins pointing downward.

Common VS1838B / HX1838 pinout:

Front view, lens facing you:
_______
| |
| IR |
|_______|
| | |
1 2 3
Pin 1 = OUT
Pin 2 = GND
Pin 3 = VCC

So the connection is:

VS1838B / HX1838 Microcontroller
---------------- ---------------
Pin 1 OUT ----------> Digital input
Pin 2 GND ----------> GND
Pin 3 VCC ----------> 3.3V or 5V

C. Older TSOP1738-style receiver

Some older Vishay TSOP parts use a different pinout. For example, many TSOP1738 receivers use:

Front view, lens facing you:
_______
| |
| TSOP |
|_______|
| | |
1 2 3
Pin 1 = GND
Pin 2 = VCC
Pin 3 = OUT

This is different from VS1838B-type receivers.

So for TSOP1738:

TSOP1738 Microcontroller
-------- ---------------
Pin 1 GND ----> GND
Pin 2 VCC ----> 5V or 3.3V, depending on part
Pin 3 OUT ----> Digital input

This is why checking the exact part number is important.


Simple wiring diagram

Arduino example

 IR Receiver Module
+-------------------+
| |
Arduino 5V ---| VCC |
Arduino GND --| GND |
Arduino D2 ---| OUT / DATA / S |
| |
+-------------------+

If using a module marked -, +, S:

Arduino GND ---> -
Arduino 5V ---> +
Arduino D2 ---> S

Practical guidelines

1. Use the correct supply voltage

Most common IR receiver modules work from approximately 2.7 V to 5.5 V, but you should check the specific module.

General rule:

Controller Recommended IR receiver VCC
Arduino UNO / Nano 5 V
ESP32 3.3 V
ESP8266 3.3 V
Raspberry Pi 3.3 V
Raspberry Pi Pico 3.3 V

For 3.3 V microcontrollers, it is safest to power the IR receiver from 3.3 V, so the OUT signal does not exceed the input voltage rating.


2. Connect OUT to a digital input pin

The OUT pin goes to a normal digital input pin. For better decoding, use a pin that supports interrupts if your software library recommends it.

Example:

OUT ---> Arduino D2

or:

OUT ---> ESP32 GPIO 14

or:

OUT ---> Raspberry Pi GPIO 18

3. Add a decoupling capacitor if the signal is unstable

IR receivers can be sensitive to power supply noise. Place a small capacitor close to the module:

VCC ----+------ IR receiver VCC
|
=== 100 nF
|
GND ----+------ IR receiver GND

For longer wires or noisy supplies, you can also add a larger capacitor:

100 nF ceramic + 4.7 µF to 10 µF electrolytic/tantalum

In noisy designs, a small series resistor, for example 47 Ω to 100 Ω, in the VCC line can also help.


Important notes

  • Most remote-control IR receivers are designed for a carrier frequency around 38 kHz.
  • The receiver output is usually inverted/active LOW.
  • Reversing VCC and GND can damage the receiver.
  • Do not rely only on wire color; check the PCB labels or datasheet.
  • Direct sunlight or strong lamps can reduce range or cause unreliable reception.
  • If using long wires, keep GND and signal wiring short or twisted together to reduce noise.

Troubleshooting

Problem Likely cause Fix
No response VCC/GND/OUT connected incorrectly Check pinout and labels
Receiver gets hot VCC and GND reversed Disconnect immediately
Random readings Power supply noise Add 100 nF capacitor near module
Short range Wrong carrier frequency or poor alignment Use 38 kHz receiver and aim remote
Works on Arduino but not ESP32/Raspberry Pi Output voltage too high Power receiver from 3.3 V
Remote not detected Remote battery dead or wrong protocol Test remote with phone camera

Brief summary

Connect an IR receiver module as follows:

VCC ---> 3.3 V or 5 V
GND ---> GND
OUT ---> Digital input pin

If your module is labeled -, +, S:

- ---> GND
+ ---> VCC
S ---> Digital input

For a bare 3-pin receiver, check the exact part number because VS1838B/HX1838 and TSOP1738 style receivers can have different pin orders.

Ask additional question

Wait...(2min)
Disclaimer: The responses provided by artificial intelligence (language model) may be inaccurate and misleading. Elektroda is not responsible for the accuracy, reliability, or completeness of the presented information. All responses should be verified by the user.