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
      

Tuesday, April 2, 2013

All About Arduino

What is Arduino?

I believe with the start of these projects, most of you who are new to this technology are probably thinking " what at all is this Arduino about and what can be achieved from using it?". Guess what, your thinking is not wrong at all and it is time you take a glass of water and read this post to the fullest.

Arduino is simply a tool or a single- board micro-control designed to make computers sense and interact with the physical world. It is an open- source program that consists of both the hardware(the board) and the software(Integrated Development Environment) for programming the board.

Arduino can be used for variety of things that will blow your mind.It can be used to develop interactive objects such as blinking an LED,it can be used to control sensors, switches and other objects by taking input from them and using it to control other devices such as motors, lights etc.It has the ability to transcend through communication devices.

The programming language for Arduino is based on Processing Multimedia Programming Environment.

Reasons for using Arduino 

  • Arduino is inexpensive- compared to other micro-controllers,Arduino board is very much cheaper and can cost as low as $30 depending on the type of board you prefer.
  • Arduino is cross-platform- this means that it can be used on any operating system platform.Examples Windows, Mac OS, Linux etc.
  • Arduino is an open source program- this means that anyone can freely download and use it as well as help to even improve it.
So now, what are you waiting for,simply go to this link http://arduino.cc/en/Main/Software and download the software and get started.

Now for the seek of our projects, I will introduce you to the various Arduino boards we have. 
  • Arduino BT
  • Arduino Due
  • Arduino Fio
  • Arduino Leonardo and Micro
  • Arduino Expolora
  • Arduino Mini
  • LilyPad Arduino USB
  • LilyPad Arduino 
  • Arduino Nano
  • Arduino Pro
  • Arduino Pro Mini
Ok that's enough. We are using the Arduino Leonardo and Micro.

Images  

Arduino Leonardo

Arduino Leonardo with the Bread board

    Installation Guidelines

  1. Download the zip file from http://arduino.cc/en/Main/Software. Make sure to chose the right platform.
  2. Unzip the file to a portal location like your local drive or program files.
  3. Insert the Arduino board and wait for the driver software to detect.In windows, the installation will fail so go to your device manager and look for new hardware Arduino. Right click on it and choose update driver software. Select choose from a list of driver software and browse to the location where you unzip the file and select driver in the Arduino folder.
  4. The driver software will be updated and the board will be detected.
  5. Now open the unzipped folder and double click on the arduino.exe. Arduino IDE will launch and you can start programming with Arduino.

Please check out for more updates soon on video tutorial for the installation and be sure to send me your comments.