Project Blog Part 2 : Binaural Sensor Glasses (SonicScape) - Adding Bluetooth functionalities
- Pawit Kochakarn
- Jul 2, 2017
- 3 min read

After my last project blog post, which you can read right here , I discussed the beginnings of my Binaural Vision Glasses for the blind project. That included coding up the basic Arduino Uno boards equipped with the MP3 player shields and hardwired to some Beats Headphones. Some time has passed now, and that meant writing about what I have been up to with this device and what I have done to maybe improve it. Let's start with an experiment I did which turned out to not be so successful after all but nevertheless provided great insight on how far I can push the functionalities of these glasses and possibly learn from this minor setback.
Part 2: Sending Ultrasonic Distance Data to Arduino via Bluetooth modules
The idea for this came from when I tried to get find a way to get around the problem of having long wires connecting the bluetooth mounted on the glasses to the Arduino boards which I have planned for the blind user to store in their rucksacks behind them. The long wires may be a pain for the user when using in real life and so by making the glasses separate from the main circuitry, we can boost its portability and wireless functionality. In order to achieve, I have decided on using a HC-05/HC-06 master-slave bluetooth system where the HC-05 acts as a master module (connected to the HC-SR04 sensor), which sends distance data wirelessly to the HC-06 (connected to the Arduino board), which reads it.

From the here, we can see that one Arduino board is being connected to the HC-SR04 and the HC-05 , while another is connected to the HC-06. I have taken the schematic wiring from Martyn Currey's website, which is shown below. He writes really cool stuff about Arduino on his website, so you should check him out by clicking here.

Before I write more about this, proper connection between the two Bluetooth modules must first be made. To save space, you can read off on Martyn's website on how to do that, since I followed his instructions on his post to do that for my project. The link to that post is here.
From this point on, I uploaded two pieces of code to each Arduino board. One was the master code which reads the ultrasonic sensor and writes the distance through the serial port. The other was the slave code in which tells the HC-06 to read data sent from the HC-05 through the other Arduino's serial port. Here is the code for the master/slave module respectively.
Master Code Slave Code
This basic installation of the bluetooth modules and HC-SR04 worked completely fine but problems started to arise when I started to interface it with the MP3 shield and the whole device...
Why Bluetooth Interfacing of HC-SR04 to SonicScape didn't work
When I started adding in all the code for the audio part of my device to the main slave code of the Arduino, I started experiencing major lagging between receiving distance data and when the audio beeps actually get generated and heard. This would mean that if there is a fast moving object coming towards to user, it would take at least 5 seconds for the user to hear a change in beep delay and thus means that it would be too late for a response. This is a major health hazard and even though the bluetooth functionality sounded cool at first, it is not quite practical in real life. I managed to scour the Internet to find reasons why this didn't work and why the whole process wasn't as instantaneous as I predicted. What I managed to find was that the 5V power source of the Arduino wasn't enough to send/receive distance data and generate the corresponding audio. Since the instantaneous process that I originally thought of was quite power-hungry, this was not viable in practice due to power limitations. That means having to stick to hardwiring the HC-SR04 to the Arduino's.
Stay tuned for the next post to see if there has been any improvements that I have made to SonicScape.
Comments