Difference between revisions of "F20: Treasure Diver"

From Embedded Systems Learning Academy
Jump to: navigation, search
(RGB LED Matrix)
(Abstract)
Line 5: Line 5:
  
 
== Abstract ==
 
== Abstract ==
Treasure Diver is a single player game in which the player descends into watery depths on the hunt for treasure. The player must dodge obstacles and enemy creatures all while collecting treasure along the way. While descending the player is able to attack enemies at a range which in turn may give them power ups such as extra air, faster move speed, or temporary invincibility. When they reach the bottom they can collect the Motherlode. After that they have to ascend the cavern and make it out with all their treasure in one piece. Hitting an enemy or obstacle causes the player to lose air and a treasure chest and when their air hits zero it’s game over. At the end of a level the player is given a score based on treasure collected, remaining air, and the amount of enemies destroyed.
+
Treasure Diver is a single player game in which the player descends into the watery depths on the hunt for treasure. The player must dodge obstacles and enemy creatures all while collecting treasure along the way. While descending, the player is able to attack enemies at a range which in turn increases the player's score. When they reach the bottom of the level, they can collect the large treasure chest called the Motherlode. Once the Motherlode is collected, they have to ascend the cavern and make it out before running out of air. Hitting an enemy causes the player to lose air, a treasure chest, and their score to decrease. When their air hits zero, it’s game over. At the end of a level the player is given their score based on treasure collected, and the amount of enemies destroyed, and can progress to the next level.
  
 
== Objectives ==
 
== Objectives ==

Revision as of 22:31, 17 December 2020

Tiger Tiger Game from Xenoblade Chronicles 2

Treasure Diver

Treasure Diver

Abstract

Treasure Diver is a single player game in which the player descends into the watery depths on the hunt for treasure. The player must dodge obstacles and enemy creatures all while collecting treasure along the way. While descending, the player is able to attack enemies at a range which in turn increases the player's score. When they reach the bottom of the level, they can collect the large treasure chest called the Motherlode. Once the Motherlode is collected, they have to ascend the cavern and make it out before running out of air. Hitting an enemy causes the player to lose air, a treasure chest, and their score to decrease. When their air hits zero, it’s game over. At the end of a level the player is given their score based on treasure collected, and the amount of enemies destroyed, and can progress to the next level.

Objectives

The main objective of this project was to create the treasure diver video game displayed on an RGB LED matrix, one SJ2 board as a graphics processor/matrix controller, and another SJ2 board as a game pad controller. Other objectives are the following:

  • Design custom PCBs for both the game pad and matrix controller SJ2 boards.
  • Design custom 3D printed enclosures for both the matrix and game pad controller.
  • Use the FreeRTOS Real-Time Operating System on both SJ2 boards.
  • Use a wireless interface for communication between both SJ2 boards.
  • Incorporate an acceleration sensor as one of the options to control the game character's movement.
  • Add background music to the game to enhance gameplay experience.

Introduction

This project was divided into the following modules for each SJ2 board:

  • Matrix Controller Board: The matrix controller board is responsible for displaying the graphics of the treasure diver game, controlling the treasure diver game logic, playing MP3 tracks based on the current game/menu screen, receiving character movement and button press signals over a bluetooth interface, and sending controller type (accelerometer or joystick) signals over a bluetooth interface.
  • Game Pad Controller Board: The game pad controller board is responsible for processing input joystick, accelerometer and button press signals, controlling the treasure diver game controls logic, sending character movement and button press signals over a bluetooth interface, and receiving controller type (accelerometer or joystick) signals over a bluetooth interface.

