Arduino Game Console

Prototype of shield, with Nokia3310 LCD, 4050 buffer and 4051 multiplexer to connect 8 buttons, plus a buzzer to play tones

In the IEEE Student Branch of Leuven, we regularily organize "Soiree Pratiques", during which it is shown how to build/make/program various electronics or software projects. For example, in the past we had two low-cost Sumo-Robot competitions (also based on Arduino) and a DIY home automation session.

One idea I played with was a simple handheld gaming console Arduino shield. It should be easy to solder and as cheap as possible (to attract more people and limit expenses for the branch).

The main "spark" for this shield is the availability of the Nokia 3310/5510 LCDs. These are LED backlit LCD displays that go for about 3 euro. Many code-examples are available as well.

Note that different versions of the LCD carrier board with slighty different pinouts are available and that they are a bit fragile (sometimes the screen is not properly pressed against the carrier board and it refuses to display anything).

The main difficulty in this project was keeping the cost down and make it possible to solder for people who have never done something like this before. Eventually, PCBs were made at Eurocircuits because by ordering 30 pieces at once, the price per PCB was only about 6.5 euro. Total cost for the shield is then about 15 euros.

A full soldering manual and programming introduction is in the PDF. All source code and the PCB gerber files are in a separate zip-file which you can find at the bottom of this page. If you want to have your own board made, you can just upload this gerber-zip to an online PCB service and have it made!

Component overview

The game shield is designed to plug into an Arduino Uno and transform it into a mini-Gameboy clone. The main features are:

  • a Nokia 3310 monochrome LCD, with 48 x 84 pixels and a backlight consisting of 4 LEDs
  • 8 tactile switch buttons that can be used as inputs
  • a reset button
  • a buzzer, that can be used as a low-quality speaker.

LCD screen

The LCD screen is the same as used in the Nokia 3310/5510 cell phones and has 48x84 pixels. Internally it has a controller chip, the PCD8544, so that it can be driven using a serial connection. On the sides there are 4 leds that function as a backlight. Because of it’s popularity, it is easy to find code examples and also a ready-made Arduino library can be found.

The controller chip works at 3.3V, which means it cannot be directly connected to the Arduino’s 5V output pins. A level converter is preferred to avoid damaging the internal logic. On the Arduino game shield, this level-shifting achieved with a Non-inverting Buffer, type 4050. Incoming 5V data signals come out as 3.3V.

Input buttons

Next to the screen there is a small D-pad on the left and 4 general buttons on the right. These are tactile ‘clicky’ switches.

Because the Arduino has only a limited amount of pins available, we can save a few by using a multiplexer. With a multiplexer, you choose the button which state you want to read by setting an address. On the board is a 4051 multiplexer.

To select between the 8 buttons, a 3-bit value must be set at the address pins of the multiplexer, and then the state of the selected button appears at its output. This way we only need 4 pins of the Arduino instead of 8.

Below the D-pad there is also a reset button that is directly connected to the Arduino’s reset circuit.

Buzzer

At the left top, there is space for a small buzzer. Normally, buzzers are meant to output only one specific tone. This is their resonance frequency at which maximum volume is produced, in this case about 2kHz. When driven at other frequencies, the volume will depend on how far this frequency is from the buzzer’s optimal resonance frequency. In other words, you can use it as a simple speaker, but the volume cannot be controlled other then by using a resistor.

With the Arduino Tone library, you can play some basic music!

A list of all components on the board can be found in section 6 of the PDF.

Schematics

Below the schematic of the board can be found. It was drawn and layed out in KiCAD, and the project files for it can also be found at the bottom of the page. The pins have been chosen as such that the SPI bus and AD pins remain available. This way, maybe an SD card can be connected to load extra graphics, tones, etc

Game programming & example code

In the zip file with the source code, some general examples on how to use the display, play music and read the buttons are included, together with two ready-to-play games; a snake variant and a basic Space Invaders clone: