Arduino Laser Tag - Duino Tag

Arduino Laser Tag - Duino Tag
Duino tagger- General introduction

Duino tag is a laser tag system based around the arduino.

Finally a laser tag system that can be tweaked modded and hacked until you have the perfect laser tag system for office ordnance, woodland wars and suburban skirmishes.

Laser tag is combat game like paintball or airsoft without the pain, it uses infrared light (IR) to simulate the tagging / shooting of other players or targets.

I have been working on this project for a while, but don't see it as over, I just though it was time to get more people involved. Hopefully this instructable will be near enough finished in time for me to enter it in the arduino competition, although I expect the instructable will need editing and tweaking for some time to come. 


This instructable aims to provide you with the information you will need to go out and build your own duino tagger.
This instructable focuses on how to build a duino tagger by modifying a light gun but with a bit of extra work you could build you own gun from scratch.

This instructable does not look in too much detail at the software / code side of the project, although a working code based on the miles tag protocol is provided.

For those wishing to learn about duino tagger programming I suggest you start at the excellent tutorials found at A Terrible Idea.

Thoes experience arduino users will probably find the overview page (Step 1) and code pages (Step 8) the most useful, newer arduino users may need to take a closer look at the instructable and the links provided.

I hope many of you will find this instructable useful and will go on to build your own duino taggers. There is much scope for improving and upgrading this system outlined here. If you do go on to improve on this duinotagger please share your work and hopefully in time the system will evolve into a much richer gaming experience.  


Youtube videos of my duino taggers:


This video shows me using the second duino tagger I made to shoot at a talcapult target I have been working on. I hope to make an instructable about the talcapult soon.





 
Remove these adsRemove these ads by Signing Up
 

Step 1Overview

Overview
Overview


Key parts of a duino tagger:



IR Transmitter system
What - Transistor amplifier, high power IR LED and a lens to give a well focused IR beam.
Why - To give the tagger means of tagging / shooting other players as well as communicating game information. The transmitter amplifies the transmission signal from the arduino and transmits it using an IR LED, lenses are used to make the signal very directional in order to make the guns behave like guns and make long range transmissions possible.

Sound
What - Peizo Sounder (& mini sound recorder / playback electronics from greetings card)
Why - It’s nice to have some audio feedback from the system. Sound effects to let you know when the tagger has been shot or run out of ammunition or lives.

Receivers
What - Standard IR receiver module and power regulation capacitor
Why - So the gun knows when it has been shot. This design in this instructable looks at using 3 sensors 1 on the gun as well as front and rear head sensors.

Visual Effects and lights
What - LED’s and bar graph driver circuits
Why - It is nice to get visual feedback on game information, eg lights to let you know when you have been shot. 




Cost
To make this section internationally friendly; at the time of writing: £1 GBP = $ 1.6 USD = 1.1 EUR

Assuming you already own an arduino the basic extra components for this project can be bought for around  £10.

Now is a great time to try to build a duino tagger as it is easy to get hold of cheap second hand light guns. Light guns are the guns that you can use with computer games, many of them don’t work with modern LCD screens and so there are a lot of them going cheap on ebay and else where. I bought two light guns each cost about £4 one off ebay one from a charity shop. Light guns are a great starting point for this project as they provide the optics, switches and case required for the build.


You will need:

Arduino
Light Gun
Coloured LED’s (preferably 30mA+)
IR sensors
At least 2x IR LED’s matched to the IR receiver  (preferably 100mA+)
Peizo sounder
Power transistor /MOSFET
A few electronics basics: solder, resistors , capacitors.

You may also want
Scrap plastic
LED bar graph driver chips
More LED’s
Record your own message greetings card
Hats / helmets / headbands to mount sensors on

« Previous StepDownload PDFView All StepsNext Step »
69 comments
1-40 of 69next »
May 7, 2010. 11:14 AMMr Jaderman says:
Hey, great instructables! Got a question though. I've been looking over the internet for a light gun and I can't seem to find one anywhere. Is there a site that you know of or a link you could send me that has one for sale? Thanks
 
