In the previous Instructable, "Hacking the Spy Video Trakr" (https://www.instructables.com/id/Hacking-the-Spy-Video-Trakr/), you learned how to open up the Trakr and install male headers in the GPIO connections on the circuit board. You also learned how to write, compile, and install a short program on the Trakr to flash LEDs by pressing the A and B buttons on the Trakr remote. Of course, getting the Trakr to flash LEDs isn’t very interesting, but now that you’ve completed your first Trakr hack, you can try more sophisticated hacks.

The voltage output directly from the GPIO pins is only 3.3 volts so, there aren’t many devices other than LEDs that you can drive with such low voltage. If you wanted to control, say, a Lego motor that runs on nine volts, you would need a nine volt voltage source yet prevent accidently sending nine volts through the Trakr’s processor and frying it.

When deciding what kind of circuit to connect to the GPIO pins, always apply the maxim, “Keep It Simple, Stupid” (KISS). If, for example, you wanted to drive a single motor in only one direction, the simplest device to keep a higher voltage source–the one used to drive a motor–from accidently passing through the Trakr’s processor is an electronic relay. This Instructable will demonstrate how to use a relay to control an external device with the Spy Video Trakr. You'll learn how an electronic relay works, what the electronic scematic diagram for a relay looks like, and what an actual electronic circuit diagram in which the relay is used looks like. You'll learn how to make conversion cables to connect the Trakr to external devices. You'll learn how to make  a larger cargo deck for the Trakr and see some examples of how some devices can be mounted on the Trakr. You'll learn how to tap into the Trakr's 9 volt and five volt power supplies. Finally you'll learn how to use the electronic relay to control an foam dart missile launcher.

Step 1:

What’s a relay? You’ve probably seen a relay race where one runner hands off a baton to another runner. Similarly, an electronic relay hands off control from one circuit to another. A relay is a very simple device consisting of an electromagnet, an armature (a switch that closes when attracted by the electromagnet), and a spring that is connected to the armature. You can see in the diagrams (Source: How Stuff Works) how the relay works.

In Figure 1 of the diagram, there are two circuits. The first circuit is a battery (3 volts), a switch and an electromagnet. The second circuit is a battery (6 volts), a light bulb and the relay’s armature. While the switch to the electromagnet is off, no current can flow from the 3 volt battery through the electromagnet. So, the armature-switch is off and no current can flow from the 6 volt battery to power the lamp in the second circuit.

In Figure 2 the switch to the electromagnet circuit is switched on. When current from the 3 volt battery flows through the electromagnet, the electromagnet creates a magnetic field that attracts the armature to close the circuit to the lamp. Now current can flow from the 6 volt battery to the lamp, and the lamp lights up.

If you look closely at Figure 2, you’ll notice that while the armature-switch is closed allowing the current in the lamp circuit to flow from the 6 volt battery to the lamp, it does not come into contact with the electromagnet so, the 6 volts from the lamp circuit cannot flow into the electromagnet circuit. Thus, the 3 volts in the electromagnet circuit and the 6 volts in the lamp circuit remain separate.
Use a MOSFET. get $3, go to radioshack, look in the bin labeled &quot;transistors&quot;.<br><br>You'll never go back to mechanical switching again.
Thanks for the comment. I do use the L7805 in my project: Dance Dance Roverbot! Build a Light Activated Dancing Snap Circuits Programmable Robot. <br> <br>https://www.instructables.com/id/Dance-Dance-Roverbot-Build-a-Light-Activated-Danc/step8/The-Voltage-Regulator/
The 7805 is a voltage regulator, I'm trying to get you to buy some power transistors for switching reasons. :p <br><br>MOSFETs have electrically insulated gates so you won't damage your microcontroller, and they will allow you to control a significant amount of electrical power using a very small voltage and almost no current. <br><br>I know they look the same as far as plastic package/ three pins goes, but they're completely different solid state devices.<br><br>To help you understand, here's a sample circuit from the wikipedia page https://upload.wikimedia.org/wikipedia/en/thumb/4/4a/Mosfet_n-ch_circuit.svg/220px-Mosfet_n-ch_circuit.svg.png<br>I'll leave you to your own devices for research from there.
Enter your question hereEnter your question hereEnter your question hereEnter your question hereEnter your question hereEnter your question hereEnter your question hereEnter your question hereEnter your questio
have you tried using an optocoupler?
Where is the foam in this instructable?
The foam darts taht the missile launcher fires.
cool instructable by the way
Oh ok i see now
Mobile platform for all kinds of awesome!<br /> (Also, you should enter this into the <a href="https://www.instructables.com/id/Weekly-Make-It-Challenge-Foam/">foam challenge!</a>)

About This Instructable




Bio: You can try my projects AT YOUR OWN RISK. There's infinite ways to damage or destroy persons and property. I can't think of ... More »
More by KRA5H:Discover Electronics With Snap Circuits Arcade (A Review) Variable Speed Fan With Snap Circuits, Kano Computer Blink Snap Circuits LED With Kano Computer 
Add instructable to: