100% found this document useful (1 vote)
61 views3 pages

Arduino Infrared Collision Avoidance: Pin, Control Indicator Description

This document describes an infrared obstacle detection module that can be used to detect obstacles and trigger an alarm or change the direction of a robot. The module consists of an infrared transmitter, detector, and supporting circuitry. It connects to an Arduino with just three wires - power, ground, and an output pin that goes low when an obstacle is detected. The document provides instructions on connecting the module to an Arduino, uploading a sample sketch to test it, and viewing the output in the serial monitor as obstacles are detected.

Uploaded by

Apocalypse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
61 views3 pages

Arduino Infrared Collision Avoidance: Pin, Control Indicator Description

This document describes an infrared obstacle detection module that can be used to detect obstacles and trigger an alarm or change the direction of a robot. The module consists of an infrared transmitter, detector, and supporting circuitry. It connects to an Arduino with just three wires - power, ground, and an output pin that goes low when an obstacle is detected. The document provides instructions on connecting the module to an Arduino, uploading a sample sketch to test it, and viewing the output in the serial monitor as obstacles are detected.

Uploaded by

Apocalypse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Arduino Infrared Collision Avoidance

This is yet another one of those modules with cool possibilities. You could for example, sound an
alarm when something got too close or you could change the direction of a robot or vehicle.
The device consists of an Infrared Transmitter, an Infrared Detector, and support circuitry. It only
requires three connections. When it detects an obstacle within range it will send an output low.

IR Obstacle Detection Module Pin Outs


The drawing and table below identify the function of module pin outs, controls and indicators.

Pin, Control Indicator Description


Vcc 3.3 to 5 Vdc Supply Input
Gnd Ground Input
Out Output that goes low when obstacle is in range
Power LED Illuminates when power is applied
Obstacle LED Illuminates when obstacle is detected
Adjust detection distance. CCW decreases distance.
Distance Adjust
CW increases distance.
IR Emitter Infrared emitter LED
IR Receiver Infrared receiver that receives signal transmitted by Infrared emitter.
Arduino IR Obstacle Collision Module Tutorial
Connect the Arduino to the Detection Module
Use the picture below. It only requires three wires.

Copy, Paste and Upload the Sample Sketch


// IR Obstacle Collision Detection Module
// Henry's Bench

int LED = 13; // Use the onboard Uno LED


int isObstaclePin = 7; // This is our input pin
int isObstacle = HIGH; // HIGH MEANS NO OBSTACLE

void setup() {
pinMode(LED, OUTPUT);
pinMode(isObstaclePin, INPUT);
Serial.begin(9600);

void loop() {
isObstacle = digitalRead(isObstaclePin);
if (isObstacle == LOW)
{
Serial.println("OBSTACLE!!, OBSTACLE!!");
digitalWrite(LED, HIGH);
}
else
{
Serial.println("clear");
digitalWrite(LED, LOW);
}
delay(200);
}
Test the Tutorial Sketch
Move your hand towards the IR LEDs. As you near them, the Output LED on the module and the LED
for pin 13 on your Arduino will illuminate. Open your serial monitor and vary the distance of your
hand while viewing the serial monitor. The output should look like the picture below:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy