Sonar Sensor For Smart Phones

Welcome to Sonar Simple.

The code in the is repo contains the software that implements the sonar sensor for smart phones.

Click below to watch a video demo of the system

Smartphone Sonar Ranging

Video demo

Currently we only tested the system the following platforms:

We have updated the repository so that it contains the apk file. If you would like to quickly test the application you don't have to download the entire repository and compile it. You can simply click on the link below.

Download APK

Since there is so much diversity among the sound interfaces of android devices we would like to know if you were able to get it working on your device so that we can add it to list of compatible devices.

Increasing the duration of the pulse will help increase the accuracy of the system. You can change the pulse during by editing the code.


Question: I get a flat line when I take a measurement.

Answer: I am not sure why this is but it may be because the hard code value for the noise threshold for determining the starting section of the raw signal is be too high for the device. This noise threshold was tuned for the nexus 4. The noise threshold for the signal can be adjusted in the code.

Question: Does cupping the phone as shown in the video help to improve accuracy.

Answer: We have found that cupping the phone without blocking the microphone does help to improve accuracy.