Backstory

Have you ever seen those movies where the spy is just about to reach the end of his mission when suddenly - BOOM - motion tracking turrets burst onto the scene?

I'm a huge movie buff and love making hacks based off of tech in some of my favorite movies. With that as my original inspiration I wanted to create a semi-inconspicuous way to hide and deploy a safe Nerf turret to surprise my friends.

Deployment

This project originally began in December and is still currently improved but I'm really proud of how far its gotten so far. And special thanks to some amazing friends and developers who contribute to the open source community for providing loads of guidance throughout the development process! Hopefully we can help build on this fun project to further inspire more Alexa-enabled entertaining IoT hacks!

Full Deployment

Quick Overview:

There are four main parts of this build: the box, the Nerf turrent modifications, the gimbal, and the alexa integration. I am using the gimbal that was originally designed by Hacker-House for their airsoft gun.

Step 1: Building the Box

1 / 2 • Box Dimensions and Together

Assembling the box was one of the easier parts of this overall project. I used 1/4 inch pine wood that I found at Home Depot for pretty cheap. Follow the first two pictures and the blurb below for dimensions of the box pieces. You can also look at the attached .3mf/.stl files for a more detailed inspection.

'green' Side pieces: 20" x 16"

'yellow' Top piece: 48" x 16.5"

'red' Bottom piece: 48" x 16.5"

'black' Back piece: 48" x 20"

'white' Door piece: 48" x 21.5"

**IMPORTANT NOTE: I'm going to be referring to these pieces by their corresponding color names (white piece == the door) through the remainder of the instructions!**

**OPTIONAL: I spraypainted the different pieces before assembly, it's not necessary but have fun with the project and go with your own unique color scheme!**

When it came to drilling the wood together I used a combination of 1" wood screws and .5" nails. I also added a dot of wood glue on all my wood screws when securing the pieces, for added sturdiness. Refer to the pictures and the .3mf/stl files included for the placement of the wood to create the box. You are going to have to drill in all the pieces into each other EXCEPT FOR THE WHITE DOOR PIECE. The white piece is going to be our deployment door that will swing open with the Nerf gun gimbal on it so it needs to be attached with hinges as I will discuss later.

1 / 4 • Black piece is in between both the yellow and the red pieces.

In order to attach the 'white' door we are going to be using a combination of hinges (to control the flow), and nylon string+small cabinet hydraulic cylinders to deal with the weight distribution upon deployment.

For the hinges I used .25" wood screws and attached them in between the red and white pieces with a dab on wood glue on the screws as seen in the images below. To attach the nylon string drill the fish eye hooks into both the 'white' door and the 'green' side pieces. Attach two expansion springs to the fish eye hooks on the 'green' side pieces. Then while the door is in its deployed 'open' state attach nylon string from the fish eye hooks on the side of the 'white' door to the expansion springs now on the 'green' sides. After finishing that also attach the hydraulic cylinders.

1 / 4 • How an attached hinge with wood glue looks

Finally place about 36" x 18" x 4" of memory foam in the center of the red piece. This is for the Nerf gun to rest on when the box is in its closed position.

memory foam

Step 2: Prep the Nerf Gun

In order to have the nerf gun capable of firing rounds and toggling its lazer targeting mechanism we are going to have to make one single cut into the nerf gun. Special thanks to alecnotalex for figuring out how to do this. Follow the images below and their corresponding captains for his simple instructions on how to both deconstruct and solder leads for the relay

1 / 8 • In order to do this mod, you must open up Nerf Vulcan. It would be a pain to open up the whole gun, so you need to make just one cut. This will allow you to open up just specific region of the gun. Begin by marking the region of the gun you are going to cut. (See second picture) Then use what ever method you would like to cut along the line to the spot where both sides of the gun meet. There are many methods of doing this. I just used a saw. Choose you method of cutting, and slice it down the line.

Next we have to do a similar process to attach the relay for the laser. This is much simpler then for the nerf gun itself. Unscrew the lazer module, desolder the on/off switch and solder two wires to the exposed wires for the relay and then attach that relay to #24 on the Arduino Motor HAT.

Step 3: Building the Gimbal