How to Play Treasure Diver

  • Using the joystick or accelerometer controls (chosen in options menu) on the game pad controller, move the game character down to the bottom of each screen in each game level.
  • Once the character reaches the bottom of a screen, the next screen of the level will appear.
  • Avoid all the obstacles while descending, collect as many treasure chests and shoot as many enemies as possible to increase your score.
  • You can shoot enemies by pressing the select button on the game pad controller (button on the left).
  • Try not to get hit by any enemies! Doing so will cause you to lose a chest and some air. If you run out of air, you lose the game and will have to restart at the first level.
  • Once you get to the last screen of the level, you must pick up the chest at the bottom of the screen before you can start ascending.
  • Now that you've got the final chest, move the game character back up to the top of the first screen of the level before you run out of air!
  • When you are ascending, you will not be able to shoot any remaining enemies so make sure you shoot them all when you're descending!
  • Once you reach the top of the first screen in the level, you will enter the next game level.
  • Beat all levels in order to win the treasure diver game!

Team Members & Responsibilities

Treasure Diver GitLab

Ameer Ali GitLab

  • LED Matrix Driver
  • Matrix Graphics Development
  • Game Logic Development
  • Gameplay Mechanics Design
  • Wiki Page Management

Jesus De Haro GitLab LinkedIn

  • Game Pad Controller
  • MP3 Decoder Driver
  • Matrix Graphics Development
  • PCB Design
  • GitLab Repo Management

Nicholas Kaiser GitLab LinkedIn

  • HC05 Bluetooth Driver and Interface
  • Matrix Collision Detection Development
  • CAD Enclosure Design
  • PCB Design
  • Wiki Page Management

Schedule

Week # Start Date End Date Tasks Status
1 9/27/2020 10/3/2020
  • Decide on day/time for weekly meetings
  • Decide on 2 game ideas
  • Decide on using wireless or wired controllers
  • Decide on PCB software and manufacturer to order from
  • Finalize parts list
  • Setup splitwise account for cost sharing
  • Discuss 3D printing options
  • Break project up into tasks and begin assigning tasks to team members
  • Setup team GitLab repo with master and working master branches
  • Submit Project Proposal assignment
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
2 10/4/2020 10/10/2020
  • Read past semester reports to decide on parts vendors
  • Completed
3 10/11/2020 10/17/2020
  • Choose game based on Preet's Project Proposal feedback
  • Submit Group Questions assignment
  • Choose top picks for roles and responsibilities
  • Finish schedule rough draft and upload to Wiki report
  • Completed
  • Completed
  • Completed
  • Completed
4 10/18/2020 10/24/2020
  • Assign project tasks to team members
  • Order project parts
  • Submit Wiki schedule assignment
  • Complete project GitLab Repo setup
  • 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
5 10/25/2020 10/31/2020
  • Read datasheets and conduct research for driver writing
  • Plan CAD enclosure design on paper
  • Finalize gameplay, rules, and level design on paper
  • Completed
  • Completed
  • Completed
6 11/1/2020 11/7/2020
  • Parts arrive
  • Test all parts to ensure proper functionality
  • Begin developing graphics driver for LED matrix
  • Begin developing MP3 decoder board driver
  • Begin developing bluetooth board driver
  • Finalize CAD enclosure design on paper and begin designing in AutoCAD software
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
7 11/8/2020 11/14/2020
  • LED matrix can light a pixel(s) at specified locations
  • LED matrix can display our game character and obstacles
  • MP3 decoder can play a song from the SD card
  • MP3 decoder can play/pause, jump to next/previous song, and increase/decrease volume
  • Bluetooth modules can send controls data back and forth between game pad board and master board
  • Controls data can be accessed using "get" and "set" API
  • Plan PCB design on paper
  • Game pad controller can read joystick and accelerometer values and detect switch presses
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
8 11/15/2020 11/21/2020
  • Decide how to handle each collision detection case (character/enemy, bullet/enemy, etc.)
  • MP3 decoder folder structure is finalized
  • MP3 decoder can play a song at a specified index
  • Analog thumbstick and accelerometer values are read by game pad board and sent over bluetooth
  • Button press logic is implemented on game pad board and sent over bluetooth
  • Finish enclosure design in AutoCAD software and start printing
  • Order PCB components (resistors, capacitors, etc.)
  • Finalize PCB design on paper and design in PCB software
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
9 11/22/2020 11/28/2020
  • LED matrix side bar data (health, power ups) is displayed and updates correctly
  • LED matrix displays character orientation correctly depending on current movement direction
  • Controller input (joystick or accelerometer) option is implemented on game pad controller
  • Character moves on LED matrix based on received direction controls
  • Bullet moves on LED matrix when button is pressed
  • Finalize PCB design in software and order PCB
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
10 11/29/2020 12/5/2020
  • LED matrix menu screens and game over screens are implemented on matrix
  • Volume controls in 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 character reaches the bottom of current screen
  • Finalize MP3 track selection for each screen and during gameplay
  • Collision detection logic is fully functional and displays correctly on LED matrix
  • Completed
  • Completed
  • Completed
  • Completed
  • Completed
