Social Distancing Detector

by g3holliday in Circuits > Assistive Tech

1718 Views, 6 Favorites, 0 Comments

Social Distancing Detector

Arduino_bb.jpg
P1030113.JPG

This device helps you maintain a distance of 1 meter away from people (or risk losing your hearing).

Supplies

- Arduino Uno (and supplies) - Get it here

- Protoshield (optional-I used it after I took the pictures) - Get it here

- Ultrasonic sensor - (HC-SR04) - Get it here

- Piezo buzzer - Get it here

- Jumper wires - Get them here

- Mini breadboard - Get it here

Wiring

Arduino_bb.jpg
P1030114.JPG

This step is easy, and if the diagram above doesn't work, the code has comments to help. The piezo buzzer VCC goes to digital pin 13, the trig pin goes to digital pin 6, and the echo pin goes to pin 5.

Power connections are standard.

Code

Arduino_bb.jpg

The code is here at GitHub and it is archived. If you can't get it, I'll put the code into the comments too.

Testing

P1030118.JPG

Plug your Arduino in and run the code.

Put your hand in front of the sensor. You should hear a piercing shriek. If you don't, check your wiring. Most of my problems stem from either loose wires, wires that are not fully inserted into the breadboard, or wrong wiring. The code works, and has been fine-tuned to what works for my sensor. If yours seems to be off, adjust the code to 6 ft/1 m. Good luck!

Finish!

This is a useful/fun project that can save lives. I didn't include a cover/case step or a clip for your belt, but those could be useful.

Congratulations on finishing!

Until next time,

Merry Making from g3holliday