casey@midgley:~burntice.xyzONLINE

./journal/chipboy8

ChipBoy8 - A CHIP-8 keychain prototype

My first PCB: a Game Boy-inspired handheld that boots, with the CHIP-8 emulator port still to come.

ChipBoy8 is my first custom PCB: a Game Boy-inspired handheld designed to fit on my keychain. The first board boots, but it isn’t playable yet. I still need to finish the firmware and port my CHIP-8 emulator.

Despite working on a variety of electrical projects, I had never designed and manufactured my own PCB, mainly because I had never had a project that needed one. With this hammer in mind, I set out in search of a nail and decided to attempt to design and manufacture a handheld, Game Boy-inspired console that could be clipped onto a keychain and carried around in a pocket.

Design goals

These were my targets for the finished console:

  • Maintain a handheld form factor and easily fit on my current keychain when fully assembled
  • Aim for at least four hours of active playtime on a full charge (not yet measured)
  • Have a built-in screen with a native resolution that is a multiple of the CHIP-8’s
  • Play audio (one channel and one frequency at a time)
  • Charge and program over USB-C
  • Include an SD card slot for easily adding games to the system without needing to reflash the firmware
  • Avoid scope creep so I actually finish this project someday

Components and schematic

With these goals in place, I chose the STM32G431CBT6 for its price-to-performance ratio, built-in USB support, and SPI interface for the microSD card. I used a BQ24074RGT for charging, an MCP1700 for power regulation, and a generic piezo buzzer for audio. The majority of my sourcing difficulties came from the display itself. In the testing phase, I discovered that the popular SSD1306 display has a resolution of 128 × 64, twice the CHIP-8’s native resolution in each dimension, making it a very attractive option. Unfortunately, the vast majority of sellers only sold the display already integrated into a supporting PCB module. That would have increased the size of the device more than I was willing to accept. After much research, I found a seller who sold the bare OLED displays. The display’s internal charge pump let me avoid adding a separate boost converter to the board.

With the majority of my components specced out, I began designing the schematic in KiCad. This process ended up taking around a month, with most of the work happening in the final week since I was on break.

IMAGE PREVIEW3307×2339
ChipBoy8 circuit schematic in KiCad.

PCB layout

The layout was painful, to say the least. The microSD slot sits on the opposite side of the board from the keypad. Its keepout zone made the keypad’s diode matrix especially tricky to route. Moving from two copper layers to four gave me more routing options around the slot, but it also made the layout more complex. I think a professional could have produced a much cleaner layout and improved the routing significantly, but because the design used low switching speeds, a little bit of jank was acceptable as long as it actually got made.

In the routing view, you can follow the individual traces, especially around the microSD slot and the keypad. The copper-pour view shows how the copper fills the open areas around those traces.

IMAGE PREVIEW848×1220
PCB routing view showing the traces between components.
IMAGE PREVIEW846×1244
PCB layout with the copper pours visible.
IMAGE PREVIEW1394×1388
3D render of the front, showing the keypad and display area.
IMAGE PREVIEW1336×1358
3D render of the back, showing the chips and connectors.

Bring-up

With the design finished, I shipped it out to JLCPCB and got it back a few weeks later. I’ve gotten one board about 90% assembled, with some of the front-facing buttons and diodes still to install, but it’s looking good so far.

IMAGE PREVIEW2880×2160
Front of the bare PCB next to a caliper, before the buttons and display were installed.
IMAGE PREVIEW2880×2160
Back of the bare PCB, with the solder pads still empty.
IMAGE PREVIEW1320×1440
Back of the PCB after the components were soldered in place.

Finishing the firmware and porting the emulator are my next steps. Once I can run games on the board, I’ll shift my focus to the case and get a proof of concept ready.

I’m not planning to release the files for this project until I have it working as a complete unit. At that point, I might make a couple and give them out to friends who offered advice and help while I was working on it.