F21: ACE MARIO

From Embedded Systems Learning Academy
Revision as of 10:33, 13 December 2021 by Proj user13 (talk | contribs) (MP3 Decoder)

Jump to: navigation, search

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.

Project Title

Ace Mario

Abstract

Super Mario is one of the best-selling games of all time, with more than 50 million copies sold worldwide. Our goal will be to produce a similar version of it where the player controls Mario. Mario has to race through the Mushroom Kingdom and save Princess.

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

  • Vivek Tapkir
  • Shreevats Gadhikar
  • Daya Modekar

Schedule

Week# Start Date End Date Task Status
1
  • 10/15/2021
  • 10/25/2021
  • Read previous projects, gather information and discuss among the group members.
  • Decide on 2 game ideas and submit Project Proposal assignment
  • Discussion on using wireless or wired controllers,3D printing options,PCB softwares and manufacturer.
  • Finalize parts list
  • Setup splitwise account for cost sharing
  • Create GitLab repository for project
  • Decide on day/time for weekly meetings
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
2
  • 10/25/2021
  • 11/03/2021
  • Choose game based on Preet's Project Proposal feedback
  • Finish schedule rough draft and upload to Wiki report
  • Order project parts
  • Break project up into tasks and assign project tasks to team members
  • Obtain datasheets for all parts and upload to team Google Drive folder
  • Brainstorm gameplay, rules, and level design on paper
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
3
  • 11/04/2020
  • 11/08/2020
  • Read and familiarize with LED Matrix Datasheet
  • Read datasheets and conduct research for driver writing
  • Finalize wiki schedule
  • Test all parts to ensure proper functionality
  • LED matrix can light a pixel(s) at specified locations.
  • Finalize gameplay, rules, and level design on paper
  • Start Developing graphics driver for LED matrix and implement initial game objects
  • Begin developing MP3 decoder board driver
  • Begin designing PCB in EasyEDA software
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
4
  • 11/09/2021
  • 11/15/2021
  • Begin developing Bluetooth board driver
  • LED matrix can display our game character and obstacles
  • MP3 decoder can play/pause, jump to next/previous song, and increase/decrease volume
  • Bluetooth modules can send controls data back and forth between gamepad board and master board
  • Controls data can be accessed using "get" and "set" API
  • Gamepad controller can read joystick and accelerometer values and detect switch presses
  • Decide how to handle each collision detection case (character/enemy, obstacles/enemy, etc.)
  • Finish enclosure design in AutoCAD software and start printing
  • Finalize PCB design on paper and design in PCB software
  • LED matrix displays character orientation correctly depending on current movement direction
  • Controller input (joystick or accelerometer) option is implemented on a gamepad controller
  • Finalize PCB design in software and order PCB
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
5
  • 11/16/2021
  • 11/22/2021
  • LED matrix menu screens and game over/victory screens are implemented on matrix
  • Volume controls and controller input select in the options menu are implemented
  • Integrate circuitry with 3D printed enclosure
  • PCB arrives, conduct PCB testing to ensure proper connections
  • Solder PCB and integrate with existing project circuitry
  • LED matrix can scroll to next screen when the character reaches the bottom of the current screen
  • Finalize MP3 track selection for each screen and during gameplay
  • Collision detection logic is fully functional and displays correctly on the LED matrix
  • Testing and debugging the game logic
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
6
  • 11/23/2021
  • 11/29/2021
  • Integrate game logic code with LED matrix
  • Write gameplay logic code on the master controller. Gameplay logic should update the score and status bar items correctly
  • LED matrix graphics design for all levels is complete
  • MP3 decoder plays correct song/track during gameplay and for each menu/game over screen
  • Integrate game sounds with game logic
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
7
  • 11/30/2021
  • 12/06/2021
  • Sub-system Integration
  • Finish rough draft of project report
  • Finalizing the video game
  • Completed
  • Completed
  • Completed
8
  • 12/07/2021
  • 12/13/2021
  • Address bugs during testing of an integrated system
  • Test pause/play functionality
  • Completed
  • Completed
9
  • 12/14/2021
  • 12/16/2020
  • Final Demo
  • Update Gitlab repo with final code.
  • Finalize project report and submit
  • In Progress
  • In Progress
  • In Progress


Parts List & Cost

General Parts

Item # Part Vendor Qty Cost
1 64x64 RGB LED Matrix Adafruit 1 $54.95
2 SJ-2 Boards SJSU 2 $100.00
3 HC-05 Bluetooth Boards Amazon 2 $20.00
4 MP3 Decoder/Player Board Amazon 1 $6.99
5 Joystick Amazon 1 $4.89
6 Power Supply for LED Matrix (5V 5A) Amazon 1 $15.99
7 JBL Speakers already had 1 $0
8 Audio Jack Cable already had 1 $0
9 MicroSD Card & Adapter already had 1 $0

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

LED Board PCB Schematic


Game Board PCB Schematic


Game Pad PCB (Front)
Game Pad PCB (Back)

LED Matrix

MP3 Decoder

The MP3 player device which is based on a high-quality MP3 audio chip -YX5300 is used in our project to play different soundtracks based on the current state of the game such as jump, victory, game over and Mario run states. Our master controller unit (sjtwo-c board) controls MP3 playback state by sending commands to serial MP3 via UART port

Hardware Design

Software Design

Bluetooth Interface

For this project, we used two HC-05 Bluetooth modules. One Bluetooth was configured on the LED matrix controller board while the other was configured on the gamepad controller. The Bluetooth configured on the led matrix controller worked as a slave, only receives commands, while the one configured on the gamepad worked as master, sending controls to the other controller. The master Bluetooth connected to the gamepad controller transmitted the joystick direction. The transmitted direction was in the form of x and y coordinates. The UP and FORWARD direction was calibrated using the x and y coordinates. So along with UP and FORWARD direction, the joystick switch button data was also transmitted using Bluetooth.

We selected the HC-05 Bluetooth module to transmit data over other modules because of their ease to configure, they are extremely reliable and also easy to set up. Both the Bluetooth modules were configured using AT commands. Using AT commands made our job easy to set one Bluetooth as a master while the other as a slave. The best thing about using AT commands is that we can change the configuration as per our needs. The UART baud rate was set to 38400.


HC-05 Bluetooth Module

Hardware Design

HC-05 Bluetooth Module to SJ2 Connections

Game pad Controller

Joystick

Joystick Module

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

Upload a video of your project and post the link here.

Project Source Code

References

Acknowledgement

Any acknowledgement that you may wish to provide can be included here.

References Used

List any references used in project.

Appendix

You can list the references you used.