People are social distancing these days… for reasons you’ve probably heard about once or twice. According to YouTube hacker “Sciencish,” however, there’s a kid in his neighborhood that doesn’t stay away from people as he should. How to deal with this is an interesting conundrum of our present times, so Sciencish — of course — turned to technology, and created an automated cannon to launch Nerf darts at anyone that gets too close.
This new device uses a backback-mounted webcam to recognize faces, calculating head sizes to estimate the distance to others. If someone comes with six feet, it shines a yellow LED as a warning; if they continue to encroach into his personal space, a red light illuminates, followed by a Nerf dart attack if that person doesn’t quickly step back. The turret is designed to fit on GoPro accessories, allowing for multiple mounting positions as needed.
An Arduino Uno moves the turret in the horizontal and vertical directions using a pair of stepper motors, while solenoid-actuated pneumatic system does the firing. All of this is stuffed into a backpack with a 12V battery, along with a laptop that gets info from the camera and processes it via Python and OpenCV. Communication between the computer and Arduino is over serial, and there’s also an emergency cutoff switch... just in case.
You can see it demonstrated in the first video below, and more info on its earlier iteration as a simple "face shooter" is in the second clip.