Sep 4, 2010. 10:27 PMsparktech says:
hey also try to make one out of whatever you have!!! (wood, plexiglass, lexan, stuf like that) make your body then make a frame and put them together depending on what you want it to look like personally myself i like one from the fifth element that im going to try and rebuild here is a picture http://www.zorgltd.co.uk/images/photos/ZF-1_500x340.jpg i think i might take all the missiles and stuff in the front out and replace them for sensors and more circuitry bet you get the concept! have fun
Sep 4, 2010. 3:50 PMsparktech says:
hey jaderman, Use any nerf gun that you think looks cool and can fit all the electronics just buy the gun and gut it (springs, gears, posts, etc.) with a dremel. Hapy building!
May 13, 2010. 7:24 AMemmanuel.smith says:
 I can't find them either. Does anyone know how to turn an airsoft gun into a light gun or is there an instructable on it?
Dec 13, 2011. 9:07 PMKeanan says:
Thank you for your help. The code that registers any IR signal code works great for our application. Oh which I forgot to mention what that was. It is a laser tag plane. Their are two planes that have the IR that can shoot at each other. When they are hit I have them make noise along with the flashing to manually keep track of hits. Also, with the simplicity of the code, the planes could be shot at from the ground by TV remotes, adding a new element.
Once again Thank you for your tutorial and help.

"AerospaceSmith" <(^^,)>
Dec 13, 2011. 9:10 PMKeanan says:
Images of our plane
2011-12-09 19.21.14.jpg2011-12-09 20.38.11.jpg2011-12-11 17.02.43.jpg
Dec 8, 2011. 10:09 PMKeanan says:
I have tried these recommendations and the arduino receiving the IR code still can't see all of the IR code or not at all. Is there any other code that could work for simple two person tag that uses the same components?
Dec 4, 2011. 3:39 PMKeanan says:
No I am still having issues. However, I have gotten it receive the signal 1 time, out of billions. This was only after using an older version of Arduino IDE (00017) to upload the code and after changing the code to 38kHz. I'm thinking the code can't read the IR pulses fast enough.

