Introduction: Nerf+Arduino= Sentry Gun

Picture of Nerf+Arduino= Sentry Gun

Have you ever got tired in a nerf war and wished you could just sit and relax for ten minutes, well with this automatic (motion-activated) sentry gun you can sit back and relax while this awesome sentry gun exterminates all the players. So stop reading this and start building this amazing project.

Step 1: Materials and Tools Required

Picture of Materials and Tools Required

Materials

  • An electric blaster (I used a Nerf Modulus)
  • Two 75 cm PVC pipes
  • Four PVC T connectors
  • Six PVC elbow connectors
  • Four PVC caps
  • One plastic hanger
  • A few pins
  • Glue
  • Electric tape
  • A piece of paper
  • A marker
  • Zip ties

Electronic Materials

  • One 6 volts battery
  • Any board that can be programmed with the Arduino software (I'm using a ChipKit Uno 32)
  • A USB cable for the Arduino
  • A power bank
  • One motion sensor
  • One micro servo
  • One 6 volts servo
  • A few female to male jumper wires
  • Some male to male jumper wires
  • Two different coloured LEDs (I'm using a red one and a green one)
  • One small breadboard

Tools

  • A candle
  • A pair of scissors
  • A glue gun
  • Pliers
  • One cutter

Step 2: Making the Base

Picture of Making the Base

Step 3: The Trigger Hook

Picture of The Trigger Hook

Step 4: Setting Up and Gluing the Servos

Picture of Setting Up and Gluing the Servos

This is the program you might need to run, to know where to glue the servo:

https://github.com/simonres/mpide/blob/master/serv...

For the program above, you will need to connect the ground of the micro servo (the brown or black cable) to the ground pin on the Arduino, the power of the servo (the red wire) to the 3 Volts pin on the Arduino, and connect the signal of the servo (the orange or white wire) to the pin number 9 on the Arduino board.

Step 5: Setting Everything Up for the Wiring

Picture of Setting Everything Up for the Wiring

Step 6: Wiring Everything Up

Picture of Wiring Everything Up

Wiring list (all connections are made with jumper wires)

  1. Connect the VCC of the motion sensor to the 5 volts pin on the Arduino, then connect the OUT of the sensor to pin 2 on the Arduino, and connect the GND of the sensor to the ground pin on the Arduino
  2. Connect the positive of the 6 volts servo to the positive on the 6 volts battery, then connect both, the ground of the servo and the ground pin on the Arduino, to the ground of the battery, and connect the signal of the servo to pin 9 on the Arduino
  3. Connect the positive of the micro servo to the 3 volts pin on the Arduino, then connect the signal of the micro servo to pin 8 on the Arduino, and connect the ground of the micro servo to the ground pin on the Arduino
  4. Connect the ground of the green LED to the ground pin on the Arduino, and connect the positive of the LED to pin 13 on the Arduino
  5. Connect the ground of the red LED to the ground pin on the Arduino, and connect the positive of the LED to pin 12 on the Arduino

*You will need to use the breadboard for all the ground connections and other connections as well.

Step 7: The Finale

You're almost done. All you need to do is open the link below, copy the the program and upload it to your Arduino and you're done!

Program: https://github.com/simonres/mpide/blob/master/Nerf...

If you liked this project, please go check the automation contest (if it's still going on) and smack the vote button.

Enjoy!

Comments

afridave (author)2016-09-22

and of course a paintball or even a real firearm could be rigged up in the same way....getting the gun to track a live moving target is a lot more complex however...

simonres (author)afridave2016-09-26

That would be cool, I could do it on a future pojec

afridave (author)simonres2016-09-26

and if you load the paintgun with paint ,solid, rubber and pepperball you can deny your opponent from entering specific areas....

afridave (author)simonres2016-09-26

i have an idea of setting up an array of sensors in front of the turret that holds the paintball gun....when the sensors are activated by movement they transmit to the turret which hones into the sensor......tracking the sensors is a lot less complicated than tracking the actual target as you know without a doubt where the sensors are .....mount the paintball gun on a rubber flexible mount so it is not to stable and not very accurate and carpet bomb the general area of the activate sensor.......very much like pre targeting an artillery barrage....

XxChrisTheCreatorxX (author)2016-07-04

So tru this is awesome

XxChrisTheCreatorxX (author)2016-07-04

So tru this is awesome

DIY Hacks and How Tos (author)2016-07-03

These would be awesome to setup in an entry way to surprise people as they walk into a room.

Yeah, I did that to my sister

Hambone22 (author)2016-07-04

This is awesome

About This Instructable

6,552views

82favorites

License:

More by simonres:The 3DCM (Card Multi Tool) Teensy + Normal cycling helmet = SafetySuper easy to make DIY fire starter
Add instructable to: