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. When an object is detected within its range, the module outputs a signal, making it ideal for proximity detection and obstacle avoidance.

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 and Use Cases

  • Robotics: Obstacle avoidance in autonomous robots
  • Security systems: Intrusion detection
  • Industrial automation: Object detection on conveyor belts
  • Consumer electronics: Touchless switches and counters

Technical Specifications

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

Parameter Specification
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

Pin Configuration and Descriptions

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

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

Usage Instructions

How to Use the Component 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: Attach the OUT pin to a digital input pin of your microcontroller or directly to an LED/buzzer for simple obstacle detection.
  3. Adjust the Sensitivity: Use the onboard potentiometer to adjust the detection range. Turning it clockwise increases the range, while turning it counterclockwise decreases it.
  4. Test the Module: Place an object within the detection range and observe the output signal. The OUT pin will go LOW when an obstacle 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.
  • Reflective Surfaces: Highly reflective surfaces may cause false readings. Test the module with the intended objects to ensure reliability.
  • Power Supply: Ensure a stable power supply to avoid erratic behavior.
  • Mounting: Position the module so that the IR transmitter and receiver are unobstructed.

Example: Connecting to an Arduino UNO

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

Circuit Connections

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

Arduino Code

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

#define IR_SENSOR_PIN 2  // Digital pin connected to the OUT pin of the sensor
#define LED_PIN 13       // Built-in LED on Arduino UNO

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

void loop() {
  int sensorValue = digitalRead(IR_SENSOR_PIN);  // Read the sensor output

  if (sensorValue == LOW) {
    // Obstacle detected
    digitalWrite(LED_PIN, HIGH);  // Turn on the LED
    Serial.println("Obstacle detected!");
  } else {
    // No obstacle
    digitalWrite(LED_PIN, LOW);   // Turn off the LED
    Serial.println("No obstacle.");
  }

  delay(100);  // Small delay for stability
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. The module is not detecting obstacles:

    • Ensure the VCC and GND pins are connected properly.
    • Check the sensitivity adjustment potentiometer and increase the detection range if needed.
    • Verify that the object is within the detection range (2cm to 30cm).
  2. False detections or erratic behavior:

    • Reduce ambient light interference by shielding the module from direct sunlight or strong light sources.
    • Ensure the power supply is stable and free from noise.
  3. Output signal is always HIGH:

    • Confirm that the IR transmitter and receiver are unobstructed.
    • Test the module with a reflective object to ensure the IR beam is functioning.
  4. Output signal is always LOW:

    • Check for any physical damage to the module.
    • Verify that the object is not too close or too far from the sensor.

FAQs

Q: Can the module detect transparent objects?
A: The module may struggle to detect transparent objects like glass due to low IR reflection. Use alternative sensors for such applications.

Q: Can I use this module with a 3.3V microcontroller?
A: Yes, the module operates at 3.3V to 5V, making it compatible with 3.3V microcontrollers like ESP32 or Raspberry Pi Pico.

Q: How do I increase the detection range?
A: Adjust the onboard potentiometer clockwise to increase the detection range. Ensure the object is within the new range.

Q: Is the module suitable for outdoor use?
A: The module is not designed for outdoor use as it may be affected by sunlight and weather conditions. Use it in indoor or controlled environments.