IR transmitter (IR LED) plus IR receiver (photodiode) for reflective obstacle detection

Distance Proximity
IR Infrared Obstacle Avoidance Sensor Module
IR transmitter-receiver module with adjustable range giving digital output on obstacle detection, used in line-following robots.
₹45 + 18% GST
SKU: BOTBIT-SEN-08 · Best for: Line-following robots (detecting black/white track contrast)
Overview
About IR Infrared Obstacle Avoidance Sensor Module.
This IR Infrared Obstacle Avoidance Sensor is a simple, low-cost module built around an infrared LED transmitter and a photodiode receiver. When the emitted IR light bounces off a nearby object and returns to the receiver, the onboard comparator flips its digital output, telling your microcontroller that an obstacle is present. An onboard potentiometer lets you tune the detection distance to suit your project.
It is one of the cheapest and most widely used sensors in Indian robotics kits, especially for beginners. Its low price, single clean digital output and simple 3-pin interface make it the default choice for line-following robots, obstacle-avoiding cars and basic proximity triggers in school and college projects.
Because the output is a clean HIGH/LOW digital signal, it needs no ADC and works with any microcontroller, including Arduino, ESP32, ESP8266 and Raspberry Pi, as well as being usable directly to drive a relay or transistor in the simplest builds.
Key features
Why it stands out.
Adjustable detection range of roughly 2 cm to 30 cm via the onboard potentiometer
Clean digital output that goes LOW (active) when an obstacle is detected
Onboard power and output indicator LEDs for easy visual debugging
3-pin interface (VCC, GND, OUT) that works with 3.3V and 5V logic
Comparator-based output that needs no analog input pin on the MCU
Specifications
Selection facts.
| Sensor type | Active reflective IR (transmitter + receiver) |
|---|---|
| Operating voltage | 3.3 V to 5 V DC |
| Detection range | Approx. 2 cm to 30 cm (adjustable) |
| Output type | Digital (active LOW on detection) |
| Range adjustment | Onboard potentiometer |
| Comparator IC | LM393 (typical) |
| Detection angle | Approx. 35° |
| Indicators | Power LED + obstacle/output LED |
Applications
Where it is used.
- Line-following robots (detecting black/white track contrast)
- Obstacle-avoiding robot cars and small autonomous rovers
- Simple proximity detection for automatic barriers or triggers
- Object counting on small conveyors and chutes
- Edge/cliff detection to stop a robot at a table edge
- Touchless hand-wave triggers for basic automation demos
Buying guide
How to choose.
Buy this module if you need cheap, reliable yes/no obstacle detection at short range and do not need an actual distance value. It is perfect for first robotics projects, line followers and obstacle avoiders. If you need to know the actual distance to an object, choose an ultrasonic (HC-SR04) or a laser ToF (VL53L0X) sensor instead.
It pairs with any microcontroller. Connect the OUT pin to a digital input and read it directly. For line-following you typically use two or more of these modules side by side. Because detection depends on reflected IR, tune the potentiometer for your target surface and lighting; dark, matte or far surfaces reflect less and reduce range.
Note that strong sunlight or other IR sources can interfere with reflective IR sensors, so for outdoor use test carefully or shield the sensor.
FAQ
Common questions.
How do I connect it to an Arduino?
It has three pins: VCC to 5V, GND to GND, and OUT to any digital pin. Read the pin with digitalRead(); it typically reads LOW when an obstacle is detected and HIGH when the path is clear.
Do I need a special library?
No. The output is a plain digital signal, so a simple digitalRead() is all you need. No library or ADC is required.
How do I set the detection distance?
Turn the onboard potentiometer with a small screwdriver while watching the output LED. Turning it changes the comparator threshold, effectively increasing or decreasing the trigger distance up to about 30 cm.
Can it measure exact distance?
No. It only tells you whether an object is within the set threshold (present or not). For a numeric distance, use an ultrasonic or laser ToF sensor.
Is it good for line-following robots?
Yes, it is one of the most common sensors for line followers. A dark line reflects less IR than the light surface around it, and the module's digital output flips as the sensor crosses the line.
What is in the box?
You receive one IR obstacle avoidance sensor module with the IR LED pair, comparator, potentiometer and a 3-pin header already soldered.
More in Sensors & Modules
Related hardware.
Distance Proximity
HC-SR04 Ultrasonic Distance Sensor Module
Non-contact ultrasonic ranging sensor measuring 2-400cm, the most common distance sensor for robotics.
₹75 + 18% GST
Distance Proximity
VL53L0X Time-of-Flight (ToF) Laser Ranging Sensor Module
Laser ToF sensor giving accurate short-range distance up to 2m over I2C, immune to target colour/reflectance.
₹126 + 18% GST
Environment
DHT11 Digital Temperature and Humidity Sensor Module
Low-cost single-wire digital temperature (0-50C) and humidity (20-90% RH) sensor, the default beginner Arduino sensor.
₹60 + 18% GST
Environment
DHT22 / AM2302 Temperature and Humidity Sensor Module
Higher-accuracy digital temperature (-40 to 80C) and humidity (0-100% RH) sensor, upgrade over DHT11.
₹199 + 18% GST
You may also need
Pairs well with.
Arduino Boards
Arduino Uno R3
The classic ATmega328P 8-bit microcontroller board, a popular beginner prototyping platform with 14 digital and 6 analog I/O pins.
₹799 + 18% GST
Breadboards Jumpers
MB102 830 Points Solderless Breadboard
Full-size 830 tie-point solderless prototyping breadboard with power rails, accepts 20-29 AWG wire.
₹90 + 18% GST