EE 477 Final Report

Document Sample
EE 477 Final Report Powered By Docstoc
					  ECE 477 Final Report  Spring 2010
Team 4  Quazyx: Laser Warfare System

Team Members:

#1: Ben Moeller     Signature:                                            Date: 6-May-10

#2: Emily Blount    Signature:                                            Date: 6-May-10

#3: David Freidin   Signature:                                            Date: 6-May-10

#4: Michael Niksa   Signature:                                            Date: 6-May-10

          CRITERION                              SCORE                  MPY      PTS
 Technical content               0   1   2   3   4 5 6 7   8   9   10    3
 Design documentation            0   1   2   3   4 5 6 7   8   9   10    3
 Technical writing style         0   1   2   3   4 5 6 7   8   9   10    2
 Contributions                   0   1   2   3   4 5 6 7   8   9   10    1
 Editing                         0   1   2   3   4 5 6 7   8   9   10    1
 Comments:                                                              TOTAL
ECE 477 Final Report

                         TABLE OF CONTENTS

Abstract                                             1
 1.0 Project Overview and Block Diagram              2
 2.0 Team Success Criteria and Fulfillment           4
 3.0 Constraint Analysis and Component Selection     5
 4.0 Patent Liability Analysis                      10
 5.0 Reliability and Safety Analysis                14
 6.0 Ethical and Environmental Impact Analysis      18
 7.0 Packaging Design Considerations                21
 8.0 Schematic Design Considerations                24
 9.0 PCB Layout Design Considerations               28
10.0 Software Design Considerations                 31
11.0 Version 2 Changes                              36
12.0 Summary and Conclusions                        37
13.0 References                                     38
Appendix A: Individual Contributions               A-1
Appendix B: Packaging                              B-1
Appendix C: Schematic                              C-1
Appendix D: PCB Layout Top and Bottom Copper       D-1
Appendix E: Parts List Spreadsheet                 E-1
Appendix F: FMECA Worksheet                        F-1

ECE 477 Final Report


The Quazyx: Laser Warfare System project is a new take on laser tag systems that incorporates
power-up elements of video games in a laser tag system that is less expensive than commercial
systems. It was designed in the spring of 2010 as part of the Purdue University Digital Systems
Senior Design class for the college of Electrical and Computer Engineering. The project was
selected to incorporate the wireless communications interest of several team members with the
desire to produce a genuinely fun product. The following report contains a revised form of all the
design specification and analysis documents produced throughout the semester along with
figures, schematics, PCB layouts, and referential sources that were utilized in the creation of the
final product.

ECE 477 Final Report

1.0 Project Overview and Block Diagram

The Quazyx system consists of two vests with four sensor modules each connected via phone
wire and standard Ethernet to their respective gun components. Each gun component contains a
PCB with microcontroller module, LCD display, LEDs, and trigger. Over the RF module on the
PCB, the gun/vest combination communicates with the respective RF module on the base station
PCB mounted within a project box. Also within the project box on the base station PCB is the
decoder module for the keypad input to control the game and the LCD panel to display output.

The primary game control logic and commands come from the base station PCB and associated
keypad and LCD display. The gun/vest serves mostly as an elaborate wirelessly connected sensor
array that provides very limited control over the game to the use beyond firing or physically
moving the sensor pods out of range of another gun. Only a small local display of the individual
player‟s status is shown.

The final, assembled playable laser tag system is shown below in a photograph labeled as Figure
1.1. The general internal structure and interconnection of the PCB and off-board components is
visible in the block diagrams shown in Figure 1.2

                       Figure 1.1 – Final Deliverable Laser Tag System

ECE 477 Final Report

                                                       Figure 1.2 – Final Block Diagram
                                                Gun Package
Vest Package                                                   Header                 SPI Data, Clock                           8-bit Shift Register

                                                                                                                                      Parallel Data
  IR Phototransistor

                                                        6                                                                                                LCD Panel
                                                                                           Command/Data                        Hitachi-Compatible
                                                                                       Write Enable General I/O                    LCD Driver
                        Input Capture
                                     DC Power           Vest Microcontroller                                             1PWM pin

                                                                                                                                                              IR Light Emitting
                                                                                           Generic I/O                      Trigger                                 Diode
                                                              Pins and ATD pin
            Color LEDs                                               4

                                                      Linx RF Transceiver


Base Package
                                                                                                                                8-bit Shift Register

                                                                                                                                      Parallel Data
               Linx RF Transceiver
                                                                                                                                                         LCD Panel
                                                                                                                                   LCD Driver
                                                            Base Microcontroller                         1

                                 4                                                                                                4 Column Scan


                                                                                      4 Data, Command                16-Key
                                                        Batteries                                                Keypad Encoder
                                                                                                                                        4 Row Scan       16-Key Keypad


        Programming Header

ECE 477 Final Report

2.0 Team Success Criteria and Fulfillment

   1. An ability to wirelessly transmit a shot and receive a hit via Infrared

      Reliable communication of Infrared shots was successfully established through both IR
      LED modules (for rifle and shotgun modes) and received by the vest pack sensor arrays.
      Player IDs that are associated through the RF handshake protocol are successfully
      propagated to the IR communication to distinguish between players.

   2. An ability to remotely enable and disable the gun/vest pair

      Enabling and disabling the gun vest pair happens, as envisioned, both as a result of RF
      communication and as a reaction to Infrared. An individual in an administrative position
      can utilize the base station to start and end the game, transmitting the appropriate packets
      over the RF channel, and remotely enabling or disabling the gun and vest. Additionally,
      through the course of shots and hits in a laser tag game, the vest is disabled on proper
      Infrared reception and re-enabled after several seconds to represent a “kill.”

   3. An ability to control game operation using base station keypad

      The base station keypad can be used to navigate all game setup and operation menus on
      the base station module and causes the proper RF routines to be activated in order to
      effectively control the game operation.

   4. An ability to wirelessly communicate game statistics to base station via RF

      Trigger pulls as well as kills and deaths are transmitted to the base station as they occur
      on the various roaming gun/vest modules. The base station receives this information
      properly and displays it on the LCD panel both as it occurs for the game administrator as
      well as in an aggregate form after the game has been ended.

   5. An ability to provide user with local display of game information

     The LCD panels on the gun/vest modules update as the gun transitions between startup,
     registration, game play, and game over modes. Also, messages are displayed at the
     moment of a kill from another player to identify that player. Lastly, packets received from
     the base station every thirty seconds are displayed to show the remaining game time and
     collected kill and death information.

ECE 477 Final Report

3.0 Constraint Analysis and Component Selection

3.1   Introduction

The Quazyx Laser Warfare System is designed to emulate professional laser tag systems used
within recreational facilities and military exercises while being low cost, completely portable,
and constructed from readily available parts. As the major portion of the system is the portable
gun/vest pack, power and size will be the primary constraints in selecting components and
packaging the final product. Additionally, to ensure successful completion of the project within
the next several months and on a limited budget, we have prioritized manufacturers whose parts
have been introduced to our team in previous design projects.

3.2   Design Constraint Analysis

The major constraint of the laser tag system is the portable nature of the gun/vest packs that are
deployed to each participant in the game. As such, each pack must consume minimal power such
that the batteries used can be selected to be as light as possible to prevent user fatigue. To keep
costs low, standard C or D cell batteries are intended to be used to power the device.
Additionally, the mature technologies of infrared and ISM-band radio frequency will be
considered as a part of the portable, wireless nature of the game packs to ensure a reliable real-
time solution to communication. Lastly, in a high-adrenaline game such as laser tag, the final
design consideration will be durable packaging that can withstand running, jumping, dodging,
and crawling expected to be a part of a successful and entertaining laser tag experience.

3.3   Computation Requirements

Computation within the portable gun-vest portion of the system is limited as this microcontroller
serves mostly to relay information occurring within the game to the base station module.
However, as players would like data to update in real-time, the microcontroller must be
sufficiently powerful to capture shot and hit data, process it, relay it to the base station, and
display the response to the user as quickly as possible.

The base station module requires more computational power as it must manage a one-to-many
relationship with the various gun pack devices in the system potentially switching between
identification codes to speak with all compatible devices within an area in limited time. Integer
mathematics will suffice as the primary numerical computation consists of incrementing and
decrementing various score values and tracking the current game time. Additional features like
game statistics, radio communication, and display are not computation intensive and are likely to
be entirely dependent on the speed of serial I/O from the microcontroller to the various

ECE 477 Final Report

peripherals. Most microcontrollers available to us are clocked within the megahertz range,
allowing plenty of speed for this communication.

3.4   Interface Requirements

For radio frequency communication, the microcontroller device needs to interface with the RF
transceiver via three control pins: a bi-directional serial pin, a transmit-ready pin, and a receive-
ready pin. Since the RF transceiver selected from Linx Technologies supports standard serial
communication, we expect to interface with a standard SCI component of the selected
microcontroller or general purpose I/O pins. Up to eight additional general-purpose I/O pins will
be used to communicate data from the microcontroller to the transcoder module responsible for
RF communication.

A serial shift register will be required in each of the gun packs as well as in the base station to
send data into a Hitachi-compatible LCD display screen. The 8-bit shift register will service the
data lines on the LCD panel using only one output of the microcontroller, and an additional two
pins will be needed to select command vs. data and to clock the commands into the peripheral

In the base station module, to control the operation of the game and command the
microcontroller to display various statistics on the base station‟s LCD panel, a keypad scanner
will be utilized to minimize I/O pins consumed on the microcontroller as well as to offload the
scanning work.

Current sourcing requirements from the microcontroller are minimal as it primarily drives other
ICs to perform communication functionality. The only concern may be the LEDs in the gun/vest
unit as they will likely require high current for bright, long-distance IR transmission. This
concern is easily mitigated with inexpensive switching transistors, and therefore the chosen
microcontroller seems sufficient for the application.

3.5   On-Chip Peripheral Requirements

On board, an ATD interface is needed to monitor the status of the RF module as well as to
generate random numbers efficiently. An SPI interface will be necessary for LCD
communication via the shift register. Change notification modules would be useful to detect
trigger pulls and button presses on the keypad without the need for polling. Additionally, input
capture modules to capture the time when an IR beam is detected will be useful for receiving IR
reliably. Additionally, three timers are necessary for the delay routines inherent to IR and RF
communication as well as to set up the sampling of the ATD. For details of the peripherals that
exist in our selected Microchip microcontroller, see [1].

ECE 477 Final Report

3.6   Off-Chip Peripheral Requirements

The off-chip peripherals we will use include a keypad encoder in the base module to offload
scanning and interrupt functionality, a shift register for port expansion use with the LCD panel in
both the base and the game packs, and the Linx RF transcoder that will offload the handling of
collision detection, packet encoding and decoding, and all other major wireless carrier activities
for the radio frequency transceiver.

3.7   Power Constraints

The portable gun-vest portion of the system will need to be battery powered. Our initial estimates
look into using standard off-the-shelf C or D cell batteries depending on the desired life time of
each charge and how much current we expect to draw. In either case, three batteries in series will
provide 4.5v which is well within the operating range for all components selected in our system.
Rough estimates of total power stored within D cell batteries are approximately 12,000 to 18,000
mAh per battery [2] which we believe will yield at least eighteen hours of play time based on
calculations of current usage of all the system components.

