Ultrasonic guidance system for blind grand daughter

Recently I listened to an interview discussing tecnologies that assist the blind to "see" their surroundings.
The concept that came into mind was a wand, flashlight shaped device that would emit and recieve ultra sonic sound(very common sensor) and interpolate the sound recieved into a lower frequency that would be transmitted to the user via earbuds or headphones. the sound would be interpolated into frequencys depending on distance but would also be textural such as static noise from an object such as a bush or clean notes from a smooth hard surface and would also be stereo multi dimensional. I don't know if such a device exists in the form I have described. Somewhat new to the Arduino world and so my learning curve for this project would be extremely steep. Any suggestions as to design, sensor selection or sound interpolation strategies would be appreciated.
Thank you.

The commonly-available ultrasonic sensors are usually quite limited in range. I imagine the blind person needs at least 2m range, maybe more. The minimum detectable range may also be a problem. If you can find a sensor with the desired range then check the power consumption to see how much battery you will need.

Really like the idea! Ultrasonic can be used even up to 3m. U can make it more directional by reducing the beam width of the transmitter.

For audio I just saw a previous post ref this shield...Adafruit Wave Shield for Arduino Kit [v1.1] : ID 94 : $22.00 : Adafruit Industries, Unique & fun DIY electronics and kits

Keep us posted

Thank you for your replies! I think if I were to have a high power ultrasonic emitter placed in the center of a focusing cone and 2 recievers, one located on either side, I could take the recieved sound and "frequency shift?" to a lower range more suitable to human levels. The sound could probably be unprocessed at the lower frequency and the user would learn to interpret their surroundings with it. Most sheilds etc. seem to feed back distance only information so I think I would be looking for a ultrasonic sound emitter and 2 recievers.
?

IR distance sensors.
http://www.prutchi.com/2012/02/12/sharkvision-a-sensing-suit-for-the-blind-by-hannah-prutchi/
Leo..

An ultrasonic guidance system for the blind was published in Circuit Cellar magazine November 2014, by a couple of engineering students.

It used a handheld ultrasonic wand, connected to a headband with small vibrators to guide the wearer. The code and design files are available on line.

I've been watching Covert Affairs on Amazon recently, the blind guy in the office uses what looks like a green laser pointer waving in front of him, chest level, instead of a cane. Not explained how it provides feedback.

Thank you for the links! the systems seem to use motor vibration as the method of communication. I propose more of stereophonic sound feedback through headphones or earbuds to communicate sensed objects, locations and distances. I'm not sure the arduino would be suited to the sound processing requirement or if a simpler amplifier/frequency shifting circuit would be more workable.
Found this site interesting Bat detector frequency converters.

I suppose a blind person's hearing is super tuned, and should not be removed with headphones.
Vibration is not interfering with anything, so maybe a better choice.
A vibration motor in a short cane/remote could work.
Every old/broken cellphone should have such a motor inside.
Watch this.

Leo..

KISS. :grinning:

Textural information may not be as readily conveyed by vibration as by sound (though it may not be far off).

Hearing covers many octaves.

Stereophonic information is not so easy to encode, and ultrasonic transducers work best with a narrow field. Manual scanning will be the most practical - like a cane - and a single earphone would minimally impede other hearing cues. (Only the user wants to hear the tone.)

The simplest approach is to "ping" each time an echo is received. This sets up an oscillation whose frequency is inversely proportional to the distance which is exactly what you want, and so simple. A "baseline" oscillator - reset by received echoes as the next ping is triggered - gets the system started. A pushbutton for enabling the device.

Textural information will be conveyed by fluctuations in the tone.

And - you don't need an Arduino!

Is this of interest?

The lidar looks promising. I think with a flashlight shaped device with a pushbutton as well as a GPS module. It could work in 2 different modes, one would explore and area or path with distance detail of obstructions and the other would give polar direction or trail direction. I think the vibration feedback would be simpler than the sound feedback. I looked a some sort of a dual superheterodyne radio system but I think it would be beond me to adapt ultrasonic reflection sound to a lower frequency in stereo. Thanks for the input!

I had some stuff from a kit I had purchased which included a HC-SR04 ultrasonic and a passive buzer. I cobbled together this sketch but I need to invert the frequency to the buzzer and the sability seems to be erratic.
Suggestions?

const int TrigPin = 2;
const int EchoPin = 3;
int passiveBuzPin = 7;
float cm;
void setup()
{
Serial.begin(9600);
pinMode(TrigPin, OUTPUT);
pinMode(EchoPin, INPUT);

}
void loop()
{
digitalWrite(TrigPin, LOW); //Low high and low level take a short time to TrigPin pulse
delayMicroseconds(2);
digitalWrite(TrigPin, HIGH);
delayMicroseconds(10);
digitalWrite(TrigPin, LOW);

cm = pulseIn(EchoPin, HIGH) / 58.0; //Echo time conversion into cm
cm = (int(cm * 100.0)) / 100.0; //Keep two decimal places
Serial.print(cm);
Serial.print("cm");
Serial.println();
tone(passiveBuzPin,cm*10+500,150);
delay(150);
}

14AWG:
Suggestions?

One problem might be the call of "pulseIn(EchoPin, HIGH)".

Reason: By default pulseIn() will wait up to one second if no echo pulse is recognized (echo lost, out of range). In one second, the sound is travelling about 333 meters, and that is much beyond the range of the sensor. So you don't need to wait that long if the ping echo is missing.

