Propeller based laser tag
Kal_Zakkath
Posts: 72
In an attempt to give you all the relevant information, I'll start by describing my level of knowledge:
I'm currently a masters student studying computer science (programming), I'm familiar with OOP (Java and C++ mostly), and have done a little bit of assembly programming but that was a few years ago using an FPGA as part of an undergrad course. Besides that I've never done any 'real' micro-controller programming. As for the electronics I'd say I know the 'basics' but fortunately my father should be able to help me with the more complex parts.
Now, on to the problem at hand...
I was looking at building some laser tag guns using MILES tag (http://www.lasertagparts.com/mtdesign.htm) which uses a PIC controller (18F2525) and (optionally) an ISD25xx chip for sounds. The only problem is that the ISD25xx chips are no longer produced. The next version of MILES tag is reportedly going to use the ISD17xx series, though I gather these are a bit of a pain to load sounds onto.
Enter the propeller chip...
I stumbled across the propeller chip and I can see it is capable of doing some pretty cool stuff. Most importantly (for the problem at hand) I believe it can be used to load and play wav files from an SD card. This would solve the problem above and also makes it much easier to load new sounds etc.
Basically for laser tag I'd need\want to do the following with the propeller:
From looking at the object exchange and on the forum here it seems all of these should be possible with the propeller, but before I dive in and order all the parts I thought I should check if there's any limitations or other caveats that I have overlooked that might cause problems. I realise the propeller + SD route will probably be slightly more expensive than the PIC + ISD route (and I'll have to do the coding myself), but it will·be a lot more extendable, and of course if I get sick of the whole thing and give up I can always use the propellers for other cool things
As a side note I wont be using any of the pre-made boards from parallax (handy though they would be), mostly because of the cost and since I live in New Zealand it's already going to cost me about $30 US just to ship everything out here.
I'm currently a masters student studying computer science (programming), I'm familiar with OOP (Java and C++ mostly), and have done a little bit of assembly programming but that was a few years ago using an FPGA as part of an undergrad course. Besides that I've never done any 'real' micro-controller programming. As for the electronics I'd say I know the 'basics' but fortunately my father should be able to help me with the more complex parts.
Now, on to the problem at hand...
I was looking at building some laser tag guns using MILES tag (http://www.lasertagparts.com/mtdesign.htm) which uses a PIC controller (18F2525) and (optionally) an ISD25xx chip for sounds. The only problem is that the ISD25xx chips are no longer produced. The next version of MILES tag is reportedly going to use the ISD17xx series, though I gather these are a bit of a pain to load sounds onto.
Enter the propeller chip...
I stumbled across the propeller chip and I can see it is capable of doing some pretty cool stuff. Most importantly (for the problem at hand) I believe it can be used to load and play wav files from an SD card. This would solve the problem above and also makes it much easier to load new sounds etc.
Basically for laser tag I'd need\want to do the following with the propeller:
- Display info on an LCD screen (probably 2x16, HD44780 or compatible)
- Send and receive info via IR
- Load and play sounds from an SD card
- (Optionally) Monitor battery level
From looking at the object exchange and on the forum here it seems all of these should be possible with the propeller, but before I dive in and order all the parts I thought I should check if there's any limitations or other caveats that I have overlooked that might cause problems. I realise the propeller + SD route will probably be slightly more expensive than the PIC + ISD route (and I'll have to do the coding myself), but it will·be a lot more extendable, and of course if I get sick of the whole thing and give up I can always use the propellers for other cool things
As a side note I wont be using any of the pre-made boards from parallax (handy though they would be), mostly because of the cost and since I live in New Zealand it's already going to cost me about $30 US just to ship everything out here.
Comments
As for the uOLED, it's a bit pricey for me I'm afraid. I'm trying to keep costs low since ideally I'd want 8-10 of these (it's not much fun to play on your own )
By the way, if you ever get a laser tag application up and running, it would be nice to see it here on the forum. I wanted to do something like that but didn't even start, thinking it was too difficult.
Jim C
I'm hoping that having MILES tag as a reference will help the design once I can actually use the prop (for instance, MILES tag checks for things like self-hits, burnt out IR LEDs, etc).
I will of course post it on the forum if I have some level of success (and probably numerous questions along the way).
I'm interested to see what features you've implemented. I believe the contest finishes on the 1st of december?
The Propeller LaserTag system is composed of four different parts:
1) Gun/Vest unit
2) Claymore unit
3) PC Data Link
4) Computer Program
There are two different modes of operation; Team and Free-for-All modes. In Team mode, you cannot hurt anyone on your team (i.e. Red team cannot shoot any other Red player). In Free-for-All, you can shoot anyone. The vests are programmed via Propeller based PC Data Link. The game type and game duration is sent via IR transmission to the vests. Thirty seconds after being programmed, the game starts. The Shot data is recorded to the built in SD card.
The PC Data Link module sends IR data for the game type and duration to the vests. In the future, the link will be able to get the shot data from the guns so the SD cards won’t need to be removed.
The Claymore units are built for setting up “traps” for the opposing teams. To setup the Claymore, turn it on and shoot it one time. This procedure will program the Claymore with the ID of the person that shot it. Every time the Claymore shoots a player, the person that activated it will get the credit. If, an opposing team can shoot a Claymore four times within 15 seconds without being shot, the Claymore will reset to the new player’s ID thus switching teams. The LED indicator on top of the Claymore displays the color of the team it’s on. The Claymore will not switch to a different player’s ID on the same team, so a teammate cannot take over the Claymore.
The Vests have five IR sensors to detect a “shot”; Gun, Left Shoulder, Right Shoulder, Front, and Back. If any sensor detects a shot, the Vest goes into “shutdown mode” for fifteen seconds. The data (sensor number and Vest ID) are recorded to the SD card for future statistics processing via the PC program.
Once the programmed time has passed, the vest shuts down to end the game. The time is controlled via RTC. It is programmed on startup with the date and time of June 22, 1992 at 1:00:00 a.m. The game duration is added to this set time and the vest checks to see if the time has passed.
I've ordered (hopefully) all the parts I need for 2 gun\vest sets now, I estimate the cost at·~$50 US per set for the electronics and maybe ~$25 US for the gun casing\batteries\misc, though once I can start playing with the parts I might be able to trim down that price a bit. Too bad I didn't do this back in june\july when the exchange rate was higher >.<
I assume you are driving all the LEDs at 5v and not directly from the propeller?
And just FYI the MILEStag system runs a lower current through the IR LED for longer communications (to\from PC,·cloning settings,·etc) to keep the LED from burning out so might be worth considering.
Mike: Thanks for that, should be able to run the 'team colour' LEDs straight from the prop then (super bright rated at 30mA), the IR LED though is rated at 100mA (200mA peak) and I gather they push them pretty close to the limit to get·long range (hence the concern about them burning out often).