Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Laser Tag

This thread is locked; no one can reply to it. rss feed Print
Laser Tag
Billybob
Member #3,136
January 2003

Me and a friend want to setup some Laser Tag awesomeness, probably with a couple more people involved assuming this thing works.
Here's the thing, I looked around quickly and found a few Laser Tag guns. Real ones, not the cheapo ones from Walmart. They're like $400 a pop! Or 20 for $5,000.
First question, are there cheaper laser tag guns that are pretty decent? Sub $100, really.
Failing that we'd like to build our own. I figure it'll take the following:

  • Casing for the guns

  • Programmable circuit boards

  • Precise IR emitters with good range

  • IR sensors

  • LCD/LED display

  • Misc parts, batteries, etc

Right? I mean you build the IR emitter into the gun casing, and then run a wire from the gun to the vest. The vest has the board and all the sensors. As long as the board can receive info from the sensors, and send data bursts across the IR emitter, then all I have to do is hook it up and code a program for the whole thing. Kinda coding for the RCX (which just so happens to a(n) have IR sensor/emitter).

So do I have that right? The basic idea is that the guns, when fired, would send out a data burst through the IR emitter which may be picked up by the sensors. The data is just player info, i.e. player ID. The computer in the vest would record this info. I'm sure you get the picture, it can be a lot more complex with different ammo, etc, etc. But when the game is over everybody would go to a "scoreboard" which has that LCD/LED display, a board, and an IR sensor. Each player uploads their data to the score machine, and then it'll list the stats for the game.
Of course it can get more complex -- recharging stations, magazines, different ammo, health, etc, etc. But all that can be handled once I figure the basics out.

I've never built circuitry before, :( So are there prebuilt circuit boards I can buy that I can just plug this stuff into?

How much would all this cost, and where do I get it? Any info is greatly appreciated! Thanks.

SonShadowCat
Member #1,548
September 2001
avatar

Forget laser tag, go airsoft. It looks MUCH better, and it has a more realistic feel to it. On the downside, to have a proper game you need people you can trust and will call their hits.

You can get the name brand airsoft guns( Classic Army, ICS, Tokyo Mauri, G&G, etc) for $200-300 while you can get guns from UTG for less than $100 which are almost as good as brand name ones. Also, tactical gear such as vests/helmets/ammo pouches/gun holsters/etc are $50 or less. And sidearms( pistols/Uzis) are on the average only $100( for full steel/blowback).

If you're willing to take a look at airsoft, PM me and i'll tell you everything you need to know.

nonnus29
Member #2,606
August 2002
avatar

Forget all that stupid crap: you and your friend need to go and enlist in the US Army and ask for NTC at Ft Irwin as your duty assignment. That's were I was stationed for two years; Brigade vs Brigade high intensity conflict simulations, two weeks a month, ten months a year you're in the desert fighting and manuevering in a 1000 sqr km box playing laser tag with tanks, apc's, helicopters, trucks and jeeps. It was pretty cool (but like all things in the military, the novelty wears off pretty quickly...)

Myrdos
Member #1,772
December 2001

Forget about 'high intensity conflict simulation': what you and your friend need to do is enlist in the US Army and get shipped to Iraq. There you'll experience combat and maneuvering in authentic desert and urban settings. You'll play tag with snipers, suicide-bombers, and fanatics with machine guns, as well as fend off punk kids who like to throw rocks at soldiers. Its really pretty cool (but like all things in the military, the novelty wears off pretty quickly...)

...sorry, just couldn't resist. ;D Seriously though, this may in fact be a poor time to enlist in the US military?

[EDIT] Hey, I might actually have something useful to contribute here! I think what you want to look into are micros. You can get an 8-bit micro and program it using C, just like a 'normal' computer. A micro is a small rectangular computer, you often see them embedded in circuit boards. About the size of an eraser, or smaller.

I used an Atmel 8-bit micro for my real-time systems course, they're awesome. Be sure to get one with at least two timers, and an ADC (analog to digital converter). This will let you accept inputs from your IR sensors and convert it to an integer value. A DAC (Digital-to-Analog Converter) might be a nice feature if you want to produce analog outputs (like a modem). Otherwise the standard ability to turn pins on and off will probably be good enough.

It seems very easy because you can just upload your C programs into the micro, but figuring out how to use all the features can be very tricky. Expect to read from the micro's manual for three days, and then be able to program the micro to do what you want in about 15 minutes.

But alas, there was nothing precise or accurate about the IR emitters I worked with. All I can say is, don't get the cheapo ones that work like a flashlight. They're awful for wireless communications.

[EDIT 2] Here's a link to Atmel's selection of fine micros The one I used was the ATmega16. You can learn everything you need to know about programming each micro by reading it's data sheet.

__________________________________________________

