Difference between revisions of "F22: Thunder Flash"

From Embedded Systems Learning Academy
Jump to: navigation, search
(References Used)
(Design & Implementation)
Line 329: Line 329:
 
<BR/>
 
<BR/>
  
== '''Design & Implementation''' ==
+
== '''PIN CONFIGURATION''' ==
The design section can go over your hardware and software design. Organize this section using sub-sections that go over your design and implementation.
+
<div><ul>
 +
<li style="display: inline-table;">
 +
{| class="wikitable" style="width: 100%"
 +
|-
 +
! scope="col" style="background:#ADD8E6;"|<span style="color:#FFFFFF"> <font size=3> Pin# </font></span>
 +
! scope="col" style="background:#ADD8E6;"|<span style="color:#FFFFFF"> <font size=3> SJ2 Main Board - LED Matrix Pin Configuration </font></span>  
 +
! scope="col" style="background:#ADD8E6;"|<span style="color:#FFFFFF"> <font size=3> SJ-2 PIN </font></span>
 +
|-
  
=== Hardware Design ===
+
! scope="row"| R1
Discuss your hardware design here.  Show detailed schematics, and the interface here.
+
| PIN for Red terminal of RGB LED for the upper half of LED Matrix
 +
! P0_0
 +
|-
 +
! scope="row"| G1
 +
| PIN for Green terminal of RGB LED for the upper half of LED Matrix
 +
! P0_1
 +
|-
 +
! scope="row"| B1
 +
| PIN for Blue terminal of RGB LED for the upper half of LED Matrix
 +
! P2_2
 +
|-
 +
! scope="row"| R2
 +
| PIN for Red terminal of RGB LED for the lower half of LED Matrix
 +
! P2_4
 +
|-
 +
! scope="row"| G2
 +
| PIN for Green terminal of RGB LED for the lower half of LED Matrix
 +
! P2_5
 +
|-
 +
! scope="row"| B2
 +
| PIN for Blue terminal of RGB LED for the lower half of LED Matrix
 +
! P2_6
 +
|-
 +
! scope="row"| A
 +
| Mux pin for row selection
 +
! P2_7
 +
|-
 +
! scope="row"| B
 +
| Mux pin for row selection
 +
! P2_8
 +
|-
 +
! scope="row"| C
 +
| Mux pin for row selection
 +
! P2_9
 +
|-
 +
! scope="row"| D
 +
| Mux pin for row selection
 +
! P0_16
 +
|-
 +
! scope="row"| E
 +
| Mux pin for row selection
 +
! P0_15
 +
|-
 +
! scope="row"| OE
 +
| Output Enable
 +
! P1_28
 +
|-
 +
! scope="row"| LATCH
 +
| Data Latch
 +
! P1_29
 +
|-
 +
! scope="row"| CLK
 +
| Clock Signal
 +
! P0_17
 +
|-
  
=== Hardware Interface ===
+
! scope="row"|
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.
+
! scope="col" | MP3 Decoder
 +
|
 +
|-
 +
! scope="row"| RX
 +
| UART Receive From MP3 Decoder
 +
! P2_1
 +
|-
 +
! scope="row"| TX
 +
| UART Send Command from SJ-2 Main Board
 +
! P2_0
 +
|-
  
=== Software Design ===
+
! scope="row"|
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. 
+
! scope="col"| XBEE Module Receiver
 +
|
 +
|-
  
=== Implementation ===
+
! scope="row"| RX
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.
+
| UART Receive From Game Controller
 +
! P0_11
 +
|-
 +
! scope="row"| VCC
 +
| VCC Supply
 +
! VCC 3.3
 +
|-
 +
|}
 +
</li>
 +
