Skip to the content
2 layers38 × 65.3 mmTerrible, the printed circuit board in 3D

The worst possible use of five Rasperry Pi Zeros

Size
38 × 65.3 mm
Copper layers
2
Thickness
0.8 mm
Parts
53
Nets
35
Pads
194
Tracks, vias
1,019, 88
Pours
2
Routed
Yes
KiCad
KiCad 4
Created
5 Sep 2017
Updated
3 Jun 2025

Overview

Terrible is an open-source printed circuit board by al177, from the al177/terrible-pi repository on GitHub. It is a 2-layer board of 38 × 65.3 mm with 53 parts on 35 nets, routed with 1,019 tracks and 88 vias.

It is built around the CY7C65632-48AXC and AP2191DWG. Its parts include 25 capacitors, 13 resistors, 7 connectors, 5 ICs and 1 crystal.

Main components

2

README

README.md

terrible-pi

A supercomputer, but fun sized. And not super.

In this repo you'll find hardware designs for the Terrible-Pi, a cluster computer made from four Raspberry Pi Zero boards used as compute elements and one Raspberry Pi Zero W as a head node and network router.

terrible-pi is based around a USB backplane that powers and interconnects all five Pi Zeros and allows the head node to control power to each of the compute nodes. The USB boot feature of the Pi Zero is used to automate deployment of new OS images to each compute node.

Up to date news on this project can be found at this Hackaday project.

Repo Contents

The terrible_pcb directory has a board design for the backplane and a 3D printable case. See terrible_pcb/README for instructions for printing the case and the backplane board.

etc contains config files to be copied on top of the Raspbian install for the head node.

wpa_supplicant.conf is a template WiFi config for the head node. This is used for headless setup of the head node Raspbian SD card for remote SSH access.

nodeimg_build.sh is a script for extracting a Raspbian distribution image into a set of files used to deploy new compute nodes.

node_init.sh is a script used to upload the compute node Raspbian generated by nodeimg_build.sh to the SD card of a compute node.

terrible-pi Install and Usage Guide

