Amazon Shopping Mall

Friday, April 5, 2013

Smart Obstacle-Prevention System - Using IR Proximity Sensor + Arduino

This is an ongoing project at Sookmyung Women's University. This project is seeking to find new ways to help the "Visual Impair" walk freely without the use of the stick. Now, the question to ask is "how do we make this happen?", "Is it even possible for the Visual Impair to walk on our streets freely without to fear of bumping into an obstacle or involving in an accident?".

Well at this point, I hope your guess is as right as mine. It is possible with the recent increase in technology and building of Artificial Intelligent Systems(AI) which is popularly known as Smart systems, I believe it is possible.

Basically, we know that AI uses three functionalities which are the Sensor, the Actuator and the Control(this is the knowledge-based or rule-based system). At this stage of the project, we will focus on the sensor.

So what then is a Sensor?

A Sensor is a technological device that is made to detect and receive inputs from the physical environment, converting the inputs into signals for easy detection. There are various kinds of sensors such as location sensors(GSP) for tracking devices, light sensors for detecting lights, temperature sensors for detecting temperature etc. Apart from all these sensors, there is one sensor which is very crucial to our project and that is the PROXIMITY sensor.

Why proximity sensor?

Proximity sensor is a device that is able to detect objects from far and near distance depending on the technology used in building it. Furthermore, to sense at a distance, it often emit radiation, light or sound looking for changes that occur in the electromagnetic field to return a signal. Nevertheless, there are various types of proximity sensors. We have the Inductive proximity sensor which targets ferrous metal objects, the Capacitive proximity sensor which targets plastics and metals and most importantly, the general purpose Infrared(IR) proximity sensor which is used for detecting any object.

For the sake of this project, we are using the GP2y0A21yK Infrared Proximity Sensor. This detects object between 10cm to 80cm. It has two tiny bulbs; an LED which measures the intensity of light and a photo-transistor which sends the signals. 

Images

IR proximity sensor


The setup for proximity sensor and an LED on the Arduino board

  Please watch a demo on how proximity sensor works with an LED

 

 The codes to use

 // codes Analog input

.int led0 = 3;

//declare a variable called variableResistor and assign it to analog input A0.

int variableResistor = A0;

//declare a variable called analogValue to hold the data from the variableResistor.
int analogValue;
// SETUP ROUTINE
//The setup runs once on startup or reset.

void setup() {  

//initialize the serial connection
//syntax
//Serial.begin(baud rate) 

Serial.begin(9600);
}

//MAIN LOOP
//this will run forever as long as the arduino has power.

void loop() { 

//Read the specified pin.
//Assign to the variable, the reading from the analog input pin.
//syntax
//variableName = digitalRead(analog pin); 

analogValue = analogRead(variableResistor);  

//map the values from 0 - 1024 to 0-255 

analogValue = map(analogValue, 0, 1023, 0, 255); 

//assign a level to the brightness of the led.
//Use the variable analogValue for the level of brightness.
//syntax
//analogWrite(variableName, value);
analogWrite(led0, analogValue);
//Send a label for the data with no carridge return.
//syntax
//Serial.print(data); 

Serial.print("analogValue = " );

//Send the data with a carridge return.
//syntax
//Serial.print(data); Serial.println(analogValue);
//delay for 5ms to allow the chip to maintain continuity

delay(5);
}
 

Please keep reading for updates on the Proximity sensor and an Alarm/Vibrating/Voice system. This is the main focus in this project. We are trying to found out how we can use Arduino, Proximity sensor and one of the sound devices to alert the Visual Impair that there is danger ahead of him/her.

Please do well to share this post with others and send me your comments and contributions so that we can make our world a better place to live.
  
Also on this Blog are:

All about Arduino 
 
Using a Switch to control the blinking of an LED 

Blinking an LED using Arduino 

Using the Potentiometer to blink an LED 

Reference: www.aduino.cc
      

No comments:

Post a Comment

Please send me your comments