For the base station unit, we use the same configuration of three standard battery cells to make
the design uniform with the portable packs. A point of note is that the base station will not need
to light up all the LEDs associated with the portable packs, so it will require less current and last
for a longer period of time on the same battery cells as the portable packs. A battery powered
base allows the game to be taken and set up outdoors in any location, a potentially desirable

3.8   Packaging Constraints

For the portable vest and gun combination portion of the Laser Tag system, the overall package
must be as light in weight as possible to minimize fatigue of the players running with the device.
Items with significant weight like batteries were placed near the handle of the gun to minimize
torque on the player‟s hand as it grips the gun handle. The vest will be made of durable nylon or
some similarly tough material, and the gun was selected from various ABS plastic designs
available from major toy manufacturers. The cable that runs between the gun and vest
combination was selected as a piece of durable Ethernet cable that allows range of movement
while protecting the power and communications cables inside.

ECE 477 Final Report

3.9   Cost Constraints

In comparison with our design, competing consumer level laser tag products on the market range
in price from $25 to $600 depending on features, range, quality, and inclusion of an additional
wearable vest or heads-up display [3]. Commercial systems from companies like Laserforce and
Laser Runner start at $30,000 for an entry level system and additional packs around $2,000 each
[4]. As a competitor to these products, we would like our system to be on the order of the
consumer-level systems in the several hundred dollar range while including central
administration, statistics, and additional custom features normally not seen outside the
commercial arena.

3.10 Component Selection Rationale

General rationale for minor component selection is manufacturers and interfaces that are familiar
to members of our team from previous school-related or personal design projects. Additionally,
we attempted to select components that were as inexpensive as possible since we had to fund our
own development. An example is the Hitachi-compatible parallel data LCD panels included for
user interfacing on the gun packs versus serial-only interfaces.

For the microcontroller, one of the two major components, we chose from several options within
Microchip‟s PIC 16-bit controller line. Several team members are familiar with PIC products and
expect shorter development time with these products. Additionally, all the PIC controllers
considered ranged in price from $3 to $6. Specifically, two candidates for the microcontroller
included the dsPIC33FJ32GP304 and the dsPIC30F4011. The dsPIC33FJ32GP304 boasted a
higher precision 12-bit A/D converter, a larger 4 kb of RAM, and an additional SPI interface [5]
while the dsPIC30F4011 has a larger 48kb of Flash program memory, an equal 2 UART
interfaces, six PWM channels, a larger 2.5v to 5.5v input operating voltage range, and is one
dollar more expensive at $4 per unit [1]. Ultimately we selected the dsPIC30F4011 with larger
voltage range such that it could be operated on two or three standard batteries (3 or 4.5v) and
because while generally comparable, free samples were available of this model.

In terms of radio frequency modules, the other major component, we chose from three main
manufacturers: Linx Technologies, Texas Instruments, and Freescale Semiconductor. In the
inexpensive ISM-band transceiver lines, the Texas Instruments CC110RTKR [6] and Freescale
MC33696 [7] were similar products requiring an external crystal oscillator, having an SPI
interface to a microcontroller, operating on a wide variety of ISM bands, and priced at around $6
per module. The Linx Technologies system, in contrast, is more expensive at $22 for antenna,
transceiver, and codec; targets only one specific ISM frequency of 418 MHz; and has a low data
rate of 10,000bps at up to 3,000ft [8]. However, the Linx system is more attractive in that it is
nearly a turnkey RF solution where collision detection, interference, and many-to-one

ECE 477 Final Report

communication is handled by the separate codec module eliminating the need to write extensive
software code to handle such functionality. As such, we selected the Linx Technologies system
for our design despite being slightly contrary in the price category for the additional functionality
while remaining at approximately the same power consumption (about 14mA transmitting) as
comparable models.

3.11 Summary

Ultimately the design for the laser tag system consists of readily available, inexpensive, and
proven radio frequency, keypad, and LCD interfaces connected to a familiar and well-equipped
microcontroller. While cost and size remained a concern in part selection, in select cases like the
RF module, ease of use and interfacing was prioritized. However, as a whole, the system will be
low enough on current draw to be run for many hours on one set of standard cell batteries and
will fit securely into hard plastic based packaging to be light, portable, and rugged enough to
create an enjoyable system.

ECE 477 Final Report

4.0 Patent Liability Analysis

4.1   Results of Patent and Product Search

4.1.1 Electronic Tag Game (6,530,841 Filed: 06/26/2001)

A wireless device-enabled tag game is presented in this patent. Below is a brief description of the
patented design.

“The game allows players to find and tag each other with their wireless devices. When one
player's device is in close proximity to the device of another player, the tag is enabled by the
wireless devices, thereby eliminating the need for physical contact to make the tag. The wireless
device of either player can display the status and results of the game. Because the game can be
defined in a particular space and can include anyone with an appropriate wireless device, the
game may remain ongoing such that players may join and part at will without greatly affecting
the game.” [9]

The system in patent 6,530,841 claims to be “an electronic system for playing a game of tag”
which incorporates “a radio-frequency configuration.” [9]

4.1.2 Interactive Light-Operated Toy Shooting Game (5,741,185 Filed: 02/05/1997)

The system described in this patent operates in a somewhat similar way to the Quazyx system.
Below is a description taken from the patent.

“The invention provides a toy light projector or light gun and player-worn and self-propelled toy
targets which detect light emitted by a toy light gun, and a toy shooting game which includes at
least one toy light gun, and at least one toy target.” [10]

A few claims made in this patent are possible infringed by the Quazyx system. The first of these
is “a toy light projector used in a toy shooting game.” [10] The second claim which may be
infringed is “an electrical circuit... which controls energization of said light source according to a
selectable code and thereby causes said light source to emit light with the selected code.”[10]

4.1.3 Electronic Game with Infrared Emitter and Sensor (5,904,621 Filed: 01/16/1998)

This patent is extremely similar to the Quazyx system. A brief description is below.

“A hand-held electronic toy gun and target apparatus facilitating a game of tag using infrared
light communications between a plurality of players. An electronic controller is coupled to a
transmitter for sending a series of encoded infrared light signals and a receiver for detecting

ECE 477 Final Report

infrared light signals.” [11]

There are multiple claims made in this patent which might be infringed by the Quazyx system.
The first, and most notable, of these is “an apparatus for facilitating a game of tag using infrared
light communications between a plurality of players.” [11] The patent also claims to have “at
least one switch coupled to [an electronic] controller for generating a plurality of game
functions” and “a transmitter coupled to said controller for sending a series of encoded infrared
light signals responsive to said at least one switch.” [11]

4.2    Analysis of Patent Liability

4.2.1 Patent Liability Analysis for Electronic Tag Game
The electronic tag game which is described in patent 6530841 is, in many ways, similar to the
Quazyx system. It claims an RF wireless system to communicate user data to other individuals
playing the game. It also claims to be an “electronic system for playing a game of tag.” Both of
these claims are very similar to claims made by the Quazyx system. However, by nature of their
use in both systems, they are substantially different.

In the Quazyx system, RF communication is only used to transmit game statistics and “who hit
who” data. This information is broadcasted from a gun-vest pair and received by a base station. It
is then re-broadcasted by the base station and received by the appropriate gun-vest pair to which
the data applies. At the end, the base station displays all of the data which has been compiled
during the course of the game. In the Electronic Tag Game system, RF communication is used to
convey player location data to each player in the game and only players. This data is displayed
on a screen and the players use it to track down other players in the game. There is no base
station in this implementation and the information which is being transmitted is entirely different
than game statistics.

Additionally, the method of communicating a “tag” in the Electronic Tag Game is substantially
different from the method used in the Quazyx system. In order to communicate a “tag” in the
Electronic Tag Game system, players must be within some set proximity of one another. The
system detects this proximity and automatically transfers the “tag” from one player to the other.
In the Quazyx system, an encoded IR light beam is sent from one gun-vest pair and detected by
another to communicate a “tag.” This is arguably a substantially different method of
communicating a “tag.”
4.2.2 Patent Liability Analysis for Interactive Light-Operated Toy Shooting Game

The Interactive Light-Operated Toy Shooting Game is also very similar in a few ways to the
Quazyx system. The most notable of these is that it uses an encoded IR light beam to
communicate between a gun and a target. This encoded light beam is used to distinguish between

ECE 477 Final Report

two types of firing codes on the gun. The first code is used only to communicate a shot and let
the target accumulate hit data. The second code is used to reset the hit data on the target.

Like the Interactive Light-Operated Toy Shooting Game, Quazyx also uses an encoded IR light
beam to communicate data between gun and target. Unlike the other system however, Quazyx
uses a specifically encoded signal to communicate player information such as the vest number.
This information is radically different than sending a reset signal via IR. Additionally, the
method of communicating this data is substantially different. Both signals are encoded, but while
the Interactive Light-Operated Toy Shooting Game uses a binary signal to differentiate between
signals, Quazyx uses a different duty cycle for each gun-vest pair instead of communicating the
information as a binary signal.
4.2.3 Patent Liability Analysis for Electronic Game with Infrared Emitter and Sensor

The system described in this patent is extremely similar to the basic functionality of the Quazyx
system, especially when referring to the IR communication. This system uses an encoded IR
signal, sent from a gun to a vest, to communicate player specific data in order to distinguish
between users. In essence, this is exactly the same as the IR communication system being
developed for Quazyx.
Quazyx uses an encoded IR signal specifically for communicating user identification data. Since
this is the exact implementation used in the Electronic game with Infrared Emitter and Sensor,
Quazyx infringes on this patent.

4.3   Action Recommended

4.3.1 Action Recommended for Electronic Tag Game
It was determined in the discussion in section 4.2.1 that Quazyx does not infringe upon this
patent. Because Quazyx does not infringe, it is not necessary to take any further action regarding
this patent.

4.3.2 Action Recommended for Interactive Light-Operated Toy Shooting Game

It was determined in the discussion in section 4.2.2 that Quazyx does not infringe upon this
patent. Because Quazyx does not infringe, it is not necessary to take any further action regarding
this patent.

ECE 477 Final Report

4.3.3 Action Recommended for Electronic Game with Infrared Emitter and Sensor

It was determined in the discussion in section 4.2.3 that Quazyx does in fact infringe upon this
patent. Because Quazyx infringes, it will be necessary to request licensing from the patent
holders and pay them royalty fees.

4.4   Summary

This section includes an analysis of the patent liability for the Quazyx laser tag system being
developed. It was included in the above sections that the current Quazyx design does infringe
upon US patent 5,904,621, Electronic Game with Infrared Emitter and Sensor. Since Quazyx
infringes, it will be necessary to request licensing from the patent owners and pay them royalty

ECE 477 Final Report

5.0 Reliability and Safety Analysis

5.1   Introduction

Our project is a laser tag system intended for playing in an indoor or outdoor environment. The
game of laser tag carries with it some inherent safety risks, due to high-adrenaline physical
activity in a simulated warfare environment. The opportunities for injury due to player actions
and environmental hazards are completely out of our control; the most protection we can offer is
a set of warnings and appropriate game rules in the user manual. However, the physical nature of
the game must still be taken into account in designing our system to be robust enough to
withstand a certain minimal amount of jostling. Any parts which are not securely fastened to and
completely enclosed within the packaging are at risk of being damaged in ways which cannot be
entirely predicted.

