Laser tag (IR guns)

Hi, total noob ::slight_smile: to this but have know about it for a while and have been looking for IR or infared information but cant seem to find anything that suits.

I work with laser tag guns that use IR to “shoot” each other. They cost the earth but as far as i can tell are fairly simple electronically - all analog stuff. Ideally im wanting to create something that can learn the signals from the guns as their is shoot to kill and then a ref gun that resets them to come back alive.

I would very much appreciate if anyone could point me in the right direction.

I did find this so hopefully i can get the signals. http://www.arduino.cc/playground/Code/InfraredReceivers
Would this work? And could i simply create a standard IR module that could send the signals on again.

Sorry if any of this stupid. Im not great with the whole infrared protocol stuff.

Many thanks

sjk

anyone? anyone at all.

what you want some kind of IR signal record/playback device?

Yes that would be ideal.

not sure how to go about it, but an ir receiver and an ir led and a couple of buttons would probably be ideal :smiley: dunno what resistors to use. as for programming (again im not the best person to ask) some kind of digital read, store, digital write, type thing might be the way to go… it would store one signal at a time tho, a bit like a copy/paste buffer (clipboard).

thats the theory anyway. i dunno how to program it tho :S and my wiring up of the ting would be a hazardous guess :smiley:

a pin for the rec button, a pin for the tx button, and another couple of pins for the ir rx and tx emitter and receiver, there would probably have to be a resitor in line for the ir tx led tho.

sorry i cant be any more help, if this is any help that is :smiley:

thanks muchly. at least i know have an idea of parts and terms to google.

much appreciated.

sjk

I typed this all out on my iPhone this morning only to have the browser quit. :stuck_out_tongue:

Anyway, I thought I’d offer some insight on how IR works, to give you an idea of how to go about it. The easiest explanation I’ve come up with is this:

Suppose you and I want to communicate, but the only way we can is by using flashlights. Further more, there are lots of people with flashlights and I want to know that it’s you I’m communicating with. We’ve worked out a code. I know that if you’re sending me messages, it’s going to be in 10 second intervals. This means that you will send flashes of light at me for 10 seconds, then stop for 10 seconds, then go again for another 10 seconds. That’s how I know it’s you.
Beyond that, we also have a message or two we can send:
if you blink once every second during those 10 seconds, I know you’re saying “hello”
if you blink twice every second during those 10 seconds, I know you’re saying “hi”

Remote controls, virtual walls (such as for the Roomba Vacuum cleaner), and laser tag guns work the same way. They oscillate a signal on a carrier. The signal is the message (“hello”) and the carrier is the way the computer knows it’s you.

I haven’t done this, and at the moment my Arduino is out of the business. Plug your IR receiver LED into a digital INPUT pin on your Arduino, and write a little program that counts the times the pin goes high or low (I assume you have something to shoot IR beams at it.) I may be getting this wrong as I’m pretty new too.

For what it’s worth, the kind of circuit for shooting a signal on a carrier is EXTREMELY simple. Can be done with a 556 timer circuit, a few resistors, capacitors, and a transistor, and all for under $3. I don’t know about the reception end.

Hope that helps.

ahhh now that makes a bit more sense to us simple minded folk :o. cheers. i think i remember reading about the 2 different values in the manual somewer. possibly mhz?

thanks, much appreciated.

sjk

Ok, I’ve been looking into this myself lately and you’re right: this kind of thing is fairly simple!

First off, read http://www.lasertagparts.com/mtdesign.htm

The gun is basically an IR-led placed at the focal point of a lens (explained on the site I linked to). This makes the IR-light travel in a pretty straight beam, almost like a laser, thus giving you the range you need.

The points you can hit on your opponent consist of IR-demodulators. These are found in TV’s, dvd-players, essentially anything that has an IR-remote. They have a power pin, a ground pin and a data pin that changes from high to low when the sensor is hit by modulated IR light.

By “modulated IR light” I mean IR-light that is turned on and off a certain times per second. Most tv’s and such use 36-40KHz. The reason for this is that sunlight (amongst other sources of light) emit infrared light, and this would interfere with the signal if not for the modulation.

This means that the IR-led in the gun needs to flash on and off at a freqency matching the sensors you choose. This can pretty easily be done in code with the Arduino so you probably don’t need to build a 555-timer or anything fancy like that.

Now for the data-part:
When the gun is sending out a beam of IR-light flashing on and off at, say, 40KHz, the sensors read a signal; ON, and when there is no light, it reads OFF. The most common way to encode data in this kind of system is what’s called “pulse length modulation” meaning that depending on the length of the ON-pulse, either a 1 or a 0 is transmitted.

First off though, the gun sends a “header”, which is just a way to tell the vest that data is coming. Don’t pay this much mind, it just means turning the light in the gun on for a set period of time before sending the actuall data.

Ok, lets say that the header is 2600us (microseconds) long, a ‘0’ is 600us and a ‘1’ is 1200us.

 ________      ___      ______      ___      ______      ___      ______
|        |____|   |____|      |____|   |____|      |____|   |____|      |
  header        0          1         0          1         0          1

Does that make sense? Hope it does. When the signal goes on, you are turning the IR-light in the gun on and off at 40KHz, when it’s low the IR-light is off. The long pulses (1200us) will represent '1’s and the shorter '0’s.

For this very simple example, you could let the left-most 2 bits represent the team (in this case 01; team 1) and the next 4 the players ID (0101; player 10). With this stream of data sent over and over, the vest recieves it and records that player 10 on team 1 has killed him. The killed players vest, gun and display lights turn off for 5 seconds, and is turned back on again.

I imagine the reciever would use events to hook whenever the sensor goes from low-to-high or high-to-low and count the time the sensor is on. If it’s more than 1200us it has recieved a ‘1’, if it’s less (but more than 600us) it has recieved a ‘0’.

You could of course freely extrapolate this protocol however you wish. You could add one more bit to tell if the shot is a “ressurect” shot or a regular shot. Or, you could just make the code treat it as a ressurect if the player who shot you is on the same team as yourself.

Hope this made sense. I’m very talented at going off on rants. Heh… x)