Microcontroller Recommendations for School Project: Laser Tag

I'm taking a senior design class in college (I'm an Electrical/ Computer Engineering major) and my final project is a laser tag game. My partner and I are trying to pick a good microcontroller for the guns and we're looking for recommendations. Throughout the class we've been working with the Freescale/Motorola 6811 (very old school) and writing pure assembly code but we can pick any modern microcontroller for the project. The guns need to communicate wirelessly with a base station so our professor recommended a chip that has ZigBee support but it's not a requirement - something with a relatively user-friendly RF protocol is probably important though. Also we'd like to use some sort of IR protocol (for the "laser" shots) but we haven't found many chips that come with this built-in and so we are thinking about using an external module chip that does IR encoding/decoding (a recommendation on one of these to use with the microcontroller would be awesome). For the optics part of the project we're basically following this

formatting link
and using the IR emitters/receivers that they use. If you could recommend any microcontrollers/components for this project I would appreciate it very much! Thanks.

Reply to
D-Shap
Loading thread data ...

Look at TI MSP430. Lot's of low power stuff and I think they have one with ZigBee support.

--
Scott
Validated Software
 Click to see the full signature
Reply to
Not Really Me

A good rule of thumb is that in considering what processor to use, familiarity gets a lot of extra weight. You probably already have code snippets that take care of the basic initialization, housekeeping, I/O, and so forth; build on that.

OTOH, it's always good to take an opportunity to learn another piece of silicon. The AVR chips from Atmel have a lot of exposure in the enthusiast/hobby arena since many are available in DIP form factors and run on 5 VDC and their logical layout is comfortable (a nice set of registers, useful peripherals).

The guns or the targets (receivers) need to talk to the base station?

The RF can be an external block, lower down in the protocol stack. Hop over to Sparkfun and look around their Wireless section for some ideas.

Would you need anything more than a bitstream from each "gun" that is a unique identifier? Try something on the order of: sync, header, ID number, checksum. Use the widely available 38 kHz modulation scheme (lots of receivers available).

--
Rich Webb     Norfolk, VA
Reply to
Rich Webb

with

But he doesn't really want to design a Zigbee module. This question started on aardvark, where my response was:

Well, for a variety of reasons I would suggest you use the Microchip Zigbee module MRF24J40, because it's cheap ($10) and has the antenna and everything integrated:

formatting link
x?dDocName=3Den027752

Using this device will be easiest if you use a Microchip MCU because they provide all the control software.

