Office warfare can come in many forms. For some it involves competitive games of ping pong or foosball…for others it involves spitballs and the occasional foam dart. Perhaps you even find yourself having to protect your beloved toy collection or Copic marker set from thieving co-workers similar to Milton in the 1999 comedy classic Office Space.

Well, you can now cast those worries aside with this clever Nerf Sentry gun hack that uses an automated firing system based off of large heat signatures that enter its area…and all with easy to find off-the-shelf parts.

By replacing the toy’s trigger system with a servometer and wiring it up to a home security sensor, anyone who steps into the programmed detection zone is greeted by a barrage of foam darts until the clip runs out or they leave.

Here’s how to do it:

Cost/Build Time

About $65 / 4 hours


  • 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.


Anti-Jam Feed Fingers


Jam-Clearing Door Safety Switch


Trigger System


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.