
Collision Detection Module
Infrared obstacle avoidance sensor is designed for wheeled robot obstacle
avoidance with adjustable detection distance. The module consists of one
infrared emitter and one detector. When there is an obstacle in front of the
sensor, the infrared light from the emitter is reflected back to the receiver.
The signal is squared up by a comparator to produce a digital signal. When
there is no obstacle, the output is high. When obstacle is in range, the output
is low. The sensitivity can be adjusted by means of potentiometer knob.
Several sensors can be connected in parallel. Enable pin can be used for
individual control. Remove jumper to use EN input.
Pinout and Connection to Arduino
Connect V+ to 5V. Connect output to pin 8 on the Arduino and Ground (-) to GND. To use EN pin,
remove jumper and connect to an output on Arduino.

Arduino Example Sketch
The following Arduino Sketch will light the LED when an obstacle is detected.
int ledPin = 13;
int sensorPin = 3;
int val;
void setup ()
{
pinMode (ledPin, OUTPUT);
pinMode (sensorPin, INPUT);
}
void loop ()
{
val = digitalRead(sensorPin);
if (val == HIGH)
{
digitalWrite(ledPin, LOW);
}
else
{
digitalWrite(ledPin, HIGH);
}
}