Obstacle Detecting Glasses

Ask questions about projects relating to: aerodynamics or hydrodynamics, astronomy, chemistry, electricity, electronics, physics, or engineering

Moderators: kgudger, bfinio, MadelineB, Moderators

Post Reply
amyCC
Site Admin
Posts: 398
Joined: Wed Apr 01, 2020 4:02 pm
Occupation: Moderator
Project Question: *
Project Due Date: *
Project Status: Not applicable

Obstacle Detecting Glasses

Post by amyCC »

Posted on behalf of student
---------------------------------------
Hello, can I ask how I would be able to make an obstacle warning sensor glasses that has 3 sensors in total (one for the front, left, and right side)?

I've been looking for tutorials on how to make this sort of stuff ... mostly (I have found) glasses that had 1 ultrasonic sensor instead of 3.

I have a consultation tomorrow and I know you might not be able to see this email so soon, but I'm really desperate so I'm asking anyone I can.

Thank you.


[Administrator note: Related project: https://www.sciencebuddies.org/science- ... ng-glasses ]
Snehaarun
Student Expert
Posts: 26
Joined: Fri Oct 04, 2024 11:30 pm
Occupation: Student

Re: Obstacle Detecting Glasses

Post by Snehaarun »

Hi!

Assuming you are using an Arduino like the Science Buddies tutorial for this project (https://www.sciencebuddies.org/science- ... ng-glasses )…the Arduino does support multiple ultrasonic sensors (especially the Arduino Uno). You would have to connect the ECHO and TRIG pins of the three ultrasonic sensors to different digital pins.

Here’s a circuit diagram for an Arduino with two HC-SRO4 sensors (you would just have to adapt this for 3 sensors)
Circuit Diagram for 2 ultrasonic sensors
Circuit Diagram for 2 ultrasonic sensors
IMG_1689.jpeg (325.49 KiB) Viewed 6281 times


For the code, using the example code from the Science Buddies tutorial is a good place to start.

In order to adapt the code to calculate the distances detected by each ultrasonic sensor, define constant variables for each ECHO and TRIG pin for each sensor, and make sure you set each pin to HIGH and LOW accordingly. Then you can define variables/functions that calculate the distance for each sensor — to do this, calculate the duration for each sensor [pulseIn(echoPin, HIGH)], then do duration / 29 / 2. The pin for ECHO will change per sensor.

These are basic code changes you need to make, but if you need more complete code, let me know and I can help. Or if you need more help with the specific application of your project let me know as well.

These are good tutorials to follow for a circuit that has 3 sensors is linked here as well:
https://tinkercircuits.com/arduino-smar ... detection/
https://www.instructables.com/Arduino-B ... nd-People/
Last edited by Snehaarun on Mon Jan 13, 2025 11:05 pm, edited 1 time in total.
Post Reply

Return to “Grades 9-12: Physical Science”