Group Members:

Lyuxing He(lyuxing2) - ECE 120

David Chen(sc60) - ECE110


 1. Introduction

    1. Project Description

      The video game Snake might be one of the few old games that had history and is fun to play at the same time. It was first developed on a TRS-80 and now being upgraded to be playable on computers. Our purpose of this project is to combine the "old" Snake and the "modern" Snake together——the kind of Snake video game that can be played by a self-made console (actually buttons), displayed by arrays of LED controlled by multiplexing, and programmed/ processed by Arduino. 
    2. Background Research

      The main problem to deal with in this project might be controlling the LED matrix in a square with a side length up to 10 units, and we thought the best design to cope with this problem is the technique of multiplexing. By implementing this technique, we can achieve controlling a single LED by turning on its corresponding anode grounding its corresponding cathode. However, controlling two or more than two LEDs may be a complicated scenario, as it may require us to set a duty cycle under a certain frequency in order to seemingly turn on multiple LEDs. More problems may occur as we proceed, but we think the link provided below is a good resource for us to seek help from. Another major challenge is programing the LED matrix. Thankfully, the Arduino platform offers a multiplexing library that can facilitate the code-writings, and the link provided below also had instructions on how to program multiplexed display for the LED matrix. Last but not the least, the power consumption of this design is one of our major concerns. As the snake eats more food, the size of the snake will grow and thus more LED will be turned on, causing the power drawn from the source to increase. We don't know how the power provided by a 9v battery will perform and how long will it last, but the result shall be revealed once we started testing the circuit.

2. Design Details

  1.  The focuses of this project are on two sides :

    1. Creating an array of LED, and use a multiplexer to control the lighting. We will have to write a driver for the array and use a multiplexer to control each individual pixel.
    2. Software design that implements a Snake game. Using Ardunio to receive the input from the controller and the output of the board, we will be able to light up the corresponding pixel on the array.
  2.  Some of the challenges will come from controlling the LED.  One of the issues of Using the multiplexer approach is that we cannot have two LEDs from different rows and columns light up at the same time because it will light up two additional LEDs as well. Instead, we have to blink the two led one at a time at a very high speed to avoid this problem. 

3. Parts

  1. ARDUINO MEGA 2560 REV3(38.50)

  2. PCB Prototype board 15x20
  3. Breadboard (owned)
  4. a set of arrow key input/controller*4
  5. Green LED*100
  6. Resistors (free)
  7. Mosfet transistor (free)


ARDUINO MEGA 2560 REV3(38.50)$38.50https://store.arduino.cc/usa/mega-2560-r3
PCB Prototype board 15x20$10.99https://www.amazon.com/Double-Sided-Prototype-Universal-Circuit/dp/B07BSFB33P?th=1
arrow key input/controller*4
can be purchased in ECE Supply Center
LED green*100
can be purchased in ECE Supply Center

4.  Block Diagram

 

5. Reference


Comments:

I think your project idea is very cool! I'm not sure what type of LED's you're trying to use, but keep in mind that Arduino's have a limit on how much current each pin can put out, so keep that in mind. You don't necessarily have to run it off of a 9V battery, there are other types of batteries or even a bench top power supply that can provide much more power to the LED's.

Posted by jamesw10 at Feb 15, 2020 20:05

Cool idea! Please update your block diagram by drawing a new one with computer software or web apps like Lucidchart.

Posted by yuchenc2 at Feb 16, 2020 02:43

Please keep max current ratings of the Arduino in mind while building this. Also, please re-do your block diagram in a diagramming software.


Posted by fns2 at Feb 16, 2020 13:31

Seems like this project concept has a well documented history which is great news. Like everyone above says, getting at least some sort of power estimate will be crucial for knowing what parts you will need.

Posted by dbycul2 at Feb 16, 2020 22:20

Glad to see you guys got charlieplexing, I was going to mention it.

Power will not be easy.

Update diagram to not be hand drawn.

Multiplexing may save your current limiting issue from the Arduino! If not, use Arduino to control transistors that actually provide the current.

Posted by weustis2 at Feb 16, 2020 23:01

https://www.ebay.com/itm/SX1509-16-Channel-I-O-Output-Module-Breakout-Keyboard-GPIO-Level-LED-Driver/184170408965?epid=518489590&hash=item2ae1696c05:g:mXAAAOSw6IVeRpng

Posted by fns2 at Feb 20, 2020 18:40

Approved, Feb 20th.

Posted by fns2 at Feb 20, 2020 19:08