

The IR Obstacle Avoidance Sensor is a compact and efficient module designed to detect obstacles using infrared (IR) light. It emits IR light and measures the reflected signal to determine the presence of an object within its detection range. This sensor is widely used in robotics, automation systems, and other applications requiring obstacle detection and avoidance.








The following table outlines the key technical details of the IR Obstacle Avoidance Sensor:
| Parameter | Value |
|---|---|
| Operating Voltage | 3.3V to 5V |
| Operating Current | 20mA (typical) |
| Detection Range | 2cm to 30cm (adjustable) |
| Detection Angle | ≤ 35° |
| Output Type | Digital (High/Low) |
| Dimensions | ~3.1cm x 1.5cm x 0.7cm |
| Operating Temperature | -10°C to 50°C |
The IR Obstacle Avoidance Sensor typically has a 3-pin or 4-pin interface. Below is the pinout description:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply input (3.3V to 5V) |
| 2 | GND | Ground connection |
| 3 | OUT | Digital output signal (High: No obstacle, Low: Obstacle detected) |
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply input (3.3V to 5V) |
| 2 | GND | Ground connection |
| 3 | OUT | Digital output signal (High: No obstacle, Low: Obstacle detected) |
| 4 | EN | Enable pin (optional, used to enable/disable the sensor) |
Below is an example of how to connect and use the IR Obstacle Avoidance Sensor with an Arduino UNO:
// IR Obstacle Avoidance Sensor Example Code
// Connect the OUT pin of the sensor to Arduino digital pin 2
const int sensorPin = 2; // Pin connected to the sensor's OUT pin
const int ledPin = 13; // Built-in LED on Arduino
void setup() {
pinMode(sensorPin, INPUT); // Set sensor pin as input
pinMode(ledPin, OUTPUT); // Set LED pin as output
Serial.begin(9600); // Initialize serial communication
}
void loop() {
int sensorValue = digitalRead(sensorPin); // Read the sensor output
if (sensorValue == LOW) {
// Obstacle detected
digitalWrite(ledPin, HIGH); // Turn on the LED
Serial.println("Obstacle detected!");
} else {
// No obstacle
digitalWrite(ledPin, LOW); // Turn off the LED
Serial.println("No obstacle.");
}
delay(100); // Small delay for stability
}
Sensor Not Detecting Obstacles
False Positives in Bright Light
No Output Signal
Interference Between Multiple Sensors
Q: Can this sensor detect transparent objects?
A: No, the sensor may not reliably detect transparent or highly reflective objects due to insufficient IR reflection.
Q: What is the maximum detection range?
A: The sensor can detect objects up to 30cm, depending on the object's size, color, and reflectivity.
Q: Can I use this sensor with a 3.3V microcontroller?
A: Yes, the sensor operates within a voltage range of 3.3V to 5V, making it compatible with 3.3V systems.
Q: How do I know if the sensor is working?
A: Most IR Obstacle Avoidance Sensors have an onboard LED that lights up when an obstacle is detected. Additionally, you can monitor the OUT pin for a LOW signal.