IMG_5121_Moment.jpg

Teensy Game Console

Fall 2020

Using a Teensy and a custom PCB, I created a “Gameboy-style” handheld video game console that plays a Snake game, a genre of video game where the player controls a line that grows in length. This project was for the Olin College course Real World Microcontrollers. View the demo of the final project below:

Project overview

The console is run by a Teensy 4.0, and has a 2.8” LCD screen, an on-off switch, a button, and a joystick. It’s powered by a 3.7V lithium ion polymer battery rated at 2000 mAh, and is housed in a 3D-printed enclosure. Using a power boost charger from Adafruit, the battery can be recharged, and the device can still be used while charging.

I chose to use a Teensy instead of a more standard Arduino because of the necessity to redraw the screen quickly in real-time in response to the player’s input. The Teensy has 1,024 kilobytes of RAM, compared to the Arduino Nano’s 2 kilobytes, meaning that with the Teensy I can buffer the screen’s output easily.

An early sketch showing a walkthrough of the experience of using the game console

An early sketch showing a walkthrough of the experience of using the game console

In the game itself, the player controls a snake, which automatically crawls forward in the direction it is facing and grows longer for each piece of food (represented by a pink square) it eats. However, the snake will die if it runs into the wall or its own tail. The player consumes food by navigating the snake into the pink square, after which a new pink square immediately appears on the screen. Each new piece of food (including the first one) spawns at a random, unoccupied point on the screen. The game lasts until the player dies.

Both the Teensy and the LCD screen are operable at either 3.3V or 5V. The Teensy can reach a higher clock speed at 5V, so the power boost charger is used to convert the 3.7V of the battery to 5V.

While running, the Teensy draws about 100mA, and the LCD screen draws 80mA. Using a 2000 mAh battery, this gives a theoretical battery life of about 11 hours.

The power boost charger has a micro USB port for charging, which is mounted on the PCB in such a way that it’s accessible from the top edge of the device (there’s an opening in the 3D printed covering to allow the user to plug a cable directly into it).

 
The schematic for the game console. The “company name” West-Craft was the name of my great-grandfather’s toy manufacturing company—I’d like to officially own “West-Craft” as a company name or brand some day…

The schematic for the game console. The “company name” West-Craft was the name of my great-grandfather’s toy manufacturing company—I’d like to officially own “West-Craft” as a company name or brand some day…

 
The top of the PCB layout in KiCad.

The top of the PCB layout in KiCad.

 

Parts List

Part

LCD Screen

Power Boost 1000 Charger

Teensy 4.0

Thumb Joystick

Mini Pushbutton Switch

Lithium Ion Polymer Battery

SPDT Slide Switch

COST

$13.99

$19.95

$19.95

$3.95

$0.35

$12.50

$0.95

I bought my PCBs from JLCPCB. I did two revisions, which were $6.70 plus shipping each.

Access the full project on GitHub: https://github.com/arwensadler/Game-Console