eSun 1.75mm PLA+ 3D Printing Filament 1kg Yellow Color
IR (Infrared) Obstacle Avoidance Sensor Module
Let us know!
We'll try to match the price for you
We’ll notify you once the product is back in stock.
Couldn't load pickup availability
The IR Proximity Sensor has a distance range of 2cm to 30cm and it is ideal for obstacle detection, line tracking, and more.
It is designed for easy setup and has onboard detection indication to verify its status. A preset knob allows you to fine-tune the distance range for more accurate readings.
This IR Sensor is best for IoT projects, such as creating automatic sanitizer dispensers and home automation systems.
This infrared sensor is suitable for various applications in industrial, automotive, and consumer electronics settings. This sensor offers unbeatable value for money while ensuring optimal accuracy and efficiency in all your projects.
The detection range of the infrared proximity sensor can be adjusted by the potentiometer.
If you are looking for a reliable IR obstacle sensor at the best price in India, this module is one of the most cost-effective choices available — starting at just ₹29 with GST included and same-day shipping across India.
Read our blog proximity sensor working principle.
Enjoy our free shipping on orders above Rs 500/- within India.

The IR proximity sensor circuit diagram consists of the following components:


const int sensorPin = 2; // sensor output pin
void setup() {
Serial.begin(9600);
pinMode(sensorPin, INPUT);
Serial.println("IR Obstacle Sensor Test");
}
void loop() {
int val = digitalRead(sensorPin);
if (val == LOW) {
Serial.println("Obstacle detected!");
}
else {
Serial.println("Clear");
}
delay(500);
}
const int sensorPin = 2;
const int ledPin = 13; // onboard LED on many Arduino boards
void setup() {
pinMode(sensorPin, INPUT);
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}
void loop() {
int state = digitalRead(sensorPin);
if (state == LOW) {
digitalWrite(ledPin, HIGH);
Serial.println("Obstacle!");
} else {
digitalWrite(ledPin, LOW);
Serial.println("All clear");
}
delay(300);
}
| Feature | IR Proximity Sensor | Ultrasonic Sensor |
|---|---|---|
| Detection Method | Emits infrared light and measures reflection from nearby objects. | Emits ultrasonic sound waves and measures time-of-flight to calculate distance. |
| Typical Range | 2–30 cm (depends on module and potentiometer setting) | 2 cm–4–5 m (depending on module like HC-SR04) |
| Accuracy | Good for short distances, less accurate with dark/transparent surfaces. | Moderate to high accuracy over longer distances, generally unaffected by color. |
| Surface Sensitivity | Reflectivity matters; black/dark or transparent surfaces may be poorly detected. | Works with almost any surface type; sound reflects reliably from most objects. |
| Response Speed | Fast response, good for obstacle avoidance in robots at short range. | Slower than IR; small delay due to sound travel, but good for medium distances. |
| Cost & Size | Low cost, very compact, easy to integrate. | Moderate cost, slightly larger, requires both transmitter and receiver elements. |
| Environment Limitations | Sunlight or strong ambient IR light can interfere; close proximity required. | Can be affected by soft materials (fabric, foam), or air turbulence; generally works well outdoors. |
| Best Use Case | Short-range obstacle detection, line following, touchless buttons. | Distance measurement, medium-range obstacle avoidance, level detection, robotics. |
| Specification | Details |
|---|---|
| Main Chip | LM393 |
| Operating Voltage | 3.3 ~ 5 VDC |
| Distance Measuring Range | 8 cm |
| Dimensions | 48 x 14 x 8 mm |
| Weight | 15 grams |
To use this IR obstacle avoiding sensor, connect its VCC, GND, and OUT pins to your Arduino. The Arduino serves as the microcontroller for your robot, reading the sensor's digital output. Your code can then use this signal to detect obstacles and trigger an avoidance maneuver.
The simplest way to test your IR obstacle avoidance sensor module is to power it and wave an object in front to see if the onboard LED lights up. For a more definitive test, connect the IR module's output to a microcontroller and monitor the digital signal to confirm it is working correctly.
This IR module serves as the core component for creating your own DIY obstacle sensor. By connecting it to a microcontroller and writing a few lines of code to read its output, you create a complete obstacle avoidance sensor. It is then ready to be integrated into any project needing object detection.
To build an obstacle avoiding robot, start by mounting this IR sensor on the front of its chassis. Connect the sensor's output to a digital input on your microcontroller. The code you write will read this proximity sensor's state and command the robot's motors to turn when an obstacle is detected.
To test your IR sensor, connect it to a power source and a microcontroller. The best way to verify its function for obstacle avoidance is to monitor its digital output while placing an object at various distances. This confirms the IR module is reliably triggering when an object is within its detection range.
For more robust navigation, you can combine ultrasonic and IR sensors. Connect both to your microcontroller, using the ultrasonic sensor for long-range detection and the IR sensor for close-range precision. This dual-sensor approach provides a more advanced collision avoidance system for your robot.
To build a robot with an ultrasonic sensor with IR, mount both sensors on its chassis to cover different angles and ranges. Wire both sensors' outputs to separate digital pins on your microcontroller. Your code can then process the inputs from both to create a more reliable obstacle avoidance system.
The sensor detects objects between 2cm and 30cm. The exact range depends on the reflectivity of the surface — lighter, more reflective surfaces are detected at greater distances, while dark or matte surfaces may shorten the effective range.
Yes. The onboard potentiometer (preset knob) lets you dial in the detection distance. Turn it clockwise to increase sensitivity (detect farther) or counterclockwise to reduce it. This is especially useful in environments with variable lighting or mixed surface colors.
Strong ambient IR sources — including direct sunlight and incandescent bulbs — can interfere with the sensor's readings. For outdoor or bright-light use, shield the sensor or use it in shaded conditions for reliable results.
It works best with light-colored, opaque, and reflective surfaces. Transparent objects (glass, clear plastic) and very dark or black surfaces may not reflect enough IR light to trigger the sensor reliably.
Yes — this module is one of the most popular choices for contactless IR trigger applications in India, including sanitizer dispensers, automatic taps, and hand-dryer units.