EmbeddedRelated.com
Forums

Microcontroller Recommendations for School Project: Laser Tag

Started by D-Shap October 22, 2009
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 (http://www.lasertagparts.com/mtoptics.htm) 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.
D-Shap wrote:
> 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 (http://www.lasertagparts.com/mtoptics.htm) 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. >
Look at TI MSP430. Lot's of low power stuff and I think they have one with ZigBee support. -- Scott Validated Software Lafayette, CO __________ Information from ESET NOD32 Antivirus, version of virus signature database 4533 (20091022) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com
On Thu, 22 Oct 2009 08:09:06 -0700 (PDT), D-Shap <danxshap@gmail.com>
wrote:

>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.
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 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.
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 <http://www.sparkfun.com/commerce/categories.php> and look around their Wireless section for some ideas.
> 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).
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
On Oct 22, 11:36=A0am, "Not Really Me"
<sc...@validatedQWERTYsoftware.XYZZY.com> wrote:

> > microcontrollers/components for this project I would appreciate it > > very much! Thanks. > > Look at TI MSP430. =A0Lot's of low power stuff and I think they have one =
with
> ZigBee support.
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: http://www.microchip.com/wwwproducts/Devices.asp= 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: http://www.radioshack.com/product/index.jsp?productId=3D2049727
In article <7da10c21-82a5-4377-acf6-
456476e5b180@m1g2000vbi.googlegroups.com>, danxshap@gmail.com says...
> 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.
..... 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 <http://www.pcserviceselectronics.co.uk/> PC Services <http://www.pcserviceselectronics.co.uk/fonts/> Timing Diagram Font <http://www.gnuh8.org.uk/> GNU H8 - compiler & Renesas H8/H8S/H8 Tiny <http://www.badweb.org.uk/> For those web sites you hate
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.
On Oct 23, 7:05=A0am, Paul Carpenter  wrote....
> > 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.
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.
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)?.




"larwe" <zwsdotcom@gmail.com> wrote in message 
news:79cc3b5f-a780-4d02-aa87-3e0d846ae112@d34g2000vbm.googlegroups.com...
On Oct 22, 11:36 am, "Not Really Me"
<sc...@validatedQWERTYsoftware.XYZZY.com> wrote:

> > microcontrollers/components for this project I would appreciate it > > very much! Thanks. > > Look at TI MSP430. Lot's of low power stuff and I think they have one with > ZigBee support.
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: http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en027752 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: http://www.radioshack.com/product/index.jsp?productId=2049727
"D-Shap" <danxshap@gmail.com> wrote in message 
news:7da10c21-82a5-4377-acf6-456476e5b180@m1g2000vbi.googlegroups.com...
> 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 (http://www.lasertagparts.com/mtoptics.htm) 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.
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.
> > 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.
Real time 'position/status ranking', that's why.
> > 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.
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.
> > 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).
With the right frequency choice, there wil be no issues here with SRD.
> > -- > Paul Carpenter | paul@pcserviceselectronics.co.uk > <http://www.pcserviceselectronics.co.uk/> PC Services > <http://www.pcserviceselectronics.co.uk/fonts/> Timing Diagram Font > <http://www.gnuh8.org.uk/> GNU H8 - compiler & Renesas H8/H8S/H8 Tiny > <http://www.badweb.org.uk/> For those web sites you hate