Arduino Nerf sentry gun build: Relay firing circuit

Arduino Technology
Arduino Nerf sentry gun build: Relay firing circuit

arduinoSentry01.jpg
I’m building an Arduino Nerf sentry gun. In the previous post, I showed how I wired and mounted the trigger connector. Now, I need a circuit to fire the gun from the Arduino microcontroller by bridging the two wires coming from the 1/8″ jack I put in the handle. I’m doing this is with a small, 5V relay wired to a digital pin and ground of the Arduino (my original plan called for a MOSFET, but the spot I wired to made a relay easier). Relays are electro-magnetic switches that can be opened and closed by energizing their coils. In this case, the low current, 5V from the Arduino is enough to do the trick all by itself. Here’s a snazzier circuit, if you have a less Arduino-friendly relay. My circuit also has a diode in it to prevent the collapsing magnetic field from frying the board. Here’s my sketch of this:

NerfRelayNtbkScan01.jpg
Here it is on a breadboard. I loaded a simple blink sketch on the Arduino, so that it pauses for four seconds, then fires the gun for one second, repeats. This is great for testing, and means I can now command a barrage of Nerf darts from my microcontroller. Watch out!

nerfGunRelay01.jpg

In the Maker Shed:

Makershedsmall

arduino_duemilanove_cropped.jpg

Arduino Duemilanove

4 thoughts on “Arduino Nerf sentry gun build: Relay firing circuit

  1. Jeremy says:

    Looking good so far. In case you need some advice, I made almost the exact same thing last year. Good luck on the rest of the project!
    http://jeremyblum.com/2009/05/15/nerf-sentry-gun_be-afraid/

  2. Ethan says:

    What website did you get the relay from?

Comments are closed.

Discuss this article with the rest of the community on our Discord server!
Tagged

John Edgar Park likes to make things and tell people about it. He builds project for Adafruit Industries. You can find him at jpixl.net and twitter/IG @johnedgarpark

View more articles by John Edgar Park

ADVERTISEMENT

Maker Faire Bay Area 2023 - Mare Island, CA

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 15th iteration!

Buy Tickets today! SAVE 15% and lock-in your preferred date(s).

FEEDBACK