Infrared Obstacle Avoidance Proximity Sensors Module has builtin IR transmitter and IR receiver that sends out IR energy and looks for reflected IR energy to detect presence of any obstacle in front of the sensor module. The module has on board potentiometer that lets user adjust detection range. The sensor has very good and stable response even in ambient light or in complete darkness.
The sensor module can be interfaced with Arduino, Raspberry Pi or any microcontroller having IO voltage level of 3.3V to 5V.
Features
LM393 Comparator based detetction circuit is very stable and accurate
On board potentiometer sets obstacle detection range
On board Power LED indicator
On board Obsatcle Detection LED indicator
3.0MM mounting hole for easy mounting the sensor.
Male header for easy connection
Good Accuracy: By use of Infra-red LED transmitter the module performs well in Ambient light
VCC: 3.3V-5V power input pin
GND: 0V power pin
OUT: Digital Output Pin
Detection angle: 35 °
Operating Voltage: 3.0V – 6.0V
Detection range: 2cm – 30cm (Adjustable using potentiometer)
pcb size : 3.1 cm (L) x 1.4 cm (W)
Overall Dimension: 4.5cm (L) x 1.4 cm (W), 0.7cm (H)
Ative output level: Outputs Low logic level when obstacle is detected
In-active output level: Outputs High logic level when obstacle is not detected
Current Consumption:
at 3.3V : ~23 mA
at 5.0V: ~43 mA
An IR sensor consists of an IR LED and an IR Photodiode; together they are called as Photo–Coupler or Opto–Coupler. As said before,the Infrared Obstacle Sensor has builtin IR transmitter and IR receiver.Infrared Transmitter is a light emitting diode (LED) which emits infrared radiations. Hence, they are called IR LED’s. Even though an IR LED looks like a normal LED, the radiation emitted by it is invisible to the human eye. Infrared receivers are also called as infrared sensors as they detect the radiation from an IR transmitter. IR receivers come in the form of photodiodes and phototransistors. Infrared Photodiodes are different from normal photo diodes as they detect only infrared radiation. When the IR transmitter emits radiation, it reaches the object and some of the radiation reflects back to the IR receiver. Based on the intensity of the reception by the IR receiver, the output of the sensor is defined.
Upload the program given below to your Uno board.The on-board obstacle led will turn on when is there any obstacle exist in front of sensor.It will turn off when there is no obstacle.
int irObstaclePin = 7; // This is our input pin int Obstacle = HIGH; // HIGH MEANS NO OBSTACLE void setup() { pinMode(irObstaclePin, INPUT); Serial.begin(9600); } void loop() { Obstacle = digitalRead(irObstaclePin); if (Obstacle == LOW) { Serial.println(''OBSTACLE!!, OBSTACLE!!''); } else { Serial.println(''clear''); } delay(200); }