Difference between revisions of "S16: Pinball"
Proj user21 (talk | contribs) (→Hardware Constraints) |
Proj user21 (talk | contribs) (→Hardware Constraints) |
||
Line 256: | Line 256: | ||
* Angle: ~5 degrees inclined | * Angle: ~5 degrees inclined | ||
* Serial 7-Segment LED Display: 2.6-5.5V | * Serial 7-Segment LED Display: 2.6-5.5V | ||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Software Design === | === Software Design === |
Revision as of 04:23, 23 May 2016
Contents
Grading Criteria
- How well is Software & Hardware Design described?
- How well can this report be used to reproduce this project?
- Code Quality
- Overall Report Quality:
- Software Block Diagrams
- Hardware Block Diagrams
- Schematic Quality
- Quality of technical challenges and solutions adopted.
Pinball
Abstract
For our project, we wanted to design a pinball machine. We wanted to incorporate bumpers, a 7 segment LED display driven by a UART interface for the total points earned, a sound system that would go off after each bumper was hit, and LED's surrounding the machine. In addition, we wanted the user to be able to interact with the machine by turning it on and off with a power button, as well as control the flippers with push buttons that are placed on the sides of the pinball machine.
Objectives & Introduction
The objective of this project is to design and build a pinball machine powered by an SJ-One Board. The pinball machine will feature an audio controller that will play sounds once triggered by the playing field, a real-time score machine, servos for powering the flippers, and different LEDs that will display different color patterns throughout the entire session of the game. Below is a high level list of the minimum functionality features our project will include.
- Launching Pin ball (mechanical)
- Play sound/music when sensors are triggered
- Flipper Controls (mechanical)
- Ball detection sensor
- Score Incrementation as sensors are hit
- Display score on 7-segment display
- Game Over announcement
Team Members & Responsibilities
- Yvonne Jacinto
- Physical Component Design: Building the Pinball Machine container and Designing the layout for the playing field
- Megumi Page
- Power Accountant: Designing power circuit for power supply and tracking watt consumption
- Jo-Anna Marie Reyes
- 7-Segment Display Programmer: Developing the code to display outputs as the State Machine executes
- BJ Wahhab
- Flipper Control/Polling MicroSwitch, State Machine and Software Flow
Schedule
Week# | Start Date | End Date | Task | Status | Outcome |
---|---|---|---|---|---|
1 | 3/28 | 4/03 | Project Proposal | Submitted | Approved |
2 | 4/04 | 4/10 | 1. Component research and initial pinball design 2. Begin component purchasing |
Completed | Completed |
3 | 4/11 | 4/17 | 1. Start of the architectural design 2. Program lights, sounds, and buffers 3. Start mechanical aspects |
Completed architectural design, sounds, lights | Working on buffers and mechanical aspects |
4 | 4/18 | 4/24 | 1. Incorporate bumpers and LED display 2. Make connections and test if certain parts are working |
Completed LED Display | Bumpers are still in progress as well as previous taks |
5 | 4/25 | 5/01 | 1. Incorporate all components into the designed pinball skeleton 2. Begin component/unit testing 3. Troubleshoot/Debug as needed |
In-Progress | |
6 | 5/02 | 5/08 | Product testing and final adjustments | In-Progress | |
7 | 5/09 | 5/15 | Final Product Testing | In-Progress |
Parts List & Cost
Part | Part Name | Quantity | Cost |
---|---|---|---|
1 | SJ One Board | 1 | $80.00 |
2 | Audio Controller | 1 | $50.00 |
3 | Power Supply | 1 | Free |
4 | Pinballs | ~9 | Free |
5 | Pinball Ball Shooter | 1 | $20.00 |
6 | Rainbow LEDs | 24 | $6.00 |
7 | LED Mixed Pack | ~20 | $5.00 |
8 | 7-Segment Serial Display (COM-09230) | 3 | Free |
9 | 3-D Printed Flippers | 2 | Free |
10 | Jumper Cables | 90+ | $15.00 |
11 | Speakers | 1 Set | Free |
12 | Servos | 2 | $75.13 |
12 | Push Buttons | 2 | $4.00 |
13 | Wood | A lot | 0 |
14 | Buck Converters | 3 | 0 |
15 | 74HCT138 (3-to-8 line decoder/demultiplexer; inverting) | 2 | Free |
16 | SN74LS148 (8-line to 3-line priority encoder) | 4 | $2.40 |
17 | Micro Switches | 40 | $8.00 |
18 | Speakers | 1 | Free |
19 | Styrofoam | 1 | Free |
20 | Balsa Wood | 1 | Free |
Total | PUT TOTAL HERE |
Datasheets are provided at the bottom of this page in the references section.
Design & Implementation
In this section, we will discuss the design and implementation of our pinball machine. This section will be broken up into subsections including hardware design, hardware interface, hardware constraints, software design, and implementation. Throughout these sections, we have added schematics and diagrams that will show the reader the specifics of our project.
Hardware Design
Discuss your hardware design here. Show detailed schematics, and the interface here.
In this section, we will discuss the hardware design used for our project. The hardware design included a power supply, 3 7-segment serial displays as our score board, multiple LEDs that will display patterns throughout the session of the game, and an audio controller that will display sounds throughout the game.
Figure 1 shows the power circuit, which has a power supply that can provide 24 volts. The power supply's voltage is divided to the SJ-One Board, the serial 7-segment LED display, the audio controller, the LEDs around the board, and the servos, which control the push buttons for the flippers. We were able to make this power supply power the SJ One Board by connecting it directly to our circuit. In addition, by hooking up the LED circuit (Figure 2) to the SJ One board, we are able to supply 5 volts to the 3-to-8 line decode, which powers the basic colored LEDs (i.e. red, orange, yellow, etc).
Figure 2 shows the circuit for the basic LED lights around the playing field. This circuit shows the SJ-One Board connected to two 3-to-8 line decoders, which are both connected to 6 different colored LEDs. From the SJ-One Board, each pin is connected to the inputs of the decoders. The output pins of the decoders and connected to 220 ohm resistors, which are then connected to the different LEDs.
Hardware Interface
In this section, we will discuss how the hardware is interfaced and the different types of driver implementations used to complete our project.
For the serial 7-segment LED display, Figure 3, we used a Serial Peripheral Interface (SPI). Because we chose SPI communications, the 7-segment LED display's datasheet instructed us to connect the MOSI, CSN, and SCK pins to our SJ One Board in order to successfully complete the communication. In the figure above, we have shown the display with the different pins that were connected to our SJ One Board.
Figure 3 shows the audio controller circuit, which uses the WAV Trigger WIG-13660 ROHS. We have inputted a microSD card that holds the music that will be played throughout the game. This circuit has a UART interface, which will be discussed more in the software section of this report. Because of this type of interface, we connected the SJ One Board's ground pin to the WAV Trigger's ground. In addition, one of the TX output pins on the SJ One Board was connected to the RX pin on the WAV Trigger.
Hardware Constraints
- Power Supply: 24V / 2.1A
- Pinball size: 0.5 inch diameter / 8.4-8.5 grams each
- Pinball frame width: 1.5 feet
- Pinball frame length: 2 feet
- Pinball frame height: TBD
- Angle: ~5 degrees inclined
- Serial 7-Segment LED Display: 2.6-5.5V
Software Design
Show your software design. For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level. Do not show the details of the code. For example, do not show exact code, but you may show psuedocode and fragments of code. Keep in mind that you are showing DESIGN of your software, not the inner workings of it.
For the serial 7-segment display, we are using an SPI interface to get our scoreboard functioning. For the LEDs surrounding the playing field, we are using a basic GPIO driver. For the audio controller, we are using UART to display the sounds throughout the board.
Implementation
This section includes implementation, but again, not the details, just the high level. For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash. You can include sub-sections for each of your component implementation.
Testing & Technical Challenges
When testing our pinball machine, we began by testing the different components that we had done and working off of that. Once we knew that each part was completed successfully, we started combining the different components together and repeating the testing process.
Describe the challenges of your project. What advise would you give yourself or someone else if your project can be started from scratch again? Make a smooth transition to testing section and described what it took to test your project.
Include sub-sections that list out a problem and solution, such as:
Issue #1 - Servos
We have had a few issues and a majority of these problems have been due to mechanical oversights. One of the first issues we had when starting our project was because of our servos. While trying to purchase our servos, we were researching which servo would work best for our purpose, which would be to control the flippers. Because we were limited with time, we choose the servos we thought would be the best, but they turned out to be too slow. In order to solve this issue, we had to add gears to increase the speed.
Issue #2 - Serial 7-Segment LED Display
One of the smaller scale issues we had included the first set of 7-segment LED displays that we bought. Because of time constraints, we did not do our research well enough to purchase an LED display that fit our project. The first ones we purchased, we were unsure of how to display data on them because the datasheet did not have the information regarding which pin did what function. Because of this, we decided to consult with Preet about whether we should purchase new ones, or try to add different Gates to get them to work. He suggested we use 7-segment LED displays that could be driven by UART and SPI, which was the current ones we have now (COM-09230).
Issue #3 - Ball
One of the major issues we had was that the ball we initially got for the project was too light for the limit switches to be triggered once on the playing field. Because of this, we ran into other problems. The servos we had were not strong, or fast enough to withstand a ball that was heavier than the ball that we initially have, so we had to think of a different solution. The solution is yet to be determined......
Conclusion
Conclude your project here. You can recap your testing and problems. You should address the "so what" part here to indicate what you ultimately learnt from this project. How has this project increased your knowledge?
Project Video
Upload a video of your project and post the link here.
Project Source Code
References
Acknowledgement
We would like to thank Preet for encouraging us to pursue this type of project, and for teaching us how to incorporate the labs in a real time project. In addition, we would like to thank Dr. Haluk Ozemek for teaching us the fundamentals we needed in order to complete this project.
References Used
List any references used in project.
Serial 7-Segment LED Display (COM-09230) Datasheet https://www.sparkfun.com/datasheets/Components/LED/7-Segment/SFE-0012-DS-7segmentSerial-v41.pdf
Serial 7-Segment LED Display (COM-09230) Power Schematic https://www.sparkfun.com/datasheets/Components/LED/7-Segment/SPI_to_4x7SD-v22.pdf
Sparkfun WAV Trigger 50751 Datasheet https://solarbotics.com/download.php?file=2342
Sparkfun WAV Trigger 50751 Power Schematic https://solarbotics.com/download.php?file=2237
Servo - Hitec HS-85MG (Micro Size) ROB-11887 Datasheet http://cdn.sparkfun.com/datasheets/Robotics/hs85.pdf
Concave Button - White https://www.sparkfun.com/products/9340
8-line to 3-line Priority Encoder http://www.farnell.com/datasheets/93457.pdf