Arduino Smart Cane for Blind People
by 932787 in Circuits > Arduino
1485 Views, 3 Favorites, 0 Comments
Arduino Smart Cane for Blind People
Hey, there today I will be showing step by step how to make a smart cane using our Arduino Unos! This is a fun and easy way for people to use ultrasonic sensors in their circuits. The things that you will be needing are;
1. Arduino Uno
2. Ultrasonic Sensor
3. 5V buzzer
4. Jumper
5. 9v battery or a power bank and use the USB connector for the arduino
Find a Stick
You are required to use a stick/cane. A PVC pipe is a common item to use.
Make an Arduino Code
For this project i used the following code
// defines pins numbers
const int trigPin = 9; const int echoPin = 10; const int buzzer = 11; const int ledPin = 13;
// defines variables long duration; int distance; int safetyDistance;
void setup() { pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output pinMode(echoPin, INPUT); // Sets the echoPin as an Input pinMode(buzzer, OUTPUT); pinMode(ledPin, OUTPUT); Serial.begin(9600); // Starts the serial communication }
void loop() { // Clears the trigPin digitalWrite(trigPin, LOW); delayMicroseconds(2);
// Sets the trigPin on HIGH state for 10 micro seconds digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel time in microseconds duration = pulseIn(echoPin, HIGH);
// Calculating the distance distance= duration*0.034/2;
safetyDistance = distance; if (safetyDistance <= 5){ digitalWrite(buzzer, HIGH); digitalWrite(ledPin, HIGH); } else{ digitalWrite(buzzer, LOW); digitalWrite(ledPin, LOW); }
// Prints the distance on the Serial Monitor Serial.print("Distance: "); Serial.println(distance); }
Once you are finished with the code make sure to connect your Arduino with your pc and upload the code we just made.
Connecting
So, grab your Pvc Pipe or stick and start to put on the Arduino, buzzer and Ultrasonic sensor by using rubber bands or zip ties. Tape isn't recommended as it would be in the way of the circuit.
Getting Wired Up
So the first step that you would do is grabbing your jumper cables.
Connect the jumper cables to all the pins on the sensor. Connect the sensor VVC to the 5V pin on the Arduino. Then connect the sensor's ground to the ground on the Arduino. Connect the Echo to Arduino's pin #10. And finally, connect the Trig to Arduino pin #9.
Getting Wired Up! Continues...
Grab your 3V buzzer and connect the negative side of the buzzer to ground and the Positive side to Arduino pin #11. Make sure to tape the buzzer so it doesn't hang around.
Light It Up!
Connect a LED light to Arduino pin #13 and Ground!
Power Her Up!
Using a 9V battery and an Arduino connector connect to the back of the Arduino or you can use a power bank and use the USB connector. Then you're all set to your new Smart Cane!