Hardware Setup for Raspberry Pi: Connect It Safely¶
Prepare the board with power disconnected, identify each connector, then connect power only after the boot card and required peripherals are ready. This lesson focuses on Raspberry Pi 4 Model B and Pi 5; other boards have different connectors.
Before you start¶
You should know your board model and whether you will use a monitor or SSH. If not, read the introduction first.
You need the board, suitable power supply, microSD card and reader, and a computer to write the card. For a desktop, add a monitor, micro-HDMI-to-HDMI cable, keyboard and mouse. For headless use, prepare a reachable LAN and another computer.
This lesson covers physical preparation, not flashing the OS. There are no commands to run until the shutdown section.
Match power and storage to the Raspberry Pi¶
| Item | Pi 4 Model B | Pi 5 |
|---|---|---|
| Power connector | USB-C | USB-C |
| Recommended official supply | 15 W USB-C supply | 27 W USB-C supply |
| Supply mode used by the board | Approximately 5 V, 3 A | Approximately 5 V, 5 A |
| Display cable | micro-HDMI to HDMI | micro-HDMI to HDMI |
| First boot storage | microSD | microSD |
A supply's advertised maximum wattage does not prove it can deliver the voltage/current mode the board needs. Pi 5 can operate from a suitable 5 V / 3 A supply but limits USB peripheral current; the 5 A supply is the simpler starting point when using peripherals. See the official power guidance.
Use at least 32 GB for the desktop image or 8 GB for Lite, with extra space for your own software and files. A working kit card need not be overwritten. Keep the selected card identifiable when using Imager, particularly if other external disks are connected.
1. Prepare the board without power¶
Place it on a stable, non-conductive surface or in a case made for the exact model. Avoid a metal worktop, loose screws underneath, or a surface that blocks ventilation.
Handle the board by its edges. Fit a model-compatible cooler or case according to its instructions, checking that thermal pads and mounting hardware do not bridge components. A Pi 5 fan connector is not the same as connecting an arbitrary fan across GPIO header pins.
For the first boot, leave HATs, sensors, motors and other GPIO wiring disconnected. Add them only after the basic computer works.
Check: no loose metal, forced connectors or obstructed ports; power is still disconnected.
2. Prepare and insert boot media¶
Follow Install Raspberry Pi OS with Imager on the computer with the card reader. Configure the account and remote access before writing if you intend to use SSH.
Image writing erases storage
Check the selected device's name and capacity before confirming. Do not flash a drive containing files you want to keep.
Once writing and verification finish, safely eject the card from the writing computer. Insert it into the slot on the underside of the Pi, with the label facing away from the board. On Pi 4 and 5 it slides in without a spring-loaded click; do not force it looking for a click.
Check: the card sits fully in the intended slot and contains a verified OS image.
3. Connect the peripherals you actually need¶
With a monitor¶
- Connect the micro-HDMI end to the port labelled HDMI0.
- Connect the other end to the monitor and select that input.
- Connect the keyboard and mouse to USB. The USB 2.0 ports are sufficient for these.
- Power the monitor using its intended supply.
Pi 5 has no 3.5 mm analogue audio jack. Use HDMI, compatible USB audio or another supported audio device later. Do not use a Pi 4 port diagram to identify Pi 5 audio or camera connectors.
Without a monitor¶
Connect Ethernet to your router if using wired networking. Otherwise, confirm that Imager has the correct Wi-Fi credentials and localisation settings, and that the client computer can reach that network.
On current Raspberry Pi OS, do not prepare headless Wi-Fi by dropping a legacy wpa_supplicant.conf file onto the boot partition. Use Imager customisation or the current NetworkManager workflow.
Check: the chosen access path is ready. A blank HDMI display is expected if there is no monitor, and a Lite image does not provide a graphical desktop.
4. Connect power last and observe¶
Connect the board-appropriate supply to the power input, then turn on its mains supply. Do not insert/remove the microSD card or rewire GPIO with the Pi powered.
Allow first-boot provisioning to finish. Observe the display or attempt the planned SSH login using the installation lesson. LED behaviour varies by model; a light alone does not prove the OS, network and login are working.
Success: you reach the intended login or desktop. Then complete the first-login checks before connecting extra hardware.
If hardware setup fails¶
| Symptom | First check | Avoid |
|---|---|---|
| No sign of power | Correct input, supply and mains outlet | Treating every USB port as a power input |
| Status LED repeats a pattern | Exact model's boot-error reference, verified card | Assuming the same colour means the same fault on every board |
| No display | Monitor input, cable, HDMI0, image type | Adding old hdmi_mode or Fake KMS settings without diagnosis |
| USB repeatedly disconnects | Supply capability, cable and peripheral load | Powering a motor or large load from a GPIO signal |
| Headless login unavailable | Account, SSH and LAN settings in Imager | Reimaging before checking the router or client name resolution |
Use the official hardware reference for model-specific connectors and status codes. Change one thing at a time so you can tell which change helped.
Shut down before disconnecting¶
Once logged in, run this on the Pi only when you intend to shut it down:
Wait for the shutdown to finish before removing power. A headless SSH session disconnects as the system stops; do not confuse that expected disconnect with an unexplained crash. Halted hardware can still have power on header pins, so unplug power before rewiring.
This article's assembly instructions were reviewed against the official documentation; they are not a claim that a fresh Pi 5 assembly or new Imager installation was performed for this revision.
Next step¶
Complete Initial Setup and First Login. Once login, networking and reboot recovery work, continue with Terminal Practice.