Amazon Shopping Mall

Saturday, June 22, 2013

Smart Obstacle-Prevention System - Final Update

This is the final update for Smart Obstacle-Prevention System Using IR Proximity Sensor and Arduino programming.

Check out these pictures and Videos :





 


                           Video



 
 
Please leave your comment after watching this final project.

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 

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.


Sunday, March 31, 2013

Using a Switch to control an LED

 

What is a Switch?

A Switch can be any device that has two state 0 or 1 (on/off). This can be use to break and make connection in an electric circuit.It comes in different forms and the one you are seeing on this page is just a type of switch. Henceforth, for the purpose of this project, any switch at can be used.

Remember that a switch may directly be manipulated by a person as a control signal to an electric circuit or a system.

Setting Up the Switch on the Arduino board

Components

  • 1 Arduino 
  • 1 LED
  • 1 220 ohm resistor for the LED
  • 1 10K ohm resistor for the LED
  • 2 data wires

Images 





Codes for programming the Switch

Hi Everybody, my name is Elizabeth Yeboah and  this is project 3. Copy and paste this code in your sketch whiles following the video tutorial for the setup.

// The switch codes

int led = 13;                                               // my LED is connected to pin 13
int switchPin = 2;                                        // my switch is connected to pin 2
int switchState = 0;                                      // initialize the variable as 0
void setup() {                                              // Tell the arduino that pin 13 is to be treated as an OUTPUT 
pinMode(led, OUTPUT);                             //command(variable,mode);
pinMode(switchPin, INPUT);                       // Tell the arduino that pin 2 is to be treated as an INPUT
}
void loop() {
// set the variable to the value of the pin. This determines if the switch is on or off. //syntax //variableName = digitalRead(pin); switchState = digitalRead(switchPin); // Use an if statement to take an action. We compare the variable with the value of the switchPin.

if(switchState == 1){

//if the switch is ON
//turn the led ON using digitalWrite() by setting the mode to HIGH. This sends 5 volts out of the assigned pin

//digitalWrite(variableName, MODE);

digitalWrite(led, HIGH);

// if the switch is not on, then do the following action
}
else{

//turn the led OFF using digitalWrite() by setting the mode to LOW. This stops the 5 volts on the assigned pin

digitalWrite(led, LOW);
  }
}

Watch the Switch Video

Please if this tutorial was helpful, send me your comments. Thanks
By Lis Brown.

Blinking an LED using Arduino

Project 1

Setting Up your LED on the Arduino Board

Components

  • 1 Arduino
  • 1 LED
  • 1 220 ohm resistor (red, red, brown)
  • 1 piece of data wire


LED setup on the Arduino Board



Codes to use on the Arduino IDE

  /*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.

  This example code is in the public domain.
 */


// Pin 13 has an LED connected on most Arduino boards.

int led = 13;
int blinkTime = 1000;

// the setup routine runs once when you press reset:
void setup() {               
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);    
}

// the loop routine runs over and over again forever:
void loop() {
blinkMe();
}
//blinkme function

void blinkMe()
{
  digitalWrite(led, HIGH);
  delay(blinkTime);
  digitalWrite(led, LOW);
  delay(blinkTime);
}

Watch A Short Video

If this tutorial was helpful, please do post your comments. Thanks 
By Lis Brown.

Using The Potentiometer to Blink an LED

Project 2

What is Potentiometer?
Potentiometer is a three-terminal resistor which is used to control electrical devices as well as measure the potential(voltage) of a particular electric device.

So in this project, the potentiometer is been used to regulate the amount of current or voltage that the LED can receive in order to light. In our codes, we declared the map function to a range to which the potentiometer can lie within.  

Setting Up the Potentiometer

Components 

  • 1 Arduino
  • 1 LED
  • 1 220 ohm resistor (red red brown)
  • 1 10K ohm potentiometer
  • 2 data wires
Always note that the red wire is for power , the black for ground and the white or yellow for data/signal.

 Images 



Setup for Potentiometer and  LED

The Codes to use on your Arduino IDE

Hi Everybody, this is Elizabeth Yeboah and  this is project 2. Copy and paste this code in your sketch whiles following the video tutorial for the setup.

// Using the Potentiometer codes

/*analogRead()
This is an example of analogRead(). analogRead() listens for a range of voltages (5v - 0v) on an assigned analog port.
This code outputs the data to an led and affects the LEDs brightness using analogWrite().
syntax
analogRead(analog pin); 
*/

//DECLARE YOUR VARIABLES AND PIN NAMES
//Assign a variable name to a pin number.
//Assign the variable name led0 to analog/digital pin 3
//syntax:
//datatype variableName = value;

int led0 = 3;
int variableResistor = A0;        //declare a variable called variableResistor and assign it to analog input A0.
int analogValue;                 //declare a variable called analogValue to hold the data from the variableResistor.

// 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); 
analogValue = map(analogValue, 0, 1023, 0, 255);                //map the values from 0 - 1024 to 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(5);                                                                     //delay for 5ms to allow the chip to maintain continuity
}

Watch a Potentiometer Video

Please if this tutorial was helpful send me your comments. Thanks
By Lis Brown