Using a code from Ladyada (https://github.com/adafruit/Raw-IR-decoder-for-Arduino/blob/master/rawirdecode.pde) I was able to read the raw IR code sent from the other arduino(which was sending 56kHz at the time). So it seems to be the lasertag code can't read fast enough. I am in urgent need of help or a new code as soon as possible. I just need a simple laser tag code to use between mainly two people playing against each other that I can have each players score keep track of independently. Any and all help will be greatly appreciated.
Nov 16, 2011. 8:46 PMKeanan says:
Okay, I am I have copied your code to my Arduinos and have a similar setup as yours, the only main difference being I am using 56kHz receivers and have changed the IRfrequency variable to 56, but when ever I shoot the other arduino, it just reads ERROR
sensor: 1... 2 2 2 2 0 2 2 0 2 2 0 2 2 2 2 2 2

after the sometimes there is all 2s and sometimes zeros randomly in the string. I also set it up to display received[17] specifically and it is always 2. Why is this?

I also have the Arduinos close to each other, could the short distance be affecting the IR signal?

Any advise would be greatly appreciated.
2011-11-16 22-43-36.162.jpgCapture.JPG
Dec 5, 2011. 9:38 AMyeshi88 says:
Try removing timeOut paramter in the following line of the code:

received[i] = pulseIn(IRreceivePin, LOW, timeOut);

If it still does not work , try adding

Serial.println(received[i]); before the following lines.

int receivedTemp[18];
receivedTemp[i] = 2;
if(received[i] > (IRpulse - 200) && received[i] < (IRpulse + 200)) {receivedTemp[i] = 0;} // Works out from the pulse length if it was a data 1 or 0 that was received writes result to receivedTemp string

Your output should fall between 400 - 800 for byte 0 and 1000 - 1400 for byte 1
Nov 26, 2011. 9:55 AMtag says:
Hi,

My lasertag used to work and as of today I am getting the above error as well ?

I have tried J44's suggestions and still nothing? Weird !

Any other suggestions ?

Thanks
Tag
Nov 27, 2011. 8:35 AMtag says:
just had a thought - can this be related to the new Arduino client ?

Thanks
Tag
Nov 17, 2009. 6:32 PMKT Gadget says:
This is awesome! I am just about to use the Arduinos for a competition my robotics club is going into. I really want to build a full on laser tag system for my group of friends to mess around with.

One question though, wouldnt a laser work the same way (i know the hazard might be the problem) but isnt that what is used for most laser tag systems?

As a suggestion, make a simple voltage regulator for the arduino and add a bigger battery to be able to use the motor, but I am not sure how to signal the motor to move (Im thinking using a PWM system?).
Jun 16, 2011. 4:26 PMmdshann says:
Since you already have sensors mounted on the player wouldn't it be possible to use the same line and put a battery pack say on a persons back? Having a high battery capacity would allow you to use the rumble feature in the gun, and maybe even add more rumble motors. It would be cool say if you get hit on the head sensor to have a small cell phone sized rumble go off on that sensor, and maybe a larger one for the chest sensor and a third on the back sensor. The rumble in the gun could be use as feedback for when you shoot, and then when you are out of ammo it doesn't give feedback, like a gun not firing when out of ammo. Another feature that could be cool is a game start timer, say everyone starts in the middle of the playing field and hits the power on the system at the same time and it gives you like 30-45 seconds to run to your base / starting point and then all the sensors go off to indicate the game has started.
Sep 4, 2010. 3:57 PMsparktech says:
hey i was wondering i dont know if you can do this but heres my idea could you tell me how i could do this? ok so a small screen to tell you where the other people are (10 ft acurate) a umpc built into the gun so at the beginning of the game you choose a gun (machine gun, sniper rifle, etc. each gun has dif. ammo quantities, damage, and "range") each person gets a pistol with unlimited ammo. get 3 grenades,1 nuke (each has dif radius of how much it kills) 100 health to start with and all the sensors are on the gun (maybe 6?) i was wondering if you could get and program all these things into the gun i dont care about costs so could you just tell me how or if you think it is possible? i am learning how to program this stuff but i have about 6 people who could help me program the arduino Thanks
Sep 5, 2010. 6:33 PMsparktech says:
http://www.sparkfun.com/commerce/product_info.php?products_id=8977 this is even easier than the other touchscreen this would not be a problem to put on the arduino
Sep 5, 2010. 6:31 PMsparktech says:
here is a screen and a trackball to use as a button so you could select stuff and scroll http://www.sparkfun.com/commerce/product_info.php?products_id=8537 http://www.sparkfun.com/commerce/product_info.php?products_id=9320 then if price is not an option you could use this and substitute it for both or keep the trackball (i love the blackberry trackballs) http://www.sparkfun.com/commerce/product_info.php?products_id=8624 please tell me what you think about this
Sep 5, 2010. 5:42 PMsparktech says:
sure ill let you know what i do!!
Sep 5, 2010. 5:41 PMsparktech says:
for gps couldnt you use an xbee module? they make screens for arduino
Nov 19, 2009. 9:46 PMKryptonite says:
In Canberra where I am, we have a laser tag arena that we often to go for birthday parties (not so much now...) where you get a vest with sensors on the shoulders, front, back and on the gun. If you should just off the sensor, then it will not sound it. But if the laser points directly at it then you're good. This does not make it much harder at all.

This arena also has "bases" which you have to shoot 3 times (with 3 second down time between each shot at the base) and then you capture it and score 10 points in stead of 1.

Feedback motors are cool, but as a "laser" feel it's alright if they're kept off, to keep with the futuristic feel of just the laser.
Feb 26, 2011. 6:42 AMRevolt Lab says:
If I wanted to do this with all hardware could I not just put a PNP transistor on the output of the IR detector and connect lights/sounds etc to power through the PNP transistor?

Thanks!
Will
Feb 25, 2011. 7:11 PMRevolt Lab says:
Are the receivers interfered with by sunlight? Can it be used on a sunny day with lots of direct sunlight?
Nov 14, 2010. 8:39 PMNate711 says:
j44 the first receiver picture is hard to read because of its low quality. Could you upload a better picture? the rest is clear and awesome. the tactapult is also neat
Nov 15, 2010. 6:15 PMNate711 says:
I just discovered that I can click on the picture info button and get a high quality picture. I feel dumb. thanks anyways
Nov 2, 2010. 2:25 AMgreen laser pointer says:
I think you can try the laser sight for your gun or rifle that provided by http://www.greenlaserpointer.org
waterproof-laser-pointers-D-green-red-jetlasers (36).jpg
Dec 3, 2009. 1:44 PMblueberrypieisgood says:
i just have a litle question. with the IR leds spreading all around, and to get the beam to a narrow range, how can you do this? is it the lens? would a convex lens do the trick? or what?
Sep 4, 2010. 3:52 PMsparktech says:
get a double convex lense
Apr 27, 2010. 4:19 AMpewepintheformats says:
 What model of transistor would you reccomend for the transmitter?
1-40 of 69next »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
8
Followers
6
Author:j44(J44 Industries)