1. Infrared Obstacle Avoidance Sensor Manual

1.1 Infrared Obstacle Avoidance Sensor Description

1.1.1 Sensor Introduction

The infrared obstacle avoidance sensor is used for detecting obstacle ahead. It has an infrared transmitting tube and an infrared receiving tube. Once the sensor encounters an obstacle, the infrared light will be reflected back and received by the receiving tube. It is widely used for automatic obstacle avoidance in smart cars and robotics.

1.1.2 Working Principle

When the infrared receiving tube does not receive infrared light, the signal terminal OUT will output a high-level signal; when it receives infrared light, the signal terminal OUT will output a low-level signal.

During operation, you can determine whether there is an obstacle ahead by reading the status of the sensor’s OUT signal pin. In addition, the sensor is equipped with a miniature potentiometer, which can be rotated to adjust the detection range. If you adjust the potentiometer to the threshold between ON and OFF, the sensor will achieve its maximum detection distance.

1.2 Notice

  1. Do not exceed the rated voltage range during use.

  2. Do not use materials that transmit visible light or infrared light as test objects.

  3. Avoid strong light exposure and do not block the light on the test object during use.

  4. Do not operate the sensor in humid environments.

1.3 Specifications

For more information of this chip, you may refer to Infrared obstacle avoidance sensor schematic

1.3.1 Pin Instruction

Pin Instruction
5V Power Input
GND Ground
OUT When no obstacle is detected, the output remains HIGH (1). When an obstacle is detected, the output switches to LOW (0).
The Detection range is adjustable.
NC None

1.3.2 Specifications

1.Infrared Obstacle Avoidance Sensor
Parameter Specification
Working Voltage DC 5V
Operating Current 40mA
Detection Range 2~ 25cm
LED1 Description Lights up when an obstacle is detected.
Detection Range Adjustment Method Adjustable via miniature potentiometer
Connector Type 5264-4AW
Dimensions 50mm×20mm
Modular installation, compatible with Lego series.

1.4 Project Outcome

You can refer to the case tutorials and programs for different platforms in the same directory as this tutorial. This section will demonstrate the testing effect using Arduino IDE as an example.

Place an object in front of the infrared obstacle avoidance sensor. When no obstacle is detected, LED1 on the sensor will be OFF, and the serial monitor will display 1. When an obstacle is detected, LED1 will turn ON, and the serial monitor will display 0.