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

What will the next generation of Make: look like? We’re inviting you to shape the future by investing in Make:. By becoming an investor, you help decide what’s next. The future of Make: is in your hands. Learn More.

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
Discuss this article with the rest of the community on our Discord server!

ADVERTISEMENT

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

Prices Increase in....

Days
Hours
Minutes
Seconds
FEEDBACK