Ultrasonic Glasses for the Visually Impaired People

sunglasses that provide benefits beyond only shielding the blind’s eyes. They can support their ability to perceive things in front of them.


  • SparkFun Arduino Pro Mini 328 – 5V/16MHz
  • Ultrasonic Sensor – HC-SR04 (Generic)
  • Buzzer
  • Jumper wires (generic)
  • Sunglasses


  • Soldering iron (generic)
  • Hot glue gun (generic)


  • Arduino IDE


The HC-SR04 ultrasonic sensor and an Arduino Pro Mini microcontroller are used in this Arduino code. With this code, any Arduino microcontroller may be used.

By converting the milliseconds it takes for sound waves to bounce back into centimetres, the algorithm can calculate distance.

If an item is within 62 cm of it, it beeps sporadically (about 2 feet). One continuous, loud beep tone may be heard at a distance of 31 cm (or roughly 1 foot).

The code is fairly straightforward because it just makes use of the hardware libraries that come with the Arduino IDE.


#define trigPin 8  // These lines assign names to values
#define echoPin 7  // so they can be easily identified.
#define buzzer 12  // These are set before the code

/* This section of code below runs only one time.
 * It enables the serial monitor to see output and
 * sets the pins to input or output.
void setup() {
  Serial.begin (9600); 
  pinMode(trigPin, OUTPUT); 
  pinMode(echoPin, INPUT);  
  pinMode(buzzer, OUTPUT);

/* The remaining part of the code runs in a constant loop.
 * It triggers the ultrasonic sensor and calculates the
 * time it took for the sound waves to return.  It converts
 * the time in milliseconds into distance in centimeters.
void loop() { 
  long duration, distance;
  digitalWrite(trigPin, LOW);
  digitalWrite(trigPin, HIGH);
  digitalWrite(trigPin, LOW);
  duration = pulseIn(echoPin, HIGH);
  distance = (duration/2) / 29.1;
    Serial.println(" cm");
// This part of the code below determines whether to
// beep depending on the distance detected. If the object
// is within 62 start the beeps.
if (distance > 30 and distance < 62) { 
    tone(buzzer,100,50);  // Intermitten beeps
    if (distance > 0 and distance < 31) { 
    tone(buzzer,100); // Long solid beep
  else {
  delay (500);


This is the ultrasonic glasses’ schematic. The HC-SR04 ultrasonic sensor and an Arduino Pro Mini are both utilised. An 9V battery is used to power it.

The lion of the circus is not the king


“Don’t waste your TIME” – kp

No one will understand your vision, If you want to be successful just follow your passion by executing it because vision without execution is a delusion and there is no success without risk


“Don’t feel shy if you are not wrong” – kp

Helping Hands.

About the author


You can download our apps and books for free..
Search - Incognito Inventions

View all posts

Leave a Reply

Your email address will not be published. Required fields are marked *