Billybob
Member #3,136
January 2003

David, you're my hero. After some searching I turned up the keyword I was looking for: Microcontrollers. I had simply forgotten it ;) Basically RCXes, which is what I wanted.

I even found this neat online course information from Purdue on the Atmel. It describes the things you need to know to program for the Atmel micros. Awesome!

With the keyword Microcontroller I'm sure I'll be able to find tons of info. But I'm looking for a few specific things, and maybe someone can guide me to good sources for these.
Are there any good online U.S. stores where I'd find all I need for this project? IR emitters, switches, displays, micros, etc. A nice store where I can buy the stuff like I'd buy anything else online and have it here in a few days. Most of the sites I run across are distributors who want me to buy bulk. Some even place an order with the factory so I have to wait a couple weeks. I want the NewEgg of electronic hobbyists.

And another thing, I want a good resource for learning how to work with micros from the ground up. Some good online tutorials would be perfect. I know they're out there, it's just a pain finding the good ones.

David, again, thank you for that tip. It has proved to be most helpful.

nonnus29
Member #2,606
August 2002
avatar

Quote:

...

Heh, good one.

BAF
Member #2,981
December 2002
avatar

You can also check into microchip PICs, and get free samples from microchip.com. This is what I have done. The only downside is that, unless you pay big dollars for their C compiler, you are limited to ASM with their free assembler. You can get some pretty big PICs from them, I have some 40 pin ones... that is a lot of I/O and should be good for your application.

Billybob
Member #3,136
January 2003

I think I've got a better idea of this stuff now. The microcontroller has the CPU, memory, and whatnot, but it is not a demo board like I thought it was. I need to buy demo boards, and plug the microcontroller into it. The board would provide easy connectors for all the inputs/outputs, easy way to plug in power, serial port, etc, etc.
Only problem is all the demo boards I've found are $60+. The controller itself is cheap, but these boards are expensive :(
Can I get a demo board that just lets me plug in a battery, and easily plug in my components (buttons, sensors, emitters, etc) and that's it? Then I could buy the programmer seperately, right? Because I only need one programmer for all the chips.

BAF
Member #2,981
December 2002
avatar

You can get the programmer separately... I got mine from sparkfun electronics for a few bucks. You don't need a demo board, just do what I do... put the chip on a breadboard, look up the pinout in the datasheet, and wire it to power and inputs/outputs yourself... it's pretty much fool proof.

Billybob
Member #3,136
January 2003

I've been browsing Sparkfun for a little bit.

So let's say I get:
This PIC
This programmer
and this breadboard

Is that all okay stuff? I seriously have no idea what I'm doing ;) The breadboard comes with jumpers...I guess that's good. I checked to make sure the microcontroller matched with the programmer. One question though, the programmer has a weird cable on it. What is it for? Will I need it, or can I just plug it right in through that COM port thing?

And of course I'm still missing stuff. How do I power the controller? I'd like to hook it up to a battery. I guess I'll need some components for the breadboard and whatnot.

And do I need an oscillator? If so, which should I get?

Am I missing anything else to get the microcontroller running? Once I have everything that'll make it run then I'll start hunting for the other parts.

The micro has 18 pins, but how many of those can I actually use to hook up to stuff? An LCD screen takes a lot of pins, for example, so I want to be sure I have enough.

Note that I have never soldered, nor know how to.

Oh, and how sturdy will the connections to the breadboard be? I assume they'll be pretty weak. In the future, after testing, what will I do to package this up? I can't solder, so that's no good unless I learn. I've read a little bit about a sort of wire wrapping? Does that have any relevance?

BAF
Member #2,981
December 2002
avatar

Looks fine. That weird cable is ICSP, in circuit programming. I'll address your other questions later, I have to leave for school now.

Thomas Fjellstrom
Member #476
June 2000
avatar

Now, something I've learned, AVRs give you much more bang for your buck. They may not have as high a clock all the time, but they are way more efficient, ie, more IPS (Instructions Per Second).

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Billybob
Member #3,136
January 2003

I'm not concerned about clock speed at all. ROM size and pin count are my main concerns, but since I've never done this I don't know how much I'll need. Thanks for the tip, though.

BAF: Thanks! I can't wait :)

BAF
Member #2,981
December 2002
avatar

Quote:

Is that all okay stuff? I seriously have no idea what I'm doing ;) The breadboard comes with jumpers...I guess that's good. I checked to make sure the microcontroller matched with the programmer. One question though, the programmer has a weird cable on it. What is it for? Will I need it, or can I just plug it right in through that COM port thing?

The jumpers can come in handy. As I said the cable is for ICSP, in circuit serial programming. It lets you program the chip while it is still in the circuit. I wouldn't worry about it, just plug the chip right into the programmer

Quote:

