Stufin
Home Quick Cart Profile

5mm IR Transmitter Receiver Pair

Buy Now

Component Name

5mm IR Transmitter Receiver Pair

Overview

The 5mm IR Transmitter Receiver Pair is a compact and versatile infrared (IR) component designed for wireless communication applications in the Internet of Things (IoT) domain. This pair consists of a transmitter and a receiver, both housed in 5mm packages, making them ideal for space-constrained projects.

Functionality

The IR Transmitter Receiver Pair enables reliable and efficient wireless communication between devices over short distances, typically up to 1 meter. The transmitter converts electrical signals into infrared light, which is then transmitted through the air to the receiver. The receiver converts the received IR light back into an electrical signal, allowing the receiving device to interpret the data.

Key Features

### Transmitter

Operating Wavelength

940nm (infrared)

Peak Emission Wavelength

940nm

Radiant Intensity

10mW/sr (typical)

Beam Angle

30 ( typical)

Operating Voltage

1.2V to 1.6V

Operating Current

20mA (typical)

Package Type

5mm radial leaded package

### Pair Characteristics

Sensitivity

0.2mV (typical)

Bandwidth

100kHz (typical)

Supply Voltage

1.2V to 1.6V

Supply Current

0.5mA (typical)

Data Transfer Rate

Up to 4.8kbps

Communication Range

Up to 1 meter (3.3 feet)

Operating Temperature

-25C to 85C

Storage Temperature

-40C to 100C

Applications

The 5mm IR Transmitter Receiver Pair is suitable for various IoT applications, including

Remote control systems

Infrared communication systems

Wireless sensor networks

Industrial automation

Consumer electronics

Robotics and automation

Technical Notes

The IR Transmitter Receiver Pair operates in a line-of-sight configuration, requiring direct visibility between the transmitter and receiver.

To ensure reliable communication, the transmitter and receiver should be aligned properly, and any obstacles or ambient light sources should be minimized.

The component is sensitive to electromagnetic interference (EMI); proper shielding and grounding are recommended to ensure reliable operation.

By providing a reliable and efficient means of wireless communication, the 5mm IR Transmitter Receiver Pair is an ideal choice for a wide range of IoT applications where space is limited.

Pin Configuration

  • 5mm IR Transmitter Receiver Pair Documentation
  • Overview
  • The 5mm IR Transmitter Receiver Pair is a common component used in various IoT and robotics projects to establish infrared communication between devices. This documentation provides a detailed explanation of the pins and their connections.
  • Pinout Structure
  • The IR Transmitter and Receiver pair consists of two components:
  • IR Transmitter (Tx)
  • + 3 pins: Vcc, GND, and OUT
  • IR Receiver (Rx)
  • + 3 pins: Vcc, GND, and OUT
  • Pin Explanation and Connection Guide
  • ### IR Transmitter (Tx)
  • 1. Vcc (Positive Power Supply)
  • Connect to a positive voltage supply (typically 3.3V or 5V) to power the IR Transmitter.
  • Ensure the voltage supply is within the recommended operating range.
  • 2. GND (Ground)
  • Connect to the ground pin of the power supply or the ground plane of the circuit board.
  • This pin provides a return path for the current and helps to complete the circuit.
  • 3. OUT (Infrared Output)
  • This pin outputs the modulated infrared signal.
  • Connect to a suitable infrared LED or a transmitting device that can handle the output signal.
  • ### IR Receiver (Rx)
  • 1. Vcc (Positive Power Supply)
  • Connect to a positive voltage supply (typically 3.3V or 5V) to power the IR Receiver.
  • Ensure the voltage supply is within the recommended operating range.
  • 2. GND (Ground)
  • Connect to the ground pin of the power supply or the ground plane of the circuit board.
  • This pin provides a return path for the current and helps to complete the circuit.
  • 3. OUT (Received Signal Output)
  • This pin outputs the demodulated signal received from the IR Transmitter.
  • Connect to a microcontroller, decoder, or other receiving device to process the signal.
  • Important Notes
  • Ensure proper polarity when connecting the power supply to the Vcc and GND pins.
  • Use a suitable infrared LED with the IR Transmitter and a compatible photodiode or phototransistor with the IR Receiver.
  • Follow proper PCB design and layout guidelines to minimize noise and interference in the circuit.
  • Consult the datasheet and manufacturer's guidelines for specific operating conditions, frequency ranges, and transmission protocols.
  • By following these guidelines, you can successfully connect and utilize the 5mm IR Transmitter Receiver Pair in your IoT and robotics projects.