11 12/6/2020 12/12/2020
  • Finish rough draft of project report
  • Write gameplay logic code on 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
  • Gameplay state machine switches to next state based on user button presses and gameplay progression
12 12/13/2020 12/19/2020
  • Film demo video and upload. Create link on Wiki report
  • Demo Day
  • Finalize project report and submit


Parts Lists & Cost

General Parts

Item # Part Vendor Qty Cost
1 64x64 RGB LED Matrix Adafruit 1 $54.95
2 SJTwo Boards SJSU 2 $100.00
3 HC-05 Bluetooth Boards Amazon 2 $12.59
4 MP3 Decoder/Player Board Amazon 1 $7.39
5 Speakers (with audio jack connection) already had 1 $0
6 Audio Jack Cable already had 1 $0
7 MicroSD Card & Adapter (32GB or smaller) Amazon 1 $5.99
8 Power Supply for LED Matrix (5V 5A) Amazon 1 $14.99
9 Tactile Push Buttons Amazon 2 $7.98
10 Analog Thumbstick Amazon 1 $4.89
11 Power Bank already had 1 $0
12 6" USB to Micro-USB Cable Amazon 1 $5.19

Game Pad PCB Components

Item # Part Vendor Qty Cost
1 M3 Size (or smaller) Screws & Nuts Amazon 4 $11.99
2 5-pin Right Angle Male Header Amazon 1 $4.99
3 6-pin Right Angle Female Header Amazon 1 $7.99
4 1K Through-Hole Resistors Amazon 2 $5.69
5 2x20 Female Header Amazon 1 $6.99
6 Male Header Pins Amazon 16 $4.99

Matrix Controller PCB Components

Item # Part Vendor Qty Cost
1 2.1mm DC Power Jack (Breadboard Compatible) Adafruit 1 $0.95
2 2-pin Screw Terminal Block Amazon 1 $5.99
3 2x20 Female Header Amazon 1 $6.99
4 4-pin Right Angle Male Header Amazon 1 $4.99
5 6-pin Right Angle Female Header Amazon 1 $7.99
6 Male Header Pins Amazon 20 $4.99
7 2x8 Box Header Amazon 1 $9.99

Matrix & Game Pad Enclosure Parts

Item # Part Vendor Qty Cost
1 Game Pad and Matrix Enclosures custom design 1 $153.34
2 M3 Size (or smaller) Screws & PCB Standoffs Amazon 18 $11.99
3 #8-32 x 1/2 inch Machine Screws & Nuts Home Depot 8 $1.18
4 Male Header Pins Amazon 12 $4.99
5 Hot Glue Gun & Hot Glue Sticks already had 1 $0
6 6" Slim Headphone Jack Extender (Male to Female) Amazon 1 $6.99
7 6" DC Power Jack Extender (Male to Female) Amazon 1 $9.89
8 Velcro Straps (20mm wide) Amazon 2 $6.59

Design & Implementation

Insert diagram of all modules connected to each sj2 board (using pictures of actual modules)

