Simple Obstacle Detection Project for Blind Person With Detection Turn-off Button
by alaminashik in Circuits > Arduino
833 Views, 3 Favorites, 0 Comments
Simple Obstacle Detection Project for Blind Person With Detection Turn-off Button
This simple project uses SC-HR04 sonar sensor to detect obstacles at the front and send a signal to the vibration motor. The processing is done by an Arduino pro micro and powered by a lithium cell. If there is any obstacle at less than 30cm range the vibrator would turn on. This ensures quiet feedback. All the electronics are mounted on the spectacle's frame.
A special feature of this project is that the detection mode can be controlled via a single button. It works in the following way:
If you are talking to a person who stood very close to you, the motor would continue vibrating which can be a lot annoying; so to control it you can:
- Single press the button: This would temporarily shut down the vibration. The detection is turned on automatically when there is nothing at the front.
- Double press the button: This would completely shut down the vibration and stops any detection. To turn it back on, double-press the button again.
Supplies
Theory
I won't go much into the theories. It basically detects by sending a pulse of ultrasound (freq > 20kHz) and measures the time delay between sending and receiving the pulse. By doing some simple calculation it measure the distance.
The sensors are tilted slightly before mounting on the sunglass to ensure proper detection. I made some tests before securing the sensors firmly using hot glue.
To learn more about how this topic checkout this link at instructable
Detach the Sonar Sensors
I used a soldering iron to remove the sensors. Then I soldered wires for extending the connection.
Circuit Diagram
Upload the Code and Test
Explanations of the code are added as a comment after each line of the code but the basic theory is:
- At first variables and constants are declared to store different pin numbers and values for usage in the later part
- A library "onebutton.h" is also added for detecting double press
- In void setup the inputs and outputs pin are declared.
- in the void loop the code triggers and measures the distance. The distance is then put in a condition to check if the distance is less than 30 cm. Before sending signal to the vibrator, the code checks whether the button is pressed or not.
- The last part of the code checks whether the button is pressed twice and changes a variable 'y'
You can download code from below link.
Downloads
Build the Device
Complete!
I built this project back in 2019 and it received much attention. We even got featured by a TV channel! :)