Code Examples

5mm IR Transmitter Receiver Pair Documentation
Overview
The 5mm IR Transmitter Receiver Pair is a popular module used in various IoT projects, robotics, and remote control systems. This module consists of an infrared transmitter (IR TX) and an infrared receiver (IR RX), which allow for wireless communication between devices using infrared light.
Technical Specifications
IR Transmitter (TX):
	+ Wavelength: 940nm
	+ Angle: 30
	+ Power consumption: 20mA
 IR Receiver (RX):
	+ Wavelength: 940nm
	+ Sensitivity: 15mV
	+ Power consumption: 5mA
 Operating voltage: 3.3V - 5.5V
 Communication distance: up to 10 meters
Code Examples
### Example 1: Basic IR Communication using Arduino
In this example, we'll demonstrate how to use the 5mm IR Transmitter Receiver Pair to send and receive data between two Arduino boards.
Transmitter Code (Arduino)
```c++
const int irTxPin = 3;  // define the IR transmitter pin
void setup() {
  pinMode(irTxPin, OUTPUT);
}
void loop() {
  // Send a simple "Hello, World!" message in IR
  for (int i = 0; i < 13; i++) {
    digitalWrite(irTxPin, HIGH);
    delayMicroseconds(600);
    digitalWrite(irTxPin, LOW);
    delayMicroseconds(600);
  }
  delay(1000);
}
```
Receiver Code (Arduino)
```c++
const int irRxPin = 2;  // define the IR receiver pin
void setup() {
  pinMode(irRxPin, INPUT);
  Serial.begin(9600);
}
void loop() {
  if (digitalRead(irRxPin) == HIGH) {
    // Receive and decode the IR signal
    char receivedChar = decodeIRSignal();
    Serial.print(receivedChar);
  }
  delay(50);
}
char decodeIRSignal() {
  // Implement your own decoding logic or use an existing library
  // For simplicity, we'll assume a simple 1-0 encoding scheme
  char receivedChar = ' ';
  for (int i = 0; i < 8; i++) {
    if (digitalRead(irRxPin) == HIGH) {
      receivedChar |= (1 << i);
    }
  }
  return receivedChar;
}
```
### Example 2: IR Remote Control using Raspberry Pi (Python)
In this example, we'll demonstrate how to use the 5mm IR Transmitter Receiver Pair to send and receive IR commands using a Raspberry Pi.
Transmitter Code (Python)
```python
import RPi.GPIO as GPIO
import time
# Set up the IR transmitter pin
GPIO.setmode(GPIO.BCM)
irTxPin = 17
GPIO.setup(irTxPin, GPIO.OUT)
def send_IR_command(command):
    # Send the IR command using a 38kHz carrier frequency
    for i in range(command.bit_length()):
        if command & (1 << i):
            GPIO.output(irTxPin, GPIO.HIGH)
            time.sleep(0.0000125)  # 12.5us high
            GPIO.output(irTxPin, GPIO.LOW)
            time.sleep(0.0000125)  # 12.5us low
        else:
            GPIO.output(irTxPin, GPIO.LOW)
            time.sleep(0.000025)  # 25us low
# Send a sample IR command
send_IR_command(0x12345678)
```
### Example 3: IR Obstacle Detection using ESP32 (C++)
In this example, we'll demonstrate how to use the 5mm IR Transmitter Receiver Pair to detect obstacles using an ESP32 board.
Obstacle Detection Code (C++)
```c++
#include <WiFi.h>
const int irTxPin = 18;  // define the IR transmitter pin
const int irRxPin = 19;  // define the IR receiver pin
void setup() {
  pinMode(irTxPin, OUTPUT);
  pinMode(irRxPin, INPUT);
}
void loop() {
  // Send an IR pulse
  digitalWrite(irTxPin, HIGH);
  delayMicroseconds(600);
  digitalWrite(irTxPin, LOW);
  delayMicroseconds(600);
// Check if the IR signal is reflected back
  if (digitalRead(irRxPin) == HIGH) {
    // Obstacle detected!
    Serial.println("Obstacle detected!");
  } else {
    Serial.println("No obstacle detected.");
  }
  delay(50);
}
```
Note: These code examples are for demonstration purposes only and may require modifications to work with your specific project requirements.