Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use IR Sensor Module: Examples, Pinouts, and Specs

Image of IR Sensor Module
Cirkit Designer LogoDesign with IR Sensor Module in Cirkit Designer

Introduction

The IR Sensor Module (Manufacturer Part ID: IR-OBS-3PIN) is a versatile electronic component designed to detect infrared radiation. It is commonly used for proximity sensing, motion detection, and object detection. The module consists of an IR transmitter (infrared LED) and an IR receiver (photodiode or phototransistor), which work together to detect objects or changes in the environment by analyzing reflected IR signals.

Explore Projects Built with IR Sensor Module

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Battery-Powered IR Sensor Controlled Relay Module
Image of New: A project utilizing IR Sensor Module in a practical application
This circuit uses an IR sensor to control a 1 Channel 5V Relay Module, which is powered by a 9V battery. The IR sensor detects an object and sends a signal to the relay module to switch its state, enabling or disabling the connected load.
Cirkit Designer LogoOpen Project in Cirkit Designer
IR Sensor-Controlled Relay with LED Indicator
Image of smart TV: A project utilizing IR Sensor Module in a practical application
This circuit uses an IR sensor to control a relay module, which in turn switches a 12V blue LED on and off. The IR sensor output is connected to the signal input of the relay, enabling the sensor to activate the relay. The relay's normally closed (NC) contact is connected to the LED, allowing the LED to be powered by a 9V battery when the relay is not activated by the IR sensor.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP8266-Based Environmental Monitoring System with GPS, GSM, and Sensor Integration
Image of IOT BASED SENSORS: A project utilizing IR Sensor Module in a practical application
This is a sensor-rich IoT circuit designed for environmental monitoring, featuring an ESP8266 NodeMCU for data processing and Wi-Fi connectivity, a GPS for location tracking, a SIM800L module for GSM communication, and various sensors (IR, pH, turbidity) for measuring environmental parameters. An ESP32-CAM module adds image capture capabilities, and the system is powered by an 18650 Li-Ion battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Environmental Monitoring System with GPS and GSM Connectivity
Image of IOT BASED SENSORS: A project utilizing IR Sensor Module in a practical application
This circuit features an ESP32 microcontroller as the central processing unit, interfacing with a variety of sensors and modules. It includes an IR sensor for detecting infrared signals, a GPS NEO 6M module for location tracking, a PH Meter and a Turbidity Module for water quality measurement, and a SIM900A module for cellular communication. The ESP32 is powered by an 18650 Li-Ion battery, and it communicates with the GPS, SIM900A, and ESP32-CAM modules via serial connections. Ground and power connections are distributed among all components to ensure a common reference point and proper power supply.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with IR Sensor Module

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of New: A project utilizing IR Sensor Module in a practical application
Battery-Powered IR Sensor Controlled Relay Module
This circuit uses an IR sensor to control a 1 Channel 5V Relay Module, which is powered by a 9V battery. The IR sensor detects an object and sends a signal to the relay module to switch its state, enabling or disabling the connected load.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of smart TV: A project utilizing IR Sensor Module in a practical application
IR Sensor-Controlled Relay with LED Indicator
This circuit uses an IR sensor to control a relay module, which in turn switches a 12V blue LED on and off. The IR sensor output is connected to the signal input of the relay, enabling the sensor to activate the relay. The relay's normally closed (NC) contact is connected to the LED, allowing the LED to be powered by a 9V battery when the relay is not activated by the IR sensor.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of IOT BASED SENSORS: A project utilizing IR Sensor Module in a practical application
ESP8266-Based Environmental Monitoring System with GPS, GSM, and Sensor Integration
This is a sensor-rich IoT circuit designed for environmental monitoring, featuring an ESP8266 NodeMCU for data processing and Wi-Fi connectivity, a GPS for location tracking, a SIM800L module for GSM communication, and various sensors (IR, pH, turbidity) for measuring environmental parameters. An ESP32-CAM module adds image capture capabilities, and the system is powered by an 18650 Li-Ion battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of IOT BASED SENSORS: A project utilizing IR Sensor Module in a practical application
ESP32-Based Environmental Monitoring System with GPS and GSM Connectivity
This circuit features an ESP32 microcontroller as the central processing unit, interfacing with a variety of sensors and modules. It includes an IR sensor for detecting infrared signals, a GPS NEO 6M module for location tracking, a PH Meter and a Turbidity Module for water quality measurement, and a SIM900A module for cellular communication. The ESP32 is powered by an 18650 Li-Ion battery, and it communicates with the GPS, SIM900A, and ESP32-CAM modules via serial connections. Ground and power connections are distributed among all components to ensure a common reference point and proper power supply.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Obstacle detection in robotics
  • Line-following robots
  • Motion detection systems
  • Automatic door opening systems
  • Industrial automation for object counting or sorting
  • Security systems for intrusion detection

