pinball machine - today at minesinside.mines.edu/~whoff/courses/eeng383/projects/2013... ·...
TRANSCRIPT
![Page 1: Pinball Machine - Today at Minesinside.mines.edu/~whoff/courses/EENG383/projects/2013... · 2013-05-01 · Project overview Objective: small-scale pinball machine Operations: User](https://reader030.vdocuments.us/reader030/viewer/2022040910/5e82ff4c3ff45d0d026456ba/html5/thumbnails/1.jpg)
Pinball MachineMei LiCaleb Whitehead
EGGN 383 Final Project
May 1, 2013
![Page 2: Pinball Machine - Today at Minesinside.mines.edu/~whoff/courses/EENG383/projects/2013... · 2013-05-01 · Project overview Objective: small-scale pinball machine Operations: User](https://reader030.vdocuments.us/reader030/viewer/2022040910/5e82ff4c3ff45d0d026456ba/html5/thumbnails/2.jpg)
Project overviewObjective: small-scale pinball machine
Operations:○ User pushes a button to swing the paddle○ Machine records number of times the ball enters
different regions, using IR break-beam sensors○ Game over when the ball escapes 3 times○ The goal is to get as many points as possible
Mei
![Page 3: Pinball Machine - Today at Minesinside.mines.edu/~whoff/courses/EENG383/projects/2013... · 2013-05-01 · Project overview Objective: small-scale pinball machine Operations: User](https://reader030.vdocuments.us/reader030/viewer/2022040910/5e82ff4c3ff45d0d026456ba/html5/thumbnails/3.jpg)
Hardware - Diagram
Score Regions
Escape Region
Mei
![Page 4: Pinball Machine - Today at Minesinside.mines.edu/~whoff/courses/EENG383/projects/2013... · 2013-05-01 · Project overview Objective: small-scale pinball machine Operations: User](https://reader030.vdocuments.us/reader030/viewer/2022040910/5e82ff4c3ff45d0d026456ba/html5/thumbnails/4.jpg)
Hardware - ComponentsServo motors
○ swing the paddle○ operate on 6 V (Vservos)○ 60o rotation
Pushbuttons○ control the servo motors○ active high with pull-up
resistorhttp://image.made-in-china.com/2f0j00geNanjyoSZbY/Push-Button-Switch-PBS-28B-2L-.jpgMei
![Page 5: Pinball Machine - Today at Minesinside.mines.edu/~whoff/courses/EENG383/projects/2013... · 2013-05-01 · Project overview Objective: small-scale pinball machine Operations: User](https://reader030.vdocuments.us/reader030/viewer/2022040910/5e82ff4c3ff45d0d026456ba/html5/thumbnails/5.jpg)
Hardware - Components
IR Break-Beam Sensors
○ detect the ball○ update the score○ modulated by 555
timer
Liquid crystal display (LCD)○ GDM2004D module○ Hitachi HD44780U controller○ display the scores○ display "escape" counter
Mei
![Page 6: Pinball Machine - Today at Minesinside.mines.edu/~whoff/courses/EENG383/projects/2013... · 2013-05-01 · Project overview Objective: small-scale pinball machine Operations: User](https://reader030.vdocuments.us/reader030/viewer/2022040910/5e82ff4c3ff45d0d026456ba/html5/thumbnails/6.jpg)
Hardware - Components
http://www.circuitstoday.com/wp-content/uploads/2009/09/555-timer-ic-identification.jpg
http://upload.wikimedia.org/wikipedia/commons/thumb/3/3d/555_Astable_Diagram.svg/500px-555_Astable_Diagram.svg.png
LM 555CN Timer○ provide 38kHz signal for modulating the IR
emitter ○ configure in astable mode○ C = 1nF, R1 = 1kΩ, R2 varies
Mei
![Page 7: Pinball Machine - Today at Minesinside.mines.edu/~whoff/courses/EENG383/projects/2013... · 2013-05-01 · Project overview Objective: small-scale pinball machine Operations: User](https://reader030.vdocuments.us/reader030/viewer/2022040910/5e82ff4c3ff45d0d026456ba/html5/thumbnails/7.jpg)
Schematic
Caleb
![Page 8: Pinball Machine - Today at Minesinside.mines.edu/~whoff/courses/EENG383/projects/2013... · 2013-05-01 · Project overview Objective: small-scale pinball machine Operations: User](https://reader030.vdocuments.us/reader030/viewer/2022040910/5e82ff4c3ff45d0d026456ba/html5/thumbnails/8.jpg)
Software - Design Controlling the paddles
○ impulse vs holdInterrupts vs. PollingFrom PWM system to Servo outputsUse of PortAD for LCD
Caleb
![Page 9: Pinball Machine - Today at Minesinside.mines.edu/~whoff/courses/EENG383/projects/2013... · 2013-05-01 · Project overview Objective: small-scale pinball machine Operations: User](https://reader030.vdocuments.us/reader030/viewer/2022040910/5e82ff4c3ff45d0d026456ba/html5/thumbnails/9.jpg)
Software - PseudocodeInitialize
LCD (on PortAD)PWM system (on PortT)IR sensors (already set as inputs on PortM)Set score to zeroSet number of escapes left to three
Caleb
![Page 10: Pinball Machine - Today at Minesinside.mines.edu/~whoff/courses/EENG383/projects/2013... · 2013-05-01 · Project overview Objective: small-scale pinball machine Operations: User](https://reader030.vdocuments.us/reader030/viewer/2022040910/5e82ff4c3ff45d0d026456ba/html5/thumbnails/10.jpg)
Software - PseudocodePoll
Drive motor forward if button depressedDrive motor back if button releasedWaiting = 1 if score sensor detects ballIncrease score, waiting = 0 if score sensor doesn't detect ball and waiting = 1 If escape sensor detects ball, wait until escape sensor doesn't detect ball, then decrease escapes leftUpdate counters on the LCDDisplay "Game Over" if no escapes leftWhile (Game Over) enter infinite loop to disable game
Caleb
![Page 11: Pinball Machine - Today at Minesinside.mines.edu/~whoff/courses/EENG383/projects/2013... · 2013-05-01 · Project overview Objective: small-scale pinball machine Operations: User](https://reader030.vdocuments.us/reader030/viewer/2022040910/5e82ff4c3ff45d0d026456ba/html5/thumbnails/11.jpg)
Challenges Pushbuttons
○ bouncing on input captureMotors
○ interfering with each otherIR Break-Beam Sensors
○ used 555 timer instead of function generatorMechanical construction
○ mounting of components
Caleb
![Page 12: Pinball Machine - Today at Minesinside.mines.edu/~whoff/courses/EENG383/projects/2013... · 2013-05-01 · Project overview Objective: small-scale pinball machine Operations: User](https://reader030.vdocuments.us/reader030/viewer/2022040910/5e82ff4c3ff45d0d026456ba/html5/thumbnails/12.jpg)
SummaryDesign and implement a small-scale pinball machine
○ Use HCS12 microcontroller for interfacing○ Pushbutton activates the motor○ Motor swings the paddle to hit the ball○ IR sensors detect the ball○ LCD displays the scores
Mei
![Page 13: Pinball Machine - Today at Minesinside.mines.edu/~whoff/courses/EENG383/projects/2013... · 2013-05-01 · Project overview Objective: small-scale pinball machine Operations: User](https://reader030.vdocuments.us/reader030/viewer/2022040910/5e82ff4c3ff45d0d026456ba/html5/thumbnails/13.jpg)
Questions or clarifications or suggestions?
?