In addition to the physical hazards of the game, our system also carries a potential safety hazard
in the form of a laser, used for visual targeting feedback. The website
[15] explains the damage that can be caused by shining a laser into a human eye. However, it
also points out that for lasers rated at 5 mW or less (ours is 3 mW), a normally functioning “blink
reflex” is sufficient to prevent accidental damage. It is still possible to cause retinal damage by
purposely shining the laser into an eye and keeping that eye open, but if we simply limit the
duration of a shot to 1 second or so, it would be effectively impossible to do so without
deliberately misusing the product.

The final safety concern is the power supply. Our units are powered by three standard D-cell
batteries. These were chosen for various reasons, including cost-effectiveness and reliability.
Alkaline batteries have been around for over fifty years, and are much more stable and reliable
than newer high-capacity batteries such as lithium-ion. The primary issues that can result from
various power problems are sparking and leaking. Sparking could occur with any short-circuit
anywhere in the device. In order to prevent harm to the user from sparking, all electrical
components are fully enclosed and insulated from the user. Our batteries will only reach a
combined total of 4.5V, with only 3V going to the PCBs, so as long as the insulation is good,
there should be no risk to the user from sparking. The other possibility is that the batteries could
leak potassium hydroxide (KOH). There should not be any immediate danger to the user, as the
batteries are fully enclosed in either the gun or base station. The possibility of danger arises
when the user attempts to remove the failed batteries. Unfortunately, there is not much we can do
to lessen this risk aside from placing appropriate warnings in the user manual.

ECE 477 Final Report

5.2     Reliability Analysis

The three components I will focus on for analysis will be the microcontroller, the RF transceiver,
and the LEDs. The microcontroller (dsPIC30F4011) is probably the most complex component in
our design. It has the most pins of any device, and is the most general purpose of the devices we
are using. The RF transceiver is also a fairly complicated component, and it has the highest
operational frequency in our project, as it must transmit an RF signal at 418 MHz. Finally, the
LEDs make up the majority of the current drawn by our system, and there are more of them than
any other component.

                 Table 5.2.1 - Microcontroller (Microelectronic Circuit Model)
      Parameter name     Description             Value         Comments
      C1                 Die complexity          0.14
      πT                 Temperature coeff.      1.5           Assuming room temperature
      C2                 Pin constant            0.015         Value for 40 pins
      πE                 Environmental constant 6              “Ground Fixed” environment
      πL                 Learning factor         1             In production for more than 2
      πQ                 Quality factor          10            Non-military grade
      λP                 Predicted failure rate  3             Per 106 hours
      MTTF               Mean time to failure    333333        Years

                  Table 5.2.2 - RF Transceiver (Microelectronic Circuit Model)
      Parameter name     Description              Value        Comments
      C1                 Die complexity           0.14         Assuming similar complexity
                                                               to our microcontroller
      πT                 Temperature coeff.       1.5          Assuming room temperature
      C2                 Pin constant             0.0041       12 pins
      πE                 Environmental constant 6              “Ground Fixed” environment
      πL                 Learning factor          1            In production for more than 2
      πQ                 Quality factor           10           Non-military grade
      λP                 Predicted failure rate   2.346        Per 106 hours
      MTTF               Mean time to failure     426257       Years

ECE 477 Final Report

                                 Table 5.2.3 - LEDs (Diode Model)
      Parameter name      Description              Value       Comments
      λB                  Base failure probability 0.0012      General purpose diode
      πT                  Temperature coeff.       3.9         Assuming room temperature
      πS                  Stress coefficient       0.054       Not a tranzorb
      πC                  Contact construction     1
      πQ                  Quality factor           8           Plastic-encapsulated
      πE                  Environmental constant 6             “Ground Fixed” environment
      λP                  Predicted failure rate   0.0123      Per 106 hours
      MTTF                Mean time to failure     81300813    Years

While the predicted failure rates for the microcontroller and RF transceiver are rather high, the
values used in the calculations are worst case scenarios. In particular, the quality factor is
probably somewhat below 10, and the temperature coefficient for the microcontroller is probably
much lower than this upper bound due to the fact that it is being used at the lower end of its
voltage range [13]. We could further reduce the heating of the microcontroller by reducing its
clock rate, but there is a point of diminishing returns. If heat was found to be a serious issue, we
have enough room that we could easily apply small heat sinks to certain components.

5.3     Failure Mode, Effects, and Criticality Analysis (FMECA)

Appendix F contains circuit schematics for various subsystems of our product. Each system has
its own potential failures associated with it, and the failures for each system affect the game in
different ways. For the FMECA tables in Appendix F, three levels of criticality are used: Low,
Medium, and High. High criticality indicates a possibility of harm to a user. Low and Medium
criticality are differentiated by both importance to gameplay and ability to replace with a spare
component. If a particular failure still allows the game to be played or the broken part is easily
replaceable by the user, the failure has low criticality. Otherwise it has medium criticality. Note
that the parts that are not replaceable are generally critical for gameplay, so the question of
whether a non-replaceable failure that doesn‟t break gameplay should be medium or low
criticality can be ignored. The criticality of each failure is briefly explained in its row in the
FMECA tables. For high criticality failures, the probability of failure should be less than 10-9.
For medium criticality failures, a rate of around 10-6 is reasonable, and for low criticality
failures the rate can be higher.

ECE 477 Final Report

5.4   Summary

Our project has various safety hazards associated with it. However, many of these hazards are
part of the normal intended usage scenario of the system. Because none of the components we
are using are bleeding edge technology, they are expected to be very reliable, especially if we
avoid using them near the limits of their specifications. Very few of our potential failures have a
possibility of harm to the user, and we are doing all we can at our end to prevent such harm.

ECE 477 Final Report

6.0 Ethical and Environmental Impact Analysis

6.1   Introduction

The Quazyx Laser Warfare System is a modified laser tag game implemented using IR shots
and RF communication between the gun and vest units and the base station. Although the
software of the system recognizes the IR signal as a shot, an actual laser has been included as a
visual cue to the player. Lasers can be potentially harmful in many ways, and this is a major
ethical concern. Also due to the inherent violence in any simulated warfare system, it would be
unethical to expose impressionable youth to this violence, much in the way that violent movies
are age restricted without parental consent.

A unit of this system is composed of a fabric vest, plastic gun, various electronic components,
D-cell batteries, and a plastic box for the base station. All components are designed to be
durable to withstand damage during high activity play; therefore, the expected lifetime of this
product is fairly lengthy. The only components that will have a shorter lifespan than the rest of
the product are the batteries, which have been specifically chosen to be easily replaceable and

6.2   Ethical Impact Analysis

During the manufacture and production of this product, precautions should be taken to resolve
several ethical problems related to and because of this product. Since this product will be used in
high intensity rough play, the product should be thoroughly tested to withstand brutal
environments and handling. In the event that the product is dropped, smashed, bumped, or
crushed, it should be able to endure with reasonable function. Testing should simulate these
actions. A vibration chamber would be ideal to be able to test the ability of the circuits within
the product to withstand extreme actions. The components of this product should not jar loose or
break including circuit components and the PCB housed within the gun. To secure all parts, the
PCB will be screwed, or otherwise securely fastened, to the gun housing. The components on
the board will be securely soldered or fastened with a secure header. To prevent the cables from
becoming stressed by pulling from the gun, a strap will connect the gun to the vest so that in the
event the gun is dropped, the weight is handled by the strap and not the cables. The plastic
housing of the gun itself has been designed to withstand damage due to the fact that the housing
originated as a squirt gun, a product that must withstand similar play style factors. By designing
the product to withstand high intensity play and damage the user will benefit from the long
lifecycle of this product.

The other major ethical concern of this product is the use of the laser. Firstly, in the event that
the laser is directed at the eye, it can cause damage. According to the FDA, which regulates all

ECE 477 Final Report

laser usage, laser products should have labels stating that the product complies with the federal
laser standard [16]. Any laser that uses more power than 5mW is directly regulated by the FDA,
whereas those powered by less than 5mW can be manufactured and used recreationally. This
laser warfare system uses a 3mW red laser, which is safer for users because of the low power and
the color of the laser since the eye is less sensitive to the color red. Flash blindness occurs when
the eye is exposed to intense light and can last anywhere from a few seconds to several minutes
[17]. This is a potential hazard of the game, and as such, the hazard has been minimized as much
as possible by the choice of a low power red laser and the inclusion of a warning label on the
packaging cautioning the user to avoid staring into the laser beam. Secondly, the misuse of the
laser is another ethical concern. This laser tag system has been designed for outdoor use, and, as
such, playing in an open area could cause severe damage. For example, playing near roads could
cause flash blindness for the drivers which could cause car crashes, or also a bystander or
bicyclist could be startled by the laser and trip and fall. To remediate this potential for harm, a
caution in the user documentation would suggest playing in an area away from roads and
bystanders and to avoid shining the laser at any overhead airplanes or distant mountains.

Lastly, due to the violence inherent in a warfare simulation system and the potential for
mischievous misuse, a caution would be included in the user manual to suggest restriction of use
of this product to users over the age of 18. Since ideally this product would be sold in stores, a
way to prohibit use would be difficult; therefore, only a cautionary statement in the user manual
is feasible.

6.3   Environmental Impact Analysis

The environmental impact of this product is minimized due to the design. It has been designed
to last for a lengthy period of time and to withstand hazardous environments. The only parts that
will need regular replacement are the non-rechargeable D-cell batteries. The product has been
designed to run from alkaline D-cell batteries because of the minimal environmental impact.
Many places alkaline batteries are do not require special disposal; however, in the user manual, it
would be suggested to recycle the used batteries. Many cell phone companies offer this service
for free [18].

In the event that the product should break, guidelines for disposing the parts correctly will be
included in the user manual. The current product uses a mass produced squirt gun as the basis
for the laser gun. The plastic in this gun is non-recyclable; however, it can be safely disposed in
the city dump. Likewise, the plastic coverings for the base station and vest sensor pods can also
be safely disposed to the local trash repository. The fabric material is made of durable polyester;
however, it will also decompose without any environmental impact other than the cubic space it
will occupy in the dump. The last concern for disposing this product correctly is disposing the
electronic components correctly. Without belaboring the point, the PCB contains lead, and the

ECE 477 Final Report

other various electronic components also contain heavy metals that are considered harmful to the
environment. One suggestion of disposal of the electronic components would be to donate the
materials to a local high school to use in their computer courses as examples. It would also be
suggested in the user manual, to dispose of the materials at a local electronics recycler.

6.4   Summary

In brief, the major ethical concerns for the Quazyx: Laser Warfare System include reliable
durable design, laser hazards, laser misuse, and violence exposure to minors. These concerns are
addressed by extensive durability testing, a laser hazard label included on the packaging, a
caution in the user manual stating play should be away from bystanders and roads, another
caution directing users to refrain from pointing lasers at far away objects, and lastly a parental
advisory stating that play should be restricted to ages 18 and up.

The major environmental concerns include battery disposal, vest and plastics, and proper
disposal of electronic components. These environmental concerns have been addressed by
utilizing a battery that is considered less hazardous to the environment, the use of bio-degradable
plastics and fabrics, and instructions in the user manual to dispose of electronic components at a
local recycler or high school.

ECE 477 Final Report

7.0 Packaging Design Considerations

7.1   Introduction

Our project idea is a conventional Laser Tag game system with additional Halo-inspired features
including multiple firing modes and defensive features. It is an infrared and RF-based system
that will incorporate several gun and vest pairs to simulate a virtual war game. The gun housing
will be the shell of a water gun while the interior will include most of the electronics for the
system. The vests will be comprised of a heavy-duty fabric and will have four sensors attached.

7.2   Commercial Product Packaging

7.2.1 Product #1 – LT-11.5 Laser Tag System
                                                                     This professional laser tag
                                                                    system is known as the LT-
                                                                    11.5 and is the system of
                                                                    choice for newly started laser
                                                                    tag arenas [19]. From a
                                                                    packaging standpoint, this
                                                                    laser tag system is very well
                                                                    built and durable. It is meant
                                                                    to stand up to many years of
                                                                    constant use.

                                                                   The gun is comprised of a
                                                                   hard plastic shell with a
sensor and LED built in. Additionally, this system requires two hands to be used on the gun
when firing. The red button at the end of the gun needs to be pressed down when firing. This is
a feature we will not be including in our design. We are also not planning to have a sensor built
into the gun. Also, the commercial gun is designed to be extremely durable and made out of
hard plastic. Our gun packages are made from modified squirt gun housings, so they will be less
durable. Aside from these minor differences, our system‟s gun will be very similar to the gun in
the LT-11.5 system.

The LT-11.5 vest is also very similar to the vest we will be using in our design. It is durable and
includes four sensors to detect a shot at the vest. Since this is a professional system, it is
obviously a very well-designed system. However, our vest will not be as bulky as this design.
The LT-11.5 vest is comprised of hard plastic and covered with a foam layer. Our design will be
made of a heavy duty fabric and will conform to the user‟s body. Also, the LT-11.5 has most of
the electronics housed in a hard plastic case on the front of the vest. Our design idea is to have

ECE 477 Final Report

the PCB and batteries inside the gun housing. This will allow us to connect our off-board
electronic components with minimal cabling and keep things more compact. Our vest will have
only the four IR sensors built into it and will have minimal wiring routing signals from these
sensors back to the gun.

7.2.2 Product #2 – Humvee Combat Tactical Vest

                                                      The Humvee Combat Tactical Vest (HCTV)
                                                      is very durable and lightweight [20]. By
                                                      nature, this vest can be worn by different
                                                      many different sized people, where the LT-
                                                      11.5 vest was hard plastic and would only
                                                      comfortably fit athletic middle-aged people.
                                                      In our vest design, we will be using a fabric
                                                      similar to that used in the HCTV. Our vest is
                                                      intended to be lightweight but durable and
                                                      comfortable. The HCTV design accomplishes
                                                      these requirements very well.

                                                     One main difference between our design and
                                                     that of the HCTV is that we won‟t be using a
zipper-up vest with arm holes. Our vest is designed with open sides and will have buckles on
both sides to allow adjusting for larger or smaller wearers.

7.2.3 Product #3 – Radio Shack Project Box [21]

Our base station will be a very simple design. It will be a large PCB housed in a Radio Shack
project box with access to an external keypad and LCD screen. Due to the simplicity of this
design and the unique nature of our base station, it was impossible to locate any commercial
product which was similar enough to reference.

7.3   Project Packaging Specifications

The gun housing for our laser tag system will be the shell of a Wal-Mart-brand water gun. This
housing provides us with an excess of space in the reservoir tank to place electronics and wiring.
It is also lightweight, durable, and ergonomically friendly. A CAD representation of the gun
housing is provided in Appendix B of the final report. It is a very accurate representation of the
size of the gun but has no detail on the surface of the shell as this is unnecessary.

ECE 477 Final Report

The vest for our system is going to be hand-made by Emily from a sturdy nylon fabric or
equivalent. It will have a buckling system to allow the wearer to tighten it to their chest size. The
CAD drawing provided in Appendix B of this document is a fair representation of the size and
shape we will be using. Also included in this drawing are the placement locations of the sensor
pods. Two will be located on the shoulders; the other two will be located on the front and back.

Our base station is simply going to be a box, roughly 6” x 8” x 3” in size. This box size was
chosen to leave enough room to accommodate for all of our electronic components such as the
LCD screen and keypad. Additionally, the inside of the box allows enough room for the PCB and
batteries. A CAD representation of the final base station design is provided in Appendix B of the
final report.

7.4   PCB Footprint Layout

Thankfully for our project, we are not really constrained at all by PCB size. The only thing we
needed to make sure was that there was enough space available for metal fill to provide the RF
chip with an antenna. This metal fill was the main constraint of the overall PCB size for our

The base station PCB is nearly identical to the gun PCB. The main difference is that the base
station PCB has connections for the keypad and keypad encoder. However, this only requires the
placement of one IC and a header, so this causes minimal size constraints. Both the LCD and
keypad will not be connected directly to the PCB but will be connected via a cable and mounted
to the external face of the project box.

7.5   Summary

This report includes multiple comparisons of product similar to our own which are already in
existence as well as specifications that will be used in the packaging of our product. It also
includes detailed CAD drawings of our product.

ECE 477 Final Report

8.0 Schematic Design Considerations

8.1   Introduction

The laser tag system is composed of a base station, and two vest and gun combinations. The
base station will include a keypad to enable users to input different game modes, an LCD screen
to display game statistics, an RF transceiver to communicate with the vests, a header to enable
programming of the microcontroller, and lastly a power supply. Each vest will have several
sensor pods, placed on the shoulders, front and back that will contain IR phototransistors to
detect „hits‟ and color LEDs to display current status of the player (alive or dead and color will
indicate team). The vest will be linked through an Ethernet cable to the gun with IR detector
signals (a total of four, one for each pod), LED transistor signals (to control LED blinking),
power, and ground.

8.2   Theory of Operation

Each subsection of the circuit is directly controlled by the microcontroller [22], whether on the
base station or on the gun and vest, except for the trigger which is controlled by the user and is a
simple switch that is pulled down when closed and otherwise pulled high through a pull-up
resistor. One major subsection of the circuit is the RF transceiver. The transceiver has a
transmit-or-receive enable pin that is directly controlled by the microcontroller. When the T/R
pin is enabled to transmit, then the data pin is in input mode, and when the T/R pin is enabled to
receive, then the data pin is in output mode [23]. The microprocessor handles the encoding and
decoding of the signal passed through the data pin. Therefore, when the microprocessor sends
the T/R pin to transmit, the data line becomes an input and receives data from the
microprocessor. The transceiver then transmits the data by use of Carrier-Present Carrier-Absent
modulation. This means that logic „1‟ is represented by the presence of a carrier, and logic „0‟
by the absence of a carrier. The signal is passed to an antenna and broadcast. The data is then
received by the other antenna and filtered and amplified to recover the original signal, and output
on the data pin which is an output to the microcontroller. Therefore the second microcontroller
receives the data from the first microcontroller and this is how hits will be registered by the base
station and the signal to deactivate hit vests will be transmitted.

When hits are registered they will be displayed on the Newhaven Display LCD screens [24] of
both the base station and the gun. Therefore, the LCD screen is another major subsection of the
circuit. An 8-bit shift register from Fairchild Semiconductor [25] is used to interface with the
microcontroller through the SPI ports, mainly clock and data out. The data is shifted out of the
microcontroller and clocked into the shift register. Then when the LCD screen is enabled
through the enable pin, the data is shifted into the LCD panel where it is displayed.

ECE 477 Final Report

Another indication of a „hit‟ is through the status of the LEDs on the vest. The LEDs are
controlled through the general I/O pins of the vest microcontroller. Therefore, when the gun
microcontroller receives the command through the RF to deactivate the LEDs to simulate the hit,
the microcontroller drives the LED pins low. There are a total of two LED pins and each pin is
connected to the base of four 2N2222 BJT transistors. Although BJT transistors don‟t switch as
fast as MOSFETs, the LEDs don‟t need to blink that fast to require MOSFETS, so it was decided
to use the 2N2222 because they are cheap and will fulfill all requirements. The collector of each
transistor connects to the two LEDs which then each connect to a resistor and power. The
emitter is connected to ground. When the pins are driven low, the transistor turns off and cuts
power to the LEDs thereby also turning those off. The vest then simulates a hit because the vest
is „dead‟ when the LEDs are dark. The LEDs will be connected to 4.5V and the current though
each LED will be 20mA, which was determined to be plenty bright enough. For the blue LEDs
the required resistance was 31.5ohms because the forward voltage drop is 3.17V. For the red
LEDs, because they have a forward voltage drop of 1.8V, the required resistance to keep the
current through the red LED at 20mA is 100ohms. We decided to not include an LED driver
because construction on the sensor pods had already begun, and we felt that this design was
simple enough to negate the need for an LED driver.

The last major circuit subsection are the IR diodes used to send the shots and the IR
phototransistors used to detect each shot. There will be two IR diodes. One will be short range
and wide angled so simulate a „shotgun‟ blast. The other IR diode will be inside a barrel with a
lens at the end that will focus the IR light into a focused beam, simulating the „rifle‟ shot. Each
diode will be controlled by the PWM of the microcontroller. The PWM pin will connect to the
base of a transistor which will turn on or off according to the voltage level of the pin and thereby
also turn on and off the IR diode, exactly like the circuitry for the status LEDs. The 2N2222
transistor will still be used to control the switching of the IR LED. For encoding of the IR
signal, please refer to the software design section. Several phototransistors will used to detect
shots to increase the likelihood of a shot being detected. Each sensor pod will have three
phototransistors facing different directions with the signal detection pins tied together. Therefore
each sensor pod, four total, will have a detection signal that will connect to the input capture pin
on the micro. When the phototransistors receive the IR signal the transistors turn on and the pin
of the microcontroller will be pulled low. In the off state the pin is pulled high through a pull-up
resistor. Therefore the microcontroller will detect the hit. Modulation of the signal to
communicate the ID of the shooter is also covered in the software design narrative, no analog
circuitry is needed.

8.3   Hardware Design Narrative

Firstly, the SPI subsystem of the microcontroller will be used to control the LCD screens of both
the base and guns. The clock and data out pins will interface with the shift register to display the

ECE 477 Final Report

data on the microcontroller. There is only one SPI clock pin, pin 43, and pin 44 is the only SPI
data out. Secondly, the PWM subsystem will be used to control the pulsing of the IR LED so
that each gun vest pair may be identified by the unique frequency of the IR LED. The PWM will
control the frequency and duty cycle of the LED. The choice of PWM pin is flexible since all
PWM pins can also be used for general I/O. One analog to digital pin will be used for the RF
transceiver to detect the strength of any RF signals in the immediate area. The RSSI (Received
Signal Strength Indicator) pin on the transceiver will supply an analog voltage proportional to the
signal strength [23]. This will allow comparison of the voltage level to a predetermined level so
that if necessary the data line can be squelched to save power if the signal strength falls below a
certain level. Once again the A/D pin choice is flexible since the others can also be used as
general I/O, however pin 22 was chosen simply because it was next to three other general I/O
pins. Lastly the four input capture pins on the microcontroller will be used to capture the input
from the IR phototransistors. All other connections are done through general I/O and there are
many other I/O pins available left over to bring out to a header in case of a pin failure. Table
8.3.1 shows all of the microcontroller pin connections to each peripheral.

8.4   Summary

Due to the simplicity of the project there were not any major design issues, however several
design considerations included picking the right transistor and resistors for the three types of
LEDs, which pins of the microcontroller were required by each peripheral. The basic theory of
operation is that when pushbutton trigger is depressed, the microcontroller sends a signal to the
IR diode (one or both depending on the game mode). Upon the detection of a hit by the IR
phototransistor, a RF signal is transmitted to the base station to register the hit. The base station
then sends out a signal to the „hit‟ vest to deactivate color LEDs and IR LED, and also sends a
signal to display the hit on the LCD screens of both the guns while also displaying the hit on the
base station LCD screen. After a period of time the base station will send another RF signal to
reactivate the hit vest. A keypad is attached to the base station to enable users to select game
modes. The major subsystems of the microcontroller that are used are the SPI, PWM, A/D, and
input capture.

ECE 477 Final Report

                 Table 8.3.1: Microcontroller connections for the Base and Guns

Base Microcontroller                                   Portable Microcontroller
                                                Pin                                                       Pin
External Device         Function                #      External Device            Function                #
Header                  PGC clock input            1 Programming Header           PGC clock input           1
                        PGD - data                                                PGD - data
                        input/output              44                              input/output             44
                        /MCLR - Master Reset      18                              /MCLR - Master Reset     18
                        VDD                       40                              VDD                      40
                        VSS                       39                              VSS                      39
Shift Register          SDO1 - SPI Data out       44   Shift Register             SDO1 - SPI Data out      44
                        SCK1                      43                              SCK1                     43
LCD Screen              RF1 - LCD Enable           4   LCD Screen                 RF1 - LCD Enable          4
                        RF0 - Register Select      5                              RF0 - Register Select     5
Key Encoder             RE4 - output enable        9   RF Transceiver             AN3 - RSSI               22
                        RE3 - Data out D          10                              RB0 - Data               19
                        RE2 - Data out C          11                              RB1 - T/R Select         20
                        RE1 - Data out B          14                              RB2 -Power down          21
                        RE0 - Data out A          15   Trigger                    RE5 - trigger input       8
                        IC7 - Data Available      23   IR LED                     PWM1H                    14
RF Transceiver          AN3 - RSSI                22   IR LED 2                   PWM2H                    10
                        RB0 - Data                19   Laser LED                  RE4 - Gen I/O             9
                        RB1 - T/R Select          20   Color LED Set 1            RB6 - Gen I/O            25
                        RB2 -Power down           21   Color LED Set 2            RB7 - Gen I/O            26
                                                       Photo Transistor Set 1     IC1 - input capture      42
                                                       Photo Transistor Set 2     IC2 - input capture      37
                                                       Photo Transistor Set 3     IC8 - input capture      24
                                                       Photo Transistor Set 4     IC7 - input capture      23

ECE 477 Final Report

9.0 PCB Layout Design Considerations

9.1   Introduction

Our project of Laser Tag requires two different types of PCB designs. One design is for an
arbitrary gun/vest pair. This PCB must fit in the gun package, which is a modified water gun.
The board must fit inside the water tank, and the headers must be placed where they can be
easily reached by cables coming from outside the tank. The second PCB design is for the base
station. It is much less constrained because there are no requirements for the size of box that it
must fit in. However, it contains many of the same components as the gun PCB, and therefore
will use a similar size and part placement for simplicity. The primary difference between the two
PCBs is that the base station has a keypad decoder with a header for the keypad, whereas the gun
has transistors to drive the LEDs and a header to route signals to the vest. The rest of this
document will focus on design considerations that are held in common by both designs, as the
parts they have in common provide the most significant constraints.

9.2   PCB Layout Design Considerations – Overall

The portion of our PCB that has the most constraints unique to our design is the RF transceiver.
As its operating frequency is obviously in the RF range, it is a significant source of noise in the
circuit. Also, as the only analog IC on our board, it is the most susceptible to external noise.
Fortunately, all of the problems inherent in using this chip can be mitigated or eliminated with a
single solution. That solution is to have a large ground plane below the chip on the opposite side
of the board. Ground planes are commonly used to reduce the impact of noise in any type of
circuit, and the data sheet for our transceiver chip specifically requires a large ground plane
below the RF chip [27]. The ground plane also serves as the second pole of the RF antenna,
thereby improving its performance. For this purpose, the data sheet says that the ground plane
should ideally have a surface area no less than the length of the ¼-wave antenna.

The other constraints specific to our transceiver chip regard trace routing. First and foremost, we
cannot have any traces routed underneath and on the same layer as the chip. [27] This is simply
because the chip has exposed traces on its underside, and any traces on the board could easily
cause a short circuit in the chip. Also in the realm of routing, the data sheet requests that three
particular pin traces be kept as short as possible. These are the two ground pins and the antenna
pin. The ground pins should only be long enough to reach past the soldered pin to a via which
links directly to the ground plane. This way the ground impedance is kept to a minimum, which
further reduces noise. The trace from the chip to the antenna should be kept short in order to
minimize the impact of the trace on the characteristics of the antenna, which is simply a wire of a
particular length tuned for the transmission frequency. Any extra length in the trace beyond what

ECE 477 Final Report

is necessary for physical part spacing could detune the antenna, causing communication
problems. These routing concerns will have to be addressed manually, after the auto-router does
the first pass on the board.

9.3   PCB Layout Design Considerations – Microcontroller

Our microcontroller has no placement or routing requirements specific to our chip. One
consideration is that it should be placed reasonably centrally on the board in order to obtain the
simplest routing, since pretty much everything is connected to it. It cannot be placed in the
physical center of the board, as the RF chip and ground plane will be taking up about half of the
board, but we can certainly place it such that the other components are around it and near the
pins they connect to.

Another thing that we need to take into account is that we need five particular pins to be brought
out to a header for in-circuit programming. [28] Since at least one of these pins is also needed for
another purpose, we need to make sure that the two uses of these pins are electrically isolated,
using a resistor. We won‟t have a problem with two things trying to drive the pins, since we
won‟t be programming the microcontroller when it‟s in use. However, we do need to make sure
that the programmer doesn‟t affect whatever else may be connected to the pins. Of particular
concern are the two pins that the programmer uses to send data to the microcontroller. If left
unchecked, these could potentially send commands to another chip, or try to drive an output, or
any of a number of disastrous possibilities.

9.4   PCB Layout Design Considerations - Power Supply

We plan on using standard D-cell batteries for our power supply, so we don‟t have to worry
about noise from an AC power source or ripple due to imperfect filtering. The most important
consideration for the power section of our circuit is keeping the RF system reasonably isolated
from the rest of the circuit. As was noted earlier, the RF transceiver is expected to be our most
significant source of noise. We will be keeping it isolated by ensuring that the ground plane for
the transceiver is connected to the ground for the rest of the system at only one point, and also by
not placing any other parts above the RF ground plane.

In addition to the required ground plane under the RF transceiver and antenna, it would be useful
to place ground planes under some of the other chips, especially the microcontroller. The
microcontroller will be running at a clock rate of only a few MHz—two orders of magnitude
below the frequency of the RF transceiver—so it‟s not as critical as the RF ground plane.
However, any amount of noise reduction will help to ensure the stability of our circuit. Also,

ECE 477 Final Report

having a ground plane under the microcontroller would allow us to connect the ground pins of
the chip with short traces and vias directly to the ground plane, which will lower the impedance
of the power circuit.

9.5   Summary

The most significant considerations for our PCB design come from requirements of the RF
system. There needs to be a large ground plane under the RF transceiver and antenna, and there
can be no traces directly under the transceiver chip. The microcontroller has few restrictions
specific to our chip. It should be placed centrally among the other components for optimal
routing, and needs five pins for in-circuit programming to be electrically isolated from any other
use they might have. The restrictions on the power circuit primarily involve electrical isolation of
noisy components. The RF system has the most potential for noise, with a transmission
frequency on the order of 100 MHz. The microcontroller is the next noisiest chip with a clock
rate on the order of 1 to 10 MHz, and all other signals are expected to switch at less than 1 MHz.

ECE 477 Final Report

10.0 Software Design Considerations

10.1 Introduction

The software for the Quazyx system is similar to any other laser tag system including infrared
transmission and sensing, LCD displays, keypad configuration, and button-triggered firing
mostly based on interrupts for near real-time operation. However, Quazyx includes radio
frequency communication between the portable gun packs and the base station for live game
statistics and game enhancements like an invincibility mode that require the use of messaging
queues, collision-detection protocols, and coordinated timing within the software. This section
will detail the software design considerations and the architecture of the code modules that make
Quazyx operate.

10.2 Software Design Considerations

Within the Quazyx software project, all of the detailed memory mappings and addresses for data
registers and configuration are handled by the Microchip C30 compiler and the dsPIC30F4011
header that is imported upon compilation. This header file allows the use of the pin names with
an underscore prefix for reading and writing within the C code and abstracts the exact address
and structures of the microcontroller memory. The mappings of the utilized peripherals to their
respective port pins and underscore-prefixed variable names can be seen in Table 10.2.1 below.
During the build process, the C30 compiler reports program memory in flash starting at 0x100
with strings followed by application code and ending with initialization routines. Data memory
utilizes 0x000 through 0x800 for the heap and 0x804 through the end of SRAM for the stack.
The addresses overlap because the PIC uses separate instruction and data memories. See the
dsPIC30F reference manual for register name and memory address details [29].

ECE 477 Final Report

                   Table 10.2.1: Variable Name to Pin and Peripheral Mapping

Base                                                    Portable

External Device   Variable Name - Function   Pin        External Device      Variable Name - Function   Pin
Shift Register    _SDO1 - SPI Data out             44   Shift Register       _SDO1 - SPI Data out        44
                  _SCK1                            43                        _SCK1                       43

LCD Screen        _RF1 - LCD Enable                 4   LCD Screen           _RF1 - LCD Enable                4
                  _RF0 - Register Select            5                        _RF0 - Register Select           5
Key Encoder       _RE4 - output enable              9   RF Transceiver       _AN3 - RSSI                 22

                  _RE3 - Data out D                10                        _RB0 - Data                 19
                  _RE2 - Data out C                11                        _RB1 - T/R Select           20
                  _RE1 - Data out B                14                        _RB2 -Power down            21
                  _RE0 - Data out A                15   Trigger              _RE5 - trigger input             8
                  _IC7 - Data Available            23   IR LED               _PWM1H                      14
RF Transceiver    _AN3 - RSSI                      22   IR LED 2             _PWM2H                      10

                  _RB0 - Data                      19   Laser LED            _RE4 - Gen I/O                   9
                  _RB1 - T/R Select                20   Color LED Set 1      _RB6 - Gen I/O              25
                  _RB2 -Power down                 21   Color LED Set 2      _RB7 - Gen I/O              26

                                                        Photo Transistor 1   _IC1 - input capture        42
                                                        Photo Transistor 2   _IC2 - input capture        37
                                                        Photo Transistor 3   _IC8 - input capture        24

                                                        Photo Transistor 4   _IC7 - input capture        23

The peripherals utilized include SPI, timer, input capture, PWM, and general purpose I/O.
Initializing the SPI for connection to the shift register requires modifying the SPI1CONbits
structure to set the data rate, trigger clock edge, word size, and framing/checksum options. Then
the SPI is operated simply by filling the SPI1BUF variable and checking the status within the
SPI1STATbits structure. The interrupt must also be set by filling the _SPI1IE register with 1.
The timer module operates similarly using the T1CONbits structure (for timer 1 with other
timers replacing 1 for their respective value) to set up the tick rate and configuration settings,
clearing the TMR1 register containing the current timer count, setting the PR1 register for the
value to trigger an interrupt on, and setting that interrupt by filling the _T1IE register. For the
input capture module, the IC1CONbits structure is used to set up interrupts as well as trigger
edge for the input pin. The PWM, used to control the infrared shot pulse, is configured first by
setting a time base in the PTCON register that all PWM channels share, then adjusting the
individual PWMCON control and PDC duty cycle structures for each channel. Lastly, all general
purpose I/O pins are easy to set up using their respective _TRIS and the values for input or
output can be manipulated with the _R variables. The only notable issue with general purpose
I/O is that for any pin that shares input with the ATD module (most of the B section pins), an

ECE 477 Final Report

additional set of flags within the PCFG register controls whether those pins connect to the ATD
or digital input and must be set accordingly.

The overall organization of the application code centers around interrupts with a small polling
loop responsible for the processing of the message queues after the initialization sequence. This
organization was chosen as it allows the microcontroller to react in near real-time to human
input. The messaging queues are established and placed within a polling loop containing a delay.
In the case of the LCD panel, this messaging queue and delay prevents multiple interrupts from
sending messages to the panel too quickly for the user to see and potentially covering up one
message with another. In the case of the RF communication, the messaging queue allows our RF
protocol to process actions in a well-ordered manner and leave a message in the queue for later
retry if a collision or corruption error occurs in transmission.

Collisions are detected when a corresponding acknowledgement packet is not received within
approximately 500ms of the initial transmission of the data packet. If no acknowledgement is
received, a random number is pulled from the random number generator and used as the delay
before retrying the transmission. The random retry reduces the chance of another collision.

For debugging the application, standard 6-pin Microchip programmer/debugger headers have
been attached to both the gun and base station PCBs [30]. The chosen microcontroller has a
memory resident debugging area supporting two hardware breakpoints and interaction with the
MPLAB development environment for execution trace and memory inspection. Additionally, for
debugging RF communication, the raw analog signal from the RF chip has been mapped to an
ATD port on the microcontroller which can be initialized and read through the Microchip
debugger if necessary. With a combination of these resources, the LCD display panel, and the
various LEDs attached to the device, the code can be easily debugged. Specific extra routines
that are commented out in the final production code were used to output the RF communication
packets directly to the LCD display when they were sent or received to help debug that
communication and similar routines exist for the IR modules.

10.3 Software Design Narrative

The overall architecture of the Quazyx software consists of a main loop and a handful of
interrupts. Generally, the main loop on top initializes the various wrapper modules and
interrupts, the wrappers initialize their respective device drivers and processor peripherals, then
the machine moves into the main polling loop state where interrupts drive most of the reactions
back up through the main class and down into whichever module needs to respond to the request.

The main polling loop for the base station provides a menu system to set up operation of the laser
tag game. It prompts first for the length of the game then the type of game before waiting for the

ECE 477 Final Report

various gun/vest modules to register with the RF module. Once registration is complete, the loop
proceeds to prompt for game start, counts down for 30 seconds, and then sends the command to
the guns to begin the game with the specified mode. The base station then proceeds to keep track
of the current game time with a broadcast of the remaining time every minute to update the
individual pack displays. Additionally, when shots are fired or a player is hit, the main polling
loop continues to update the LCD panel at the base to allow the game administrator to see what
is going on. At any time during the game, this loop can be escaped through a cancel game button.
When the game ends, the main loop will rotate through all collected statistics on all the players.
On the press of any button, the loop will restart from the top at game time and type selection.

For the portable gun modules, the main loop provides no real menu system as the operation of
the game is primarily controlled by the base. Once a gun is turned on, the loop will wait for the
signal from the base station to begin negotiating registration of the pack. Afterward the loop
blocks until the game start message is received including game type and time remaining
information. Then the loop simply serves to watch the hit and kill count of the player and give
out power-ups according to game rules if the power-ups were turned on. Power-ups include an
invincibility mode that is given out after five kills in a row, a continuous fire mode given out
after five deaths in a row, and an invisibility mode given out based on when the random number
generator passes the threshold of 121. This segment of the code will end when the game end
message is received over RF and will proceed to display the player‟s game statistics until a new
game message is received and the loop starts again.

The RF and LCD messaging modules both provide synchronous send routines that will pass the
given message directly out their respective ports to the hardware. In the case of the RF module,
receipt of packets happens within an interrupt. The packets use NRZI encoding to keep the line
switching. The general packet format starts with a USB-style start byte in NRZI, followed by the
destination ID, source ID, command type, and up to four bytes of payload data. As such, the
interrupt can escape early if it detects a bad start byte or if the destination byte does not match
the ID of the pack that is currently receiving data.

The Timer software module provides support for other functions such as the LCD driver. It is set
up to allow other routines to request a specific synchronous “wait” period of time when set-up
and hold times in communication with peripherals need to be met. This module has been
implemented with the help of online source code [31] and tested in hardware. A second timer is
used to sample one of the ATD pins to generate random numbers. A third timer is implemented
much like the first to delay for multiples of 1 ms for the RF module and IR communication

The LCD, Keypad, IR, RF, and PWM wrapper classes provide higher level commands such as
writing or reading of entire lines of data and overall initialization routines. Individual character,

ECE 477 Final Report

byte, or bit level transfers are abstracted away within the wrappers or down one level in the
device drivers. IR routines are transmitted and received in a similar way to the RF modules and
use the same start byte and packet structure. However, no acknowledgement is returned. The
sending side simply continues to resend the packet until the trigger is released or the trigger time
out occurs (500 ms). The receiving side will deactivate the entire gun pack when it matches a hit
from a valid player and therefore will not accidentally record too many hits if one were to focus
the transmission on one player for the whole firing period.

Lastly, the specific SPI, input capture, PWM, and general purpose I/O device drivers contain all
the control bits, registers, and operational flags that are necessary to activate those
microcontroller peripherals and establish a properly timed connection over the link. These
modules accept only the most basic bit or byte input and output commands and map them to the
registers and timings required by the interface.

10.4 Summary

This software design section for the Quazyx Laser Warfare System contains an overview of the
design considerations in terms of Flash and SRAM utilization, pin to register mapping within the
code, the utilized microcontroller peripherals and their respective setup and operational registers,
and the overall architecture of the Quazyx code. A main polling loop is responsible for a small
portion of outgoing functionality for the RF communication and LCD panel display as well as
the main game logic for power-ups and menus systems while interrupts from the SPI, input
capture, RF, and timer drive a majority of the actions and responses to user input. Device drivers
exist for most off-chip peripherals and wrappers create convenience functions for the main
program logic in manipulating strings, initializations, and multi-byte messages. Debugging and
support is provided by the MPLAB development environment packaged with the microcontroller
and available in-circuit through a standard set of header pins in combination with the connected
LEDs and LCD panel display. Lastly, protocols for IR and RF communication are based on a
USB frame for each packet and retry on random intervals when acknowledgement is not received
to detect and alleviate collisions. Software source files can be found as a part of the source code
submission ZIP file.

ECE 477 Final Report

11.0 Version 2 Changes

In a second revision of this product, revisions would be made to the PCB, sensor pod modules,
and power circuitry. All other components functioned as expected and would be reused as is in a
second revision.

One of the major issues during assembly and debugging of the gun/vest modules was the amount
of off-board components that required fly-wired power lines as well as pull-up resistors. On the
original PCB, only signal lines are provided for the trigger, LEDs, laser, and connection to the
vest pack via Ethernet. As such, the 4.5V power to each of these had to be tapped using fly-wires
from the battery lugs directly. In a revision, the power traces would be placed on the PCB and
additional header pins would be added such that a single simple cable could be made to connect
to each of these devices.

For each of the sensor pods, we believed that it would be easiest to use perfboard segments and
assemble the LEDs, phototransistors, and various wiring to interconnect the modules. However,
after the creation and connection of four modules per sensor vest, we realized that it would have
been much easier to create another PCB that simply had several copies of a sensor pod layout
and mount the LEDs and phototransistors to these PCB segments. Also, it would have
significantly helped reduce our wiring headaches in respect to cross-over phone and Ethernet
cables if we had proper PCB headers and joined the correct wires as traces on the board.

Lastly, one critical issue we worked around was the lack of power regulation on our board. In the
end, the entire system operated properly without any regulators after disabling the brown-out
functionality of the microcontroller and reducing the clock rate. However, in a discussion with
course staff, we would place a buck-boost converter on the PCB in a second revision to properly
regulate 3.3V and 4.5V power. This would likely eliminate the need to disable the brown-out
reset and allow more power to be drained from the batteries before the system would turn off due
to low voltage.

ECE 477 Final Report

12.0 Summary and Conclusions

Through the course of this project, we successfully built a working laser tag system to the
specifications of our initial idea. With the system, a game of laser tag can be played successfully
and contains all the power-up, statistics, and radio frequency communication specifications we
initially envisioned.

Along the way, we learned several new skills and refined many existing ones from previous
courses and experience. It was our first experience designing and laying out a printed circuit
board, working with wireless communications technologies, and using a battery powered circuit.
Additionally, in the past we only had experience with programming microcontrollers in
assembly, so the introduction of Microchip C30 allowed us to develop faster while still
understanding how the code turned into assembly. We also gained experience in how interrupts
get triggered and their priorities. Also, we learned lessons about power regulation, crystal
oscillators, and cabling.

In terms of the senior design curriculum, we also gained new insight into all the considerations
that must go into the creation of an integrated digital system. We learned about the workings of
the patent system and its implications on digital design, the importance of environmental
considerations in the selection of components and fabrication, and how to identify potential
safety and reliability issues with a product. As a team, we strengthened our skills of delegating
tasks to one another and learned to find productive tasks that would help the team when we
individually came to moments of free time.

Overall, our digital systems senior design project was a great developmental experience for our
team. We believe that our success in carrying the project through all phases from design to
completion proves both our success in our undergraduate studies and certifies our ability to do
real world engineering work or future graduate study in our coming years.

ECE 477 Final Report

13.0 References

[1]    “dsPIC30F4011 Data Sheet,” dsPIC30F4011, Microchip Technology, Inc., July 4, 2008.
      [Online]. Available: [Accessed:
      Feb. 1, 2010].

[2] “Energizer E95 Product Datasheet,” E95, Energizer Holdings, Inc. [Online]. Available: [Accessed: Feb. 2, 2010].

