Build an Open Source Computer: Raspberry Pi

25 Sep 2020

For under $150 (including monitor and accessories) you can build a functional open source computer. With a footprint just slightly larger than a credit card, this computer is useful for a variety of creative projects.

In this post, I’ll show how to build a fully-functional open source computer called the “Raspberry Pi.”

This walkthrough is for complete beginners.

What we'll build: Raspberry Pi 4 Model B with peripherals

This specific setup cost $246.62. Most of that was the new monitor ($90) and mechanical keyboard ($65)—both of which were purely for convenience and preference. Had I been frugal, the full thing would have cost closer to $130.00. If I was aggressively cheap, well under $100. It took ~45 minutes to build (including shopping for the parts).

Questions, comments, feedback? Email me.

Table of Contents - How to Build The World’s Simplest Personal Computer: Raspberry Pi

  1. Introduction
  2. Parts
  3. Setup
  4. Operating system
  5. Turning it on
  6. Shopping list

A. Introduction

In the early 2000’s, a group of teachers, academics, and computer enthusiasts created a miniature computer to inspire creativity in children (full story here). They called it the Raspberry Pi.

About a decade later, in 2012, a UK-based non-profit—the Raspberry Pi Foundation—began selling Pis to the general public at prices from $5 to $35, depending on the model.

At such a low price tag, and because of its kid-friendly roots, you might ask, “is the Pi a toy?”

It’s much more than that. The Pi is an excellent tool for a variety of programming, electronics, Internet of Things (IoT), and hobby projects. With the Pi as a launchpad, you can learn skills that fetch well-paying jobs in a variety of industries all over the world.

In addition to hobby uses, the Pi also occasionally pops up in higher-profile use cases. For example, earlier this year, two university hospitals in Bogota, Colombia tested the Pi in emergency-use Covid-19 ventilators. Pis have also traveled to space:

Northern Europe from low Earth orbit taken with Raspberry Pi (Source: Raspberry Pi via YouTube)

Below is a fully-illustrated, step-by-step post showing how to source, assemble, and start up a Raspberry Pi computer. Depending on your needs, this machine may be powerful enough to use as a basic home desktop computer. I chose something modest because simplicity is my primary goal.

The Pi runs entirely on open source software, including a Linux operating system. This means all of the source code is freely and openly available. This is possible through a large community of developers who build software together. Open source software is like public land: it’s for everyone to share.

Building a computer on open source software is a valuable exercise for several reasons. You will better understand the interplay between community-powered computing and commercial computing. And you will always have access to computers and applications for a tiny fraction of the cost of retail computers.

B. Parts

First let’s fast forward to the computer, fully set up in my office:

I ordered everything on Amazon, both for convenience and so anyone anywhere could replicate this build. A detailed parts list (with product screenshots and purchase links) is at the end of this post.

The Boxes

We’ll start with the parts arriving at my front door.

The packages arrived about three days after I placed my order. I live in a rural area. It’s probably way faster in the city.

Here’s what was in the boxes:

Monitor

A 21” monitor was in its own box. It came with a VGA cable (pictured above, blue ends). The other two cables are the power unit. I chose this monitor because it was cheap, new, and had an HDMI input. It cost $90.

I could have saved about $60-70 by going to a thrift store and getting used peripherals and cables. I opted for a new monitor because this computer will live in my office. I wanted something that looks, smells, and works like new.

Raspberry Pi

This is the actual “computer.” This particular version is a Raspberry Pi 4 Model B. It’s 8.5 centimeters wide, 5.6 centimeters deep, and 1.6 centimeters high. If you’re interested, detailed measurements are here. (transparency is one joy of open source.)

I explain below what the various inputs and outputs do. For now, all you need to know is that this little thing is the computer.

Case

To keep the Pi safe, I bought a metal case. A case is not strictly necessary. I wanted something that wasn’t an open circuit board with loose wires (nothing but love for loose wires though!). It looks a little nicer in my office. A case also protects from dust and the elements, which is good for the long game.

Keyboard (with cables, extra keycaps, and key changing tool)

The keyboard was an optional upgrade. I enjoy mechanical keyboards and wanted this Pi to have its own look and feel 1.

A cheaper option might be something like this. You can use pretty much any USB keyboard. I chose to upgrade the keyboard because it makes it more fun to use the computer, which makes me more likely to use it more often.

Mouse

This is an entry-level wired optical mouse. I personally prefer wired mice and keyboards so I don’t need to deal with batteries, charging, or wireless connection issues. If you prefer wireless accessories, the Pi has built-in Bluetooth.

Mini HDMI cable

This is the cable that connects the Pi to the monitor. Little end goes into the Pi. Big end goes into the monitor.

