Before you start
Whether you're new to Arduino or a seasoned builder, this project has something for you. There's nothing quite as satisfying as creating an interactive physical object, knowing that if it breaks or needs modification, you know where all the parts go and how everything works. The 'Duino tag gun is a great project to work on by yourself or with friends. To complete this project, you should at least have a basic understanding of electronics (you should know what a resistor is, but you don't need to know the science behind one) and have an understanding of programming (you should know what loops and variables are, but you don't need to be able to parse Big O Notation). Don't be afraid to jump right in.
In this series, you use Arduino technology to create a basic interactive laser game called 'Duino tag:
- Part 1: Learn some Arduino basics, lay out the project, and do an experiment that will help you understand how infrared works.
- Part 2: Build and test the receiver part of the 'Duino Tag gun, including the testing.
- Part 3: Build the transmitter and complete the 'Duino Tag gun.
To follow along, you don't need any electronics experience, although experience working with electronic components can certainly serve you well. If you've worked with microcontrollers, you'll have an edge, but keep in mind that the Arduino platform is well suited for people without that experience. Above all, you should be willing to stretch your skills. Working with electronics and microcontrollers can be rewarding. Most software engineers don't get a chance to write code for devices that interface with the physical world, and Arduino provides a low-cost entry point into working with interactive devices.
This tutorial focuses on building the transmitter for the 'Duino Tag gun. The actual component assembly is minimal and won't take much time. You'll spend time working with the code to handle all of the firing needs for a player's gun. You'll learn what's needed to build a referee's gun and explore some casing options. This tutorial closes by suggesting some ideas for taking things beyond this series.
For this tutorial, you need a few tools and supplies. See Parts 1 and 2 for a list, including the Arduino hardware and software. Following are the basic items needed for Part 3.
- Infrared LED
- Just about any would do, but the brighter the better.
- Infrared sensor
- This series was written using a TSOP2138YA Infrared Sensor (from All Electronics).
- 10,000-ohm resistor
- Brown-black-orange markings.
- 82-ohm resistor
- Gray-red-black.
- 0.1uF capacitor
- You will need a capacitor of 0.1uF.
- Switch
- You need a single pole momentary switch.
- Wire
- Get 22 gauge, solid or stranded.
- PVC or other rigid tubing
- You need only a short length.
- A small magnifying lens (three-quarters to 1 inch in diameter)
- You can use a cheap plastic one, such as those given as party favors.
You can also get all these parts in one kit (see Resources).
A breadboard worked fine when prototyping the receiver, and you can continue to prototype your 'Duino tag gun with a breadboard. You'll need to solder everything together before you can put your gun into a decent case.
In Part 2, you got around needing a second gun by using a remote control to help test your receiver. Here, you need another gun or, at the very least, another receiver. It's not practical to try to test-fire and detect from the same unit. (It could probably be done, but it will be easier if you have two guns or a few friends on hand building their own guns.)
Before diving into work on the transmitter, we need to revisit the receiver.

