Features

  • 16x12 WS2818 array for display
  • Buzzer for sound
  • 6 axis IMU
  • Can be an I2C host or device, for multiplayer games
  • Compatible with CircuitPython or the RP2040 SDK
  • Power via SAO connector or USB-C


Goals

  • Easy for the novice programmer to get started with
  • No support equipment needed to program
  • Easy assembly (single-sided placement except thru-hole connector)
  • More peripherals than just buttons and a display
  • Power via USB or two AAA batteries
  • A bit more space on the flash than the Pi Pico board
  • < $100 cost for prototype quantity
  • < $10 cost for 1k quantity

Design

PCB

The PCB layout takes advantage of JLCPCB's 6-layer $2 special. It includes via-in-pad, ENIG surface finish and 4/4 spacing. For other vendors, layers 4 and 5 can be discarded to make a 4-layer board, as none of the traces on the bottom layer are high-speed. After finishing the initial layout, I found that there is probably enough room to have used only 2 layers. This is possible if the display LEDs are connected in a zig-zag fashion instead of linear. After quoting a 1k quantity both ways it only saves about 10-15 cents per board, which didn't seem worth bothering with. A 4-layer board with the trivial change mentioned above saves about 4 cents per board (still including ENIG and via-in-pad), so that is the way to go for mass production. I chose components so that as many of them as possible fall under the JLCPCB assembly loading fee waiver.

Display

The WS2812 LEDs have some pros and cons in their use as a display. If the only focus of this project was to produce a small and inexpensive handheld video game, then a color OLED screen is unequivocally a better option, with far superior resolution, frame rate, battery life, reliability, and cost. The LEDs, on the other hand, definitely put the "S" in "SAO." At full brightness, they are ridiculously overpowered. I limit the brightness to about 10% of maximum for the text scroller demo, and much less for the games. The main downside to this is that only a few bits of each color channel can be displayed, like EGA or less. Trying to simultaneously light all 192 LEDs at 100% will draw 3 x 192 x 12mA = 7 Amps, so don't do that. 

MCU

The microcontroller is an RP2040 wired to be compatible with the Pi Pico CircuitPython board definition. I included 32Mb of flash so that there is a bit more room for graphics and sound files. The flash is programmed using the USB bootloader, or using a debugger via the SWD port.

SAO

The SAO I2C bus can be dynamically configured to connect or disconnect pullup resistors. The I2C hardware included on the RP2040 supports both host and device operation. GPIO 1 and GPIO 2 are connected to the RP2040 UART0 RX and TX pins, respectively. These pins are protected by 330 ohms resistors, in accordance with the SAO spec.

Audio

A small passive buzzer is used for audio output. It is loudest around 4-5kHz, but provides reasonable volume from a few hundred Hertz to about 7kHz. While the datasheet calls for it to be driven with a 50% duty cycle square wave, I find that 25% is usually louder at most frequencies. Wave files can also be played back using the RP2040 PWM hardware, with varying results.

IMU

A 6-axis IMU is connected to the RP2040 via a separate I2C bus. The first revision used SPI, but CircuitPython only supports an I2C connection for this particular device.

Power

Power can be provided via USB or through the SAO connector, even simultaneously. The SAO VCC pin can accept a wide range of 1.8V to 5V. A boost converter is used to step up the voltage to the level required by the WS2812 LEDs and LDO 3.3V regulator used to power everything else. If power is supplied via USB, it will not back-drive the SAO power pin, and vice versa. With two NiMH AAA cells providing 2.4V and the RP2040 running the tvstatic demo (all pixels lit to an average of 2%) I observed a current draw of 220mA. This is ~0.5W, well under the SAO 1.1mHP power draw limit.

Software

Setup

  1. Connect the SuperXBit192 to a PC using the USB port.
  2. Hold down the SEL...
Read more »