If you’re using an older monitor (cheaper), you might need a VGA to HDMI adapter.

Power supply

To keep the cost down to a bare minimum, the Pi ships without a power supply. You can use a number of external USB-C power supplies. However, after skimming a few posts about power delivery issues with the Pi 4B, I decided not to risk it and just bought a Pi-sanctioned power supply. I didn’t want to turn this post into an electronics tutorial, so I purchased something I knew would work right out of the box.

MicroSD (64GB, blank)

This MicroSD chip serves as a 64GB hard drive for the Pi. The tiny MicroSD chip (smaller than my fingernail) is the actual memory unit. How cool is that?

The larger piece is the adapter for an SD card reader, as described below.

You can also buy MicroSD cards that load via USB thumb drive, which may be a better choice depending on how you plan on downloading the operating system. Alternatively, if you don’t have access to a computer for downloading and saving files to a MicroSD card, you can buy cards with preloaded operating system files.

I decided to go with a blank MicroSD card and load the necessary software onto the card myself. I describe the entire process below to show how simple and non-intimidating the process is.

C. Setup

Now let’s turn these parts into a working computer.

First, the computer:

Here are the inputs and outputs you should understand:

On the bottom of the Pi, there’s a small slot for the Micro SD card. Here’s a picture with the card partially inserted (so you can see which side is up).

Plugged-in cables will look like this:

In the photo above everything is plugged in but the power. The HDMI cable in front goes to the monitor. The USB cables on the right side go to the mouse and keyboard.

The HDMI cable connects to the back of the monitor, like so:

HDMI cable (left), power cable (right)

After you put the Pi into the case, it looks like this:

That’s it. Now we have a basic setup:

D. Operating system

The Pi comes without any operating system (OS). In fact, it has no hard drive. If you try booting the Pi without a MicroSD card or with a blank Micro SD card, it will do nothing (I tried).

The process for setting up the SD card is really simple: you download an image of an OS online, save it to the SD card, and insert the SD card into the Pi. If you do not have access to a computer and SD card reader, you should order a preloaded SD card.

Here’s how I set up the SD card:

From Raspberry Pi’s website, I went to “Downloads” and downloaded the Raspberry Pi Imager for macOS:

I put the SD card adapter into my MacBook Pro so I could load the OS on there:

As noted above, if you don’t have an SD card reader, you can buy a preloaded SD card, USB SD Card reader, or an SD thumb drive. This step can seem intimidating but I promise it’s not that bad.

When I opened the downloaded file, it gave me following prompt:

Then I dragged the Raspberry Icon into the Applications folder as it suggested.

Then I ran the Raspberry Pi Imager by clicking the icon in the applications folder.

Here’s what popped up:

I selected the first box: “Choose OS.”

Then this popped up:

I picked Raspian OS 32-bit because it is the recommended OS and I know from my travels in the open source world that it will be easy and simple to use.

If I wasn’t writing this tutorial, I might have picked Ubuntu, which is a more robust OS. Again though, simplicity was my goal.

Next, I selected the “Choose SD Card” option. The SD card reader showed up and I selected it:

Finally, I selected “Write” to write the OS to the SD card:

It took about 5 minutes to load the OS onto the SD card.

When it was done, I ejected the SD card and put it in the Pi:

At this point, the Pi was ready to turn on.

E. Turning it on

There's no "ON" button on the Pi. To turn it on, plug in the cable.

Here are a series of screen snapshots showing what happened when I turned on the Pi for the very first time (please excuse the blur—taken on my phone as the computer booted for the first time).

First, it showed a welcome screen:

Then the desktop loaded and began prompting through the setup:

I selected my country, language, and time zone (Pi supports many languages):

Then I changed the password:

Then I configured the screen:

Selected the Wi-Fi network:

Pi automatically checks for and installs updates:

Finally, Pi confirmed that everything was set up:

After a restart, the Pi booted to a fully functioning desktop:

That’s it—a working computer. In other tutorials, I'll show some things you can do with this computer.

F. Shopping list

Here’s a shopping list to do what’s described above:

Raspberry Pi 4, Model B
$39.71

Case
$15.95

Keyboard
$65.00 (cheaper option available here)

3-Button Wired Optical Silent Mouse
$12.99

21.5” Monitor
$89.99 (used monitors on eBay are about $30.00)

Micro HDMI Cable
$9.99

Power Supply
$12.99

64GB MicroSD Card
$12.99

1 Mechanical-switch keyboards contain individual per-key mechanisms with springs and stems. They are known for being highly reliable, customizable, and enjoyable for their feel and sound.
Thanks to Compound Writing members who reviewed this post: Sara Campbell and R.W. Richie.