Difference between revisions of "F22: DDRTOS"

From Embedded Systems Learning Academy
Jump to: navigation, search
(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
 
|}
 
|}
 
=== 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.
 
  
 
== Testing & Technical Challenges ==
 
== Testing & Technical Challenges ==

Revision as of 09:57, 15 December 2022

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

MichaelHatzi.PNG

  • Michael Hatzikokolakis
    • Core gameplay development
    • Beatmap development

Kyle Kwong.jpg

  • Kyle Kwong
    • MP3 module driver development
    • Audio system research and design
    • Ensure coding standards
    • Assist on all parts of the project

Anthony Zunino.png

  • 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
  • 10/11/2022
  • 10/17/2022
  • Read previous projects
  • Create GitLab repository
  • Choose and order initial round of parts
  • Establish wiki schedule
  • Completed
  • In progress
  • Completed
  • Completed
2
  • 10/18/2022
  • 10/24/2022
  • Test LED Matrix
  • Obtain output from mechanical key breakout board
  • Not started
  • Not started
3
  • 10/25/2022
  • 10/31/2022
  • Create a simple beatgrid for a test song
  • Start work on audio processing driver
  • Start work on graphics processing driver
  • Not started
  • Not started
  • Not started


4
  • 11/01/2022
  • 11/07/2022
  • Create main menu graphics and logic
  • Design and assemble controller prototype 1
  • Not started
5
  • 11/08/2022
  • 11/14/2022
  • Start game (song playthrough) graphics and logic
  • Not started
6
  • 11/15/2022
  • 11/21/2022
  • Continue song graphics and logic
  • Map more songs and integrate
  • Refine controller prototype 1
  • Not started
  • Not started
  • Not started
7
  • 11/22/2022
  • 11/28/2022
  • Design and assemble controller final prototype
  • Start design and assembly of console/screen housing
  • Not started
  • Not started
8
  • 11/29/2022
  • 12/05/2022
  • Testing and bug fixing
  • Update the wiki page
  • Not started
  • Not started
9
  • 12/6/2022
  • 12/12/2022
  • Testing and finishing touches
  • Not started
10
  • 12/14/2022
  • 12/15/2022
  • Final Demo (10/14)
  • Finalize GitLab repo
  • Finalize the wiki page
  • Upload test video
  • Not started
  • Not started
  • Not started
  • Not started


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

DF Mini mp3 player

Appendix

You can list the references you used.