IR
Interfacing TSOP1738 IR with ESP32
What is the TSOP1738?
TSOP1738 practical reference
A demodulating IR receiver tuned to 38kHz, used to decode signals from standard infrared remote controls. Rather than just detecting raw infrared light, the TSOP1738 internally filters and demodulates the 38kHz-modulated carrier that virtually all consumer IR remotes use, rejecting ambient light noise and outputting a clean digital pulse train that directly matches the original transmitted code — making it the standard receiver for universal remote clone projects, IR-controlled robots, or capturing existing remote codes for later playback.
Key specifications
- Sensor type: TSOP1738 demodulating infrared receiver, tuned to a 38kHz carrier frequency
- Operating voltage: 2.5V–5.5V DC
- Operating current: ~1.5 mA typical, low standby current
- Carrier frequency: 38kHz (matches the vast majority of consumer IR remote controls)
- Output: Active-LOW demodulated digital signal — pulses LOW when a matching 38kHz-modulated IR signal is received
- Range: ~10-15m typical for standard remote-control transmission power
- Ambient light rejection: Built-in filtering rejects sunlight and normal indoor lighting noise that would otherwise interfere with detection
- Interface: Single digital output pin, typically read using an IR-remote decoding library (e.g. IRremote)
Pinout and connection notes
Add a small decoupling capacitor (e.g. 10-100µF) across VCC and GND close to the sensor if experiencing unreliable readings, since the internal AGC circuit can be sensitive to power supply noise; libraries like IRremote handle the pulse-timing decode automatically once wired to a digital input pin. Confirm the carrier frequency matches your target remote — 38kHz covers most consumer electronics, but a few remotes (particularly some Japanese TV brands) use 36kHz or 40kHz and need a differently-tuned TSOP variant.
- OUT: Demodulated digital signal output, active LOW — connect to a digital input pin
- GND: Ground
- VCC: Power, 2.5–5.5V DC
Integration checklist
- Confirm the exact part number and breakout-board revision.
- Verify supply voltage, current demand, logic levels, and signal direction against the datasheet.
- Check controller pin assignments and bus address or interface mode against the example code.
- Power up with external loads disconnected, then test signals before full integration.
- If readings or communication fail, check power and ground first, then pin mapping, interface settings, and library initialization.
Troubleshooting and reproducibility
Record the board used, wiring, library/version, supply arrangement, and measured behavior. Use the selected board-specific wiring example as the source of truth. Never assume visually similar modules share identical voltage tolerance or pin order.
Setting Up TSOP1738 with ESP32
Library
IRremote by Armin Joachimsmeyer
Arduino IDE → Tools → Manage Libraries → search "IRremote"
Wiring
| Component pin | ESP32 pin | Note |
|---|---|---|
| VCC | 3.3V | |
| GND | GND | |
| OUT | GPIO15 | Any interrupt-capable GPIO works; avoid strapping pins (0, 2, 12) to prevent boot issues |
Swipe sideways to see every column →
TSOP1738 is tuned for a 38kHz carrier -- works with most consumer IR remotes. IRremote v3+ uses the IrReceiver object shown here; older sketches written against IRrecv/decode_results need updating.
Related Components
CC2530
Mesh-networking Zigbee radio module for home-automation sensors.
ESP 01
Minimal ESP8266 breakout for adding Wi-Fi to any microcontroller.
ESP8266 Module
General-purpose ESP8266 breakout with more accessible GPIO.
IR Transmit Kit
Combined IR transmitter and receiver pair for custom remotes and line-of-sight communication.
Related Guides & Projects
MicroPython vs Arduino on ESP32: Which Should You Learn First?
An honest comparison for beginners: where MicroPython is easier, where Arduino C++ is faster, how libraries and memory differ, and how to choose based on your project instead of hype.
MicroPython ESP32 Web Server: Control an LED or Relay from Your Browser
Create a working web server with the socket module, parse requests, serve a responsive control page for an LED or a relay, keep the displayed state truthful, choose a safe relay startup state and make the server survive bad or repeated requests.
MicroPython on ESP32 and Raspberry Pi Pico W: The Complete Guide
A structured MicroPython learning path for ESP32 and Pico W. Set up your tools, control GPIO, read sensors, connect to WiFi, build web servers, publish MQTT data and make projects reliable. Start here, then follow the links by level.
boot.py vs main.py in MicroPython: What Runs, When and Why
Understand the difference between boot.py and main.py in MicroPython, startup order, Wi-Fi setup, project structure, and recovery from boot errors.