Software | Raspberry Pi

Quick navigation:


General information: Raspberry Pi Jump to top of page

Websites


General information: Guidebooks Jump to top of page

Projects: Retro Game Computer Jump to top of page

The idea behind this project was to create a large custom case for the Raspberry Pi with a style reminiscent of the older gaming consoles (like the Commodore 64 or the Amiga). The case was made in thin multiplex wood, housing a Raspberry Pi 3B+ that runs RetroPie. In addition, the case accommodates a custom-coloured PS/2-over-USB keyboard, a turn off/on button, a sequence of LEDs to indicate the current CPU temperature, an internal 5V temperature-controlled blower fan, a status LED indicating SD-card activity, externally-routed access ports for HDMI, power, audio/video jack, and Ethernet, and a USB hub containing three extra USB ports as well as various card readers.

The case was made such that both the Raspberry Pi and/or the keyboard can be removed if needed, with custom made compartments for storing cabling (HDMI, power and adapter, earbuds, SD-cards, ...). After sanding down, the wood was painted with multiple layers of various-coloured acrylic spray paints, and coated in two layers of acrylic gloss varnish. The front of the case contains a wooden panel on which an image was created by transferring toner to the wood.

The operating system (Raspbian stretch with RetroPie) runs on a SanDisk Ultra microSDHC UHS-I Card (32 GB, max. 80 MB/s), and also contains the LXDE desktop environment (with Python, Java, Eclipse, LibreOffice, ... and the Conky system resources monitor installed).

  • Painting the keyboard

  •                
  • Soldering the electronics

  •                            

    The fan is a 5V Sunon MagLev 1.2W model, using some 190 mA; it receives its power directly from pin 2 (5V PWR). The fan is controlled via pulse- width modulation (PWM) (including hysteresis) using the 3.3V pin 29 (GPIO5), which is connected to the base of a BC547E NPN transistor (having a 0.7V voltage drop from the collector to the emitter). A 1K ohm resistor is put between the GPIO pin and the transistor, and a diode is placed in parallel with the fan to protect the motherboard from reverse current during the turning on and off sequences of the fan.

    The first three LEDs (green, yellow, and red) are controlled via the 3.3V pins 31, 33, and 35 (GPIO6, GPIO13, and GPIO19, respectively), with currents limited by three 120 ohm resistors. Both the LEDs and the fan are controlled via a Python script running as a service in the background, continuously monitoring the CPU's temperature and being activated accordingly. The fourth LED is a blue one, directly controlled via pin 37 (GPIO26) as its forward voltage is over 3V; it is associated with SD-card activity.

    A pushbutton is also connected to pins 5 (GPIO3) and 6 (GND). There is a Python script running as a service in the background, continously monitoring the button's state, which in turn triggers a proper shutdown sequence for the CPU. In low-power mode, the board is reactivated once the button is pressed again.

    Finally, a truncated 5V blue LED-strip was placed inside the case, placed in series with an on/off switch.