Arduino Based Cartridge Game Console - Tiny Game Corner

by alojz in Circuits > Gadgets

6870 Views, 10 Favorites, 0 Comments

Arduino Based Cartridge Game Console - Tiny Game Corner

Arduino Based Cartridge Game Handheld Console - Tiny Game Corner

Welcome to the instructable which will teach you how to make your own Arduino game console that utilises cartridges!

Yes you heard it well, no more flashing each time you want to play another game, simply pop out the current cartridge and insert another one ;)

This handheld has exposed ICSP header so you can flash a game onto a blank cartridge or the old one that contains a game that you no longer want to play.

How is this possible?

Well, the console is actually just an interface between you and cartridge that is actually an ATMEGA328P-PU microcontroller!

Given the price of this microcontroller, each cartridge will cost approximately 1-2 USD.

Remember this console in it's infancy stage?

https://www.instructables.com/id/Arduino-Pocket-Ga...

It used to have coin cell batteries, small SSD1306 OLED, not even a blinky LED :)

Welcome the new mighty Tiny Game Corner!

Now with bigger screen, top of the line designed case and rechargeable LiPo battery that can last for ages!

Parts Needed

parts.jpg

We will need following parts:

  • ATMEGA328P-PU
  • 4x6cm prototype PCB
  • male and female pin headers
  • M2x20 screws and nuts
  • Passive piezo speaker
  • an LED
  • 7x push buttons
  • switch
  • 2x 22pF ceramic capacitors
  • 16MHz crystal
  • LiPo battery (720mAh in used for this project)
  • LiPo battery charging module with micro USB input
  • SH1106 I2C OLED screen
  • wires

Tools:

  • 3D printer or if you don't have one, you can get prints from Shapeways: click here
  • soldering iron
  • solder
  • phillips screwdriver

Optional:

  • USBTinyISP programmer

for better visual understanding of parts, refer to the image above.

-

Designing and Making a 3D Printable Case

Selection_131.png

Case for this handheld is designed around 4x6 cm prototype PCB, SH1106 I2C OLED, header pins, switch, buttons, LiPo charging module and cartridge header.

I cant embed tinkercad view... here is the link: https://www.tinkercad.com/things/ayJ1Hi8w8vB

Thingiverse: https://www.thingiverse.com/thing:3239429

No printing supports needed for any part listed here.

If you don't own a 3D printer, you can order prints from Shapeways: click here

Connecting Everything Together

schematic.png
atmega328w.png
Selection_132.png
Selection_133.png
Selection_134.png
Selection_135.png
Selection_136.png
Selection_137.png
Selection_138.png
Selection_139.png
Selection_140.png
Selection_141.png
Selection_142.png
Selection_143.png
Selection_144.png

All of the connections are noted in the provided schematic diagram.

Since you will not have the chip itself soldered to the board, but pin headers, pretend that pin headers are the chip legs, imagine where would each leg go.

Pin 1 should be the one on bottom left when looking at the back side of the PCB.

Chip orientation is also defined by notch both on back part of the case and notch on the cartridge, so it cannot go wrong way around by mistake.

For all following soldering/assembly steps you can refer to the video or this section screenshots:

  1. clip adjacent button pins so each button has 2 pins remaining, this is important because we will place buttons in a way that all 4 pins cant go through the board holes
  2. start with buttons' placement and soldering in place as shown
  3. solder 16MHz crystal oscillator on the back of the board so it is aligned with pins 9 and 10, solder to these pins
  4. connect one leg of each 22pF ceramic capacitor together and solder these to ground (GND) pin 8
  5. solder other 2 legs of each 22pF ceramic capacitor on the front side of the board one to pin 9 another to pin 10
  6. solder and wire up all button ground pins together to common GND as shown
  7. solder wires between buttons' second pin and corresponding chip pin as shown
    • UP button to pin 13 (D7)
    • DOWN button to pin 12 (D6)
    • LEFT button to pin 15 (D9)
    • RIGHT button to pin 14 (D8)
    • A button to pin 11 (D5)
    • B button to pin 6 (D4)
    • START button to pin 4 (D2)
  8. solder the switch
  9. solder the 6 pin female header (2x 3 pin header) one pin header on one side, other on other side, this will be used to expose ICSP header for MOSI, MISO, SCK, GND, VCC and RST pins
  10. place LiPo charging module as shown so it is in the right place when everything is put in the case
  11. solder LED on top of the board between power switch and ICSP header anode to pin 16 (D10)
  12. solder wires to connect power switch, ICSP header and LED as shown
  13. solder piezo puzzer: one wire to GND, another to pin 5 (D3)
  14. place the OLED screen and solder remaining 4 wires, SCL, SDA, GND, VCC
  15. solder 2 separated male pin headers to the board as shown, these will be used as holders for LiPo charging module
  16. solder charging module OUT+ and OUT- to the pins from previous step, make sure module aligns correctly with the case
  17. connect OUT+ to switch, OUT- to GND
  18. solder battery wires to B+ and B- of the LiPo charging module
  19. put everything in case
  20. insert chip soldered to female pin headers in the cartridge part
  21. insert the cartridge and program it
  22. remove programmer
  23. turn on the power switch :)

Cartridge is made of the chip and female headers, as shown in the video in the opening step. When you 3D print the enclosure, you can pop the cartridge into 3D printed part designed for it.

Please refer to the video for detailed assembly instructions.

Most important part is to leave OLED screen for the end, because most of the wiring goes under the screen.

Flashing Cartridges With Games!

Selection_141.png
7eb9fc0c-55ce-4835-b760-f4a6541f5965.jpg

To flash cartridge(s) you can use ICSP header on top of your device. In my example i made it fit USBTinyISP programmer, which can be found very cheap online.

I suggest you first burn Arduino Uno bootloader from your Arduino IDE if you have a blank chip without bootloader.

Please put the console power switch in OFF state before connecting ICSP programmer, because it will provide its own power.

here are 2 of my games made for this console:

A-Maze:

https://github.com/alojzjakob/A-Maze/tree/master/A...

and

Tamaguino :)

https://github.com/alojzjakob/Tamaguino/tree/maste...

Make Your Own Games!

Cover1920instructables.jpg
Selection_146.png

You are free to make your own games or port Arduboy and similar games to your handheld!

These are the pins used by this system:

button1Pin = 9; //LEFT

button2Pin = 8; //RIGHT

button3Pin = 7; //UP

button4Pin = 6; //DOWN

button5Pin = 5; //A

button6Pin = 4; //B

button7Pin = 2; //MENU

sound = 3;

ledPin = 10;