The Raspberry Pi Family and Choosing a Board
Understand what a Raspberry Pi is and is not: a single-board computer that runs Linux, how it differs from a microcontroller, the main models (Zero 2 W, 4 and 5, plus the Pico as a microcontroller), memory, networking and storage options, power supplies and cooling, the 40-pin header, and how to choose a board and card for a project.
1. A computer the size of a card
A Raspberry Pi is a single-board computer (SBC): a processor, memory, networking, USB and video on one small board, running a full operating system (normally Linux). Compared with a microcontroller board such as an Arduino:
| Raspberry Pi (SBC) | Microcontroller board | |
|---|---|---|
| Runs | Linux and many programs at once | One program, directly on the chip |
| Memory | Hundreds of MB to several GB | Kilobytes |
| Storage | microSD card, SSD or USB drive | Built-in flash, a few KB to MB |
| Timing | Not hard real-time: Linux can pause your program for milliseconds | Precise, microsecond control |
| Power | Typically 1 to 12 W; cannot deep-sleep to microamps | Milliwatts, and microamps asleep |
| Boot | Tens of seconds | Instant |
| Strengths | Networking, cameras, databases, web servers, Python, many services | Sensors, motors, tight timing, battery life |
They are partners rather than rivals. A common design is microcontrollers doing the precise, low-power sensing and a Pi acting as the gateway that stores data, serves a dashboard and connects to the internet (a later lesson builds exactly this).
2. The models you will meet
Specifications vary between revisions, so check the official product page for the exact figures. In outline:
| Model | Processor | Memory options | Notes |
|---|---|---|---|
| Raspberry Pi Zero 2 W | Quad-core Arm Cortex-A53 at about 1 GHz | 512 MB | Tiny and cheap, Wi-Fi and Bluetooth, no full-size ports; good for small headless jobs |
| Raspberry Pi 4 Model B | Quad-core Arm Cortex-A72 | 1, 2, 4 or 8 GB | Gigabit Ethernet, USB 3, two micro-HDMI ports; the long-standing workhorse |
| Raspberry Pi 5 | Quad-core Arm Cortex-A76 at 2.4 GHz | 4 or 8 GB (larger options later) | Much faster, a PCIe connector for an SSD, a power button, a connector for an RTC battery |
| Raspberry Pi Pico / Pico W | RP2040 microcontroller | 264 KB | Not a Linux computer: it is a microcontroller (programmed like the Arduino course) |
| Compute Module | Same chips on a module for custom boards | Varies | For products, not for learning |
Choosing in practice:
- Learning and general projects: a Pi 4 or Pi 5 with at least 2 GB; 4 GB or more if you will run desktop software, containers or a database.
- Small, always-on, headless jobs (a sensor gateway, a print server): a Zero 2 W or Pi 4 with modest memory.
- Heavier work (cameras with processing, an SSD, many services): a Pi 5.
- Cost: models and prices change, and stock varies by country; budget for the whole kit (power supply, card, case, cooling), not just the board.
3. Everything around the board
Power. The Pi runs from 5 V and is fussy about it. Use the official supply or one with the same specification: about 5.1 V at 3 A for a Pi 4, 5.1 V at 5 A (27 W) for a Pi 5 if you attach power-hungry USB devices, and about 5 V at 2.5 A for a Zero 2 W. A weak or long, thin cable makes the voltage sag, and the Pi reports under-voltage and slows itself down. Estimate your total: the board, plus every USB device and anything powered from the 5 V pins.
Storage. A microSD card holds the system on most boards. Use a good brand, A1 or A2 rated, 16 GB at least (32 GB or more is comfortable). Cards wear out with constant writes, so for always-on logging use an SSD (Pi 4 over USB, Pi 5 over USB or PCIe) or reduce writes (a later lesson). Label your cards and keep a backup image.
Cooling. A Pi 5, and a Pi 4 working hard, throttles when hot. A heatsink or the official active cooler keeps it fast. Check the temperature with vcgencmd measure_temp.
Network. Ethernet is the most reliable; Wi-Fi is convenient. A headless Pi is reached over the network (next lesson).
Case and accessories. A case protects the board from shorts and dust; keep the GPIO accessible if you use it.
4. The 40-pin GPIO header
Every modern full-size Pi has a 40-pin header carrying power, ground and GPIO (general-purpose input and output) signals, many of which double as I2C, SPI, UART and PWM:
| Physical pin | Signal |
|---|---|
| 1 | 3.3 V power |
| 2 and 4 | 5 V power |
| 3 and 5 | GPIO2 (SDA1) and GPIO3 (SCL1): I2C |
| 6, 9, 14, 20, 25, 30, 34, 39 | Ground |
| 8 and 10 | GPIO14 (TXD) and GPIO15 (RXD): UART |
| 12 | GPIO18: hardware PWM |
| 19, 21, 23, 24, 26 | GPIO10 (MOSI), GPIO9 (MISO), GPIO11 (SCLK), GPIO8 (CE0), GPIO7 (CE1): SPI |
Three rules protect your board (the GPIO lesson covers them in detail):
- GPIO is 3.3 V logic and is not 5 V tolerant. A 5 V signal on a GPIO pin can destroy it.
- A pin supplies only a few milliamps. Drive anything bigger through a transistor or a driver board, exactly as in the electronics course.
- The pins are not protected. A wrong wire can kill the board. Power off before you wire, and double-check pin numbers.
There are two numbering schemes: the physical pin number (1 to 40, by position) and the BCM / GPIO number used by software (for example physical pin 12 is GPIO18). Libraries normally use the BCM number.
5. On your bench
- Look at your board and identify the processor, the RAM chip, the USB and Ethernet ports, the GPIO header, the power input and the camera and display connectors. Find its exact model name on the board or the official site.
- Look up your model’s official specification page and write down its processor, memory, supply requirement and any limits on the GPIO.
- Total up a project power budget: board, a camera, a USB SSD and a few sensors. Compare the total with your power supply.
- Print the 40-pin pinout (the official documentation, or run
pinouton a Pi later) and mark the power, ground, I2C, SPI and UART pins in different colours.
6. Hands-on lab: choosing and sizing
7. Common mistakes
| Mistake | Better |
|---|---|
| Treating a Pi like an Arduino for ultra-low-power work | Use a microcontroller there, and a Pi for Linux jobs |
| A phone charger and thin cable for the power | The official supply or one with the same rating |
| Connecting 5 V signals to GPIO | Level shift or divide down to 3.3 V |
| Running an always-on logger on a cheap SD card | An SSD, or reduce writes, and keep backups |
| Pulling the power cable to turn it off | sudo shutdown -h now first |
| No cooling on a Pi 5 under load | A heatsink or active cooler |
| Buying a board before listing the requirements | Write down memory, ports, network, power and cost first |
8. Key takeaways
- A Raspberry Pi is a Linux computer; a microcontroller runs one program with precise timing and tiny power. Use them together.
- Models differ in processor, memory, ports and price: Zero 2 W for small headless jobs, Pi 4 the workhorse, Pi 5 the fastest; the Pico is a microcontroller.
- Plan the power supply (5 V, 3 A for a Pi 4 and 5 A for a Pi 5), storage (quality microSD or SSD), cooling and a safe shutdown.
- The 40-pin header is 3.3 V logic with small current limits and no protection; learn the BCM numbering.
- Choose by requirements first, then buy the whole kit.
Your Pi 4 runs a USB camera (about 250 mA), an SSD (about 800 mA) and a few sensors (about 100 mA), on top of the board's own draw of roughly 1,000 mA when busy. Is a 5 V 2.5 A supply enough?
The total is about 2,150 mA, so a 2.5 A (2,500 mA) supply has only about 16 percent headroom, which is thin and may cause under-voltage when everything is busy. Use a 3 A supply or larger, powered USB for the SSD, and short, thick cables, then check vcgencmd get_throttled while the system is under load.
Can You Explain It?
Close the lesson and answer these without looking back. The goal isn't the wording — it's whether you've formed a usable mental model.
- Explain how a Raspberry Pi differs from a microcontroller and when you would use each.
- List what you need besides the board to run a Pi reliably.
- Describe the three rules for using the GPIO header safely.
🧪 Want to practise this on your own computer? See how to set up your lab →