<li style="display: inline-table;">
 +
{| class="wikitable" style="width: 100%"
 +
|-
 +
! scope="col" style="background:#ADD8E6;"|<span style="color:#FFFFFF"> <font size=3> Pin#  </font></span>
 +
! scope="col" style="background:#ADD8E6;"|<span style="color:#FFFFFF"> <font size=3> Controller Board Pin Configuration  </font></span>
 +
! scope="col" style="background:#ADD8E6;"|<span style="color:#FFFFFF"> <font size=3> uC PIN </font></span>
 +
|-
 +
 
 +
 
 +
! scope="row"|
 +
! scope="col" | XBEE Module Transmitter
 +
|
 +
|-
 +
 
 +
! scope="row"| TX
 +
| UART Transmit to Main Board
 +
! P0_10
 +
|-
 +
! scope="row"| VCC
 +
| VCC Supply
 +
! VCC 3.3
 +
|-
 +
 
 +
! scope="row"|
 +
! scope="col" |Joystick
 +
|
 +
|-
 +
 
 +
! scope="row"| VCC
 +
| VCC
 +
! 3.3V
 +
|-
 +
! scope="row"| GND
 +
| GND
 +
! GND
 +
|-
 +
! scope="row"| Vx
 +
| X-axis ADC Reading for character movement
 +
! P0_25
 +
|-
 +
 
 +
! scope="row"|
 +
! scope="col" | Push Button
 +
|
 +
|-
 +
! scope="row"| I/0 Pin
 +
| Arrow Shooting
 +
! P1_29
 +
|-
 +
 
 +
|}
 +
</li>
 +
</ul></div>
  
 
== '''Testing & Technical Challenges''' ==
 
== '''Testing & Technical Challenges''' ==

Revision as of 03:18, 1 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.

Bow and Arrow

Abstract

Bow and arrow is a fun, aiming archery game. Our goal is to produce a similar version of ‘Bow and Arrow’ where the archer aims the arrow at the targets (balloons) using the bow. The game would have different levels and the archer would get 3 lives to score maximum points. As the level increases the challenges and speed of the game increase. In the later levels, there would be monsters coming onto the archer. In the later levels, there would be monsters coming onto the archer, and the archer should make sure he dodges those obstacles to save his life and hit the balloons to earn points. This is all displayed on the LED matrix acting as the screen.

Objectives & Introduction

The main objective of this project was to create the “Bow and Arrow” video game displayed on a 64X64 RGB LED matrix, with one SJ2 board as a graphics processor/matrix controller, and another SJ2 board as a controller. Other objectives are the following:

  • Design custom PCBs for both the gamepad and matrix controller SJ2 boards.
  • Use the FreeRTOS Real-Time Operating System on both SJ2 boards.
  • Establish UART communications through Xbee between the two SJ-Two Microcontrollers.
  • Create simple coding logic for displaying required characters and game objects.
  • Add background music to the game to enhance the gameplay experience.

Team Members & Technical Responsibilities

  • Shreya Kulkarni
    • Integrating of Graphics Driver
    • Game logic design
    • Joystick and button Implementation
  • Pinky Mathew
    • Interfacing of LED Matrix and driver design
    • Game logic design
    • Joystick and button Implementation
  • Pushkar Deodhar
    • Zigbee module
    • Integrating MP3 module with the Game
    • Hardware Designing & PCB Integration
  • Noel Smith
    • MP3 Audio Encoder/Decoder
    • Integrating MP3 player with the Game
    • Hardware Designing & PCB Integration


Administrative Responsibilities

Administrative Roles
  • Finance Manager
Noel Smith
  • Git Repository Manager
Pinky Mathew
  • Wiki Report Manager
Shreya Kulkarni
  • Bill of Materials Manager
Pushkar Deodhar


Schedule

Week# Start Date End Date Task Status
1
  • 10/16/2022
  • 10/23/2022
  • Analyze previous projects, discussion and finalize game
  • Discuss and order components
  • Create a GitLab repository.
  • Completed
2
  • 10/24/2022
  • 10/29/2022
  • Discuss and plan down the project into modules and assign responsibilities
  • Familiarize with relevant hardware datasheets
  • Completed
3
  • 10/30/2022
  • 11/05/2022
  • Develop driver for joystick
  • Develop driver for LED display
  • Design game start, end, level screen
  • Finalize wiki schedule
  • Completed
4
  • 11/06/2022
  • 11/16/2022
  • Integration of joystick and character motion
  • Develop driver for MP3 Decoder
  • Game logic development
  • In-Progress
5
  • 11/17/2022
  • 11/20/2022
  • Order circuit boards components and complete the design for printing
  • circuit board and component assembly
  • Circuit board testing
  • Game logic development
  • Not started
  • Not started
  • Not started
  • Not started
  • Not started
