IR Infrared Obstacle Avoidance Sensor Module
Infrared obstacle detection sensor detects objects by reflecting infrared rays.
The red part is the section that detects obstacles, and the yellow part is a variable resistor used to adjust sensitivity.
It is a module equipped with LEDs for power and detection status indication.
Specifications
- Operating Voltage [V]: 3.3 ~ 5 (5 recommended)
- Distance can be adjusted using a variable resistor
- Digital output: LOW output when an obstacle is detected (HIGH output when no obstacle is detected)
Example hardware
- Arduino board
- Jumper cables
- Infrared obstacle detection module
Connections
Arduino | IR Sensor Module |
5V | VCC |
GND | GND |
D7 | OUT |
Example code
Outputs 0 to the serial monitor when an obstacle is detected, and 1 otherwise.
#define out_pin 7
void setup() {
pinMode(out_pin, INPUT);
Serial.begin(9600);
Serial.println("Start");
}
void loop() {
Serial.print("out_pin: ");
Serial.println(digitalRead(out_pin));
delay(1000);
}
Execution result
Check the operating video from the link.