Collision Avoiding Robot using IR

Purpose

The purpose of this page is to illustrate how an IR sensor can be used in conjunction with the shadow robot chassis to create a robot that avoids obstacles.

Components

Background

IR Sensors work by using a specific light sensor to detect a select light wavelength in the Infra-Red (IR) spectrum. The Sharp IR sensor uses an LED to generate a specific wavelength of light. The IR sensor then detects the intensity of the received light, and the MBED reads its analog in pin to measure the analog output, a 0 to 1.0 value of the Sharp IR sensor. Using the basic principle, the robot is able to "sense" by evaluating the input from the IR sensor. Afterwards, the robot can execute the proper actions to avoid the object in front of the robot. In the case of the example demo code, the robot simply turns around, however, more complicated actions can be executed such as seeking an open area.

Pictures

Front side of the robot /media/uploads/Mcapone/pic_front.jpg Top side of the robot /media/uploads/Mcapone/pic_top.jpg Close-up of board /media/uploads/Mcapone/pic_close.jpg

Pinouts

MBEDH-BridgeMotor
P 30AIN2
P 29AIN1
P 28BIN1
P 27BIN2
VccVcc
VoutVMOT
GndGnd
VccSTBY
AO0Right Motor+
AO1Right Motor -
BO0Left Motor +
BO1Left Motor -
MBEDIR Sensor
Pin 16Analog Input
VccPower
GndGnd

Code Example

This piece of code has the robot moving in circles. The IR sensor input is read into the MBED, and the intensity of the analog readings are displayed on the LEDs. When the intensity of the reading goes over the threshold, the robot will make a 180 degree turn and begin analyzing the nearby for objects. If no objects are discovered, the robot continues infinitely in a circle.

Import program4180Lab4SoradhmunyAndMichael

ECE 4180 Collision Avoiding Robot demo

Demonstration

Demonstration of the Code Example

Group Members

Michael Capone & Soradhmuny Lanh


Please log in to post comments.