Digital Pong Maisee BrownChris AndrewsHoang NguyenOmar Alattar.
-
Upload
ashlee-gaines -
Category
Documents
-
view
215 -
download
0
Transcript of Digital Pong Maisee BrownChris AndrewsHoang NguyenOmar Alattar.
ECE 411Digital Pong
Maisee Brown
Chris AndrewsHoang Nguyen Omar Alattar
WHAT IS IT, WHAT DOES IT DO? A machine that allows two players to play the game
of pong One player begins the game by triggering the IR
sensor adjacent to a row on the LED matrix which causes a “ball” of light to launch towards the opposite side
The opposing player triggers the IR sensor corresponding to the same row to nullify the “attack” then responds by launching his own ball
If a player is unable to “block” an oncoming ball, the other player receives a point
As the game goes on, it increases in difficulty by increasing the ball speed more and more, requiring quicker reaction times from both players
The game ends when one player’s score reaches 9
INTERFACE Two players communicate with the
device by triggering one of the three IR sensors situated at their respective end of the board
Two 7-segment displays on the front of the board display the current score, the one on the right for player 1 and the one on the left for player 2.
The 5 x 16 LED matrix on the top is the game play interface; it displays the “ball” and scoring and game messages
HOW DOES IT WORK
RATIONALE Fulfill project requirements Simple
Feasible in terms of knowledge Feasible in terms of time
Interesting Exciting Captivating Easy to use, intuitive
Adequately demonstrate our team’s skill at engineering
The objective of our project was a working prototype
HOW WE DID ITApproach
Design
Implementation
Testing
APPROACH Concurrently Worked on Software and
Hardware Built small prototypes at every step to
verify each piece of the design Ran software to insure we could
interface each component the way we expected
Fully prototyped before sending layout
INFRA RED DETECTION ARRAY
Player 2 Signal Interrupt
Player 1IR emitter
Player 2IR Detector
Player 2IR emitter
Player 2IR Detector
Player 1 Signal Interrupt
REQUIREMENTS SPECIFIC TO INPUTS
Must have an interface between the player and machine that is without wires or buttons during play mode.
Must be playable indoors with respect to signal interference.
Motivation for choosing IR technology:• Provides novel and intuitive
interface between player and Pong board
• Provides a “wireless” feel without wireless interfacing
SPECTRUM CONSIDERATIONS
Source: www.mtholyoke.edu/~mpeterso/classes/phys301/projects2001/awgachor/awgachor.htm
• Fluorescent and halogen lights have a reduced spectrum emission at 950nm
IR DETECTOR CIRCUITVERY SIMPLE, BUT ADEQUATE
HARDWARE DESIGN
Hoang Nguyen
DESIGN- SCHEMATIC
DESIGN – VOLATGE SUPPLY
DESIGN - INPUT
ATMEGA32
INT0
INT1IR
SIGNALS
IR SIGNA
LS
OR GAT
E
OR GAT
E
PC 0 1 2
PA 0 1 2
DESIGN - OUTPUT
DESIGN - PCB LAYOUT
SOFTWARE DESIGN
Maisee Brown
SOFTWARE- CONTROLLING THE LED MATRIX
Use SPI interface clock serial data into shift register
Shift Register acts as a serial to parallel converter
Use decoder to select row to be on Lights were the row is selected and there is a
0 from the shift register will be on To scroll you just << the data word you are
sending to the SPI and re-send
CONTROLLING THE LED MATRIX
Cannot light multiple columns at the same time
To write a message:Combine multiple lettersSelect each row very quicklyAppears to human eyes all lights are on
Load data1 into shift regSelect row one
Load data 2 into shift regSelect row two…
MAIN Only flashes through the rows one at a
time and shifts data words out to the shift registers
INTERRUPT SERVICE ROUTINEFLOW CHART
TIMER INTERRUPT ROUTINE
HOUSINGChris Andrews
HOUSING
Requirements Must be assembled using materials, skills, and tools available. Should have an attractive physical case.
Other considerations that guided housing design Must provide mounting and shielding (physical and EM) for IR arrays. Must hold LED matrix and 7 segment displays for easy viewing Must have components accessible for inspection and rework
CABLES: A NON-TRIVIAL DESIGN CHOICE
If you must use cables… Connect components with headers and bus cables Label and document all connections Account for the physical space of the cable in the housing design
Many bugs traced to cabling problems and last minute design changes traced to cabling problems.
TESTINGOmar Alattar
TESTING Modular testing
Shift register testBCD to 7 segment testMicrocontroller testPower system testOR gate interrupt test3-8 decoder test IR function test
Incremental/concurrent testing Integration testing Criteria for knowing our project worked
Power Supply Test
Micro-Controller Test
3-8 Decoder Test
BCD-7 Segment
Decoder Test
Shift Register Test
OR Gate Interrupt
Test
IR Test
Integration Test 1
Setup: Solder capacitors 3 and 5(.01 uF) , IC3 and 4 (74HCT4511D,652), and SV4 and 5 to the board. Plug two seven segment LED's into SV4 and SV5
Step Action Expected Result
Pass
Fail
N/A
Comments
1 Plug AVR programmer into ISB header pins
X
2 Open Pong_BCDTest X
3
Progam the board and watch both 7- segment displays
Both 7 segments should run through the numbers 0-9
X
Overall test Result: X BCD - 7 and 7 segment displays functional
LESSONS LEARNED
Omar
Chris
Hoang
Maisee
THINGS WE WOULD HAVE DONE DIFFERENTLY Add light to show whose turn it is Add buffer to IR circuit Perhaps use capacitive buttons Perhaps implement a real pong where
the position of the paddle is controlled by IR sensors detecting the position of a player’s finger