Proximity detection Glasses for Visually Impaired Peoples
I made very stylish glasses that have the ability to help visually impaired users to be able to walk more safely. The glasses detect if there are any objects in proximity to the user, such as branches or any overhanging obstacles, that could not be detected with a cane on the ground. The glasses then make a buzzing noise depending on the proximity of the object, warning the user of its presence.
Lucas
6/7/20242 min read
I was thinking of projects that I could make with a small infrared rangefinder, when I came up with this idea. A pair of glasses for visually impaired users that could detect overhanging obstacles that could not be noticed by a cane. I quickly found a pair of stylish (fake) Louis Vuitton sunglasses and got to work.
The Design
Materials:
Arduino Mini (or any arduino)
SHARP 2Y0A02 IR Sensor
Piezo buzzer
Jumper wires
The Arduino acts as the brains, controlling all of the parts from input (the sensor) to output (the buzzer). We will connect all the components to it.
The IR sensor should have red, black and yellow wires. These are the positive, negative (ground), and signal wires respectively. Connect the red wire to any 5 volt pin on the Arduino, then connect the ground to any GND pin. The signal wire can connect to any of the analogue in ports, but for this example, I connected it to analogue port 0 (A0).
For the buzzer, locate the positive and negative legs and wire the negative to GND. The positive can also go to any pwn port, for this example I connected it to data port 3 (D3).
The Code
In the Arduino IDE you must download the library SharpIR by searching for it in the library manager. This library will interpret signals from the IR sensor and turn it into distance data.
Next, start a new sketch and start by including the library SharpIR. This will tell the program that you will be using the library and it will be compiled into the Arduino along with the code.
Next you will define the port you are using for the sensor (A0) and the model of the sensor (20150). I then set a variable, maxDis, to represent the maximum distance the buzzer will alert. Then use the method SharpIR to define your model and location on board
In the loop, begin with a delay of 100ms then set a variable, dis, to equal SharpIR.distance, or the distance the SharpIR library detects. Then I made a condition, if the distance is less than the max distance, continue through the code. Later I used the tone method to send a frequency to a port. I set the port to 3, the buzzer, and set the frequency to 1000hz - the distance x 5. I found that this function sounded the best in order to make the distance have a noticeable change in pitch. I then set a delay of time dis to make the interval between beeps correlate to the distance.
Then simply hit send code and you should be good!
#include <SharpIR.h>
#define ir A0
#define model 20150
int maxDis = 100;
SharpIR SharpIR(ir, model);
void setup() {
}
void loop() {
delay(100);
int dis=SharpIR.distance();
if(dis < maxDis){
tone(3, 1000-(dis*5));
delay(dis);
noTone(3);
}
}