final project...
TRANSCRIPT
![Page 1: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/1.jpg)
DuckhunterFinal Project Presentation
Taylor Barton and Andrew Lisy
[email protected], [email protected]
6.111 - Digital Electronics Laboratory
Massachusetts Insitute of Technology
Duckhunter – p.
![Page 2: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/2.jpg)
Outline of Talk
Objectives and System Overview
Block Diagram
Input System
Output Servomechanizm
Calibration
What’s Next?
Conclusions
Taylor Barton
Andrew Lisy
Duckhunter – p.
![Page 3: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/3.jpg)
Objectives and System Overview
Objective: build a servomechanism that plays Nintendo’sDuck Hunt in skeet mode
Nintendo
switchbox
TV light gun
servos
optical sensorcalibrate
Duckhunter
Duckhunter – p.
![Page 4: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/4.jpg)
Block Diagram
calibration video
timing module
light calibratorwhite v_sync
h_sync
xvga
hcount
vcount
65 MHzclock
c_videoto TV
comparator hit
thresh
light gunphototransistor
c_ready
x_hit
y_hit
FSM
c_enc_x_coords
c_y_coords
conversion
x_coord
y_coord
x_offset
y_offset
8
(LED[0])
debounce
7
theta_coord
phi_coord8
8
drivermotor
distance to TV(switch[6:0])
to motors
debouncecalibrate(switch[7])
black
Each block also gets clock and reset inputs
calibrated
calibrator
FSMstate: oneof fivecoord pairs
8 8
<δ?
<δ?
counts v and hsyncs betweenwhite and hit
coordinate
use trig toconvert totheta and phi based onTV distance
tv_dist
8
8
8
8
8
A/D controller
AD7125
on high c_en andc_ready, blanksscreen and pulses black, then colors screen white andpulses white
two registers:
black and whitescreen.
sensor vals for
light_val
x1_coord_pred
y1_coord_pred
x2_coord_pred
y2_coord_pred
8
8
8
8
ADC0820
shoot to triggerof light gun
8
Andrew Lisy
Taylor Barton
timer
start_counttime
disk spacing delayinput vectorsystem time
physics1
disk spacing delayinput vectorsystem time
physics2
wait FSM
start_d1
start_d2
enable
enable
0
video
19
vsync
<x,y>
phy1_en
phy2_en
10
t2timersave
time offset 8
8
8
Duckhunter – p.
![Page 5: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/5.jpg)
Input System
Function: Translate the video output of the Nintendo totime-adjusted coordinates for the gun.
Duckhunter – p.
![Page 6: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/6.jpg)
Input System
Function: Translate the video output of the Nintendo totime-adjusted coordinates for the gun.
Subcomponents:
Duckhunter – p.
![Page 7: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/7.jpg)
Input System
Function: Translate the video output of the Nintendo totime-adjusted coordinates for the gun.
Subcomponents:
Vector Analyzer - from frame sequence, detect discs anddetermine initial velocity vector < −→x1,
−→y1 > for each disc.
Duckhunter – p.
![Page 8: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/8.jpg)
Input System
Function: Translate the video output of the Nintendo totime-adjusted coordinates for the gun.
Subcomponents:
Vector Analyzer - from frame sequence, detect discs anddetermine initial velocity vector < −→x1,
−→y1 > for each disc.
Physics Engine - Using vectors, apply formulas:
xt = −→x0t, yt = −→y0t + 1
2gnest
2
where gnes = experimentally determined gravity force ofNES (in pixels/frame2).
Duckhunter – p.
![Page 9: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/9.jpg)
Input System
Function: Translate the video output of the Nintendo totime-adjusted coordinates for the gun.
Subcomponents:
Vector Analyzer - from frame sequence, detect discs anddetermine initial velocity vector < −→x1,
−→y1 > for each disc.
Physics Engine - Using vectors, apply formulas:
xt = −→x0t, yt = −→y0t + 1
2gnest
2
where gnes = experimentally determined gravity force ofNES (in pixels/frame2).
Timer - keeps track of delays in 1/10 seconds.Duckhunter – p.
![Page 10: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/10.jpg)
Input System: Vector Analyzer
1. Wait for white ’blip’ to appear just above scoring panel.
Duckhunter – p.
![Page 11: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/11.jpg)
Input System: Vector Analyzer
1. Wait for white ’blip’ to appear just above scoring panel.
2. When blip is found, record coordinates in register bankA1. Wait a frame, record new coordinates to to A2 andassert start_d1.
Duckhunter – p.
![Page 12: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/12.jpg)
Input System: Vector Analyzer
1. Wait for white ’blip’ to appear just above scoring panel.
2. When blip is found, record coordinates in register bankA1. Wait a frame, record new coordinates to to A2 andassert start_d1.
3. Set ’disc_present’ register to high to indicate we havecoordinates for one disc.
Duckhunter – p.
![Page 13: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/13.jpg)
Input System: Vector Analyzer
1. Wait for white ’blip’ to appear just above scoring panel.
2. When blip is found, record coordinates in register bankA1. Wait a frame, record new coordinates to to A2 andassert start_d1.
3. Set ’disc_present’ register to high to indicate we havecoordinates for one disc.
4. Output < xA2 − xA1, yA2 − yA1 > to vector output
Duckhunter – p.
![Page 14: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/14.jpg)
Input System: Vector Analyzer
1. Wait for white ’blip’ to appear just above scoring panel.
2. When blip is found, record coordinates in register bankA1. Wait a frame, record new coordinates to to A2 andassert start_d1.
3. Set ’disc_present’ register to high to indicate we havecoordinates for one disc.
4. Output < xA2 − xA1, yA2 − yA1 > to vector output
5. Repeat process for next disk (using register bank B1,B2). When blip for next disk is found, assert start_d2.
Duckhunter – p.
![Page 15: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/15.jpg)
Input System: Physics Engine
Inputs: Vector from Vector Analyzer, system time t, gunaiming latency taim, shot spacing offset tsp
Duckhunter – p.
![Page 16: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/16.jpg)
Input System: Physics Engine
Inputs: Vector from Vector Analyzer, system time t, gunaiming latency taim, shot spacing offset tsp
Output: Coordinates of the two discs, compensating foraiming latency and spacing offset, as a function of t, taim, tsp
Duckhunter – p.
![Page 17: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/17.jpg)
Input System: Physics Engine
Inputs: Vector from Vector Analyzer, system time t, gunaiming latency taim, shot spacing offset tsp
Output: Coordinates of the two discs, compensating foraiming latency and spacing offset, as a function of t, taim, tsp
Implementation: The first physics engine receives input t
from timer, taim from experimental values, and tsp wired toground (since it handles the first disc, there is no spacingdelay). The second module receives t and taim from thetimer and experimental values, as well as tsp from the t2module.
Duckhunter – p.
![Page 18: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/18.jpg)
Servomechanism
The output system takes the (x, y) coordinate from the physics
engine and translates it into angles for the servomechanism.
distance
height
(0,0)
inputs: (x, y) coordinates, (x, y) offsets, distance from TV, height
(constant)
outputs: motor control signal
Servo resolution ≈ 1 degree.
Duckhunter – p.
![Page 19: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/19.jpg)
Servomechanism: Calibration
hcount
vcou
nt
(0,0)
Calibrator outputsvideo to TV: first black,then white screen.
Timing module countsthe hsync and vsyncsignals between thestart of the whitescreen and the gunsensing a hit to deter-mine position.
System is calibrated by comparing intended and actualcoordinates.
Duckhunter – p.
![Page 20: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/20.jpg)
What’s next?
1. Real-time Feedback: If we are able to find a version ofthe NES Duck Hunt game that uses a specific mode ofhit detection (blanking then whiteing the entire screen),we can implement real-time calibration to our system,thus increasing the accuracy.
Duckhunter – p. 10
![Page 21: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/21.jpg)
What’s next?
1. Real-time Feedback: If we are able to find a version ofthe NES Duck Hunt game that uses a specific mode ofhit detection (blanking then whiteing the entire screen),we can implement real-time calibration to our system,thus increasing the accuracy.
2. Miss Correction: If possible, we will implement a hitdetection mechanism which sends a signal into the FSMafter the gun is fired. If the signal is low, re-aim and fire.If high, move to the next state.
Duckhunter – p. 10
![Page 22: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/22.jpg)
What’s next?
1. Real-time Feedback: If we are able to find a version ofthe NES Duck Hunt game that uses a specific mode ofhit detection (blanking then whiteing the entire screen),we can implement real-time calibration to our system,thus increasing the accuracy.
2. Miss Correction: If possible, we will implement a hitdetection mechanism which sends a signal into the FSMafter the gun is fired. If the signal is low, re-aim and fire.If high, move to the next state.
3. Duck Hunt Mode: Depending on the mechanicallimitations of our tracking and firing mechanism,Duckhunter could be implemented to play the DuckMode of Duck Hunt
Duckhunter – p. 10
![Page 23: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/23.jpg)
Conclusion
Mechanical considerations limit how fast and accuratethe digital system can be.
Duckhunter – p. 11
![Page 24: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/24.jpg)
Conclusion
Mechanical considerations limit how fast and accuratethe digital system can be.
The calibration routine, while seemingly mundane, is avery critical part of the system, since the gun will bemoved from station to station. Manual calibration wouldbe tedious and unreliable.
Duckhunter – p. 11
![Page 25: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/25.jpg)
Conclusion
Mechanical considerations limit how fast and accuratethe digital system can be.
The calibration routine, while seemingly mundane, is avery critical part of the system, since the gun will bemoved from station to station. Manual calibration wouldbe tedious and unreliable.
Determining the coefficients for the physics engine mayrequire a separate system to track and analyze datafrom previous runs.
Duckhunter – p. 11
![Page 26: Final Project Presentationweb.mit.edu/6.111/www/f2005/projects/tbarton_Project_Design_Presentation.pdfDuckhunter Final Project Presentation Taylor Barton and Andrew Lisy tbarton@mit.edu,](https://reader035.vdocuments.mx/reader035/viewer/2022062414/5e87f004c026ad54ce35b175/html5/thumbnails/26.jpg)
Conclusion
Mechanical considerations limit how fast and accuratethe digital system can be.
The calibration routine, while seemingly mundane, is avery critical part of the system, since the gun will bemoved from station to station. Manual calibration wouldbe tedious and unreliable.
Determining the coefficients for the physics engine mayrequire a separate system to track and analyze datafrom previous runs.
If we are successful, this system may succeed where wehave failed: reaching the final level of Duck Hunt
Duckhunter – p. 11