Technical Specifications

The following table outlines the key technical details of the IR Sensor Module:

Parameter Value
Operating Voltage 3.3V to 5V
Current Consumption 20mA (typical)
Detection Range 2cm to 30cm (adjustable)
Output Type Digital (High/Low)
Output Voltage (High) ~Vcc (3.3V or 5V, depending on input)
Output Voltage (Low) ~0V
Dimensions ~3cm x 1.5cm x 1cm
Operating Temperature -25°C to 85°C

Pin Configuration and Descriptions

The IR Sensor Module has a 3-pin interface. The pin configuration is as follows:

Pin Name Description
1 VCC Power supply pin. Connect to 3.3V or 5V.
2 GND Ground pin. Connect to the ground of the circuit.
3 OUT Digital output pin. Outputs HIGH or LOW based on detection.

Usage Instructions

How to Use the IR Sensor Module in a Circuit

  1. Power the Module: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to the ground of your circuit.
  2. Connect the Output: Connect the OUT pin to a digital input pin of your microcontroller or directly to an external circuit (e.g., an LED or buzzer).
  3. Adjust the Sensitivity: Use the onboard potentiometer to adjust the detection range. Turn clockwise to increase the range and counterclockwise to decrease it.
  4. Test the Module: Place an object within the detection range and observe the output. The OUT pin will go LOW when an object is detected and HIGH when no object is detected.

Important Considerations and Best Practices

  • Ambient Light Interference: The module may be affected by strong ambient light. Use it in controlled lighting conditions for optimal performance.
  • Distance Calibration: Always calibrate the detection range using the potentiometer before deployment.
  • Power Supply: Ensure a stable power supply to avoid erratic behavior.
  • Mounting: When using the module in robotics or automation, ensure it is securely mounted to avoid misalignment of the IR transmitter and receiver.

Example: Connecting to an Arduino UNO

Below is an example of how to connect and use the IR Sensor Module with an Arduino UNO:

Circuit Connections

  • Connect the VCC pin of the IR Sensor Module to the 5V pin of the Arduino.
  • Connect the GND pin of the IR Sensor Module to the GND pin of the Arduino.
  • Connect the OUT pin of the IR Sensor Module to digital pin 2 of the Arduino.

Arduino Code

// IR Sensor Module Example Code
// This code reads the output of the IR Sensor Module and turns on an LED
// when an object is detected.

#define IR_SENSOR_PIN 2  // Define the pin connected to the IR sensor's OUT pin
#define LED_PIN 13       // Define the pin connected to the onboard LED

void setup() {
  pinMode(IR_SENSOR_PIN, INPUT);  // Set the IR sensor pin as input
  pinMode(LED_PIN, OUTPUT);       // Set the LED pin as output
  Serial.begin(9600);            // Initialize serial communication for debugging
}

void loop() {
  int sensorValue = digitalRead(IR_SENSOR_PIN);  // Read the sensor output
  
  if (sensorValue == LOW) {
    // Object detected
    digitalWrite(LED_PIN, HIGH);  // Turn on the LED
    Serial.println("Object detected!");
  } else {
    // No object detected
    digitalWrite(LED_PIN, LOW);   // Turn off the LED
    Serial.println("No object detected.");
  }
  
  delay(100);  // Small delay for stability
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. The module is not detecting objects:

    • Ensure the VCC and GND pins are properly connected.
    • Check the detection range and adjust the potentiometer as needed.
    • Verify that the object is within the detection range and is reflective enough for IR detection.
  2. False triggers or erratic behavior:

    • Reduce ambient light interference by shielding the module or using it in a controlled environment.
    • Ensure a stable power supply to the module.
  3. Output pin always HIGH or LOW:

    • Check the connections to the microcontroller or external circuit.
    • Verify that the IR transmitter and receiver are not obstructed or misaligned.

FAQs

Q: Can the IR Sensor Module detect transparent objects?
A: Transparent objects may not reflect enough IR light for detection. Use opaque or reflective objects for reliable results.

Q: How do I increase the detection range?
A: Turn the onboard potentiometer clockwise to increase the detection range. Note that the maximum range is approximately 30cm.

Q: Can I use the module with a 3.3V microcontroller?
A: Yes, the module is compatible with both 3.3V and 5V systems. Ensure the VCC pin is connected to the appropriate voltage source.

Q: Is the module affected by sunlight?
A: Yes, strong sunlight or other IR sources can interfere with the module's performance. Use it in shaded or indoor environments for best results.