I based my gimbal off of Hacker-House's gimbal + OpenCV design. They did a AMAZING job not only making these original designs but also providing a walk through YouTube video on how to assemble the gimbal. Instead of repeating these instructions here I recommend that you watch 0:00-22:04 of their walkthrough video on how to make the gimbal. HOWEVER MAKE THE FOLLOWING ADJUSTMENTS FOR THE NERF VULCAN BUILD:

The base of the gimbal needs to have a minimum diameter of 12"

Use 1/4 inch wood

Use Nema 17 5:1 Stepper Motors (we need these to gain the required torq to move the heavy Nerf Vulcan

Use custom flange collars to fit the Nema 17 5:1 Stepper Motors which can be found here .

I drilled my flange collar and flange shaft into the Nerf Vulcan using .25" screws instead of using double sided tape.

Here are a few images that might help you put things in perspective for the Hacker-House's gimbal modifications.

1 / 3 • Custom Flange collar

Step 4: Attaching the Servo/Locking Mechanism

Attach the bolt lock to the center of the top yellow piece as shown in the image below. Then cut a hole big enough for the servo and place adjacent to the bolt lock. I then used a spare zip-tie and a nail to attach the bolt on the lock to the servo. Make sure the bolt can freely open and close with the rotation of the servo.

Then close the box and mark where the bolt lock reaches on the white door. Attach the end of the bolt lock there.

1 / 3 • End of Bolt Lock attached on 'white' door

Make sure you then wire the servo into the raspberry pi according to the schematic at the bottom of these instructions. In order to not have free floating wires that could get caught and pulled on during the deployment of the Nerf turret - I used these wire guides that I 3D printed.

Step 5: Software Install

Shh into your Raspberry Pi 3 and make sure it is updated.

sudo apt-get update

Install the necessary libraries

pip install python-firebase pip install requests sudo pip install git+https://github.com/adafruit/Adafruit-Motor-HAT-Python-Library

Setup I2C on your Raspberry Pi: https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c

Install OpenCV 3. Follow all steps for python 2.7 instructions

http://www.pyimagesearch.com/2016/04/18/install-guide-raspberry-pi-3-raspbian-jessie-opencv-3/

Make sure to create your virtual environment with the extra flag.

mkvirtualenv cv --system-site-packages -p python2

Source your bash profile

source ~/.profile

Activate your virtual environment

workon cv

Now you are ready to clone the repo on the Raspberry Pi

cd ~ git clone https://github.com/QuodCertamine/Project-Icarus.git

Then follow the following instructions to take the icarus.service file and enable it with systemd https://www.raspberrypi-spy.co.uk/2015/10/how-to-autorun-a-python-script-on-boot-using-systemd/

After setting up the service file your Raspberry Pi should automatically start Project Icarus on boot.

Step 6: Alexa Integration

Go to the alexa directory and install node dependencies.

cd alexa-icarus npm install

Go to firebase and set up a firebase application. Follow these instructions to obtain your firebase-admin service account key Save the downloaded file to serviceAccountKey.json in the alexa-icarus folder of this project Save all items in the folder as a .zip file.

Follow the following instructions from Amazon to set up your own Lambda service and nodejs skill:https://developer.amazon.com/alexa-skills-kit/alexa-skill-quick-start-tutorial Load the .zip file into your lambda service

Add the following command configurations to your Alexa skill in the Alexa skill developer portal

You also have to create a config.json file for the python authentication of firebase config.json

{ secret: "", email: "email@gmail.com" }

Different Alexa Commands Supported:

"Alexa launch Project Icarus" "Activate defense protocol alpha" "Activate security" "Protect me" "Activate defense protocol beta" "Lock" "Stop"

Step 7: Mounting on the Wall

At this point the entire structure should weigh about 30 pounds. In order to not have a 30 pound object falling off your wall be patient and take your time to get mounting done right.

timelapse video

Find where the studs are located in your wall and mark them correctly. Then, measuring 4' off the ground - drill and mount the four mounting triangles into those studs spaced at about 12-16 inches apart. Then, with a friend, lift and place the box on top of the mounting triangles. Finally drill up into the 'red' bottom piece from the mounting triangles to secure the structure.