PCB Design

We chose EasyEDA as our PCB designing software since it is completely free to use with no trial period. Additionally, EasyEDA has a handy auto-routing feature, and the ability to create a PCB from a schematic. We designed two PCBs, one for our game pad controller and one for our matrix controller. First, we created separate schematics for both controllers that included all connections. We included extra GND, 3.3V, 5V, and SJ2 pins to accommodate any design changes down the road. We made these extra pins available as header pins on the PCBs.

Matrix Controller Board PCB Schematic
Game Pad Board PCB Schematic

Once our schematics were done and checked by each group member several times, we manually checked the footprint for each part we included in the schematic. Some of the parts we chose didn't have a footprint and so we had to search EasyEDA's library to find one. Also, the connections for several of the default footprints were incorrect for our design and had to be manually edited so that each pin corresponded to the correct solder pad. Once the footprints were all verified, we dragged and dropped the footprints onto the PCBs in precisely measured locations to ensure compatibility with our 3D printed enclosures. Next, EasyEDA's auto-routing feature was used and then manually checked to ensure proper connections.

Matrix Controller PCB Design in EasyEDA
Game Pad PCB Design in EasyEDA

We chose to order our PCBs from JLCPCB due to their fast manufacturing and shipping times, and reasonable PCB and shipping prices. As an added bonus, JLCPCB is integrated into EasyEDA, so ordering your PCB is extremely simple. Once we placed the order, our PCBs only took a week to arrive. We used a multimeter to continuity tested all the connections on the PCBs before hooking them up and didn't run into any incorrect connections during this testing.

Matrix Controller Board PCB (Front)
Matrix Controller Board PCB (Back)
Game Pad PCB (Front)
Game Pad PCB (Back)

Once the PCBs were verified, we soldered them up to integrate into our existing circuitry. The game pad PCB has precisely positioned holes so that the joystick can be screwed into the PCB, allowing for a very secure fit. The push buttons on the game pad PCBs were mounted on 10mm nylon standoffs and had header pins soldered to extend their pins. This was done in order to raise the height of the push buttons in order to match the height of the joystick.

Matrix Controller PCB (Top)
Matrix Controller PCB (Bottom)
Game Pad PCB (Top) View 1
Game Pad PCB (Bottom)
Game Pad PCB (Top) View 2
Game Pad PCB (Top) View 3

CAD Enclosures Design

We used the FreeCAD software in order to design our custom enclosures for both the matrix and game pad. We decided to use FreeCAD because it is completely free with no trial period, and lots of documentation and help videos are available online. This software is not without bugs and inefficiencies but this was the only free option we could find that didn't have a trial period, design limitations, or size restrictions. FreeCAD also includes tons of user made workbenches that include pre-made designs for specific parts (screws, nuts, standoffs, etc) which can be useful and a time saver.

Our matrix enclosure design includes a casing slightly larger than the matrix. A lip was created on the inside for the matrix to rest on. Through taking precise measurements and using a thinner but more flexible outer wall, we were able to make the matrix "snap fit" into the enclosure. We designed tabs on the bottom of the matrix enclosure to place screw nuts into in order to make our enclosure screw shut. Our matrix enclosure design also included a back plate for all the circuitry components to be fastened to. The back plate has screw holes and cutouts for the power and audio cables.

Matrix Enclosure Design in AutoCAD Software
Matrix Enclosure Back Plate Design in AutoCAD Software

Our game pad enclosure design includes a top and bottom cover for the game pad controller circuitry to sit in. Through taking precise measurements, our game pad controller circuitry fits snugly into the enclosure and is held in place by the SJ2 board's micro-USB port sticking through the cutout in the enclosure's bottom cover. This allows for easy installation and removal which was helpful for debugging. The enclosure's top cover has cutouts for the joystick and two push buttons while the bottom cover has cutouts on its bottom face for velcro straps to secure the power source to the bottom of the game pad enclosure. We designed an inner lip (top cover) and an outer lip (bottom cover) so that the two covers would fit together securely. We designed matching screw hole cutouts for each cover so that the game pad enclosure could be screwed shut.

