Ugenz Academy/IoT Tutorial

Infrared Communication

9 min read1,761 words

Reading progress

Keep learning

Infrared Communication in Electronics

1. Introduction

Infrared (IR) communication is a wireless communication method that uses infrared light to transmit information between electronic devices. Infrared light is invisible to the human eye but can be detected by suitable sensors and receivers.

Infrared communication is commonly used in television remote controls, electronic appliances, short-range data transmission, obstacle detection systems, and various electronics projects.

Science: The Electromagnetic Spectrum Worksheet PDF | Grade 6-8 | LivePhysics™

Everlight optical components operating at infrared wavelengths | Transfer Multisort Elektronik

Arduino Lichtschranke mit VS-1838 IR-Empfänger und IR LED

8

2. Definition of Infrared Communication

Infrared communication is the transmission of information using infrared electromagnetic radiation, typically with a wavelength longer than visible red light.

The infrared wavelength range is approximately 700 nanometers to 1 millimeter, although communication systems commonly use specific wavelength bands within this range.

In a typical IR communication system, a transmitter converts electrical signals into infrared light pulses, and a receiver detects those pulses and converts them back into electrical signals.

3. Working Principle of Infrared Communication

Infrared communication works by sending coded patterns of infrared light from a transmitter to a receiver.

The process involves the following steps:

  1. Data input: The transmitter receives a command or data.
  2. Signal encoding: The electronic circuit converts the data into a coded signal.
  3. IR transmission: An infrared LED emits pulses of light representing the encoded information.
  4. Signal detection: An IR receiver detects the incoming infrared signal.
  5. Decoding: The receiver circuit processes the pulses and reconstructs the original command or data.
  6. Action: The receiving device performs the requested operation.

For example, when you press the power button on a TV remote, the remote sends an encoded infrared signal to the television. The television detects and decodes the signal before switching on or off.

Input Button

User command

Encoder / Controller

Converts the command into coded pulses

IR LED Transmitter

Emits infrared light pulses

Infrared light

IR Receiver

Detects and decodes the signal

Electronic Device

Executes the command

4. Important Components of Infrared Communication

ComponentFunction
Infrared LEDProduces infrared light for transmitting signals
IR receiver moduleDetects modulated infrared signals
PhotodiodeConverts incoming light into an electrical signal
PhototransistorDetects light and produces a corresponding electrical response
MicrocontrollerEncodes, decodes, or processes communication data
Driver circuitSupplies the required current to the IR LED
Optical filterHelps reduce unwanted light and interference
Power supplyProvides electrical energy to the circuit

The components used depend on the application. A TV remote commonly uses an IR LED and a coded signaling circuit, while optical communication equipment may use more sophisticated transmitters and receivers.

5. Infrared Wavelength and Frequency

Infrared radiation lies between visible light and microwave radiation in the electromagnetic spectrum.

The relationship between wavelength and frequency is:

c=fλc=f\lambda

Where:

  • cc = speed of light, approximately 3×108 m/s3\times10^8\text{ m/s}
  • ff = frequency in hertz (Hz)
  • λ\lambda = wavelength in meters (m)

For example, consider infrared light with a wavelength of 940 nm940\text{ nm}.

Converting nanometers to meters:

λ=940×10−9 m\lambda=940\times10^{-9}\text{ m}

Frequency:

f=cλf=\frac{c}{\lambda} f=3×108940×10−9f=\frac{3\times10^8}{940\times10^{-9}} f≈3.19×1014 Hzf\approx3.19\times10^{14}\text{ Hz}

Therefore, infrared light at 940 nm has a frequency of approximately 319 THz319\text{ THz}.

Important: This optical frequency is different from the electrical modulation frequency used to encode data. Many consumer IR remote-control systems use a carrier near 38 kHz.

6. Types of Infrared Communication

Infrared communication can be classified according to how signals travel and how the transmitter and receiver are arranged.

6.1 Line-of-Sight Communication

Science: The Electromagnetic Spectrum Worksheet PDF | Grade 6-8 | LivePhysics™

livephysics.com

In line-of-sight communication, the transmitter and receiver generally need a clear optical path between them.

Examples:

  • Television remote controls
  • Air conditioner remotes
  • Infrared optical links

6.2 Diffuse Infrared Communication

Diffuse infrared communication uses reflected or scattered infrared light rather than requiring a single direct beam.

Examples:

  • Certain indoor optical wireless systems
  • Specialized short-range data communication setups

Reflections can help a receiver detect signals around obstacles, but performance depends on the room, surfaces, and system design.

6.3 Near-Infrared Communication

Near-infrared systems use wavelengths near the visible-light region. They are widely used in sensing, remote controls, optical links, and some data communication technologies.

6.4 Far-Infrared Communication

Far-infrared radiation is at longer wavelengths and is more commonly associated with thermal radiation and specialized sensing than conventional consumer remote-control communication.

The boundaries between infrared sub-bands vary by technical convention.

7. Modulation in Infrared Communication

Many IR communication systems use modulation to transmit data reliably and reduce interference from sunlight and indoor lighting.

A common technique is to switch an infrared LED on and off in patterns while driving it with a modulated electrical carrier.

For example, a typical remote control may use a carrier frequency around 38 kHz.

The receiver detects the carrier bursts and recovers the encoded command.