6
  • 11/21/2022
  • 11/23/2022
  • Integration of circuit boards and microcontroller
  • Continue game logic development
  • Testing and debugging the game logic
  • Not started
  • Not started
  • Not started
7
  • 11/27/2022
  • 12/03/2022
  • Integrate game logic code with LED matrix
  • Integrate game sounds with game logic
  • Not started
  • Not started
8
  • 12/04/2022
  • 12/10/2022
  • Integrate subsystems
  • Update the wiki page.
  • Not started
  • Not started
  • Not started
9
  • 12/07/2022
  • 12/13/2022
  • Address bugs found during system integration
  • Test pause/play functionality
  • Not started
  • Not started
  • Not started
10
  • 12/14/2022
  • 12/15/2022
  • Final Demo
  • Update Gitlab repo with final code
  • Add demo video
  • Update the wiki page
  • Not started
  • Not started
  • Not started
  • Not started


Bill Of Materials

Item# Part Description Part Model & Vendor Quantity Cost
1 Microcontroller Boards SJ2 Boards (Purchased from Preet Kang) 2 $100.00
2 LED Matrix Display Adafruit RGB LED Matrix Panel - 64x64 1 $87.95
3 PCB JLC PCB 5 $18.00
4 Electronics Fun Kit & Power Supply Module ELEGOO Upgraded Electronics Fun Kit 2 $7.56
5 MP3 Decoder HiLetgo YX5300 UART Control Serial MP3 Music Player Module 1 $6.99
6 Power Adapter for LED Matrix Belker 36W Adapter 1 $15.00
7 XBee Module XBee 2mW Wire Antenna - Series 2C (ZigBee Mesh) 2 $62.00
8 Joystick HiLetgo Game Joystick Sensor Game Controller 1 $4.89
9 Push Button Switch Anchor Electronics 1 $1.00
10 Jumper Cables Anchor Electronics 1 $7.00
11 Female headers for SJ2-PCB Connection Anchor Electronics 1 $2.50
12 Ribbon Cable Connector for LED Matrix-PCB Connection Anchor Electronics 1 $1.00
13 Soldering Wire & 18 Gauge Wire Anchor Electronics 1 $3.00
14 Copper Board for Game Controller Connections Anchor Electronics 1 $4.00
Total Cost 22 $317.89


PIN CONFIGURATION

  • Pin# SJ2 Main Board - LED Matrix Pin Configuration SJ-2 PIN
    R1 PIN for Red terminal of RGB LED for the upper half of LED Matrix P0_0
    G1 PIN for Green terminal of RGB LED for the upper half of LED Matrix P0_1
    B1 PIN for Blue terminal of RGB LED for the upper half of LED Matrix P2_2
    R2 PIN for Red terminal of RGB LED for the lower half of LED Matrix P2_4
    G2 PIN for Green terminal of RGB LED for the lower half of LED Matrix P2_5
    B2 PIN for Blue terminal of RGB LED for the lower half of LED Matrix P2_6
    A Mux pin for row selection P2_7
    B Mux pin for row selection P2_8
    C Mux pin for row selection P2_9
    D Mux pin for row selection P0_16
    E Mux pin for row selection P0_15
    OE Output Enable P1_28
    LATCH Data Latch P1_29
    CLK Clock Signal P0_17
    MP3 Decoder
    RX UART Receive From MP3 Decoder P2_1
    TX UART Send Command from SJ-2 Main Board P2_0
    XBEE Module Receiver
    RX UART Receive From Game Controller P0_11
    VCC VCC Supply VCC 3.3
  • Pin# Controller Board Pin Configuration uC PIN
    XBEE Module Transmitter
    TX UART Transmit to Main Board P0_10
    VCC VCC Supply VCC 3.3
    Joystick
    VCC VCC 3.3V
    GND GND GND
    Vx X-axis ADC Reading for character movement P0_25
    Push Button
    I/0 Pin Arrow Shooting P1_29

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

  • github repository link[1]

References

Acknowledgement

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

References Used

  1. Serial MP3 Player Datasheet
  2. Binary code pattern generator for LED Matrix
  3. Everything You Didn't Want to Know About RGB Matrix Panels


Appendix

You can list the references you used.