My Retropie Brick Retro Gaming Machine
In other words, turning all this... Into this... I had upgraded my PiVCR Retropie build with a Pi3B , and I needed an enclosure to put it in, at the time everyone was obsessing about the Mini NES cases, so to be different I thought I would take a boring off the shelf case and make it as unique as I couldThe build of the Retropie software is a Mainly British affair with the Spectrum, Commodore C16/Plus 4, Dragon32, and Oric machines taking up residence in the menu alongside the more usual Megadrive, SNES and NeoGeo machines, I only wish the BBC Micro was available in Retropie. There is a toggle power switch on the back along with HDMI, RCA video and audio outputs, power socket, a vent for the fan, and one USB port. The left side has a 2 speed fan mounted The front has a standby/reset button, two USB ports, two status LEDs, and a nice enamel Raspberry Pi badge. Internally, as well as the Pi, there is a circuit for a two speed fan control with status LED's and a dongle for a wireless keyboard/touchpad combo Mounting the Pi The Pi is mounted on plastic stand off'sOriginally the power was a micro USB extension, this caused a voltage drop large enough to show the lightning symbol, so was swapped for a barrel type socket. The rest of the ports use extenders to reach the edges of the case, although I had to use two right angle HDMI adaptors because there wasn't enough room for the HDMI plug, I had also stuck some sticky back foam on the bottom to act as feet. Fan control and LEDs I bought two 8mm square LEDs from Maplin while they were still open, and mounted them on a small piece of strip board with each having a 100 ohm resistor in series, these will connect directly to the Pi3's GPIO on pins 19 and 16 for the positive side, and any two ground pins, these indicate the state of the fan The green LED illuminates when the fan control script is running, the GPIO.cleanup command will turn the LED off if the script stops running, the red LED indicates that the CPU temp has exceeded 65°C temperature and the fan is now running at full speed. The fan will stay at full speed until the temperature drops below 58°C The fan control board is just a TIP120 transistor, one 1N4048 diode connected inversely across the fan, two 1N4007 diodes and a 10K ohm resistor mounted on a small piece of strip board, I mounted the board in the airflow from the fan so the transistor is kept cool.The board's main power is connected to a USB socket, I used the USB socket that is for the keyboard dongle so the fan only starts when the Pi is on, in this state the fan is wired with the two diodes in series, so the voltage at the fan is around 3.3V, It will run at just over half speed, but almost silently. A trigger wire from GPIO 14 turns on the transistor which bypasses the diodes and allows the full voltage to the fan, meaning maximum speed, cooling, and noise.I know it's not a Pi in the image, but this is how it's wired, there is an additional two 1N4007 diodes in series are connected between the collector and emitter of the TIP120 to allow just over half the voltage to pass, when the transistor is on the diodes are bypassed. I swapped the resistor for a 10K ohmThe LEDs and fan speed are controlled by a python script. Standby button The standby button is a normally open (NO) momentary switch, and I've given it three functions, start, restart, and halt. The button also has a blue light ring which is just connected to the power switch, it doesn't appear to be an LED as it will illuminate when power is connected either way round.The button has four pins and one is marked with a dot, this means nothing, so grab a multimeter and work out which pins are for the switch, the other two pins are for the light.One pin for the light goes to the ground pin of the power connector, and the other goes to the switched side of the switch, so when the Pi is powered the ring is illuminated. The switch pins go to GPIO 3 and ground, you don't need a resistor as the Pi has internal resistors. The button is also controlled by a python script. RCA outputs This is the innards a RCA to SCART adaptor with the lead from some old headphones connected to it, this just plugs into the composite socket on the Pi, if no HDMI is connected the Pi defaults to composite (as long as the config.txt is set up correctly)This is handy for some old-school CRT gaming. However you can't have both connected at the same timeCut the lead before the microphone and button assembly, and solder the cables to the RCA sockets, you will need to use a multimeter to find out which wire is connected to which part of the plug, the ground is a common ground for all three signals. The below image will help Retropie softwareAvailable here, flash to a microSD card, add games, copy the two python scripts to /home/pi and link to them from /etc/rc.localsudo nano /etc/rc.localadd...python /home/pi/button.py &python /home/pi/fan_control.py & to the file just before exit 0, reboot and enjoy...