An infrared (IR) remote control is a handheld wireless transmitter that uses modulated near-infrared light (typically 850–940 nm) to send encoded digital commands to a line-of-sight receiver. In a real circuit, adding an IR remote control changes the input architecture from a direct mechanical switch or a complex RF transceiver to a simple, single-wire digital input; it eliminates the need for an antenna, impedance-matching network, and RF frontend IC, allowing a microcontroller to decode commands using just a standard GPIO pin configured with a timer capture module. Makers and consumers commonly confuse IR remotes with Radio Frequency (RF) or Bluetooth Low Energy (BLE) remotes, but unlike RF (which operates at 433 MHz or 2.4 GHz and penetrates walls) or BLE, IR requires strict line-of-sight alignment and cannot pass through opaque physical barriers.

How Infrared Carrier Frequencies and Modulation Work

If an IR remote simply flashed an LED on and off to represent 1s and 0s (baseband transmission), ambient light from the sun or incandescent bulbs would drown out the signal. To solve this, IR remotes use a carrier frequency—almost universally 38 kHz—and pulse the LED at that specific rate to represent a 'mark' (logic high in the protocol), while turning the LED off for a 'space'.

The receiver contains a bandpass filter tuned precisely to 38 kHz. It ignores steady ambient IR (like sunlight) and low-frequency flicker (like 100/120 Hz mains-powered lighting), only reacting to the rapid 38 kHz pulsing. The most common protocol you will encounter on the bench is the NEC protocol, originally developed by NEC Corporation for consumer electronics but now used universally by third-party remote manufacturers.

Bench Tip: When probing the raw output of an IR LED with an oscilloscope, you will see a 38 kHz square wave during the 'mark' periods. The duty cycle of this carrier is typically kept to 1/4 or 1/3 to maximize the peak current (and therefore transmission range) without exceeding the LED's average power dissipation limits.

Worked Numeric Example: NEC Protocol Timing

Let's calculate the exact timing and carrier cycles for a standard 32-bit NEC IR frame. The NEC protocol uses pulse-distance encoding. The carrier period at 38 kHz is exactly 26.315 µs (1 / 38,000).

  • Leader Pulse (AGC Burst): 9 ms mark, followed by a 4.5 ms space. During the 9 ms mark, the LED pulses exactly 342 times (9,000 µs / 26.315 µs).
  • Logic '0': 562.5 µs mark (21 carrier cycles) + 562.5 µs space. Total bit time = 1.125 ms.
  • Logic '1': 562.5 µs mark (21 carrier cycles) + 1.6875 ms space. Total bit time = 2.25 ms.

A full 32-bit frame consists of the leader plus 32 bits of data (8-bit address, 8-bit inverted address, 8-bit command, 8-bit inverted command). If the command consists entirely of Logic '1's, the data portion takes 72 ms (32 × 2.25 ms). Add the 13.5 ms leader, and the maximum frame transmission time is 85.5 milliseconds. If the data is all Logic '0's, the frame takes 49.5 milliseconds. This predictable timing is why microcontrollers can decode the signal reliably using simple edge-triggered interrupts without needing a high-speed ADC.

The Receiver Circuit: Demodulating the Signal

On the receiving end, you rarely build a discrete photodiode and amplifier circuit from scratch. Instead, you use an integrated IR receiver module like the ubiquitous Vishay TSOP38238. This single 3-pin component contains a PIN photodiode, a preamplifier, a 38 kHz bandpass filter, an integrator, and an automatic gain control (AGC) circuit.

The critical thing to understand about the TSOP38238 is its output logic. The output pin is active-low. When no IR carrier is detected, the internal pull-up transistor keeps the output pin HIGH (VCC). When it detects the 38 kHz carrier burst, the output pin pulls LOW to GND. Therefore, the microcontroller sees the inverse of the LED's physical state: a physical LED 'mark' becomes a logic LOW on the MCU pin.

TSOP38238 Electrical Characteristics & Pinout (Assuming 5V VCC, 25°C Ambient)
Parameter Value / Pin Notes for Circuit Design
Pin 1 (OUT) Logic Output Active LOW. Connect to MCU GPIO. Add a 4.7kΩ pull-up if MCU lacks internal pull-ups.
Pin 2 (GND) 0V Reference Must share a common ground with the microcontroller.
Pin 3 (VCC) 2.5V to 5.5V Decouple with a 100nF ceramic cap and a 4.7µF electrolytic cap in parallel to suppress power rail ripple.
Carrier Frequency 38 kHz Tolerance is tight; a 36 kHz or 40 kHz remote will suffer a 50% range reduction.
Transmission Distance Up to 45 meters Tested with a high-power 940nm emitter (e.g., TSAL6200) at 500mA peak current.

Where You Meet This in Practice

You will encounter IR remote control circuits in HVAC systems, motorized projector screens, RGB LED strip amplifiers, and consumer audio/video equipment. In DIY and maker projects, it is the default choice for low-cost, low-power, one-way wireless control where the user is physically present in the room.

However, IR has distinct physical limitations dictated by the inverse-square law of light and its wavelength. The 940 nm wavelength is heavily absorbed by certain plastics and completely blocked by drywall, wood, and metal. Furthermore, direct sunlight contains a massive amount of broadband infrared radiation. While the 38 kHz bandpass filter in the receiver rejects the steady-state DC component of sunlight, extreme direct sun can saturate the receiver's internal photodiode, causing the AGC to max out and effectively blinding the sensor. If you are installing an IR receiver in a sunroom or behind a tinted glass cabinet door, you must use an external, shielded photodiode connected via a twisted-pair cable to a remote amplifier, or switch to an RF-based solution.

Frequently Asked Questions

Can an infrared remote control work through walls?

No. Infrared light operates at wavelengths between 850 nm and 940 nm, which is just below the visible light spectrum. Like visible light, it cannot penetrate opaque solid objects such as drywall, wood, or metal. If your project requires control from another room or without line-of-sight, you must use a Radio Frequency (RF) remote (like a 433 MHz ASK/OOK transmitter) or a Bluetooth/WiFi-based solution.

Why does my IR remote drain batteries faster when the receiver is in direct sunlight?

The remote itself does not know if the receiver is in sunlight; the battery drain happens because the user is forced to hold the button longer or press it repeatedly. When sunlight saturates the receiver's photodiode, the signal-to-noise ratio drops, causing the microcontroller to reject the frames due to checksum or timing errors. The user compensates by transmitting more frames, which keeps the remote's IR LED (drawing 100mA+ peak) active for longer periods.

What is the difference between an infrared remote control and an RF remote?

An IR remote uses modulated light (typically 38 kHz carrier on a 940 nm wavelength) and requires line-of-sight alignment, offering high security against cross-room interference but zero wall penetration. An RF remote uses radio waves (commonly 433.92 MHz or 2.4 GHz), which penetrate walls and do not require line-of-sight, but they are susceptible to interference from other wireless devices and require more complex (and expensive) transceiver ICs on both the transmitting and receiving ends.

How do I test if my infrared remote control is actually transmitting?

The fastest bench trick is to use a digital camera or smartphone camera. Camera sensors are sensitive to near-infrared light, even though the human eye is not. Point the remote's LED at your phone's camera lens and press a button. If the remote is working and the battery has voltage, you will see the LED flashing with a distinct purple or white glow on your phone screen. For precise protocol debugging, connect a logic analyzer to the output pin of a TSOP38238 receiver module and decode the pulse widths using software like PulseView or Saleae Logic.