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

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

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

Introduction

The IR Obstacle Sensor Module is a compact and versatile electronic component designed to detect obstacles using infrared (IR) light. It works by emitting infrared rays and measuring the reflection from nearby objects, allowing it to determine the presence and distance of obstacles. This module is widely used in robotics, automation systems, and proximity detection applications due to its simplicity and reliability.

Explore Projects Built with IR Obstacle 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!
MakerEdu Creator with Bluetooth, IR Sensors, LCD Display, and Push Button Interaction
Image of MKL Distance Measurement: A project utilizing  IR Obstacle Sensor Module in a practical application
This circuit features a MakerEdu Creator microcontroller board interfaced with two MKE-S11 IR Infrared Obstacle Avoidance Sensors, a MKE-M02 Push Button Tact Switch, a MKE-M15 Bluetooth module, and a MKE-M08 LCD2004 I2C display module. The push button is connected to a digital input for user interaction, while the IR sensors are likely used for detecting obstacles. The Bluetooth module enables wireless communication, and the LCD display provides a user interface for displaying information or statuses.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Environmental Monitoring System with Wi-Fi Connectivity
Image of tb_sensor: A project utilizing  IR Obstacle Sensor Module in a practical application
This circuit features an ESP32 Devkit V1 microcontroller interfaced with an IR sensor, an HC-SR04 ultrasonic sensor, and a DHT11 temperature and humidity sensor. The ESP32 reads obstacle detection from the IR sensor, distance measurements from the ultrasonic sensor, and environmental data from the DHT11 sensor. It then sends this data to a server via Wi-Fi, likely for remote monitoring or data logging purposes.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO R4 WiFi with IR Obstacle Detection and OLED Display
Image of proximtiy sensor: A project utilizing  IR Obstacle Sensor Module in a practical application
This circuit features an Arduino UNO R4 WiFi connected to a 0.96" OLED display and an FC-51 IR Obstacle Sensor. The Arduino powers both the display and the sensor, and it communicates with the OLED via I2C (using A4 and A5 pins as SDA and SCL). The IR sensor's output is read by the Arduino on digital pin D2 to detect the presence of obstacles, and the detection status is displayed on the OLED screen.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP8266-Based Obstacle Detection and Alert System with IR Sensor, Buzzer, and Relay-Controlled Motor
Image of Sem3: A project utilizing  IR Obstacle Sensor Module in a practical application
This circuit is an obstacle detection and alert system using an ESP8266 microcontroller. It utilizes an IR sensor to detect obstacles, and upon detection, it cuts off power to a motor via a relay, while simultaneously activating a buzzer and an LED to alert the user.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with IR Obstacle 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 MKL Distance Measurement: A project utilizing  IR Obstacle Sensor Module in a practical application
MakerEdu Creator with Bluetooth, IR Sensors, LCD Display, and Push Button Interaction
This circuit features a MakerEdu Creator microcontroller board interfaced with two MKE-S11 IR Infrared Obstacle Avoidance Sensors, a MKE-M02 Push Button Tact Switch, a MKE-M15 Bluetooth module, and a MKE-M08 LCD2004 I2C display module. The push button is connected to a digital input for user interaction, while the IR sensors are likely used for detecting obstacles. The Bluetooth module enables wireless communication, and the LCD display provides a user interface for displaying information or statuses.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of tb_sensor: A project utilizing  IR Obstacle Sensor Module in a practical application
ESP32-Based Environmental Monitoring System with Wi-Fi Connectivity
This circuit features an ESP32 Devkit V1 microcontroller interfaced with an IR sensor, an HC-SR04 ultrasonic sensor, and a DHT11 temperature and humidity sensor. The ESP32 reads obstacle detection from the IR sensor, distance measurements from the ultrasonic sensor, and environmental data from the DHT11 sensor. It then sends this data to a server via Wi-Fi, likely for remote monitoring or data logging purposes.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of proximtiy sensor: A project utilizing  IR Obstacle Sensor Module in a practical application
Arduino UNO R4 WiFi with IR Obstacle Detection and OLED Display
This circuit features an Arduino UNO R4 WiFi connected to a 0.96" OLED display and an FC-51 IR Obstacle Sensor. The Arduino powers both the display and the sensor, and it communicates with the OLED via I2C (using A4 and A5 pins as SDA and SCL). The IR sensor's output is read by the Arduino on digital pin D2 to detect the presence of obstacles, and the detection status is displayed on the OLED screen.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Sem3: A project utilizing  IR Obstacle Sensor Module in a practical application
ESP8266-Based Obstacle Detection and Alert System with IR Sensor, Buzzer, and Relay-Controlled Motor
This circuit is an obstacle detection and alert system using an ESP8266 microcontroller. It utilizes an IR sensor to detect obstacles, and upon detection, it cuts off power to a motor via a relay, while simultaneously activating a buzzer and an LED to alert the user.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Line-following robots
  • Obstacle-avoiding robots
  • Proximity detection in automation systems
  • Object counters and motion detectors
  • Security systems and alarms

