This instructable was created in fulfillment of the project requirement
of the Makecourse at the University of South Florida (www.makecourse.com)
This is my Foam Automated Defense Turret. It was designed as a stationary turret with a proximity sensor, which when tripped, will fire excessive amounts of Nerf darts at the intruder. It is made using an Arduino Uno board, a 3D printed component housing, various electronic components (see materials below), and salvaged parts from a Nerf Rapidstrike. It is a fun project to make for guaranteeing your roommates/ little sister/ various other people do not go where they shouldn't.
Step 1: Materials
Step 2: Nerf Dissassembly
Remove all screws holding the blaster together. Doesn't matter what happens to them we don't need them. There is a black wire that is holding the two sides together. Cut it, we will be cutting plenty of more wires. Now that it is open, what we need is the flywheel cage, the pusher cage, and the clip holder. The flywheel cage looks like the first image, followed by the pusher cage, and lastly the clip holder. This last piece will hold the clip we are using in much more snugly than anything 3D printed could. Everything else you can toss or use for other projects, we don't need it. Also desolder the resistors from the motors, they are used to keep children safe, we are not concerned about that here.
Step 3: Creating 3D model
The files for the housing is attached. Variations in the parts will require tweaking of the components, but overall this will line up all the parts so that you can make your project. This print will come out with a few supports created by the printer for stability during the print, remove these with extreme bias (but do not break the housing, it's a large print and you don't want to print another one.) Sand as you feel necessary for a smooth product. My project was in white, but any color is a valid option, as is painting so that the 3D printed product and the electronics box match, but make sure to use paints for plastic.
Step 4: Wiring
This is the most complicated step, as there are a lot of components and a lot of wires coming off of the components. Sample drawings of the circuit diagram for the motor switch and LEDs are included (sorry for the bad handwriting/ sketches) to give an idea of how these work. The resistor in the motor diagram leads to your input pin for the Arduino. The rest of the components are straight forward to connect and are largely independent of each other. Hook up the proximity sensor with 1 wire to the GND line on the breadboard, 1 to the 5V line, and then two input pins. The buzzer is simply uses an input pin and a GND wire. Make two of the LED circuits, 1 for the red and green LEDs. Two of the motor circuits must be set up, simply replace the 5V and GND leads with the positive and negative terminals of your battery, (but also make sure to have the negative wire connect to GND as well, otherwise it will not fire. The touch sensor is rather easy, just connect it to 5V, GND, and pin 2 (the interrupt pin.) Have all of the input pins connected to the pin that is programmed in the Arduino sketch.
WARNING: The transistors used in this application really are not suited for this strong of a battery. Running the motors too long, or shorting the circuit because of how poorly the jumpers stay in the breadboard (I'm guilty of both) will lead you to burning out your transistor and having to replace it. This is obviously not ideal, and it will smoke and smell very bad. I plan on replacing these with MOSFETs in the future, but was limited by time. Another option is to use a smaller battery. Note the Arduino cannot provide enough current for these motors, so that isn't an option.
Step 5: Programming
The Arduino sketches have been attached and are fully commented. You must also use the library for the Proximity sensor, which is attached. Simply put all of the proximity sensor code in the library folder of your Arduino compiling software, (to find this, google "adding libraries in the Arduino IDE." It is slightly different for Windows and Mac) Uploading this to Arduino should finish the project. Simply hook up the Arduino, turn it on, and have fun shooting your friends for going places they are not supposed to! :)