2

(sharon) #1
SPARK

Robot that


shoots you


in the face


imply put, this is an intricately designed, far-from-
practical, over-the-top robot that shoots you in the
face. It uses a dirt-cheap Logitech webcam, three servo
motors, an Arduino, a Nerf gun, and some code from
projectsentrygun.rudolphlabs.com to track your face
and shoot it.
The robot has X-axis and Y-axis modules, mounted on a simple
wooden frame, that support and move the shooting mechanism – a
toy Nerf gun. Each axis and the trigger of the Nerf gun is controlled
by high-torque Futaba servos. A webcam mounted at the top of the
wooden frame is used to locate your face.
The servos controlling the axes and the trigger are controlled by
an Arduino that is programmed to use processing code running on
my laptop. This processing code is the brain of the computer vision
functionality of the robot. The original code aimed a paintball gun at
the chest of a person but, with a few quick modifications, I managed
to get it to aim at my face reliably.
This processing code spits out coordinates that are sent to the
Arduino, which controls all three servos to correctly position and
shoot the gun. The servos have a heavy current draw and need an
external 5 V power supply. For testing purposes, I added an external
switch with a servo controller to fire the gun.
Now, considering that I have essentially built an automated turret,
I just had to add a green laser as a sight to satisfy the stereotypes
of every futuristic weapon ever, thanks to sci-fi movies. The laser
needs 3 V, sourced from the power supply using an LM317-based
voltage regulator.
I believe in building over buying and reusing as much as possible,
and so I kept the build as inexpensive as I could. The wood is all
recycled pallet wood from a florist and the metal parts are scrap
aluminium from e-waste. I used a modified ATX power supply to
power it all with stable DC 5 V. The electronics were the only part of
the build that I did not manage to find a recycled source for.

S


By Mihir Vardhan Makingwithmihir.com

Left
Mihir’s on a mission to show that
making can be cheap and fun
Free download pdf