fritzing Collision Detection Module User guide

Page 1

Collision Detection Module

Operating Voltage
5V
Maximum Current
20mA / 5VDC
Detection distance
2 - 4cm
Detection angle
35°
Dimensions
28mm x 23mm
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.
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.
Page 2
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); } }
Loading...