I have made a simple blind stick. This can be helpful to blind people. I have used a SONAR sensor, an Arduino UNO, some jumper wires and a buzzer.
Arduino UNO is the brain of this project. The SONAR sensor and a buzzer is connected to the arduino UNO. The Arduino takes reading from the SONAR sensor
When the nearest obstacle is less than 25 cm away, the Arduino makes the buzzer pin High. The buzzer starts making a sound. Thus the user can be alert and alter their way. I attached the circuit to a white stick-like thing that was available at home.
Parts list
Arduino UNO x 1
Buzzer x 1
Walking Stick x 1
Jumper wires
Double sided tapes
Connection:
Arduino UNO | SONAR Sensor |
VCC | VCC |
GND | GND |
Trig | 2 |
Echo | 3 |
Arduino Uno | Buzzer |
11 | + |
GND | - |
Code
#define trigPin 2 #define echoPin 3 #define buzzerPin 11 // Define variables: float duration=0.00; float distance=0.00; void setup() { // Define inputs and outputs: pinMode(trigPin, OUTPUT); pinMode(buzzerPin, OUTPUT); pinMode(echoPin, INPUT); //Begin Serial communication at a baudrate of 9600: Serial.begin(9600); } void loop() { // Clear the trigPin by setting it LOW: digitalWrite(trigPin, LOW); delayMicroseconds(2); // Trigger the sensor by setting the trigPin high for 10 microseconds: digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); // Read the echoPin, pulseIn() returns the duration (length of the pulse) in microseconds: duration = pulseIn(echoPin, HIGH); // Calculate the distance: distance = duration /58.82 ; // Print the distance on the Serial Monitor (Ctrl+Shift+M): Serial.print("Distance = "); Serial.print(distance); Serial.println(" cm"); delay(1000); if(distance<=25) { digitalWrite(buzzerPin ,HIGH); } else { digitalWrite(buzzerPin ,LOW); } }