Difference between revisions of "F22: DDRTOS"
(→Design & Implementation) |
(→Design & Implementation) |
||
Line 294: | Line 294: | ||
** The module is able to play from 0001.mp3 up to 2999.mp3. | ** The module is able to play from 0001.mp3 up to 2999.mp3. | ||
+ | |||
+ | |||
+ | === 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. | ||
+ | |||
+ | === 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. | ||
* <code>mp3_module.c</code> | * <code>mp3_module.c</code> | ||
** The driver has 5 public functions. | ** The driver has 5 public functions. | ||
Line 321: | Line 328: | ||
| 4.28 | | 4.28 | ||
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Testing & Technical Challenges == | == Testing & Technical Challenges == |
Revision as of 09:57, 15 December 2022
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.
Abstract
Rhythm games have been popular for years and date back to the 1970’s, but hit its stride in 1997 when one of the most notable and popular games released - Dance Dance Revolution (DDR). The main point of a rhythm game is to use music and challenge a player’s ability to stay on beat and typically press a button to the beat of the song. Our project is based and dedicated to DDR, as we all share a passion for music and video games. DDR is played with four arrows for each direction up, down, left, and right that need to be hit at the time of a beat in order to score and increase the multiplier. There are several aspects that are taken from other games like Guitar Hero and Friday Night Funkin’ (sound effects, multiplier, and artwork) that have also become a part of the project. Our project name, DDRTOS, is a combination of the game DDR and RTOS which runs the project.
Objectives & Introduction
Show list of your objectives. This section includes the high level details of your project. You can write about the various sensors or peripherals you used to get your project completed.
Team Members & Responsibilities
- Michael Hatzikokolakis
- Core gameplay development
- Beatmap development
- Kyle Kwong
- MP3 module driver development
- Audio system research and design
- Ensure coding standards
- Assist on all parts of the project
- Anthony Zunino
- Enclosure Design
- PCB Design
- Converted the mp3 module to use UART queue instead of polling
Schedule
Week# | Start Date | End Date | Task | Status |
---|---|---|---|---|
1 |
|
|
|
|
2 |
|
|
|
|
3 |
|
|
|
|
4 |
|
|
|
|
5 |
|
|
|
|
6 |
|
|
|
|
7 |
|
|
|
|
8 |
|
|
|
|
9 |
|
|
|
|
10 |
|
|
|
|
Parts List & Cost
Note: For the keycaps, we suggest using uniform profile keycaps such as DSA or XDA.
Item# | Part Desciption | Vendor | Qty | Cost/Item |
---|---|---|---|---|
1 | 64x64 RGB LED Matrix - 3mm Pitch (192mm x 192mm) | Adafruit [1] | 1 | $59.95 |
2 | MP3 Module | Amazon [2] | 1 | $12.99 |
3 | PCB | JLCPCB [3] | 1 | $ |
4 | NeoKey Socket Breakout for Mechanical Key Switches with NeoPixel – For MX Compatible Switches | Adafruit [4] | 4 | $1.75 |
5 | LM7805 Power Regulator | N/A | 1 | N/A |
6 | 10-pin Terminal Block | N/A | 1 | N/A |
7 | LEDs | N/A | 8 | N/A |
8 | Mx style switches | N/A | 4 | N/A |
9 | Mx style keycaps | N/A | 4 | N/A |
10 | SeeedStudio 4-pin connectors | N/A | 2 | N/A |
11 | 4-pin to wire connector cable | N/A | 2 | N/A |
12 | 20-pin ribbon cable | N/A | 1 | N/A |
13 | Miscellaneous resistors and capacitors | N/A | N/A | N/A |
Design & Implementation
The design section can go over your hardware and software design. Organize this section using sub-sections that go over your design and implementation.
Hardware Design
- PCB
- 3D Printed Enclosure
- Mechanical Keyboard Switches, Keycaps, and Breakout Board
- Power
- Power bricks come in many different wattages and ratings, so a power jack and voltage regulator were the easiest solution to accommodate different power bricks while still providing a stable voltage for both the LED Matrix, SJ2 board, and controller. The traces on each of the PCBs were widened as much as possible to allow as much current to flow as needed, and the wires and terminal block connections were selected based on the specifications of the Matrix as it was the biggest power draw.
Hardware Interface
In this section, you can describe how your hardware communicates, such as which BUSes used. You can discuss your driver implementation here, such that the Software Design section is isolated to talk about high level workings rather than inner working of your project.
- DFmini MP3 Module
- The MP3 module uses UART to receive instructions from SJ2, with a baud rate of 9600.
- You can select the playback source by sending it the select playback device instruction (0x09). We chose SD card (parameter 0x0002) as our playback source because it requires the least amount of signal processing.
- The module is able to play from 0001.mp3 up to 2999.mp3.
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.
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.
-
mp3_module.c
- The driver has 5 public functions.
- We dedicated one pin for each UART port
-
void mp3_module__init(uart_e uart_to_use);
- This function sets the dedicated pin for the selected UART port to UART mode, initializes the UART, and selects SD card as the playback source. If the GENUINE macro is set to 1, it also sets the volume to 10.
-
void mp3_module__play(uart_e uart_to_use, uint32_t song_number);
- This function sends the instruction to the mp3 module to play the song with the name song_number.mp3. It checks to make sure that the song_number is less than or equal to 2999.
-
void mp3_module__resume(uart_e uart_to_use);
- This function resumes a paused song.
-
void mp3_module__pause(uart_e uart_to_use);
- This function pauses a playing song.
-
void mp3_module__reset_playback(uart_e uart_to_use);
- This function resets the module.
UART Port | UART_0 | UART_1 | UART_2 | UART_3 |
---|---|---|---|---|
GPIO Port.Pin | 0.0 | 2.0 | 0.10 | 4.28 |
Testing & Technical Challenges
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:
<Bug/issue name>
Discuss the issue and resolution.
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
Project Source Code
References
Acknowledgement
Any acknowledgement that you may wish to provide can be included here.
References Used
Appendix
You can list the references you used.