Game Pad Enclosure Top Cover Design in AutoCAD Software
Game Pad Enclosure Bottom Cover Design in AutoCAD Software

Getting our enclosures printed proved to be a challenge. Normally, the SJSU library offers free 3D Printing services to students and the SCE club offers free 3D printing services to members, but due to the COVID pandemic, SJSU and all of it's services were shutdown and so we had to explore other options. Online 3D Printing services were incredibly expensive so we chose a local place that printed our enclosures for about $155. Due to the limitations of FDM 3D printing, the screw hole and joystick cutouts on the game pad enclosure and the power jack cutout on the matrix enclosure had to be manually made larger using a needle file but this was the only post-printing modification that had to be made.

Matrix Enclosure (Front)
Matrix Enclosure (Back)
Matrix Enclosure Side View
Matrix Enclosure Back Plate (Front)
Matrix Enclosure Back Plate (Back)
Game Pad Enclosure Top Cover (Front)
Game Pad Enclosure Top Cover (Back)
Game Pad Enclosure Bottom Cover (Front)
Game Pad Enclosure Bottom Cover (Back)

Assembly of the matrix enclosure included using hot glue to glue a screw nut into each tab so that screws could be threaded through the back plate to fasten it to the main body of the matrix enclosure. We chose a screw shut design because it would make assembly and disassembly easier during debugging. Assembly of the game pad enclosure included placing standoffs between the top and bottom covers so that screws could be threaded through each cover and into one end of the standoff to hold the game pad enclosure together. Velcro straps were threaded through the cutouts in the bottom cover to hold the power source securely in place. A short 6" USB to micro-USB cable was used to connect the power source to the SJ2 via the cutout in the side of the bottom cover.

Matrix Enclosure Assembled (Front)
Matrix Enclosure Assembled (Back)
Matrix Enclosure Assembled Side View 1
Matrix Enclosure Assembled Side View 2
Game Pad Enclosure Assembled (Front)
Game Pad Enclosure Assembled (Back)
Game Pad Enclosure Assembled Side View

The SJ2 board and MP3 decoder board are mounted on the matrix enclosure's back plate, and 6" power and audio cables are run through to the outside of the enclosure for easy plug in access. The game pad enclosure's SJ2 board sits in the bottom cover, and a 6" USB to micro-USB cable runs from the power supply and plugs into the SJ2 board by plugging in through the cutout in the bottom cover.

Matrix Enclosure Inside View
Game Pad Enclosure Inside View
Game Pad Enclosure Inside Side View

RGB LED Matrix

Brief description of what this module does. Insert diagram of led matrix connected to sj2 (using pictures of actual modules)

The Adafruit 64 X 64 LED matrix is responsible for displaying our Game elements to the player.

Treasure Diver LED Matrix backplate.jpg
Treasure Diver LED Matrix front.jpg
Treasure diver Raw connection.jpg

Hardware Design

Discuss your hardware design here. Show detailed schematics, and the interface here. 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.

The Technical Specifications of our Matrix are as follows:

  • Brightness: 2800cd/square meter
  • Size: 160x160mm
  • Pitch: 2.5M
  • 5 Addressable Pins
  • Compatible with M3 mounting screws
  • Scan: 1/32
  • Refresh Frequency: >=400HZ

Two pin Sets, Input & Output, are located on the back of the Matrix along with a 2 VCC & 2 GND pins. The power pins require an external power supply capable of providing 5v at a bare minimum 4A of current, which were hooked up to a power supply via the spade connectors provided with the board . Any less than that will be insufficient if the whole board must be lit up. The input pins are where the Sjtwo microcontroller connects to drive this board. The output Pins are for chaining together multiple matrices together and was unused for this project. To drive the matrix, 16 GPIO pins were selected and made into output pins to control the input block of the matrix. The matrix input pins are as follows:

