🚗 Infrared IR Obstacle Avoidance Sensor Module – 3 Pin
The IR Obstacle Avoidance Sensor is a compact and easy-to-use sensor that detects the presence of objects or walls in front of it using infrared light reflection. Widely used in robotics, line-following cars, and automatic door systems, this module helps your project detect and avoid obstacles in real time.
⚙️ Technical Specifications
| Parameter | Value |
|---|
| Operating Voltage | 3.3V – 5V DC |
| Detection Range | 2 cm – 30 cm (adjustable) |
| Interface | 3 pins (VCC, GND, OUT) |
| Output Type | Digital (HIGH/LOW) |
| IR Wavelength | ~850–940 nm |
| Adjustment | Sensitivity via onboard potentiometer |
| Dimensions | ~3.1 cm × 1.5 cm |
📌 Pinout
| Pin | Description |
|---|
| VCC | +5V supply |
| GND | Ground |
| OUT | Digital output (LOW when obstacle is detected) |
🛠️ Applications
🎮 Arduino Sample Code
int sensorPin = 2; // IR sensor connected to digital pin 2
int ledPin = 13; // On-board LED for indication
void setup() {
pinMode(sensorPin, INPUT);
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}
void loop() {
int sensorValue = digitalRead(sensorPin);
if (sensorValue == LOW) { // Obstacle detected
digitalWrite(ledPin, HIGH);
Serial.println("Obstacle!");
} else {
digitalWrite(ledPin, LOW);
Serial.println("Clear");
}
delay(200);
}
🎥 YouTube Tutorial
📺 IR Obstacle Sensor with Arduino