ULTRA-SONIC GLASSES FOR BLIND PEOPLE
by 1091873 in Circuits > Arduino
23 Views, 0 Favorites, 0 Comments
ULTRA-SONIC GLASSES FOR BLIND PEOPLE
Hi I am Rishnoor a grade 10 student and I made ultra sonic glasses for blind people.
General information about the project
An ultrasonic sensor measures how far away an object is by sending out sound waves and listening for them to bounce back. It uses a sensor to send and receive these sound pulses, which help it figure out the distance.
An Arduino buzzer makes noise when electricity flows through it. It can be connected directly to the Arduino and make different sounds depending on the electrical signals it gets.
In this project, the goal is for the sensor to detect objects that are at least 30cm away. The buzzer will make a sound that changes based on how close or far the object is. The closer the object, the higher the pitch of the sound, and the farther away it is, the lower the pitch.
The glasses consist of a ultra sonic distance sensor, a buzzer , red, green yellow LEDs, three 10k resistors and wires.
To start the glasses put your hand near the distance sensor if the distance sensor reads from 17 - 20 the buzzer will buzz and the red light will turn on the further you move your hand further if the sensor reads number from 20 - 25 the green led will turn and the buzzer keeps buzzing and lastly if the buzzer reads number from 25 - 30 the green light turns on and the buzzer keeps buzzing.
Supplies
- Ultrasonic distance sensor
- Buzzer
- Green led
- Red led
- Yellow led
- Wires
- Breadboard
- Sunglasses
- 9 volt battery( if you don't have an Arduino)
Parts Required
- Ultrasonic distance sensor
- Buzzer
- Green led
- Red led
- Yellow led
- Wires
- Breadboard
- Sunglasses
- 9 volt battery
Make the Circuit
Do the same thing as shown in the three images but if an arduino is not available use a 9 volt battery and a battery cap.
The distance sensor should be should be wired to ground and power, the trig and echo pin should be wired to the analog pins of the arduino, the three LEDs should be wired to one of the three arduino power pins and connect the resistors to ground. The buzzer negative side should be connected to the breadboards ground and the positive side should be connected to one of the arduino pins.
Upload Code
int trigPin= 4;
int echoPin= 3;
int redled = 7;
int greenled= 8;
int yellowled = 10;
int buzzerpin= 5;
long duration ,inches;
void setup(){
Serial.begin (9600);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(buzzerpin, OUTPUT);
pinMode(redled, OUTPUT);
pinMode(yellowled, OUTPUT);
pinMode(greenled, OUTPUT);
Serial.begin(9600);
}
void checkDistance(){
digitalWrite(trigPin,LOW);
delayMicroseconds(2);
digitalWrite(trigPin,HIGH);
delayMicroseconds(10);
digitalWrite(trigPin,LOW);
duration = pulseIn(echoPin,HIGH);
inches = duration /74 /2;
Serial.println(inches);
}
void loop(){
checkDistance();
if ((inches > 17) && (inches < 20)){
analogWrite(buzzerpin, 50);
digitalWrite(redled, HIGH);
digitalWrite(greenled, LOW);
digitalWrite(yellowled, LOW);
}
else if ((inches > 14) && (inches < 17)) {
analogWrite(buzzerpin, 55);
digitalWrite(redled , HIGH);
digitalWrite(greenled, LOW);
digitalWrite(yellowled, LOW);
}
else if ((inches > 11) && (inches < 14)) {
analogWrite(buzzerpin, 100);
digitalWrite(greenled,HIGH);
digitalWrite(redled, LOW);
digitalWrite(yellowled, LOW);
}
else if ((inches > 8) && (inches < 11)) {
analogWrite(buzzerpin, 150);
digitalWrite(greenled,HIGH);
digitalWrite(redled, LOW);
digitalWrite(yellowled, LOW);
}
else if ((inches > 5) && (inches < 8)) {
analogWrite(buzzerpin, 200);
digitalWrite(yellowled,HIGH);
digitalWrite(redled, LOW);
digitalWrite(greenled, LOW);
}
else if (inches < 2) {
analogWrite(buzzerpin, 250);
digitalWrite(yellowled,HIGH);
digitalWrite(redled, LOW);
digitalWrite(greenled, LOW);
}
else if (inches > 20){
Serial.println("Out of range");
digitalWrite(redled, LOW);
digitalWrite(greenled, LOW);
digitalWrite(yellowled,LOW);
}
delay(500);
}
This code utilizes an ultrasonic distance sensor to determine the distance to an object and provides feedback using LEDs and a buzzer. The sensor emits a pulse and measures the time it takes for the pulse to return, which is then converted into a distance in inches. Based on the distance, different LEDs (Red, Yellow, Green) light up, and the buzzer's volume adjusts. As the object gets closer, the buzzer becomes louder, and the LED color changes to reflect the proximity. The code continuously monitors the distance and updates the feedback every 500 milliseconds for real-time distance tracking.
Ranking 17 to 20 inches
Red LED on, buzzer at low volume.
Ranking 14 to 17 inches
Red LED on, buzzer slightly louder.
Ranking 11 to 14 inches
Green LED on, buzzer louder.
Ranking 8 to 11 inches
Green LED on, buzzer even louder.
Ranking 5 to 8 inches
Yellow LED on, buzzer at high volume.
less than 2 inches: Yellow LED on, buzzer at maximum volume.
greater than 20 inches: No LED on and print "Out of range" to the serial monitor.