S.NO RGB LED pins Function
1 R1 High R data
2 G1 High G data
3 B1 High B data
4 R2 Low R data
5 G2 Low G data
6 B2 Low B data
7 A Row select A
8 B Row select B
9 C Row select C
10 D Row select D
11 E Row select E
12 CLK Clock signal.
13 OE Output enables to cascade LED panel.
14 LAT Latch denotes the end of data.
15 VCC 5V
16 GND GND
Treasure diver Pin connections.jpg

Software Design

Implementation

Short code snippets or pseudo-code with explanations

MP3 Decoder

The YX5300 MP3 Music Player Module is used in the project to play music at the menu, gameplay and at the Victory/Gameover screen. Although we use it to decode MP3 files, it can also decode MAV files. This board contains a slot for SD card mounting, which we command the module to read from. Insert diagram of MP3 decoder connected to sj2 (using pictures of actual modules)

Image of MP3 Decoder board used in our project from Amazon

Hardware Design

This module is easy to interface since it only uses UART pins (Rx and Tx), excluding the Vcc and Ground. This board was able to be powered with the 3.3V power from the SJ2 board. The MP3 decoder was connected to 2 SJ2 pins....(to be continued). Discuss your hardware design here. Show detailed schematics, and the interface here. 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.

Connection diagram of MP3 decoder to SJ2 board.


Software Design

For ease of code reading, memory was unionized so it may be accessed as an array and by variable names that correspond to the command packet format that is specified in the module's datasheet. The SJ2 board initializes UART for communicating to the MP3 decoder and allocates memory to load packet information before sending via Tx line. Before sending any other command, we must command the decoder to select device 2 (as described in the datasheet).

In the project we wait for an event, such as entering the title screen or game to start playing music.

MP3 Decoder flowchart

Implementation

The datasheet specifies the command packet to the MP3 decoder to be a minimum size of 8 bytes composed of the START, VERSION, LENGTH, COMMAND, FEEDBACK, DATA (min of 2 bytes), and END bytes. To make the implementation self explanatory and easy to use (via array), the commands were placed in a unionized memory location (shown below). This approach made it easier

typedef struct {
  uint8_t bytes[8]; ///< 8 bytes of a mp3 decoder message
} mp3_decoder__command_t;

typedef union {
  mp3_decoder__command_t decoder_command; ///< 64-bit command message to decoder
  struct {
    uint64_t start_byte : 8;    // Will be set to 0x7E
    uint64_t version_byte : 8;  // Will be set to 0xFF
    uint64_t data_length : 8;   // Will be set to 0x06
    uint64_t command_byte : 8;  // Varies
    uint64_t feedback_byte : 8; // Will be set to 0x00
    uint64_t data_byte0 : 8;    // Varies
    uint64_t data_byte1 : 8;    // Varies
    uint64_t end_byte : 8;      // Will be set to 0xxEF
  } decoder_command_byte;
} mp3_decoder__msg_t;

The commands were structured as an enum for dedicated functions to use in setting command_byte in the command packet via decoder_command_byte members. Once the command is set, the packet is accessed as an array to simplify sending over UART.

Bluetooth Interface

Brief description of what this module does. Insert diagram of bluetooth connected to each sj2 (using pictures of actual modules)

Hardware Design

Discuss your hardware design here. Show detailed schematics, and the interface here. 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.

Software Design

Use a flowchart(s)

Implementation

(Short code snippets or pseudo-code with explanations)

Game Pad Controller

Brief description of what this module does. Insert diagram of joystick and buttons connected to sj2 (using pictures of actual modules) The main components in Game Pad controller are a joystick, accelerometer, two buttons, and bluetooth. The controller is used to send commands and control Steve (the main character) in Treasure Diver, along with navigation of the menus, with the joystick or the SJ2's on-board accelerometer (user's choice). With bluetooth on the game pad, the controller is wireless.

