Introduction: Sound Ranging for the Visually Impaired Using Arduino Prototype Design Concept

This was my idea for a device that would assist the visually impaired using an ultra-sonic ranging sensor mounted on a hat.  Basically the concept is that the device would tone out distances for a visually impaired person allowing them to essentially see with their ears.  The Utlra-sonic sensor sends out a ping and based on the time it takes to receive the ping back, can calculate distances of nearby objects/ surfaces.  The Arduino translates this distances into distinguishable audio tones variations.  Different tones indicate different distances, a fast stacatto tone indicates an object is very near where as a single short burst high tone indicates a greater distance to an object. 

Step 1:

Basically the unit consists of an Ultrasonic Sensor, and Arduino Uno, and a piezo buzzer.  To start I used an old headlamp band and created a flat surface to mount the prototype housing on.   Next I mounted the battery and Arduino in an old project case.  I drilled all holes with a cordless dremel, mounted the Uno and Battery inside the project case.  With the Ultrasonic Sensor, I soldered this to a small bread board and mounted the board to a paper holder which fits nicely on the brim of my hat!

Parts List:
1 x Arduino Uno
1 x Ultrasonic Sensor and library (
1 x Piezo Buzzer
1 x 9 volt batter with Arduino Connector

Step 2: Tone Demonstration and Source Code

//Vcc to 5 volt +
//Trig to pin 12
//Echo to pin 13
//Grd to Grd
//Piezo to pin 9
//GRD to GRD

#include "Ultrasonic.h"
Ultrasonic ultrasonic(12,13);  //12,13 are pin assignements
int buzzPin = 9;  // positive connection of the piezo
int delay1 = 25; 
void setup() {


void loop()
  Serial.print("cm     :");

  if(ultrasonic.Ranging(CM) > 0 && ultrasonic.Ranging(CM) <= 5)
   { tone(buzzPin, 100 ,100); delay(100);}
  if(ultrasonic.Ranging(CM) > 5 && ultrasonic.Ranging(CM) <= 10)
   {tone(buzzPin, 100 ,100); delay(100);}
  if(ultrasonic.Ranging(CM) > 10 && ultrasonic.Ranging(CM) <= 20)
   {tone(buzzPin, 15 ,100); delay(50);}
  if(ultrasonic.Ranging(CM) > 20 && ultrasonic.Ranging(CM) <= 30)
   {tone(buzzPin, 14 ,100); delay(50);}
  if(ultrasonic.Ranging(CM) > 30 && ultrasonic.Ranging(CM) <= 40)
   {tone(buzzPin, 13 ,100); delay(50);}

  if(ultrasonic.Ranging(CM) > 40 && ultrasonic.Ranging(CM) <= 60)
   {tone(buzzPin, 12 ,100); delay(50);}
  if(ultrasonic.Ranging(CM) > 60 && ultrasonic.Ranging(CM) <= 90)
   {tone(buzzPin, 11 ,100); delay(050);}
  if(ultrasonic.Ranging(CM) > 90 && ultrasonic.Ranging(CM) <= 120)
   {tone(buzzPin, 10 ,100); delay(50);}
  if(ultrasonic.Ranging(CM) > 120 && ultrasonic.Ranging(CM) <= 200)
   {tone(buzzPin, 9 ,100); delay(50);}
  if(ultrasonic.Ranging(CM) > 120 && ultrasonic.Ranging(CM) <= 200)
   {tone(buzzPin, 8 ,150); delay(50);}
  if(ultrasonic.Ranging(CM) > 200 && ultrasonic.Ranging(CM) <= 300)
   {tone(buzzPin, 9000 ,150); delay(50);}


Step 3: Limitations and Design Improvements

Of course this being a prototype, there are some lacking areas.  First off size is a major issue, no one likes walking around with 10 pounds of electronics on their hat.  Ideally this unit would be programmed on an ATTiny and be small enough to clip on to a shirt collar.  Perhaps it could be incorporated into a pair of sunglasses.  Also, a push button in a person's pocket would allow them to 'Tone on Demand' reducing the constant tone.  Finally an ear-bud audio device as opposed to a piezo buzzer would allow for more discrete toning.