Infrared Obstacle Avoidance Sensor Module IR Photoelectric Reflection Sensor for Smart Car Tracking & Obstacle Avoidance LM393

Product Name:
Infrared Obstacle Avoidance Sensor Module / IR Pair Module
Detection Principle:
Active Infrared Reflection
Detection Angle:
Approx. 35°
Detection Distance:
2-30cm (adjustable)
Comparator IC:
LM393
Output Signal:
Digital TTL – Low when obstacle, High when clear
Indicators:
Red power LED, Green detection LED
Operating Voltage:
3.3V - 5V DC
Adjustment:
Potentiometer (clockwise increases distance)
Applications:
Smart car obstacle avoidance, line tracking, robot drop-off prevention

Infrared Obstacle Avoidance Sensor Module  Product Overview

This infrared obstacle avoidance sensor module integrates an IR emitter and receiver pair with an LM393 comparator. The detection distance (2-30cm) is adjustable via a potentiometer, with a detection angle of approximately 35°. When an obstacle is detected, a green LED lights up and the OUT pin outputs a low-level digital signal. Operating at 3.3V-5V, it can directly connect to a 5V microcontroller I/O pin or drive a 5V relay. The compact board measures 32×14mm with 3mm mounting holes. It is widely used in robot obstacle avoidance, smart cars, line tracking, counting, and more.


Infrared Obstacle Avoidance Sensor Module  Core Features

Infrared Reflection Detection: Emits modulated IR light; reflected light is received and processed by comparator – strong ambient light immunity

LM393 Comparator: Stable operation, adjustable threshold via potentiometer

Adjustable Detection Distance: 2-30cm range; clockwise increases distance, counterclockwise decreases. Black objects reduce range, white objects increase it

Digital Output: OUT pin outputs TTL level: high (no obstacle) / low (obstacle). Directly connect to MCU I/O

Wide Voltage Operation: 3.3V-5V DC, compatible with both 3.3V and 5V systems

Clear Indicators: Red power LED (on when powered), green detection LED (lights when obstacle detected)

Compact & Mountable: 32×14mm board with 3mm screw holes for easy mounting on robot chassis or arms

Plug & Play: Factory-calibrated; simple 3-wire connection (VCC, GND, OUT)


Infrared Obstacle Avoidance Sensor Module  Applications

Smart Car Obstacle Avoidance: Mount on front to detect obstacles, trigger stop or turn

Line Tracking (Black/White): Detects reflectivity difference between black and white surfaces for line-following robots

Drop-off Prevention: Downward-facing detection prevents robots from falling off edges

Conveyor Counting: Counts passing objects by detecting interruptions

Security/Alarm: Detects door/window opening or human presence

Interactive Installations: Proximity-triggered lights, sound, or multimedia effects


Infrared Obstacle Avoidance Sensor Module  Key Advantages

Excellent Ambient Light Immunity: Modulated IR and dedicated receiver outperform ordinary photoelectric sensors

Digital Output – No ADC Required: Direct high/low output works with any MCU I/O pin (51, Arduino, STM32)

Adjustable Sensitivity: Potentiometer adapts to different colors, materials, and environmental conditions

Low Power & Wide Voltage: 3.3V-5V operation, low standby current, battery-friendly

Compact & Easy to Integrate: 32×14mm with mounting holes fits into robots, cars, and smart devices

Plug & Play Quick Deployment: Factory calibrated; power and signal connections are all that‘s needed

Low Cost, High Value: Ideal for mass-produced smart toys, educational kits, and basic industrial detection

Proven & Widely Used: Extensive community support and project examples for smart cars and Arduino


Why Choose QIXINWEI

Years of experience in the electronics industry. Trusted by global customers.

Massive In-Stock Inventory – Ready to ship promptly

BOM Matching Service – One-stop solution, save time

PCBA Customization – Professional engineering team creates tailor-made solutions based on your needs

Cost-Effective & Efficient – Better channel, better cost

A dedicated team makes your procurement smoother.

Contact us for BOM quotes or PCBA inquiries