Technical Specifications

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

Parameter Value
Operating Voltage 3.3V to 5V
Operating Current 20mA (typical)
Detection Range 2cm to 30cm (adjustable)
Output Type Digital (High/Low)
IR Wavelength 940nm
Dimensions ~3.1cm x 1.5cm x 0.7cm
Operating Temperature -25°C to 85°C

Pin Configuration

The IR Obstacle Sensor Module typically has three pins. Their configuration and descriptions are as follows:

Pin Name Description
1 VCC Power supply pin (3.3V to 5V)
2 GND Ground pin
3 OUT Digital output pin (High when no obstacle, Low when an obstacle is detected)

Usage Instructions

How to Use the IR Obstacle 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.
  3. Adjust the Sensitivity: Use the onboard potentiometer to adjust the detection range. Turning the potentiometer clockwise increases the sensitivity, while turning it counterclockwise decreases it.
  4. Test the Module: Place an object within the detection range and observe the OUT pin. The output will go LOW when an obstacle is detected and HIGH when no obstacle is present.

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 deploying the module in your application.
  • Power Supply: Ensure a stable power supply to avoid erratic behavior.
  • Mounting: Avoid placing reflective surfaces directly in front of the sensor, as they may cause false detections.

Example: Connecting to an Arduino UNO

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

Circuit Connections

  • Connect the VCC pin of the module to the 5V pin of the Arduino.
  • Connect the GND pin of the module to the GND pin of the Arduino.
  • Connect the OUT pin of the module to digital pin 2 of the Arduino.

Arduino Code

// IR Obstacle Sensor Module Example Code
// This code reads the digital output of the sensor and prints the status
// to the Serial Monitor.

const int sensorPin = 2; // Connect the OUT pin of the sensor to digital pin 2
int sensorState = 0;     // Variable to store the sensor state

void setup() {
  pinMode(sensorPin, INPUT); // Set the sensor pin as input
  Serial.begin(9600);        // Initialize serial communication at 9600 baud
}

void loop() {
  sensorState = digitalRead(sensorPin); // Read the sensor output

  if (sensorState == LOW) {
    // Obstacle detected
    Serial.println("Obstacle detected!");
  } else {
    // No obstacle
    Serial.println("No obstacle.");
  }

  delay(500); // Wait for 500ms before reading again
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. The sensor is not detecting obstacles:

    • Ensure the module is powered correctly (check VCC and GND connections).
    • Adjust the potentiometer to increase the sensitivity.
    • Verify that the obstacle is within the detection range (2cm to 30cm).
  2. False detections or erratic behavior:

    • Check for strong ambient light sources and reduce their impact.
    • Ensure a stable power supply to the module.
    • Avoid reflective surfaces directly in front of the sensor.
  3. Output pin always HIGH or LOW:

    • Verify the connections between the module and the microcontroller.
    • Test the module independently by connecting an LED to the OUT pin.

FAQs

Q: Can the detection range be increased beyond 30cm?
A: No, the detection range is limited to 30cm due to the design of the IR transmitter and receiver. For longer ranges, consider using ultrasonic sensors.

Q: Can this module detect transparent objects?
A: The module may struggle to detect transparent or highly reflective objects due to the way infrared light interacts with such surfaces.

Q: Is it possible to use multiple IR Obstacle Sensor Modules in the same project?
A: Yes, but ensure that the IR signals from different modules do not interfere with each other. Position the modules carefully to avoid cross-talk.

Q: Can this module be used outdoors?
A: While it can be used outdoors, strong sunlight may interfere with its performance. Consider using it in shaded areas or with additional shielding.