Common signaling approaches include:

  • Pulse-distance encoding: Data bits are distinguished by the timing between pulses.
  • Pulse-width encoding: Data bits are distinguished by pulse duration.
  • Carrier modulation: A higher-frequency carrier is switched on and off according to the data.
  • Protocol-based encoding: Commands follow a defined timing and data format, such as NEC or RC-5.

Different remote controls may use different protocols and carrier frequencies.

8. Infrared Communication Using Arduino

An Arduino can transmit and receive infrared signals using an IR LED and an appropriate IR receiver module.

Receptor infrarrojo — Talos Electronics

taloselectronics.com

Example applications

  • Reading commands from a remote control.
  • Controlling an LED or relay using an IR remote.
  • Building a remote-controlled robot.
  • Sending commands between two compatible electronic devices.

Basic receiver example

The following example uses the commonly available IRremote Arduino library. Library versions differ, so install the library by Arduino-IRremote and check the installed version's examples if the API differs.

#include <IRremote.hpp>

const int IR_RECEIVE_PIN = 2;

void setup() {
  Serial.begin(9600);
  IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK);

  Serial.println("IR receiver ready");
}

void loop() {
  if (IrReceiver.decode()) {
    Serial.println(IrReceiver.decodedIRData.command, HEX);

    IrReceiver.resume();
  }
}

How it works:

  1. The receiver module detects infrared signals.
  2. IrReceiver.begin() initializes the receiver.
  3. IrReceiver.decode() checks for a decoded message.
  4. The command is printed in hexadecimal format.
  5. IrReceiver.resume() allows the next signal to be received.

Connect the receiver module's signal output to digital pin 2, and connect its power and ground pins according to the module's pin labels and voltage requirements.

9. Infrared Communication in ESP32 Projects

ESP32 boards can also be used for infrared communication. They can decode remote-control commands or transmit signals through an external IR LED driver circuit.

Possible projects include:

  1. Smart home controller: Control compatible appliances using an IR transmitter.
  2. IR remote decoder: Display remote-control commands on a serial monitor.
  3. Universal remote: Store and retransmit supported appliance commands.
  4. Automation system: Combine infrared commands with Wi-Fi-based control.
  5. IR data link: Send simple coded information between compatible transmitter and receiver circuits.

An IR transmitter should use a suitable driver when the LED requires more current than a microcontroller GPIO can safely supply. Check the specific ESP32 board's voltage and pin requirements.

10. Applications of Infrared Communication

Infrared communication is used in many electronic systems.

  • Consumer electronics: Television, AC, projector, and audio-system remotes.
  • Robotics: Short-range command transmission and some optical navigation systems.
  • Industrial equipment: Specialized optical communication and control links.
  • Data communication: Short-range optical links in suitable systems.
  • Sensors: Infrared detection, proximity sensing, and object counting.
  • Medical equipment: Certain infrared optical monitoring and sensing devices.
  • Security systems: Beam-break detectors and specialized intrusion sensors.
  • Home automation: Controlling compatible appliances with IR transmitters.

Note that infrared sensing and infrared communication are related but different: sensing detects an object's presence or properties, while communication intentionally encodes information into a signal.

11. Advantages of Infrared Communication

  • Does not require radio-frequency transmission.
  • Can be inexpensive and straightforward to implement.
  • Is widely used in consumer electronic devices.
  • Can provide focused, short-range communication.
  • Generally does not pass through opaque walls, helping limit communication to a particular room.
  • Can reduce interference with radio-based communication systems.

12. Limitations of Infrared Communication

  • Direct-path systems can be blocked by walls or objects.
  • Strong sunlight and other infrared sources can interfere with receivers.
  • Range depends on transmitter power, receiver sensitivity, alignment, and ambient conditions.
  • Many consumer systems need the transmitter to be aimed toward the receiver.
  • Different devices may use incompatible signaling protocols.
  • Infrared light may be invisible, so a transmitter's operation cannot always be judged by looking at it.

13. Infrared vs. Wi-Fi vs. Bluetooth

FeatureInfraredWi-FiBluetooth
Signal typeInfrared lightRadio wavesRadio waves
Typical useRemote controls and optical linksWireless networkingShort-range device connections
Line of sightOften needed in remote-control systemsNot normally requiredNot normally required
Wall penetrationGenerally blocked by opaque wallsCan pass through some wallsCan pass through some walls
Network accessUsually direct or specialized optical linkSupports local networks and internet accessSupports device-to-device communication
Common electronics exampleTV remoteESP32 connected to a routerWireless headphones or BLE sensor

14. Safety Precautions

  • Do not look directly into high-powered infrared emitters or optical sources.
  • Use the correct current-limiting resistor or driver circuit for an IR LED.
  • Verify the receiver module's operating voltage before connecting it.
  • Follow the manufacturer's eye-safety guidance for powerful infrared equipment.
  • Avoid short circuits when building transmitter and receiver circuits.
  • Test the transmitter and receiver at a suitable distance before integrating them into a larger project.

15. Summary

Infrared communication transmits information using infrared light. A transmitter encodes data into optical signals, and a receiver detects and decodes those signals. It is widely used in television remotes, appliance control, optical links, and electronics projects involving Arduino and ESP32.

Key point: Infrared communication is useful for simple, low-cost, short-range optical control and data transmission, especially when the transmitter and receiver have a suitable optical path.

Keep learning. Keep building. Keep growing.

© 2026 Ugenz Academy