And of course I'm still missing stuff. How do I power the controller? I'd like to hook it up to a battery. I guess I'll need some components for the breadboard and whatnot.

Basically, look at the datasheet and see where the power inputs are. Then just hook it up to a source, like a battery, that is within the power limits. (I usually run mine off 2-4 AAs).

Quote:

And do I need an oscillator? If so, which should I get?

It could come in handy i guess... if you mean do you need it to generate a clock, you can use the internal clock on the PIC, or hook a crystal to it.

Quote:

Am I missing anything else to get the microcontroller running? Once I have everything that'll make it run then I'll start hunting for the other parts.

You will want need some random caps and resistors, wires, and such... that's basically all you need.

Quote:

The micro has 18 pins, but how many of those can I actually use to hook up to stuff? An LCD screen takes a lot of pins, for example, so I want to be sure I have enough.

LCD screens usually run on a controller, using a few lines for serial communications. You can get them with up to 40 or more pins. Check the datasheet on your chip to see what it actually has for I/O.

Quote:

Note that I have never soldered, nor know how to.

No big deal, until you go to solder it to a perf board. :P

Quote:

Oh, and how sturdy will the connections to the breadboard be? I assume they'll be pretty weak. In the future, after testing, what will I do to package this up? I can't solder, so that's no good unless I learn. I've read a little bit about a sort of wire wrapping? Does that have any relevance?

Well, you push the wires/chips in, it's somewhat strong... good enough for testing with it sitting on a table or such, but not good for field use. You will want a perf board or PCB board, and use that. I made a GBA multiboot uploader, powered by a PIC.... it's in an enclosure on a perfboard, with traces I made out of solder. I can upload some pictures if you're interested.

Thomas Fjellstrom
Member #476
June 2000
avatar

Quote:

with traces I made out of solder.

You're kidding right? :o

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

BAF
Member #2,981
December 2002
avatar

Big fat ugly traces :P

Luckily, not many were needed. Please excuse the crappy webcam shots, my digital camera isn't working right.

{"name":"Picture78.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/a\/4a5de3bf076d8d834624a0e493d7eedd.jpg","w":320,"h":240,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/a\/4a5de3bf076d8d834624a0e493d7eedd"}Picture78.jpg

{"name":"Picture79.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/2\/62fd0be47abcd82fb8d5c16f47c28b9f.jpg","w":320,"h":240,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/2\/62fd0be47abcd82fb8d5c16f47c28b9f"}Picture79.jpg

{"name":"Picture80.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/d\/edd6b4dea8ec25ab1c62f25f7974ab37.jpg","w":320,"h":240,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/d\/edd6b4dea8ec25ab1c62f25f7974ab37"}Picture80.jpg

Billybob
Member #3,136
January 2003

Thank you BAF! Very helpful.

Quote:

Basically, look at the datasheet and see where the power inputs are.

Oh so it doesn't have to be exactly 5V? With 3 batteries that'll give me 4.5V, so that'll be okay? The data says it's within the min-max for VDD.
Speaking of which, I checked the datasheet for one of the chips (not necessarily the one I linked). It has one VDD and two VSS pins. VDD is the positive power pin, but where's the negative? And what do I do with the two grounds (VSS)?

Quote:

It could come in handy i guess... if you mean do you need it to generate a clock, you can use the internal clock on the PIC, or hook a crystal to it.

What'll it do for me? I'll probably go without it, to simplify, but I'm interested to know what it is.

Now if I got this all figured out, I'm going to need at the very least a breadboard, a programmer, a PIC, and a bunch of random electronic components.

BAF
Member #2,981
December 2002
avatar

As long as it's within the min/max VDD it should work fine. VSS is the negative ground pin... just hook them to the - side of the battery.

As far as the crystal stuff, it will provide a more stable clock and allow you to run the PIC at higher speeds than the internal clock. You have to guess what caps/resistors you need to get the intenral clock to go at the speed you want.

Adol
Member #2,328
May 2002
avatar

Paintball guns are cheap :)
But they can hurt, and paintballs themselves aren't so cheap. That doesn't make it any less fun though.

Billybob
Member #3,136
January 2003

Thanks again BAF, I really appreciate your help.

Another question: I'm trying to figure out what IR emitter/sensor to get. For laser tag I obviously want these things to have good range. They'll be used in combination with a lens to focus the beam. MilesTag uses the TSAL-6100 and TSOP-4840.
But are those any different from: these from SparkFun? And if so, how? They're both 940nm, but I'm assuming they're different somehow. ... besides the angle. The angle I can deal with with the lens, I suppose.

More question (sorry): Is this LCD okay? In other words, can I just wire it up to the controller on 11 of the I/O pins, type some code, and away I go?

Finally: So do I wire both VSS pins to the negative side of the battery?

I really appreciate all the help. :)

Go to: