final report project name: laser tag gaming system
TRANSCRIPT
EEL 4924 Electrical Engineering Design
(Senior Design)
Final Report
19 April 2011
Project Name: Laser Tag Gaming System
Team Members: Name: Michael Schoen Name: Noah Stahl Email: [email protected] Email: [email protected] Phone: 239-682-9503 Phone: 954-801-7203
Project Abstract: The goal of our project was to provide our end users with a laser tag gaming system that can
wirelessly keep track of scores in real time. The system consists of two individual hand-held
devices attached to vests and a central console functioning as a scoreboard. Each hand-held
device is used to tag the other players and is attached to a vest which will function as a target for
the laser. When a player fires the hand-held device or one of their targets detects a hit, a signal
will be sent to the scoreboard which will update accordingly. In addition to these core functions,
each hand-held device will keep track of the player’s health and display it on an LCD screen and
will also provide interactive feedback using LEDs and an audio speaker.
Table of Contents:
Project Features......................................................................................................................................3
Competitive Products…………………………………………………………………………………..4
Concept/Technology Section..................................................................................................................5
Project Architecture……………………………………………………………………………………8
Software Analysis…………………………………………………………………………………….13
Bill of Materials...................................................................................................................................15
Distribution of Labor...........................................................................................................................16
Gantt Chart……...................................................................................................................................17
List of Figures:
1. Commercial Laser Tag Product..........................................................................................................4
2. Laser Emitting Diode and Solar Cell................................................................................................. 5
3. Xbee RF Module.................................................................................................................................6
4. ISD1740 and 7-Segment LED............................................................................................................6
5. Nerf Dart Gun..................................................................................................................... ………...7
6. System Block Diagram.......................................................................................................................8
7. HLED Schematic................................................................................................................................9
8. HLED PCB.......................................................................................................................................10
9. Scoreboard Schematic......................................................................................................................11
10. Scoreboard PCB.............................................................................................................................12
11. Software Flowchart……………………………………………………………………………....13
List of Tables:
1. Bill of Materials................................................................................................................................15
2. Division of Labor..............................................................................................................................16
3. Gantt Chart........................................................................................................................................17
Project Features:
Our project is a standalone laser tag gaming system that people can play anywhere. The system
consists of two individual hand-held devices attached to vests and a central console functioning
as a scoreboard. Each hand-held device when activated emits a laser beam used to tag the other
players. The laser beams are modulated to key frequencies for player identification. The players
will target a set of three solar panels located on the opposite player’s vest which receives the
modulated signal. The data will be sent to an onboard PIC microcontroller which will then
determine if the player was hit by an opposing player or from stray interference. The PIC will
then send the information to the central console using an XBee and the console will then update
the scoreboard accordingly. Our design allows you to play anywhere, inside or outside, and
provides you with real time scoring.
When the trigger of the hand held device is pulled, a modulated laser beam is transmitted.
The beam is modulated at a unique frequency that the receiver will be able to recognize
and decode.
Each player will be fitted with a vest containing three solar panels. The solar panels
function as the targets for the laser beam and the output of the solar panels will be passed
through a band pass filter. This filter will be tuned to pass only the frequencies of the
opposing player’s gun. The filtered signal is passed through an amplifier circuit to
produce a waveform with a large enough voltage that it can be recognized by the PIC.
To determine when a player is hit, we used the RB0 interrupt on the PIC microcontroller.
We fed the output of our amplifier signal to the RB0 pin and set the interrupt to fire every
time the RB0 pin sees a rising edge. This implementation allows the PIC to recognize that
it has been hit by an opposing player’s laser beam.
Once the microprocessor has determined that the player has been hit, the on board LCD
updates to show the current health of the player and alerts the player by flashing LEDs
and playing audio.
The XBees are used to communicate game data between the user and the base station.
Whenever a player fires their laser, the hand held device’s XBee will transmit a signal to
the central console. When a player is hit, the hand-held device’s XBee will also transmit
a signal alerting the scoreboard which player has been hit. This data will be used to
calculate the accuracy and health of each player.
The scoreboard will keep track of each player’s health, shots, hits, and accuracy through
XBee communications. It will display three of these values, the current player’s health,
how many successful hits the player has had, and overall accuracy of the player.
The scoreboard consists of fourteen large 7-segment LEDs that are easily visible to both
the players and spectators. When data is received from the XBee mentioned above it will
update the display consisting each player’s health, hits, and accuracy.
The scoreboard data is displayed by strobing each LED. The scoreboard hardware
consists of a PIC microcontroller, BCD to 7 segment converters, and transistors. The
transistors are used as on/off switches for the different LEDs during strobing.
Competitive Products
Our main competitors fall under two categories, at home gaming systems and commercial laser
tag arenas.
The at home gaming systems are very basic and a solely use infrared technology. No current on
the market system comes with a scoreboard or has a status screen on which players can read their
health. The systems normally just consist of the hand-held laser gun and a sensor which is either
worn on the body or is built into the gun.
Figure 1: Commercial Laser Tag Product
The commercial laser tag arenas require a large number of people to play and a lot of overhead.
It would be economically unfeasible for an average consumer to set up their own game, and thus
are stuck playing at the business location. The players are required to adhere to the business’
rules and setup and have no freedom to play wherever or however they want. They must also pay
to play every game. Most laser tag arenas utilize infrared technologies, but a few businesses do
use a laser beam system as in our project.
Concept/Technology Selection Laser Based Data Communication:
We chose to implement the emitter of our handheld device using a laser diode. We are
able to modulate the laser beam to create unique signals for our devices. Using a laser
diode allowed for much easier testing and debugging during our design process since we
were able to physically see the laser beam. Due to safety concerns with eye injuries, the
laser output power was kept to a maximum 5mW.
We chose to use a laser diode in place of an infrared LED. One of the problems with the
IR LED implementation is that we would not be able to see the emitted data signals. This
would make debugging and testing our circuitry and code much harder. The IR
implementation would also have to be designed to reduce the dispersion of the IR signal.
We would have needed to find a way to focus the beam so that the player would not be
able to hit the receiver without being accurate.
For our receivers we used solar panels. Solar panels were readily available in all different
shapes and sizes. Since we wanted large targets to aim at, this worked out well. During
the design process we tested out other receiver configurations including phototransistors
and photo resistors. These devices were very small and would have made it nearly
impossible for a player to hit them at large distances.
Figure 2: Laser Module(left) and Solar Panel (right)
Radio Frequency Data Communication:
We chose to use XBEE for our wireless data transmission from the player to the base
station. We were able to purchase individual XBEE modules to put in to place on the
handhelds and the base station. The XBEEs located on the handheld devices act as
transmitters. The XBEE are connected to a PIC microcontroller using a serial EUSART
connection. They send signals to the scoreboard when a player either fires their gun or are
hit by an opposing player. The XBEE located on the scoreboard acts as a receiver. It
receives the transmitted data, feeds it into a PIC microcontroller using a serial EUSART
connection.
Figure 3: XBee Pro 1mW Wire Antennae
Player Feedback System:
Each handheld device consists of an on board LCD display that will display the player’s
health throughout the game. The display will also provide feedback to the player to alert
them of the game’s activities. The screen will display a welcome message upon power
up, a charging message after each shot, and a notification when the player has been hit.
Each handheld will also be equipped with a variety of LEDs and audio circuitry. We
chose to add these peripherals to create a more immersing gaming experience for the
player. Throughout the game these peripherals will provide feedback to the player.
o Upon power up of the guns, the player will be met by welcome sounds and a LED
power up display.
o When a player shoots their gun, an audio alert will be emitted and the LEDs will
flash off alerting the player that they have fired.
o After firing their device, the player wil be met by a charging sequence that will
include both an audio message and a recharging sequence performed by the
LEDs.
o When a player is hit, their handheld device will emit an audio message and flash
the onboard LEDs.
For the scoreboard display we will be using large 7-segment LEDs. We decided that the
LEDs would be the best implementation for their visibility. We considered displaying the
score on an LCD, but the cost of a display that would be viewable from a large distance
would be out of our budget.
Figure 4: ISD17400 Sound Chip (left) 7-Segment Display (right)
Microprocessor: Each hand-held device and the scoreboard will utilize a PIC microcontroller for data
processing and peripheral controls. We chose the PIC over other processors due to our
previous experience with them and their low cost and availability.
Each handheld will use a PIC18F2455 microcontroller. We chose this device due to its
small size of only 28 pins. Since our PCB designs for the handheld needed to fit inside of
our housing, the small space requirement was a big plus. While the chip was small, it also
had all of the features that were required for our project. It had external interrupts and
EUSART serial connection capabilities. For the scoreboard we used a PIC18F4620. We encountered this same chip in junior
design so we were very familiar with its functionality. This PIC is a much larger IC, and
has 40 pins. We needed the larger chip to be able to power the numerous BCD to 7
segment converters we are using to power our scoreboard display. The chip also had the
necessary interrupts and serial connection capabilities.
Gun/Housing:
Each handheld device will consists of an enclosure that will hold the circuitry and
batteries of the inside. The enclosure will also have spaces to display the LCD and LEDs
used for player feedback. We chose to use a Nerf Maverick to house everything. The
device is a midsized Nerf gun that was a perfect fit for all of our needs. Also by using a
Nerf gun we had a simple way of implementing the trigger for each device.
Figure 5: Nerf Maverick used for housing circuitry
Project Architecture
Figure 6: System Block Diagram
The handheld laser emitting device utilizes a PIC18F2455 as its central processor. The PIC waits
until either the trigger button is activated or the solar cell receives a signal. When the trigger
button is pushed, the PIC will output a modulated signal to the laser module which emits the
laser beam. When the solar cell detects another player’s laser, it passes the signal into the
passband filter. If the signal makes it through the filter, it is sent to an amplifier so it will have a
high enough voltage to meet the PIC’s input threshold voltage level. When either of these two
events occurs, the PIC will utilize the Xbee to send a signal to the scoreboard so it can update
accordingly. The PIC will also update the player’s status on the LCD and flash the LEDs and
play audio.
The Scoreboard utilizes a PIC18F4620 as its central processor. The PIC is constantly strobing its
outputs to the 7-segment displays by turning on and off the transistors for each LED. This allows
it to power fourteen 7-segment LEDs using only 5 BCD to 7-segment converters setups.
Whenever the PIC detects data being received through the Xbee, it updates its counter values and
displays them accordingly.
1
2
P 6
Button
1
2
P 8
Speaker
1
2
P 1 0
Laser
1
2
3
4
5
6
7
8
9
1 0
P 1 2
LCD
1
2
3
4
5
6
P 1 9
Programmer
+ 5 V
LCD4
LCD6
LCD7
LCD8
LCD9
LCD10
VPP
+ 5 V
PGD
PGC
G N D
4 7 0
R 4
Res1
1 0 K
R 2
Res1
1 0 0 p F
C 9
Cap
G N D
G N D
+ 5 V
G N D
1 2 3
P 2 7 8 0 5
1 2 3
P 3 7 9 0 5
1
2
P 1 3
Battery
1
2
P 1 5
Battery
MCLR/VPP/RE3
1
RA0/AN0
2
RA1/AN1
3
RA2/AN2/VREF-/CVREF
4
RA3/AN3/VREF+
5
RA4/T0CKI/C1OUT/RCV
6
RA5/AN4/SS/HLVDIN/C2OUT
7
VSS
8
OSC1/CLKI
9
OSC2/CLKO/RA6
1 0
RC0/T1OSO/T13CKI
1 1
RC1/T1OSI/CCP2/UOE
1 2
RC2/CCP1
1 3
VUSB
1 4
RC4/D-/VM
1 5
RC5/D+/VP
1 6
RC6/TX/CK
1 7
RC7/RX/DT/SDO
1 8
VSS
1 9
V D D
2 0
RB0/AN12/INT0/FLT0/SDI/SDA
2 1
RB1/AN10/INT1/SCK/SCL
2 2
RB2/AN8/INT2/VMO
2 3
RB3/AN9/CCP2/VPO
2 4
RB4/AN11/KBI0
2 5
RB5/KBI1/PGM
2 6
RB6/KBI2/PGC
2 7
RB7/KBI3/PGD
2 8
U 1
PIC18F2455-I/SP
+
5
v
VPP
G N D
FWD
RESET
LCD7
LCD8
LCD9
LCD10
LCD4
LCD6
Amp_In
Trigger_In
G N D
+ 9 V
-9V
S P +
G N D
Laser_Out
1 0 0 p F
C 5
Cap
1 0 0 p F
C 6
Cap
1 0 0 p F
C 4
Cap
G N D
+
9
V
+
5
V
G N D
-9V -5V
+ 5 V
Trigger_In
1 K
R 1
Res1
G N D
+ 5 V
1
2
P 2 0
Solar
G N D
Solar_In
2
3
1
1
4
1
1
U2A
LM324AN
5
6
7
2
4
1
1
U2B
LM324AN
8
1 0
9
3
4
1
1
U2C
LM324AN
1 K
R 6
OP3
1 K
R 9
OP1
1 K
R 7
OP6
1 K
R13
OP5
1 K
R10
OP4
1 K
R12
OP2
1 K
R 8
OP8
1 K
R11
OP7
1 0 0 p F
C15
COP31 0 0 p F
C14
COP2
1 0 0 p F
C12
COP4
1 0 0 p F
C13
COP1
G N D
G N D
G N D
Solar_In
+
5
V
-5V
+
5
V
-5V
+
5
V
-5V
G N D
G N D
1 K
R14
OP9
G N D
Amp_In
PLAY
Laser_Out
1 2 3
P 1 7 1 1 1
1 0 0 p F
C 3
Cap 1 0 0 p F
C 1
Cap
G N D
+3.3V +
5
V
1
2
P 4
Xbee
T X
R X
1
2
P 5
Xbee_Pwr
G N D
+3.3V
T X
R X
1 0 0 p F
C 2
Cap
1
2
3
4
5
6
7
8
9
1 0
1 1
1 2
1 3
1 4
P 1 6
Header 14
1
2
3
4
5
6
7
8
9
1 0
1 1
1 2
1 3
1 4
P 1 7
Header 14
+ 5 V
RESET
S P -
+ 5 V S P +
+ 5 V
PLAY
FWD
R 5
G N D
C10
G N D
G N D
G N D
G N D
G N D
1 K
R 3
Res1
1 0 0 p F
C 8
Cap
+
5
V
1 0 0 p F
C11
Cap
1 0 0 p F
C 7
Cap
PGD
PGC
LED3
LED2
LED1
G N D
1
2
P 7
LED1
LED1
1
2
P 9
LED2
LED2
1
2
P 1 1
LED3
LED3
1
2
P 1 4
LED4
PGC
1
2
P 1 8
LED5
PGD
S P -
1
2
3
4
5
6
7
8
9
1 0
P 2 1
Header 10
G N D
OL1
OL2
OL3
OL4
OL5
OL1
OL2
OL3
OL4
OL5
Figure 7: Handheld Laser Device Schematic
1
2
3
4
5
6
7
14
13
12
11
10
9
8
1516171819202122232425262728
1413121110987654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3
2
116
15
14
13
12
11
10
98
7
6
5
4
3
2
116
15
14
13
12
11
10
9
8
7
6
5
4
3
2
116
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1 16
15
14
13
12
11
10
9 8
7
6
5
4
3
2
1 16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
116
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1 16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1 16
15
14
13
12
11
10
9
87654321
16 15 14 13 12 11 10 9
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
2
1
5
4
3
2
1
2
1
2
1
Figure 10: Scoreboard PCB Design
Software Architecture
Figure 11: Software Flowchart Diagram
The handheld laser emitting device utilizes a PIC18F2455 as its central processor. The PIC is
interrupt driven and waits until one of the interrupt flags is set. The PIC will wait until either the
players health reaches zero, the play shoots the laser gun, or if the player is hit. If the players
health reaches zero, then the game ends and there will be no more inputs from the player. The
player being hit is a high priority interrupt and the player shooting is a low priority interrupt. The
player being hit will trump the player shooting code, this allows the PIC to detect a hit no matter
where it is in the code. When the trigger button is pushed, the PIC will jump into the interrupt
which outputs a modulated signal to the laser module which emits the laser beam. When the
solar cell detects another player’s laser, the PIC jumps into the routine which decrements the
player’s health and utilizes the Xbee to send a signal to the scoreboard so it can update
accordingly. The Xbees are connected using a serial interface.
The Scoreboard utilizes a PIC18F4620 as its central processor. The PIC is constantly strobing its
outputs to the 7-segment displays by turning on and off the transistors for each LED based upon
the counter values for the players health and shots. The Xbee routine is placed within an interrupt
so that it won’t disrupt the strobing and affect the display. When the PIC detects that data has
been written to its serial receive register, it jumps into the Xbee interrupt routine and reads in the
data. It will then decode the information and determine which player it came from and whether
that play was hit or shot their laser.
Bill Of Materials:
Table 1: Bill of Materials for the project
Item Quantity Cost Subtotal
PIC18F2455 2 $6.30 $12.60
PIC18F4620 1 $7.94 $7.94
Xbee 1mW Wire Antannea 3 $22.95 $68.85
Xbee Programmer 1 $24.95 $24.95
Xbee Breakoutboard 3 $2.95 $8.85
LM324N OP AMP 2 $0.29 $0.58
7805T 5V Regulator 3 $0.29 $0.87
7905T -5V Regulator 2 $0.29 $0.58
7809T 9V Regulator 1 $0.29 $0.29
LM1117T -3.3V Regulator 3 $0.89 $2.67
1N5817 1A Diode 6 $0.10 $0.60
CD4511 BCD/7SEG CONV 5 $0.35 $1.75
2N3904, NPN TRANSISTOR 14 $0.05 $0.70
SIP RESISTOR 8PIN 470 OHM 2 $0.07 $0.14
DIP RESISTOR 16PIN 10K OHM 4 $0.59 $2.36
DIP RESISTOR 16PIN 120 OHM 5 $0.19 $0.95
MOLEX HEADER, 2 POS 21 $0.09 $1.89
MOLEX HEADER, 10 POS 2 $0.29 $0.58
MOLEX HOUSING, 2 POS 25 $0.15 $3.75
MOLEX HOUSING, 10 POS 4 $0.59 $2.36
MOLEX CRIMP PINS 100 $0.04 $4.00
7-SEG, RED CC 2" 14 $3.95 $55.30
LED, RED T1-3/4 2 $0.12 $0.24
LED, ORANGE T1-3/4 5 $0.12 $0.60
LED, BLUE T1-3/4 5 $0.49 $2.45
ISD1740 Audio Chip 2 $7.27 $14.54
LCD 16x2 2 $8.95 $17.90
5mW Red Laser Module 2 $4.95 $9.90
3 Pin Toggle Switch 4 $1.29 $5.16
4 Pin Tactile SPST Button 2 $0.29 $0.58
Solar Panel 1.5W 4 $19.99 $79.96
Vest Tactical GXG 2 $21.60 $43.20
Nerf Maverick 2 $9.99 $19.98
Total $397.07
Distribution of Labor The following is a percentage breakdown of each team member's projected labor.
Table 2: Distribution of Labor Chart
Timeline The following is a Gantt chart of the projected timeline for the project.
Table 3: Gantt Chart