55
Configurable Laser Tag System Final Presentation Kedar Hiremath Andrew Floren Josh Armstrong Matt deWet

Kedar Hiremath Andrew Floren Josh Armstrong Matt deWet

Embed Size (px)

Citation preview

  • Slide 1

Kedar Hiremath Andrew Floren Josh Armstrong Matt deWet Slide 2 Overview of Presentation Introduce the Configurable Laser Tag System Design and Implementation Problems Encountered Cost and Other Considerations Conclusion and Recommendations Questions? Slide 3 Standard Laser Tag Simulated gun combat using infrared beams Problems: Limited Strategy Limited Teamwork Repetitive Low Replay Value http://www.laser-tron.com/Laser_Tag_Library/Laser_Tag_KidsPlayingLASERTRON.jpg Slide 4 Solution: Add Configurability! Ability to customize the game Create different gametypes & objectives Modify behavior of game devices Improvements: -Objective-Based Gameplay -Complex Tactical Strategy -Teamwork Required -High Replay Value Screenshot from Halo Capture The Flag http://www.bungie.net/images/games/HaloPC/screenshots/halopc_deathisland_ctf.jpg Slide 5 System Needs Basic laser tag functionality Wireless communication across devices Game scripting system Ability to script game Intuitive drag-and-drop GUI Robust compiler & linker Remotely initialize all game devices Slide 6 System Needs Ability to play indoors & outdoors Minimal power usage (max battery life) Low consumer costs Low prototyping costs http://www.linksengineer.com/Admin/NewsImages/479a012f-fa62-45ac-9ae3-ae40d092dd32.JPG Slide 7 Commercial Laser TagConfigurable Laser Tag Simulated gun combat Score Aggregation Objective-Based Play Configurable Devices Scriptable Gametypes Feature Comparison Slide 8 Slide 9 Design Overview Two devices necessary for basic laser tag Tagger Necessary for tagging other players Transmits IR data Pack Necessary for sensing when a player is tagged Receives IR data Slide 10 Design Overview In order to meet design objectives we need two additional devices Central Computer Keeps track of game state Enforces rules Communicates via RF Pylon Need stationary devices for players to interact with Functionality dependent on gametype Slide 11 Scale of Project Four completely separate devices IR communication RF communication USB communication Scripting language Complex software running on all devices Slide 12 System Communication Slide 13 IR Communications Hardware Chose matching lens diameter and focal length Protocol Designed 23 bit IR packet Error Handling Added 6 bit hamming code for error correction TEAM IDPLAYER ID EVENT ID 40KHz Wave TSOP4840 IR Receiver TSAL6100 IR LED WPN DMG Slide 14 RF Communication Hardware Using ONE-NET schematics Protocol Using ONE-NET protocol Allows multiple devices to share a single channel Uses acknowledgment packets to guarantee delivery Slide 15 Scripting System Making scripting easy Think LabVIEW or Lego Mindstorms Basic structure Triggers & Primitives Basic logic How do we accomplish this? Internal representation? Interpreter? Slide 16 Scripting System Example Example C code Equivalent Syntax Tree void takeDamage(int amount, int shooterId) { if(!isDead) { if (HP > amount) HP = HP - amount; else { HP = 0; die(shooterId); } Slide 17 Scripting System Example Example Syntax Tree XML Representation Slide 18 Slide 19 Implementing Scripting Have a back-end representation This must run on microcontrollers Need to convert XML to executable code Slide 20 Implementing Scripting Drag-and-Drop GUI Abstract Syntax Tree (XML) XML Parser Compiler Linker Code Generation Slide 21 Compiler & Linker Tasks Lexical Analysis / Parsing Preprocessing Semantic Analysis Linking within scripts Linking between multiple scripts Code generation Fix for microcontrollers Compiling is messy Slide 22 Compiler & Linker Huge amount of work 4000+ lines of code Written in C++ Used only XML parsing library Completed! Slide 23 Interpreter GUI: User-drawn nodes XML script Compiler: XML script Data structures Interpreter: Run data structures Slide 24 Interpreter GUI: User-drawn nodes XML script Compiler: XML script Data structures Interpreter: Run data structures Low level code to run on microcontrollers Control devices based on script Primitives & Triggers Event infrastructure Slide 25 Interpreter GUI: User-drawn nodes XML script Compiler: XML script Data structures Interpreter: Run data structures Programmer/Flasher? Slide 26 Remote Programming Need to load scripts onto microcontroller via RF Central computer listens for new devices Send initialization data Keep list of active devices Interrupts must be disable while flashing Created packet request mechanism http://www.cisco.com/en/US/i/200001-300000/270001-280000/270001-271000/270121.jpg Slide 27 Major Changes Changed wireless module to XBee Modules pre-built Protocol nearly identical to ONE-NET Switched from crystal oscillator to timer circuit Timer circuit far more reliable Switched microcontrollers twice First to consolidate to a single type of microcontroller Second to increase RAM and IO pins Slide 28 Device Design Central Computer Slide 29 Device Design - Tagger Slide 30 Device Design - Pack Slide 31 Device Design - Pylon Slide 32 Device Casing Slide 33 Slide 34 Work Completed IR communication Protocol, software, and hardware RF communication Software and Hardware PCBs Pack Tagger Pylon Central Computer Slide 35 Work Completed LCD interface High level scripting language Parser, compiler, and linker Ability to flash compiled script Script interpreter Remote procedural calls Slide 36 Work Remaining System integration IR and timer code Power circuit Script gametypes GUI for admin and scripting front end Slide 37 Problems Encountered BDM Programmer PCB Problems Vdd and Vss Footprints Power circuit Via sizes Slide 38 Slide 39 Hardware Testing System testing Incomplete hardware Module testing Pack, Tagger, Central Computer, and Pylon Component testing ICs and passives Slide 40 Demo Milestone Protoboard Demo Tagger Pack Central Computer RF, IR, LCD All working Slide 41 Compiler Testing Slide 42 Slide 43 Project Scale Project was huge 12 hours per week to start 48 hours per week for last 5 weeks Plus other classes! Slide 44 Past Costs ItemCost LCD, 10 IR Leds, 4 IR recievers$25.80 RF Parts$12.59 PCBs over the summer$85.00 Breakout Board$12.49 PVC$12.24 USB controller$18.00 IR mounting$88.95 Crystals for IR$13.00 Shipping costs$17.14 TOTAL$285.21 Slide 45 New Costs ItemCost Final order from Digikey$112.00 Wires and connectors from pololu.com $141.47 Jameco - IR circuit & various parts$30.62 Final ordered PCBs$121.70 Final order from Mouser$109.21 Final order of LCDs$39.42 RadioShack Purchases$40.78 TOTAL$595.20 Slide 46 Cost to Others Oscilloscopes Power supplies Countless parts checked out Resistors Capacitors Programmer Soldering Iron Breakout boards http://hacknmod.com/wp-content/uploads/2008/10/oscilloscope.jpg Slide 47 Slide 48 Safety and Ethics IR safety Low power RF safety Low power FCC approved bands Entertainment device Failure is not dangerous http://www.laserfx.com/BasicSafety/safety.gif Slide 49 What We Learned USB communication and bus-power Send/receive encoded IR signals Send/receive encoded RF packets Design a language, XML parser, compiler and linker Slide 50 What We Learned Solder SMT prototypes Efficiently design and layout circuits Conserve space Effective teamwork Slide 51 Recommendations Do not tear down make continual progress If possible, get components that run on the same voltage Do not try to re- invent the wheel http://209.169.12.51/images/products/08687-03-L_i_ma.jpg Slide 52 Recommendations Compromise between low prototype cost and low product cost Remember: it is a prototype, not the end product Prioritize the essential parts Do not leave the power system until the end Slide 53 Conclusion The Configurable Laser Tag System Introduces customizable objective-based gameplay Is a complex integration of Configurable devices Communication protocols Game scripting software Slide 54 Conclusion If any one subsystem is not functioning, the system as a whole will fail to operate Despite the problems we encountered, we learned a lot, worked hard, and completed a significant portion of the work Slide 55