Nerf Sentry Gun
This summer, Popular Science contributor Dave Prochnow helped readers ramp up their foam-weapon warfare. He explained how to hack a Nerf gun to fire at encroaching heat signatures!. Photograph by Dan Bracaglia

We may earn revenue from the products available on this page and participate in affiliate programs. Learn more ›

Tell workplace pen thieves and pranksters how you really feel with a barrage of foam darts. This project hacks a Nerf gun to automatically fire at large heat signatures. Simply replace the toy’s trigger system with a servomotor, wire up a home security sensor, add an extended clip, and attach it all to a tripod. Anyone who steps into the sensor’s detection zone gets pelted with darts until they leave—or the clip runs out. Follow these instructions to deter would-be cubicle intruders.


  • Nerf N-Strike Elite Stryfe gun (with clip)
  • Servomotor with an X-shaped arm
  • Single pole single throw (SPST) reed relay
  • Passive infrared (PIR) sensor (with 9V battery)
  • Roll of 22-gauge hook-up wire
  • Tripod
  • ¼-inch nut and washer


Phillips-head screwdriver, wire cutters, soldering iron


  1. Disassemble the Nerf gun with the screwdriver and study the location of the parts inside (see diagram below).
  2. Remove the electric trigger system, acceleration trigger, jam-clearing door, and one anti-jam feed finger from the muzzle. (You may need a knife.)
  3. Disable the jam-clearing door’s safety switch by removing the part and reinserting it backward into its slot.
  4. Solder the PIR to the SPST relay, and the SPST relay to the gun’s acceleration trigger switch (refer to the diagram below).
  5. Mount the servomotor inside the gun so that its X-shaped servo arm rotates within the dart breech and can push a dart into the rear of the muzzle.
  6. Solder the servomotor’s negative lead to the gun battery compartment’s negative terminal. Solder the output pole to the acceleration trigger switch.
  7. Fasten the PIR to the tactical rail on top of the gun and attach the tripod to the heel of the toy’s handgrip with the nut and washer.
  8. Reassemble the Nerf gun, aim the barrel (and sensor) at the usual point of intrusion, and dare your officemates to cross you again.


closeup of orange nerf gun anti-jam system

Anti-Jam Feed Fingers

nerf gun jam-clearing door safety switch

Jam-Clearing Door Safety Switch

closeup of nerf gun trigger system

Trigger System

nerf gun acceleration trigger switch

Acceleration Trigger Switch

closeup of acceleration trigger switch

Acceleration Trigger


  • Insert the 9V battery into the PIR first and wait for the servomotor to stop spinning, then load a clip into the Nerf gun.
  • Do not use fully loaded clips. Rather, insert only half the required number of darts for each clip capacity (e.g., three darts inside the standard six-dart clip).
  • Once activated, the PIR has a refractory period of approximately two to five seconds during which time the sentry will not fire.
  • Alignment errors with the servomotor can cause dart jams. Gently tweak your alignment until the darts are fed into the acceleration motor smoothly.
  • Dart firing will be rapid and continuous until the PIR sensor no longer detects movement.

Approximate time to build this project: 4 hours

Cost: About $65

Difficulty: 4/5

WARNING: These instructions will remove important safety features, could ruin the toy, and might even start a foam-dart arms race.

_This article originally appeared in the May 2014 issue of _Popular Science.