Amazon image of the joystick
On-board accelerometer

Hardware Design

Discuss your hardware design here. Show detailed schematics, and the interface here. 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.

Schematic of Game Pad controller

Software Design

Use a flowchart(s)

Implementation

Short code snippets or pseudo-code with explanations

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:

CAD Enclosures Design

  • When we received the 3D printed enclosures, some of the holes were smaller than designed. This can happen in FDM printing because plastic is melted and placed layer by layer, which is only accurate to a certain thickness and height. In order to enlarge the holes, a needle file was used to file down the openings until the hole was big enough.
  • Due to the COVID pandemic, we were unable to access the free 3D printing services offered by SJSU and so we had to pay to get our enclosures printed. Our original design was extremely costly and so the enclosures had to be redesigned twice in order to bring the cost down to an affordable amount. All the redesigning we had to do took a lot of time away from the other aspects of our project and the resulting enclosures were not as fancy as we originally planned, but it was all we could afford.
  • Discuss issue and resolution n.

PCB Design

  • Our first design of the matrix controller PCB had incorrect pin spacing for the led matrix pins because we accidentally used the wrong footprint. Unfortunately, we didn't notice this until after we had placed the PCB order and so we had to oder a second matrix controller PCB that had the correct matrix pin spacing. Fortunately, we noticed this before our order shipped and so we were able to add the corrected PCB design to our order without any additional delays.
  • Discuss issue and resolution 2.
  • Discuss issue and resolution n.

LED Matrix

  • When testing the game, we observed that if the character hit an obstacle and the joystick direction moving the character towards the obstacle was held for over a second or so, the game character would actually start to move into the obstacle. We realized that this was because the collision detection wasn't updating quick enough, and so we changed the collision detection's task priority from low to high. Using high priority for the collision detection task solved this problem.
  • Discuss issue and resolution 2.
  • Discuss issue and resolution n.

MP3 Decoder

  • The datasheet lacks some information and clarity on initializing the module and with some of the commands. When first using it, non of the commands appeared to work or have any effect. The issue was resolved after sending the command to select a device, which was not explicitly stated in the datasheet. Once this command is first sent, the MP3 decoder now begins accepting commands.
  • Discuss issue and resolution 2.
  • Discuss issue and resolution n.

Bluetooth Interface

  • Discuss issue and resolution 1.
  • Discuss issue and resolution 2.
  • Discuss issue and resolution n.

Game Pad Controller

  • Discuss issue and resolution 1.
  • Discuss issue and resolution 2.
  • Discuss issue and resolution n.

Advice for Future Students

CAD Enclosures Design

  • Advice/tip #1
  • Advice/tip #2
  • Advice/tip #n

PCB Design

  • Use EasyEDA to design your PCBs. It has an auto-routing feature so you don't have to perform any routing by hand which saves you so much time. It also automatically converts your schematic to components that you just "drag and drop" onto your PCB while the connections are automatically maintained.
  • Order your PCBs from JLCPCB (integrated into EasyEDA). You'll get them in 1 week.
  • In EasyEDA, may sure you check the connections for each footprint you're using. Sometimes the footprint's pinout won't exactly match your schematic.
  • Advice/tip #n

LED Matrix

  • Advice/tip #1
  • Advice/tip #2
  • Advice/tip #n

MP3 Decoder

  • Advice/tip #1
  • Advice/tip #2
  • Advice/tip #n

Bluetooth Interface

  • Advice/tip #1
  • Advice/tip #2
  • Advice/tip #n

Game Pad Controller

  • Advice/tip #1
  • Advice/tip #2
  • Advice/tip #n

General

  • Advice/tip #1
  • Advice/tip #2
  • Advice/tip #n

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

List any references used in project.

Appendix

You can list the references you used.