FAQ:

  1. What is the infrared obstacle avoidance sensor module and its key specifications?
    This module is a photoelectric reflection sensor built around an LM393 dual comparator, a pair of 940 nm IR emitter and receiver. It detects obstacles by emitting infrared light and measuring the reflected signal. Key specifications: operating voltage 3.3 V – 5 V DC, adjustable detection range 2 cm – 30 cm (via a potentiometer), digital TTL output (HIGH/LOW), and indicator LEDs for power and signal. The module is a staple in smart car obstacle avoidance, line tracking, and proximity sensing projects.

  2. How do I connect the IR obstacle sensor to Arduino or ESP32?
    Wiring is extremely simple. Connect VCC → 3.3 V or 5 V, GND → GND, and OUT → any digital input pin (e.g., D2 on Arduino, GPIO15 on ESP32). Most modules have only a digital output (3‑pin header: VCC, GND, OUT). For ESP32 (3.3 V logic), the 5 V-powered module still outputs a safe 3.3 V‑compatible signal because the comparator output is open‑drain and pulled up to the module’s VCC; if powered from 5 V, you should use a voltage divider or level shifter to be safe. In code, simply use digitalRead()LOW means an obstacle is detected (reflected IR), HIGH means no obstacle.

  3. How does the digital output work, and how do I adjust the detection distance?
    The LM393 compares the receiver signal against a reference voltage set by the onboard blue potentiometer. When reflected IR light (from an obstacle) exceeds the threshold, the output transistor turns on, pulling the OUT pin LOW and the signal LED lights up. To adjust distance: turn the pot clockwise to increase the threshold (shorter range), counter‑clockwise to decrease it (longer range, up to ~30 cm). Test by placing an object in front of the sensor and slowly tuning until the LED just activates at your desired distance. Note that black or matte surfaces reflect much less IR and will reduce the effective range significantly.

  4. What is the difference between this IR sensor and an HC‑SR04 ultrasonic sensor for obstacle avoidance?
    The IR sensor is a simple binary switch — it tells you whether an object is present within a fixed distance threshold. The HC‑SR04 ultrasonic sensor measures the exact distance and provides a numeric value. The IR sensor is much faster (response time in microseconds), smaller, and works well at short range, but its detection depends heavily on the object's color and reflectivity — black or transparent objects may be invisible. The ultrasonic sensor works regardless of color but is slower and larger. For a simple collision‑prevention switch, the IR sensor is ideal; for precise distance measurement, choose ultrasonic.

  5. Can this module be used for line tracking in a smart car?
    Yes, when used in pairs and positioned close to the ground, these sensors can detect the difference between a black line and a white surface. A black surface absorbs IR light, producing a HIGH output; a white surface reflects it, giving a LOW output. For line following, two or more sensors are mounted side by side, and the robot steers to keep the line between them. However, dedicated tracking sensor modules (often with 4–5 IR pairs on a single board) are more convenient for this purpose because they have tighter optics and are mechanically aligned for the ground.

  6. What colors and surfaces does the IR sensor detect best? What about glass or black objects?
    The sensor relies on infrared reflection. It works best with light‑colored, matte surfaces (white, grey, light wood). Black or dark matte surfaces absorb IR, drastically reducing the detection range — a black object may only be seen at 2–5 cm instead of 30 cm. Transparent materials (glass, clear acrylic) pass IR light straight through and are essentially invisible. Thin or irregularly shaped objects also give weak reflections. For universal obstacle detection, use an ultrasonic sensor; for known, light‑colored targets, the IR sensor performs reliably.

  7. How can I use multiple sensors together without mutual interference?
    Because each sensor emits its own IR beam, crosstalk can occur if two sensors are placed close together and both “see” the other’s reflection. To avoid interference: 1) Space the sensors at least 3 cm apart and angle them slightly outward. 2) Power them one at a time in software — switch on each sensor via a transistor or dedicated digital pin, take a reading, then turn it off. 3) Add a small opaque barrier between adjacent sensors. In practice, many smart‑car designs successfully use three front‑facing IR sensors with just a few centimeters of separation.

  8. What is the power consumption and can I run it from a battery?
    The module draws about 15 mA – 25 mA when the IR LED is continuously on, which is fine for most battery‑powered projects. The LM393 quiescent current is negligible. For low‑power applications, you can pulse the sensor’s VCC via a digital pin (Arduino pin can supply up to 20 mA safely). The module works from 3.3 V to 5 V, so it can be powered directly from a single Li‑Po cell (3.7 V) or a 5 V USB power bank.

  9. Why does my sensor sometimes give false triggers or miss obstacles?
    Common causes: 1) Ambient infrared interference — strong sunlight, halogen lamps, or even incandescent bulbs emit IR and can saturate the receiver. Shade the sensor or use it indoors. 2) Detection distance set too short or too long — readjust the potentiometer. 3) Target surface — dark or transparent objects produce weak reflections. 4) Power supply noise — add a 10 µF electrolytic capacitor across VCC and GND near the module. 5) Flickering — the comparator has no built‑in hysteresis; you can add a small resistor (e.g., 100 kΩ) between OUT and the non‑inverting input or implement a software debounce.

  10. What are the most typical applications of this IR obstacle avoidance module?
    It is a core component in Arduino smart car obstacle avoidance, robot proximity sensing, IR line‑following robots, automatic door triggers, hand sanitizer/soap dispensers, conveyor belt object detection, and interactive installations. Its low cost, simple digital output, and easy adjustability make it one of the most widely used sensors in educational and prototyping projects.