You can give the number of microseconds to wait as a third parameter. I'd say that the range of the sensor is no more than 5 meters, that is a travel of sound forth and back of 5m+5m=10m. Sound needs about 10/333= 0,03 seconds = 30 milliseconds = 30000 microseconds.

So I'd try pulseIn with a timeout parameter:

cm = pulseIn(EchoPin, HIGH, 30000) / 58.0; //Echo time conversion into cm

Perhaps it helps a little bit. At least the timing of the loop function should stabilize a bit.

Old function call:
Min distance loop runtime 0ms pulseIn + 150ms delay = 150ms
Max distance loop runtime 1000ms pulseIn + 150ms delay = 1150ms

New function call:
Min distance loop runtime 0ms pulseIn + 150ms delay = 150ms
Max distance loop runtime 30ms pulseIn + 150ms delay = 180ms

But I think it should be possible to rewrite the code and do more improvements.

What about the audible feedback?
Can you describe in words what tones you want to hear with which timing?
Do you want many tones starting and stopping - tock - tock - tock in different frequencies?
Or do you want one never ending tone changing up and down in frequency?

Thanks jurs, great input!
The sensor specs say up to 4 m range but in testing I was only able to get an effective range out to about 1.7 m.
So 3.4/333=10210 microseconds for delay?

The audible feedback should be a rising tone the nearer the object, the tone being pure for flat smooth objects and more static for objects such as a bush? This may be a sensor function. the tone should change very notably when an object such as a signpost is encountered or a near obstruction is sensed in the foreground or sensing a curb. Probably a few octave range. I should have a near constant sound for quick response. Later I hope to incorporate a momentary pushbutton to activate the device and probably a earpiece. If this works reasonably well I hope to incorporate the LIDAR type range sensor as suggested by Riva.

I have done some searches for a device like this and have found many concepts etc. in the searching but no devices specific.
14

14AWG:
The sensor specs say up to 4 m range but in testing I was only able to get an effective range out to about 1.7 m.

Only a range of 1.7 meters? That's bad!

Typically the maximum range of HC-SR04 sensors should be at 3 meters when operated like that:

  • in a quiet indoor room
  • against a wall in 3m distance in right angle

When the room is loud or the reflective thing is small, the maximum detectable distance might be shorter.

I have worked over your sketch in some way and this solution is working a bit like a Geiger counter: The speaker generates clicks:

  • big distance: only a few clicks with a low pitch
  • the smaller the distance: the more clicks are generated with increasing pitch

The current setting is for:
3.0 meters ==> 1 click per second, 100 Hz
0.1 meters ==> 10 clicks per second, 1818 Hz

const int TrigPin = 2;
const int EchoPin = 3;
const int passiveBuzPin = 7;

void setup()
{
  Serial.begin(9600);
  pinMode(TrigPin, OUTPUT);
  pinMode(EchoPin, INPUT);
}

void lowpassFilter(float input, float &filteredValue, int N) 
{
  // http://en.wikipedia.org/wiki/Low-pass_filter#Continuous-time_low-pass_filters
  // compute N such that the smoothed signal will always reach 50% of
  // the input after at most 50 samples (=50ms) at sampling time of 1 ms
  // N = 1 / (1- 2^-(1/50)) = 72.635907286
  filteredValue = (filteredValue * (N-1) + input) / N;
}


int calcFrequency(float distance)
{
  float frequency=2000;
  while (distance>0)
  {
    frequency= frequency/1.1;
    distance=distance-10;
  }
  return frequency;
}


#define PINGINTERVAL 100
unsigned long lastPingTime;
void loop()
{
  float distance;
  static float filteredDistance;
  int filterFactor=4;
  static int tockInterval=30;
  static unsigned long lastTockTime;
  if (millis()-lastPingTime>=PINGINTERVAL)
  {
    lastPingTime+= PINGINTERVAL;
    digitalWrite(TrigPin, LOW); //Low high and low level take a short time to TrigPin pulse
    delayMicroseconds(2);
    digitalWrite(TrigPin, HIGH);
    delayMicroseconds(10);
    digitalWrite(TrigPin, LOW);
    distance = pulseIn(EchoPin, HIGH, 30000) / 58.0; //Echo time conversion into cm
    if (distance<1 || distance>300) distance=300;
    lowpassFilter(distance, filteredDistance, filterFactor);
    Serial.print(distance); Serial.print(" cm\t Filtered: ");
    Serial.print(filteredDistance); Serial.print(" cm\t");
    int frequency= calcFrequency(filteredDistance);
    Serial.println(frequency);
    if (millis()-lastTockTime>=tockInterval)
    {
      lastTockTime+= tockInterval;
      tockInterval=100+3*filteredDistance;
      tone(passiveBuzPin, frequency,5);
     }
    
  }
}

This sketch is not perfect, as the clicks are not equal timed because of still using "pulseIn()" and "delay()" in the code. But if you find that interface usable for what you want, it would be possible to work it out further.

Please give it a try and let me know what you think about.

14AWG:
The audible feedback should be a rising tone the nearer the object, the tone being pure for flat smooth objects and more static for objects such as a bush?

And that is what I described in #5.

Pretty excited! What a nerd hey? I found a library called newping written by tekel. Gives such stable high power measurement on the HC-SR04! Google Code Archive - Long-term storage for Google Code Project Hosting. With this new library it makes the device great for the price.
Don't forget to set the baud rate.
Now I can get onto the sound feed back portion. Thanks Paul_B, as described! The original code seemed to give more of a realtime feedback for me so far tho. I think I am going to read some nfo on sound processing Thanks jurs.
14