All the compilers you will need are free. Microchip will also send you samples of the microcontroller free (you'll have to pay for the Zigbee modules though). You will however have to invest in a programming adapter, which one you choose depends on which specific micro you end up using. The PICkit 2 programmer covers quite a lot of ground at a reasonable price. There are third-party clones on eBay also.

As far as the IR goes, the usual way of doing it is to modulate the IR LED at a fairly high rate (30kHz or more) and gate the modulation to create a pulse train identifying the transmitter. A PWM output from the micro can drive the LED, and on the other end you'll use a canned IR receiver solution as used in TV remote control applications - it has a phototransistor and a filter to reject non-modulated light inputs. You need to pick the receiver to match your modulation frequency. What you get out of the receiver is your raw data pulse train (with the 30kHz or whatever carrier subtracted out).

An example:

formatting link

Reply to
larwe

.....

Why do you need wireless?

People go round 'shooting each other', unit detects if it has been hit and by which code. At end of game download the table of "been hit by" even via serial links as the equipment is returned (and reset for next game) collate the table of codes of who was hit by who into transposed matrix of "who hit who" print results.

Nobody needs the results until the end anyway.

Don't make it too complicated otherwise you will never complete the project. You will have enough to do with creating the detector arrays to put on the player and link to the gun, as well as multiple simultaneous hits (e.g. three people hit same person at same time). If you want to save power and make things easier save results in gun/back pack, forget wireless.

Let alone someones bluetooth phone/pda/gadget interferring with zigbee just when you need it NOT to. Let alone the fact that wifi is in the same band and many devices have wifi built in as well (e.g. iPhone).

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk
    PC Services
 Click to see the full signature
Reply to
Paul Carpenter

In addition to what others have said I would suggest shopping for demonstration boards or hobbyist boards with CPU and RF prebuilt and tested. If this is a 1 term project and the term has already started you need as much help as you can get. Spend time developing rather than building.

I rather like the AVR family for reasons others have stated, but also because the free avr-gcc tools are very traditional Unix text based. I rather dislike having configuration parameters nested many layers deep hidden inside a GUI. There is nothing quite so nice as diff(1) and a Makefile for comparing exactly what one version tweaked vs. a previous.

If you would rather have your configuration selections hidden in a GUI then Atmel's AVR Studio will do that for you. But it is also able to generate a Makefile from its GUI settings. Eclipse also provides a GUI for gcc tools, but I haven't bothered to try it.

And while we are on the version topic, you need Subversion and should commit your changes every hour with a note as to what you were doing. You need to get used to using svn now before bad habits are formed. When it comes time to write the term paper these commit notes will practically write the paper for you. TortoiseSVN is a very good Windows SVN client. I also use svn(1) directly via command line on Macintosh and other Unix systems.

Reply to
David Kelly

On Oct 23, 7:05=A0am, Paul Carpenter wrote....

Sound advice. One detail that I'd make use of, is you will already have a working IR data transmitter, and working IR receivers - and data stream encoders and decoders so make a PC Score Reader module that uses the Gun IR to send the scores, and that avoids serial cable clutter, but still keeps things simple - and it reuses the proven code blocks.

RF links can always be added later....

I'd also look into SiLabs Toolsticks - when I had a dialog with them back in March, they were improving what they call "Toolstick Terminal", that allows data coms to a PC file, via the debug channel.

- so you may be able to use the Debug connector on a receiver, as the PC link pathway to a file (which you then post-process) They expected ~June for this IDE change.

Reply to
-jg

Hi, Is the Microchip Zigbee module MRF24J40 useable with an Atmel mcu?.

And, when you say "Using this device will be easiest if you use a Microchip MCU because they provide all the control software.", does this mean the software is not compatible with other mcus (like Atmel)?.

But he doesn't really want to design a Zigbee module. This question started on aardvark, where my response was:

Well, for a variety of reasons I would suggest you use the Microchip Zigbee module MRF24J40, because it's cheap ($10) and has the antenna and everything integrated:

formatting link

Using this device will be easiest if you use a Microchip MCU because they provide all the control software.

All the compilers you will need are free. Microchip will also send you samples of the microcontroller free (you'll have to pay for the Zigbee modules though). You will however have to invest in a programming adapter, which one you choose depends on which specific micro you end up using. The PICkit 2 programmer covers quite a lot of ground at a reasonable price. There are third-party clones on eBay also.

As far as the IR goes, the usual way of doing it is to modulate the IR LED at a fairly high rate (30kHz or more) and gate the modulation to create a pulse train identifying the transmitter. A PWM output from the micro can drive the LED, and on the other end you'll use a canned IR receiver solution as used in TV remote control applications - it has a phototransistor and a filter to reject non-modulated light inputs. You need to pick the receiver to match your modulation frequency. What you get out of the receiver is your raw data pulse train (with the 30kHz or whatever carrier subtracted out).

An example:

formatting link

Reply to
Core2Duo

I'm the 'GrandDaddy of Laser Tag.... if you have done your research, you will know who I am, having designed laser tag systems since 1989. I'd be happy to help/advise off group. I would not use a zigbee device for a start...The processor of (my) choice would be an atmel part with 64K flash. I/R encoding/decoding can be done by the processor, including the 38/40K modulation.Either AVR or 51 core. I'm sure there's a myriad of other suitable vendors( dallas 89c450). Design the whole core around interrupts and 'goto to sleep mode' while doing nothing to get long battery life.

2.4G for radio is not the right choice- range and obstacle interference are a real issue so look at 868/433 or whatever is correct for your FCC regs. Chose I/R detectors with a metal can.The cheap plastic ones are poor on interference rejection. U/V strip lighting in a laser arena are a nightmare for generating interference.
Reply to
TTman

Real time 'position/status ranking', that's why.

I agree with the bit about never completing the project :) Multiple simultaneous hits? Impossible. If there are two concurrent incoming I/R streams ( statistically unlikely, but possible), the Rx data from the IR detector will be garbage, and rejected by the processing mechanism.

With the right frequency choice, there wil be no issues here with SRD.

Reply to
TTman

To be seen by who?

You are assuming that the majority of people taking part in these games are VERY large crowds, where they monitor the current teams. This is rare as the majority of these games every day are used by small teams sometimes I have seen places where different groups get involved, to get the numbers up.

Have you ever seen one of these 'laser' game shoot em ups?

Competitors have sensors usually donned like a bullet proof vest, that has multiple sensors, to detect 'hits' on back, front, and sides, sometimes also detect gun, legs, arms.

So multiple hits from different sensors is VERY LIKELY.

Two into same sensor, but the system each competitor 'wears' has to deal with MULTIPLE sensors.

The frequency choice being avoid 2.4 GHz like the plague, with potentially so many nodes, the collision, dead spots, range and interference problems are horrendous.

What's inside the 'arena' and what the walls of the arena are made of will effect range and transmission paths. Having seen too many cases where 2.4GHz devices have trouble going from one room to the next.

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk
    PC Services
 Click to see the full signature
Reply to
Paul Carpenter

SNIP .

I have been designing commercial lasertag systems for 20 years..... I probaly know a bit about tag systems. Agreed some systems use separated IR channels.Resolving those is no problem, but can still suffer from multiple collision. Radio provides indoor ranking status, along with custom gun/jacket configuration at start up etc etc. Useful to some, essential the the hard core, pointless for most.

Reply to
TTman

Definitely, it's just more work.

ip

It means that Microchip already have a working drop-in implementation for their micros, and a lot of porting is required to get that implementation happy on a different micro.

Since this is a school project, not a commercial project, I think the OP needs to look for plug-and-play solutions as far as possible. Microchip isn't my vendor of choice for micros, but if they're the simplest solution and there are no other controlling constraints, then why not?

I have connected the module in question to an NXP ARM, but it was not a one-day project to get the software working.

Reply to
larwe

Since neither of you have any insight into the specification, this argument is a bit silly. The assignment from the professor may have required the project to demonstrate RF communication. It may require the players to wear a six-foot foam banana on their heads. Who knows?

Reply to
larwe

Core2Duo skrev:

Better to use the Atmel ZigBee - best on the market and you have plenty of AVR S/W to go with this. There are the ZigBit modules with both. Didn't check if Atmel delivers yet, but Meshnetics does.

BR Ulf Samuelsson

Reply to
Ulf Samuelsson

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.