Setting up a terrible-pi cluster head node

  1. Get the latest Raspbian (https://downloads.raspberrypi.org/raspbian_lite_latest) and install to a microSD

  2. Mount the first (FAT) partition of the card on a PC.

  3. Copy "wpa_supplicant.conf" from this repo to the card. Edit it so that "YOUR_SSID" is replaced by the WiFi network name that you want the head node to connect to, and "YOUR_PASSPHRASE" is replaced by the network's key. Use your Google-fu if you can't get it to work.

  4. Create an empty file on the card named "ssh". Use the UNIX command "touch ssh" or just open and save a new file "ssh" with your text editor.

  5. Boot the microSD on the Pi Zero W

  6. After 4-5 minutes, try SSHing as "pi" to the Zero W with the hostname "raspberrypi", "raspberrypi.lan", or "raspberrypi.local". Use the password "raspberry". If your router isn't serving DNS for local domains, you may have to check the router's DHCP lease logs to see what IP the head node has.

  7. Now that you're logged into the Pi Zero W, update to the latest Raspbian packages:

text
sudo apt-get -y update && sudo apt-get -y upgrade
  1. Install the necessary packages:
text
sudo apt-get -y install libusb-1.0-0-dev nfs-kernel-server git \
pdsh udhcpd iptables bridge-utils
  1. Build and install the USB hub tool:
text
cd
git clone https://github.com/mvp/uhubctl.git
pushd uhubctl
make
sudo cp uhubctl /usr/local/bin/.
sudo chown root:root /usr/local/bin/uhubctl
popd
  1. Build and install the USB boot tool:
text
git clone https://github.com/raspberrypi/usbboot.git
pushd usbboot
make
sudo cp rpiboot /usr/local/bin/.
sudo mkdir /usr/share/rpiboot
sudo cp -a msd /usr/share/rpiboot
sudo chown -R root:root /usr/share/rpiboot
sudo chown -R root:root /usr/local/bin/rpiboot
popd
  1. Get this repo on the Pi:
text
git clone https://github.com/al177/terrible-pi.git
  1. Copy the config files for the DHCP server, networks, NFS, SSH, and hosts, hostname, and startup scripts:
text
sudo chown -R root:root /home/pi/terrible-pi/etc			
sudo cp -a /home/pi/terrible-pi/etc/* /etc/.
  1. Enable necessary services:
text
sudo systemctl enable udhcpd
sudo systemctl enable rpcbind
sudo systemctl enable nfs-kernel-server
  1. Create an NFS directory for the clients:
text
sudo mkdir /srv/pihome
sudo chown pi:pi /srv/pihome
chmod 755 /srv/pihome
mkdir /srv/pihome/.ssh
chmod 700 /srv/pihome/.ssh
  1. Reboot the head node.

  2. SSH to the head node again. The config files copied over have changed the hostname to "head". So if you connected as "raspberrypi.lan", "raspberrypi", or "raspberrypi.local" above, use "head.lan", "head", or "head.local" when reconnecting.

  3. Make an empty passphrase SSH key so the head can automatically connect to the nodes:

text
ssh-keygen -t rsa -f /srv/pihome/.ssh/terrible.rsa -N ""
cp /srv/pihome/.ssh/terrible.rsa.pub /srv/pihome/.ssh/authorized_keys
chmod 600 /srv/pihome/.ssh/authorized_keys
mkdir -p ~/.ssh
chmod 700 ~/.ssh
cp /srv/pihome/.ssh/terrible.rsa ~/.ssh/.

Setting up terrible cluster compute nodes

Creating the compute node filesystem

  1. Get the Raspbian Lite zip file on the head node in /home/pi. This can be the zip used to create the head node microSD card, or can be downloaded by:
text
wget --trust-server-names https://downloads.raspberrypi.org/raspbian_lite_latest

Note the filename that it downloads as.

  1. Prep the boot image:
text
sudo terrible-pi/nodeimg_build.sh 2017-09-07-raspbian-stretch-lite.zip

This will take 10-15 minutes. The result will be a directory "tcboot" that contains the boot files and filesystems for the nodes. This process needs to be repeated only when changing or upgrading the Raspbian install on the compute nodes.

Deploying Raspbian to the compute nodes

  1. Insure that the microSD cards in nodes do not contain the Raspberry Pi bootloader, or the USB boot method used to manage this cluster will not work. Insure that "bootcode.bin" does not exist in the root of any of the partitions on any of the cards. If in doubt, do a full erase on the SD card to wipe out the bootloader in any of the partitions.

  2. Turn off all the nodes. If the nodes all power up in bootstrap mode simultaneously, the image transfer script won't work.

text
sudo uhubctl -r 4 -a off
  1. Transfer the SD filesystem to each node, looping over all nodes in series:
text
for N in 1 2 3 4; do sudo terrible-pi/node_init.sh tcboot $N; done

This takes 5-10 minutes per node depending on the speed of the SD cards on the compute node Pi Zeros.

Terrible cluster management

Booting the cluster

To boot the compute nodes, first start the rpiboot server in another terminal session:

text
sudo rpiboot -o -l -d /home/pi/tcboot

Then cycle power on all of the nodes:

text
sudo uhubctl -r 4 -a cycle

The boot will take 2-3 minutes. The nodes should be pingable once they are done.

Connecting to the nodes

Before SSHing to a node in any given session, start the key agent and add the SSH key:

text
eval `ssh-agent`
ssh-add ~/.ssh/terrible.rsa

You can SSH to a node by name:

text
ssh node1

Or you can run a command on all nodes with pdsh:

text
pdsh -R ssh -w node1,node2,node3,node4 hostname

Raspberry Pi Zero 1.3 models pi0computer.stl and pi0sdcard.stl are created by jdhorvat and licensed CC-BY-NC. OpenSCAD parametric fan model is created by GelatinousSlime and licensed CC-BY-SA. All other files in this tree are by Andrew Litt and licensed as CC-BY-SA.

Parts

53
QtyValueFootprintReferences
150.1uFCapacitors_SMD:C_0603_HandSolderingC2, C3, C5, C6, C11, C12, C15, C16, C18, C20, C21, C22, C23, C24, C25
510KResistors_SMD:R_0603_HandSolderingR3, R8, R11, R12, R13
510kResistors_SMD:R_0603_HandSolderingR1, R2, R4, R6, R10
5USB_OTGhirose_usb:USB-Hirose-ZX20-B-5SP1, P2, P3, P4, P5
4120uFterrible_misc:C_Radial_D8_L6_P2.5C1, C4, C10, C14
4AP2191DWGTO_SOT_Packages_SMD:SOT-23-5U2, U3, U4, U5
31uFCapacitors_SMD:C_0603_HandSolderingC13, C17, C19
220pFCapacitors_SMD:C_0603_HandSolderingC8, C9
110uFCapacitors_SMD:C_0805_HandSolderingC7
112MHzCrystals:HC-49VY1
147kResistors_SMD:R_0603_HandSolderingR7
1650.0RResistors_SMD:R_0603_HandSolderingR9
1CONN_01X02Pin_Headers:Pin_Header_Angled_1x02P7
1CY7C65632-48Housings_QFP:TQFP-48_7x7mm_Pitch0.5mmU1
1FerriteCapacitors_SMD:C_0805_HandSolderingFB1
1LOGOterrible_misc:skullG***
1NPResistors_SMD:R_0603_HandSolderingR5
1USB_OTGConnect:USB_Micro-BP6

Similar boards

  • 2 layers217.1 × 393.8 mmSweepv2, the printed circuit board in 3D

    Sweepv2

    davidphilipbarr/Sweep

    Sweep - a small promicro based keyboard inspired by the Ferris.

    53 parts2.1k
  • 2 layers121.9 × 81.3 mmRgb to hdmi, the printed circuit board in 3D

    Rgb to hdmi

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    53 parts1kGPL-3.0
  • 2 layers48 × 48 mmUSB, the printed circuit board in 3D

    USB

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    53 parts915
  • 2 layers103.7 × 74.1 mmPicoGUS, the printed circuit board in 3D

    PicoGUS

    polpo/picogus

    Emulation of ISA sound cards and CD-ROM on Raspberry Pi Pico (GUS, SB/Adlib, MPU-401, Tandy, CMS, Panasonic CD-ROM) with USB mouse/joystick support

    53 parts805
  • 2 layers60.5 × 76.8 mmHeadphones prototype pcb, the printed circuit board in 3D

    Headphones prototype pcb

    strangeparts/niubi-headphones

    Flexible circuit board design for adding a headphone jack to an iPhone 7

    53 parts493MIT
  • 2 layers59.1 × 26.1 mmPSRAMmod, the printed circuit board in 3D

    PSRAMmod

    Architeuthis-Flux/JumperlessV5

    The next generation jumperless breadboard

    53 parts332
  • 2 layers49 × 49 mmOpen source BMS, the printed circuit board in 3D

    Open source BMS

    Teslafly/Dead-OpenBMS-dead

    A scalable, open source battery management system

    53 parts248
  • 2 layers39 × 40 mmMdb bridge esp32s3, the printed circuit board in 3D

    Mdb bridge esp32s3

    nodestark/mdb-esp32-cashless

    ESP32-based MDB cashless device for vending machines, supporting EVA DTS DEX/DDCMP telemetry and payments over the MDB protocol via Bluetooth and MQTT

    53 parts190MIT

Questions

How big is the Terrible PCB?

It measures 38 × 65.3 mm and has 2 copper layers, 0.8 mm thick.

What parts does the Terrible use?

53 parts, built around the CY7C65632-48AXC and AP2191DWG. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Terrible KiCad files?

From the al177/terrible-pi repository on GitHub, at the commit this page was made from: the board is terrible_pcb/terrible.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Terrible design in my own project?

Its repository states no licence, so its author keeps all rights: ask al177 before reusing the design.