[3] “ Laser tag: Toys & Games,” Search,, Inc., Feb. 4,
    2010. [Online]. Available:
    [Accessed: Feb. 4, 2010].

[4] “Laserforce Packages,” Laserforce – Professional Laser Tag Systems, Laserforce, Inc.
    [Online]. Available: [Accessed: Feb. 1, 2010].

[5] “dsPIC33FJ32GP302/304, dsPIC33FJ64GPX02/X04 and dsPIC33FJ128GPX02/X04 Data
    Sheet,” dsPIC33FJ32GP320, Microchip Technology, Inc., Nov. 19, 2009. [Online].
    [Accessed: Feb. 2, 2010].

[6] “Low-Power Sub-1 GHz RF Transceiver,” CC1100, Texas Instruments, Inc., 2009.
    [Online]. Available: [Accessed: Feb. 2, 2010].

[7] “PLL Tuned UHF Transceiver for Data Transfer Applications,” MC33696, Freescale
    Semiconductor, Inc., Mar. 2009. [Online]. Available: [Accessed: Feb. 2,

[8] “LT Series Transceiver Module Data Guide,” Linx Technologies Wireless Made Simple,
    Linx Technologies, Inc., Feb. 28, 2008. [Online]. Available: [Accessed:
    Feb. 1, 2010].

[9] S. Bull and T. Svoboda, “Electronic Tag Game,” U.S. Patent 6,530,841, June 26, 2001.

ECE 477 Final Report

[10] Kwan et al., “Interactive light-operated toy shooting game,” U.S. Patent 5,741,185,
     February 5, 1997. Available:

[11] Small et al., “Electronic game with infrared emitter and sensor,” U.S. Patent 5,904,621,
     January 16, 1998. Available:

[12] Military Handbook: Reliability Prediction of Electronic Equipment, MIL-HDBK-217F.

[13] “dsPIC30F4011 Data Sheet,” dsPIC30F4011, Microchip Technology, Inc., July 4, 2008.
     [Online]. Available: [Accessed:
     Apr. 8, 2010].

[14] “LT Series Transceiver Module Data Guide,” Linx Technologies Wireless Made Simple,
     Linx Technologies, Inc., Feb. 28, 2008. [Online]. Available: [Accessed:
     Apr. 8, 2010].

[15] “Don‟t aim laser pointers at a person‟s head and eyes!” [Online]
     eyes.html. [Accessed: Apr. 5, 2010].

[16] “Consumer Safety Alert: Internet Sales of Laser Products” Food and Drug Administration,
     March 2, 2010. [Online]. Available:
     EmittingProducts/RadiationSafety/AlertsandNotices/ucm116534.htm . [Accessed: April,
     16, 2010].

[17] “Illuminating Facts About Laser Pointers” U.S. Food and Drug Administration, May 20,
     2009. [Online]. Available:
     EmittingProducts/RadiationSafety/AlertsandNotices/ucm153548.htm . [Accessed: April 16,

[18] “Call to Recycle: Frequently Asked Questions” Verizon Wireless, 2010. [Online].
     [Accessed: April 16, 2010].

ECE 477 Final Report

[19] “LaserTron,” 2008. [online] Available: [Accessed
     Feb 8, 2010]

[20] “Humvee Combat Black Tactical Vest,” Aug. 7, 2008. [online] Available:
     [Accessed Feb. 8, 2010]

[21] “Project Boxes,” 2010. [online] Available: [Accessed Feb 8, 2010]

[22] “dsPIC30F4011 Data Sheet,” dsPIC30F4011, Microchip Technology, Inc., July 4, 2008.
     [Online]. Available: [Accessed:
     Feb. 18, 2010].

[23] “LT Series Transceiver Module Data Guide,” Linx Technologies Wireless Made Simple,
     Linx Technologies, Inc., Feb. 28, 2008. [Online]. Available: [Accessed:
     Feb. 18, 2010].

[24] “NHD‐0224BZ‐FL‐GBW Data Sheet,” NHD‐0224BZ‐FL‐GBW, Newhaven Display Intl,
     Inc., December 21, 2009. [Online]. Available: . [Accessed: Feb. 18,

[25] “MM74HC164 Data Sheet,” MM74HC164, Fairchild Semiconductor, Inc., Feb, 2008.
     [Online]. Available: . [Accessed:
     Feb. 18, 2010].

[26] “dsPIC30F4011 Data Sheet,” dsPIC30F4011, Microchip Technology, Inc., July 4, 2008.
     [Online]. Available: [Accessed:
     Feb. 25, 2010].

[27] “LT Series Transceiver Module Data Guide,” Linx Technologies Wireless Made Simple,
     Linx Technologies, Inc., Feb. 28, 2008. [Online]. Available: [Accessed:
     Feb. 25, 2010].

ECE 477 Final Report

[28] “PICkit 2 Programmer/Debugger User‟s Guide,” Microchip Technology, Inc., January 2,
     2008. [Online]. Available: [Accessed: Feb 25,

[29] Microchip Technology, Inc., “dsPIC30F Family Reference Manual,” Microchip
     Technology, Inc., 2005. Available: [Accessed: Feb. 27,

[30] Microchip Technology, Inc., “PICkit 2 Programmer/Debugger Users Guide,” Microchip
     Technology, Inc., 2008. Available: [Accessed: Mar. 25,

[31] Btbass, “Delay and Timeout Routine for dsPIC in Hi-Tech dsPICC,”
     Forum, 2009. Available: [Accessed: Mar. 23,

ECE 477 Final Report

Appendix A: Individual Contributions

A.1 Contributions of Ben Moeller:

At the beginning of the semester, Ben spent most of his time developing a method to
communicate IR light over long distances. This included tracking down high powered IR LEDs
and sensitive receiver modules. One issue with IR transmission is filtering out IR noise. Normal
IR detectors are in an LED package and act as an IR phototransistor. These are very sensitive to
noise and were not a feasible solution to the IR communication problem. Ben ended up tracking
down some IR detection modules which are also very sensitive but only detect IR when pulsed at
56kHz. This eliminated the possibility of IR noise and still allowed the detection system to be
extremely sensitive. Ben also designed a barrel design which had a lens at the end to focus the IR
light and greatly improve the transmission range.

Since he was mainly responsible for the packaging design, Ben purchased plastic guns from
Wal-Mart to use as the main gun housings. Over the course of the semester, he modified these
guns to accommodate for all of the off-board electronic components such as IR LEDs and the
LCD screens. Additionally, the guns were modified to house the gun-vest PCB and batteries.
Ben also purchased a RadioShack project box to act as the base station. He designed a layout for
the off-board electronics and manipulated the project box to hold these as well as the base PCB
and batteries.

Of the team members, Ben had the most soldering experience. Thus, he was mainly responsible
for the assembly of the PCBs and creation of cables for the system. Several cables were
necessary for the interconnection of off-board electronics with the PCB. For example, both guns
and the base station have an LCD screen that needs to be connected to the PCB. This required
the creation of three 16-conductor cables.

Additionally, Ben assisted in hardware troubleshooting when problems arose. Half-way through
the semester, Mike realized that, though the datasheet for the LCD screen said it would operate at
3V, it was not functional at this voltage. This required a change in the voltage supplied to the
LCD screen so PCB traces needed to be cut and fly-wired to the 4.5V rail. Ben performed these
modifications, as well as a few others that occurred during the design and debugging phases of
the project.

Lastly, Ben was responsible for the packaging design homework as well as the patent liability
analysis homework.

ECE 477 Final Report

A.2 Contributions of Emily Blount:

When the project first started Emily helped to review the part selection and choose the final
components. As an EE the team looked to Emily‟s experience to verify whether the parts would
work well together. Once Emily had reviewed Mike‟s choice on the parts she was responsible
for ordering the components, except the RF module, the PIC microcontroller, and the IR LEDs
and detector modules.

Next Emily was responsible for the schematic drawing. This was a very important part, and
since Emily wanted to be sure she connected the parts correctly, Emily asked the team to help
her determine connections on tricky parts like the RF module and keypad to keypad encoder.
Emily decided how the trigger would be implemented, and how the vest and gun LEDs would be
controlled. It was really helpful to finally see how every peripheral would connect together and
Emily believes this solidified what the team thought what the project would finally look like.

Once the schematic drawing was finalized, Emily started designing the vests. Since Emily is the
only team member who owns a sewing machine and knows how to use one she volunteered to
make the vests. This involved many trips to the fabric store to get various parts, first the fabric,
then the snaps, straps, buckles, and Velcro that we eventually decided to use. Since making
something from scratch is no easy process, the implementation of the vests actually took quite a
bit of Emily‟s time. However, she still spent time in the lab working on the electrical hardware

This involved designing the vests sensor pods. Emily split this task into two parts, first was the
LED implementation, and second was the detector module implementation. Inside each sensor
pod for the LED implementation are two transistors, 4 LEDs, 4 resistors, 2 power rails, and four
wires going off board for power, ground, and the base of each transistor. For the detector
module portion, there were three detector modules, one capacitor, one resistor, a signal rail that
connected to all three detectors and went off board with a wire, and finally a ground rail that also
connected to all three detectors. All of these parts on the tiny copper perfboard required careful
planning and could get quite messy, as evidenced by Ben‟s first iteration. It also did not help
that between the vests, the perfboard was different and the copper design covered different holes.
Therefore, not only did the sensor pods have to be designed once, but again for the other
perfboard. Emily took the perfboard from the ECE402 design lab, so we couldn‟t be choosy
about the kind that we got.

The pods also required some kind of packaging, so Emily took a trip to Target to shop for a clear
plastic box that would be just large enough to house the sensor pods. Emily ended up choosing a
travel case for Q-tips, picked up eight of them, and drilled holes in the sides so that the wires
could leave the boxes while they housed the sensor pods.

ECE 477 Final Report

Then once the sensor pods were designed and implemented, eight in total which amounted to a
lot of soldering and repetition, the signal lines leaving each sensor pod had to be connected
together in a feasible way to go to the gun PCB. It was a question of what kind of cable would
make it relatively easy to connect all of the sensor pods together, and it was decided that a 6 line
telephone cable would be appropriate. Emily bought 3 12ft male-to-male telephone cord, cut
them in half and soldered the five signal lines from each sensor pod to the same wire color of the
telephone cord. To tie the pods together Emily wired three female ports together to pass the
signals to an 8wire Ethernet cable that went to the gun PCB.

After that was completed, Emily was a resource for any hardware troubleshooting. All
throughout the project she also updated the website, and compiled and edited any team written
assignments, except for this one, together.

ECE 477 Final Report

A.3 Contributions of David Freidin:

David‟s most significant contribution in the first half of the semester was the PCB design.
Working from the basic schematic that Emily made, he made a new schematic containing only
the parts that were to go on the PCB. This also included creating a new part footprint for the
antenna, which had not been made for the main schematic. After trying out the auto-routing tool
with various settings, he learned how to manually route and lock traces to accommodate the
specific requirements of the RF transceiver and antenna, and to make wide power and ground
rails. Then, after auto-routing the rest, he went through and fixed all of the acid traps and sub-
optimal routing made by the software. When the time came to prepare the final layout for
fabrication, it took a few tries to fix the problems brought up by the online design checker.

In the second half of the semester, David‟s major focus was on various aspects of the software
development. He was primarily responsible for the design and implementation of both the RF
and IR communication protocols. He started by coming up with a rough design for the RF
protocol, based on things he had learned in the previous semester in ECE 469. After discussing
various ideas with Michael, he also decided on an IR protocol based on pulse length, since only
one number needed to be sent via IR. He then started to implement the RF protocol in software,
and when the first PCB was populated the code was tested. After some major debugging of
various parts of the code, a simple string of “Hello!” was successfully encoded and transmitted.
Once the second PCB was populated, the receiving code could be tested, and eventually the
message was properly received and printed on the LCD panel. After more coding and debugging,
a slightly revised version of the RF protocol was implemented and working reliably.

At this point he turned his attention back to the IR communication. His original idea of encoding
the pack ID in the pulse width of the IR signal was fairly simple to implement, but proved fairly
unreliable in practice, due to the unpredictable nature of the other interrupts, and the lack of any
way to differentiate between data and noise. A decision was reached to rewrite the IR protocol to
be similar in concept to the RF protocol, though much simpler. This was quickly implemented
and tested, and it worked with no significant issues.

Throughout the whole semester, David also contributed in various ways to the rest of the project.
Based on the constraints determined by the team, he picked an appropriate microcontroller which
has worked without any problems. He also helped check over the schematic and proofread
homework for other team members. He assisted in determining pin assignments for the
microcontroller, and in soldering one of the PCBs. He wrote the homework assignments on the
PCB design and on the reliability & safety analysis, and also contributed to all team papers and

ECE 477 Final Report

A.4 Contributions of Michael Niksa:

Michael‟s contribution during the first half of the semester started with sketching out the general
overview of the design, required components, and interaction of the components that would be
necessary to implement laser tag. This was primarily driven by the component selection and
design analysis that Michael completed in the first few weeks of the semester. After this
homework, Michael switched tasks from broad design to a specific research into radio frequency.

For the radio frequency component of the product, Michael researched various different vendors
within the Wi-Fi product field before coming to the conclusion that Wi-Fi would likely be too
expensive and unnecessary for the laser tag system. Then, from a featured posting on Digi-Key,
Michael found a company called Linx Technologies that had complete systems to “make
anything wireless.” Through phone calls with an engineer at Linx Technologies, Michael
established the components that would be necessary to successfully integrate the wireless
component of the project including a transceiver module, the proper antennas, and a general
overview of how to make an effective communications protocol.

Prior to spring break, Michael assisted with the design of the schematic and PCB for the gun/vest
and base station modules. This included detailed tracing of signals on David‟s PCB layouts prior
to fabrication to catch any errors. In terms of the schematic, Michael assisted Emily with
deciding which pins on the microcontrollers were to be connected to various off-board
peripherals as well as the various on-board ICs. Also, Michael worked on cleaning up, updating,
and organizing the various block diagrams and documentation required for the midterm design

Once the DIP versions of the microcontroller, shift register, and other ICs arrived, Michael
worked on putting together the initial prototype of the laser tag system on a breadboard. With
this prototype, the initial low-level drivers were written and tested in a limited fashion. Also
during this time, Michael worked with Ben to develop a system of reliably transmitting infrared
signals using high powered IR LEDs and special sensor modules that would only detect a very
specific frequency (56kHz) of IR signal.

Then after the spring break/midterm report time, Michael focused on further developing and
testing the low-level drivers that would support communication and display for the main game
logic code. A part of this included the completion of the software design analysis homework
where the specific configuration variables of necessary microcontroller peripherals were
researched, the overall code architecture was designed, and diagrams were created corresponding
to architectural decisions.

ECE 477 Final Report

Afterward for the remainder of the semester, Michael worked with David to develop and test the
code within the final PCBs as they were assembled. Michael also found several issues with
components such as 4.5V required on LCD panels and a difficulty with triggering. Michael
involved Ben to assist with fly-wiring the PCB to accommodate these issues and successfully
alleviate technical difficulties. After ensuring the stability of all low-level drivers, Michael
assisted David with software debugging and, when necessary, cooperated with Emily and Ben in
the continued debugging and refinement of the sensor modules and gun components.

Overall, Michael‟s work focused on software emphasizing the low-level interaction with various
ICs and off-board components. Foremost among these was extensive research and understanding
of radio frequency communication and the necessary design constraints. Then in addition to
assisting with debugging of hardware and higher level code, Michael served as a resource to
consult on the design constraints of the project and assisted in making modifications when
necessary. Lastly, Michael‟s homework assignments were the Design Constraints Analysis and
the Software Design Considerations documents as well as the assembly of the final presentation
and this report document from the individual group member contributions.

ECE 477 Final Report

Appendix B: Packaging

                Figure B.1 – Commercially produced squirt gun housing

               Figure B.2 – CAD drawing of vest and sensor pod mounting

ECE 477 Final Report

           Figure B.3 – CAD drawing of base station and peripheral mounting

ECE 477 Final Report                                                        Spring 2010

Appendix C: Schematic

                        Figure C.1 – Final Base Station Circuit Schematic

ECE 477 Final Report                                                   Spring 2010

                       Figure C.2 – Final Gun/Vest Circuit Schematic

ECE 477 Final Report                                          Spring 2010

                       Figure C.3 – Sensor Module Schematic

ECE 477 Final Report

Appendix D: PCB Layout Top and Bottom Copper

             Figure D.1 – Base Station PCB Top and Bottom with Silkscreen

                 Figure D.2 – Gun PCB Top and Bottom with Silkscreen

    ECE 477 Final Report                                                                                          Spring 2010

    Appendix E: Parts List Spreadsheet
     Vendor           Manufacturer           Part No.                     Description                  Unit Cost Qty   Total Cost
Digi-Key           Microchip            DSPIC30F401130IPT-   44-pin TQFP 16-bit Microcontroller             7.06  3        $21.18
Digi-Key           Linx Technologies,   LICAL-TRC-MTCT-      20-pin SSOP Bi-directional radio              4.15    3       $12.45
                   Inc.                 ND                   frequency transcoder
Digi-Key           Linx Technologies,   TRM-418-LT-ND        418Mhz RF transceiver                        17.15    3       $51.45
Digi-Key           Linx Technologies,   ANT-418-CW-QW-       418Mhz ¼ wave whip antenna                    7.88    3       $23.64
                   Inc.                 ND
Digi-Key           Linx Technologies,   EVAL-418-LT-ND       418Mhz development kit                      149.00    1      $149.00
Digi-Key           Fairchild            MM74HC164MXCT-       14-pin SOIC 74HC-series 8-bit serial to       0.51    3        $1.53
                   Semiconductor        ND                   parallel shift register
Digi-Key           Fairchild            MM74C922N-ND         16-key, 18 pin DIP IC Keypad Encoder          7.75    1        $7.75
Digi-Key           Newhaven Display,    NHD-0224BZ1-FSW-     2 by 24 LCD character display with           15.00    3       $45.00
                   Intl.                FBW-ND               White LED backlight
Mouser             Vishay               TSOP-4856            Infrared 56kHz photo detector               0.9975   20       $19.95
Mouser             Vishay               TSAL-6100            880nm Infrared 5mm LED                      0.2708   15        $4.06
Digi-Key           Grayhill Inc.        96BB2-056-F          16-key Telephone Format key pad              13.66    1       $13.66
Wal-Mart           Store Brand          n/a                  ABS plastic squirt gun                        7.50    2       $15.00
Digi-Key           Fairchild            2N2222A              NPN switching transistor                     0.335   30       $12.83
All Electronics    Store Brand                               650nm, 4mW Red Laser Diode                    6.00    2       $12.00
Digi-Key           Memory Protection    BH3DL-ND             D-cell battery holder (for 3 cells)           2.18    3        $6.54
EE Parts Room      Unknown              n/a                  10k Potentiometers                            1.20    3        $3.60
                                                                                                         TOTAL           $399.64

ECE 477 Final Report                                                                                            Spring 2010

Appendix F: FMECA Worksheet

                                                 Table F.1 - Microcontroller
Failure   Failure Mode         Possible Causes     Failure Effects      Method of     Criticality          Remarks
  No.                                                                    Detection
1       Pin stuck high or   Externally driving    That pin becomes Voltmeter          Medium        The microcontroller
        low                 output pin, software  useless, system                                   cannot be replaced by
                            bug, overvoltage,     probably breaks                                   the user
                            short circuit
2        Chip burns         Overvoltage, short    System is           Smell, smoke,   Medium
                            circuit               unusable            hot to touch

                                              Table F.2 - Vest LED Circuit
Failure  Failure Mode         Possible Causes    Failure Effects      Method of       Criticality          Remarks
  No.                                                                 Detection
1       LED burns out       Too much current,   One LED doesn‟t Visual                Low           Doesn‟t break
                            heat, physical      blink                                               gameplay. Sensor pods
                            damage                                                                  are replaceable
2        BJT burns out      Too much current,   Multiple LEDs      Visual             Low           Doesn‟t break
                            heat, physical      don‟t blink                                         gameplay. Sensor pods
                            damage                                                                  are replaceable

                                             Table F.3 - RF Transceiver Circuit
Failure  Failure Mode          Possible Causes      Failure Effects     Method of     Criticality          Remarks
  No.                                                                   Detection
1       Chip burns          Overvoltage, short    No RF              System is        Medium        Cannot be replaced by
                            circuit               communication      unable to                      the user
                                                  with that unit     communicate

ECE 477 Final Report                                                                                            Spring 2010

                                                 Table F.4 - LCD system
Failure   Failure Mode        Possible Causes     Failure Effects     Method of      Criticality          Remarks
  No.                                                                  Detection
1       Broken shift        Overvoltage, short   LCD fills with     Visual           Medium        Cannot be replaced by
        register            circuit              one repeating                                     the user
2        Broken LCD         Overvoltage, short   LCD displays       Visual           Low           Can be replaced and
         panel              circuit, physical    strange things or                                 plugged in by the user
                            damage               nothing

                                                   Table F.5 - IR system
Failure   Failure Mode        Possible Causes      Failure Effects      Method of    Criticality          Remarks
  No.                                                                    Detection
1       IR LED burns out    Too much current,     Unable to shoot     Observation    Low           Breaks gameplay, but
                            heat, physical                                                         can be replaced
2        IR detector breaks Overvoltage, short    Unable to detect     Observation   Low           Breaks gameplay, but
                            circuit, physical     shots from certain                               sensor pods can be
                            damage                angles                                           replaced
3        Lens breaks        Physical damage       Shots are            Observation   High          Lenses are plastic but
                                                  unfocused                                        could still conceivable
                                                                                                   cause minor harm to the
                                                                                                   user. This is no worse
                                                                                                   than the plastic gun
                                                                                                   being broken.
                                                 Table F.6 - Power Supply
Failure  Failure Mode         Possible Causes      Failure Effects     Method of     Criticality          Remarks
  No.                                                                  Detection
1       Batteries shorted   Loose wires           Batteries drained, Observation     High          Can cause harm to the
                                                  possible sparking,                               user, but not easily, as
                                                  possible leaking                                 explained previously