Build Smart Buddy Glasses that Help Blind Friends "See" with Sound
A fun, beginner-friendly DIY project using an ESP32 and an ultrasonic sensor to build wearable glasses that buzz when something is in the way — just like a bat's echolocation!
Why We're Building This
Turning Sound Into "Sight" 🔊
Blind and low-vision people often use a white cane to feel what's ahead of them. Our Smart Buddy Glasses add an extra layer of help: an ultrasonic sensor "listens" for objects in front of the wearer and gently buzzes to warn them — faster buzzes mean the object is closer! It's a friendly assistive-technology gadget you can build in an afternoon, and it teaches real robotics skills: circuits, sensors, and code, all in one project.
The Big Idea
How Do the Glasses "See"?
Three simple parts work together, just like your eyes, brain, and hands do.
1. The Ears — Ultrasonic Sensor
Sends out a sound "chirp" too high for us to hear, then times how long the echo takes to bounce back — just like a bat!
2. The Brain — ESP32
A tiny, powerful microcontroller that reads the sensor's data and decides: "Is this object close? Time to warn my friend!"
3. The Voice — Buzzer & Motor
Buzzes and vibrates gently to alert the wearer — the closer the object, the quicker the buzzes come.
Gather Your Gear
What You'll Need 🧰
Most parts cost just a few dollars and are reusable in future robotics projects too.
- 🔷ESP32 Dev BoardThe brain of our project
- 📡HC-SR04 Ultrasonic SensorMeasures distance with sound
- 📳Mini Vibration MotorGives a gentle buzz alert
- 🔔Small Piezo BuzzerAdds a soft sound alert
- 🕶️Old Sunglasses or FrameThe base for mounting parts
- 🔋Small Power Bank or 3.7V BatteryPowers the glasses on the go
- 🔌Jumper WiresConnects everything together
- 🧵Hot Glue or Velcro TapeAttaches parts to the frame
Safety First, Grown-Ups Needed!
- Build and solder with an adult — some steps use heat and small parts.
- This is a fun learning prototype, not a certified medical device. It should never replace a white cane, guide dog, or professional mobility training.
- Keep batteries away from water and never leave them charging unattended.
- Test the glasses somewhere safe (like a living room) before trying them outdoors.
Wire It Up
The Circuit Diagram 🔌
Here's how the sensor, buzzer, and vibration motor connect to the ESP32. Color-coded wires make it easy to follow!
| Part | Pin | Connects to ESP32 |
|---|---|---|
| HC-SR04 | VCC | 3V3 |
| HC-SR04 | GND | GND |
| HC-SR04 | Trig | GPIO 5 |
| HC-SR04 | Echo | GPIO 18 |
| Buzzer | Signal (+) | GPIO 4 |
| Vibration Motor | Signal (+) | GPIO 2 |
Let's Build!
Step-by-Step Instructions 🛠️
-
1
Set up your workspace
Grab an adult helper, lay out all your parts on a clean table, and put on safety glasses if soldering.
-
2
Connect the ultrasonic sensor
Wire the HC-SR04's VCC, GND, Trig, and Echo pins to the ESP32 as shown in the circuit diagram above.
-
3
Add the buzzer and vibration motor
Connect the buzzer's signal wire to GPIO 4 and the vibration motor's signal wire to GPIO 2. Connect their other leg to GND.
-
4
Double-check every wire
Loose wires are the #1 cause of "it's not working!" Gently tug each connection to make sure it's snug.
-
5
Install the Arduino IDE
Download the free Arduino IDE, then add ESP32 board support through the Boards Manager (search "esp32").
-
6
Upload the code
Copy the sketch below into the Arduino IDE, select your ESP32 board and port, then click Upload.
-
7
Test on the table first
Wave your hand in front of the sensor. You should feel the buzz get faster as your hand gets closer!
-
8
Mount everything on the glasses
Use hot glue or velcro to attach the sensor to the bridge of the frame and the ESP32 + battery to the side arm or a small pouch.
Program the Brain
The Arduino Code 💻
This sketch measures distance with the ultrasonic sensor and buzzes faster the closer an object gets. Copy it into the Arduino IDE.
// Smart Buddy Glasses — obstacle alert for ESP32 #define TRIG_PIN 5 #define ECHO_PIN 18 #define BUZZER_PIN 4 #define MOTOR_PIN 2 #define ALERT_DISTANCE_CM 80 // start warning within 80cm long duration; int distanceCm; void setup() { Serial.begin(115200); pinMode(TRIG_PIN, OUTPUT); pinMode(ECHO_PIN, INPUT); pinMode(BUZZER_PIN, OUTPUT); pinMode(MOTOR_PIN, OUTPUT); } void loop() { distanceCm = readDistanceCm(); Serial.print("Distance: "); Serial.print(distanceCm); Serial.println(" cm"); if (distanceCm > 0 && distanceCm < ALERT_DISTANCE_CM) { // closer object = shorter beep gap = faster buzzing int gapMs = map(distanceCm, 0, ALERT_DISTANCE_CM, 60, 400); gapMs = constrain(gapMs, 60, 400); digitalWrite(BUZZER_PIN, HIGH); digitalWrite(MOTOR_PIN, HIGH); delay(gapMs); digitalWrite(BUZZER_PIN, LOW); digitalWrite(MOTOR_PIN, LOW); delay(gapMs); } else { digitalWrite(BUZZER_PIN, LOW); digitalWrite(MOTOR_PIN, LOW); delay(80); } } int readDistanceCm() { digitalWrite(TRIG_PIN, LOW); delayMicroseconds(2); digitalWrite(TRIG_PIN, HIGH); delayMicroseconds(10); digitalWrite(TRIG_PIN, LOW); duration = pulseIn(ECHO_PIN, HIGH, 30000); // 30ms timeout if (duration == 0) return -1; // no echo received return duration * 0.034 / 2; // speed of sound math }
Did You Know?
Bats use echolocation to "see" in total darkness, sending out clicks up to 200 times per second. Your Smart Buddy Glasses use the exact same trick — just with electronics instead of a bat's voice box!
Level Up
Make It Even Smarter 🚀
Add a Second Sensor
Mount one sensor on each side to detect objects on the left and right, not just straight ahead.
Add Voice Alerts
Use a small speaker and a text-to-speech module so the glasses can say "object ahead" out loud.
Add Wi-Fi Alerts
Since ESP32 has built-in Wi-Fi, send a notification to a caregiver's phone when an object is very close.
Questions & Answers
Smart Buddy Glasses FAQ
Can these glasses replace a white cane or guide dog?
No. This is a fun learning prototype that adds an extra layer of awareness, not a certified mobility aid. Always use trained tools and techniques alongside it.
Is the ESP32 safe for kids to use?
Yes, with adult supervision! ESP32 boards run on low, safe voltages (around 3.3V–5V), but soldering irons and batteries should always be handled with a grown-up nearby.
How far can the ultrasonic sensor detect objects?
The HC-SR04 sensor typically detects objects from about 2cm up to 400cm (4 meters) away, though our code focuses on alerts within 80cm for close obstacles.
Do I need to know how to code already?
Not at all! The code above is ready to copy and upload. As you get comfortable, try tweaking the numbers to change how sensitive the alerts are.

Comments
Post a Comment