The Raspberry Pi Pico (RP2040) features 26 multi-function GPIO pins (GP0–GP28, with some reserved for internal use), operating strictly at 3.3V logic. Unlike the larger Raspberry Pi single-board computers, the Pico is a microcontroller designed for bare-metal and RTOS applications, meaning its pinout includes dedicated analog inputs, programmable I/O (PIO), and specific power management pins. Below is the complete hardware reference, mapping physical pins to their functions and standard DC electronics wire colors to keep your bench wiring organized.
The Master Pi Pico Pinouts and Wire Color Table
This table maps the physical pins to their primary GPIO assignments, alternate functions, and the recommended IEC-aligned DC wire colors for low-voltage bench work. Use this as your primary spec-sheet-table when designing custom PCBs or wiring breadboards.
| Physical Pin | GPIO / Function | Primary Use / Alternate Functions | Standard DC Wire Color |
|---|---|---|---|
| 1 | GP0 | UART0 TX / I2C0 SDA / SPI0 RX | Green (TX) / Blue (SDA) |
| 2 | GP1 | UART0 RX / I2C0 SCL / SPI0 CSn | White (RX) / Yellow (SCL) |
| 3 | GND | Ground Reference | Black |
| 4 | GP2 | I2C1 SDA / SPI0 SCK | Blue / Orange |
| 5 | GP3 | I2C1 SCL / SPI0 TX | Yellow / Green |
| 6 | GND | Ground Reference | Black |
| 7 | GP4 | UART1 TX / I2C0 SDA / SPI0 RX | Green / Blue |
| 8 | GP5 | UART1 RX / I2C0 SCL / SPI0 CSn | White / Yellow |
| 31 | GP19 | I2C1 SCL / PWM | Yellow |
| 32 | GP20 | General Purpose / PWM | Purple (Signal) |
| 34 | GP26 (ADC0) | Analog Input 0 / I2C1 SDA | Purple (Analog) |
| 35 | GP27 (ADC1) | Analog Input 1 / I2C1 SCL | Purple (Analog) |
| 36 | 3V3_OUT | 3.3V Output from Internal LDO (Max 300mA) | Red |
| 38 | GND | Ground Reference | Black |
| 39 | VSYS | System Power Input (1.8V to 5.5V) | Red (with Black stripe) |
| 40 | VBUS | Raw 5V from Micro-USB (Diode protected) | Orange (5V Raw) |
Note: Pins 9–30 and 33 follow the standard GP8–GP22 sequential mapping. Consult the official RP2040 Datasheet for the full 40-pin sequential breakdown and PIO state machine mappings.
Rows People Get Wrong (and How to Avoid Bricking Your Pico)
When reading pinout charts, hobbyists frequently misinterpret power routing and analog limitations. Here are the most common failure points on the Pi Pico pinouts and how to interpret them safely.
1. The VSYS (Pin 39) vs. VBUS (Pin 40) Trap
Many builders accidentally feed 5V into VSYS when they should be using VBUS, or vice versa.
- VBUS (Pin 40) is tied directly to the micro-USB 5V line through a protection diode. If you are powering the Pico from a USB power bank and want to tap 5V for a sensor, use VBUS.
- VSYS (Pin 39) is the main system input. It feeds the internal switching mode power supply (SMPS) that generates the 1.1V core voltage. If you feed 5V into VSYS while simultaneously plugging in USB, the voltages will fight each other unless you rely on the board's internal OR-ing diode. Best practice: If powering from a battery pack (3.7V LiPo or 3x AA), solder to VSYS. If tapping USB power, use VBUS.
2. The ADC Noise on GP26, GP27, and GP28
The RP2040’s ADC is notoriously noisy out of the box, often showing a ±50mV fluctuation on GP26–GP28. This isn't a defect; it's a routing artifact on the PCB where the ADC_VREF (internal reference voltage) shares a return path with digital ground bounce.
The Fix: Solder a 0.1µF ceramic capacitor directly across the 3V3_OUT (Pin 36) and GND (Pin 38) pins, and implement a software moving-average filter (window of 16 samples) in your C++ or MicroPython code. Never rely on a single raw ADC read for precision measurement.
3. Faded Silkscreen and Safe Interpretation
If you are using a third-party clone board where the white silkscreen is poorly aligned, faded, or obscured by flux residue, do not guess. Use the physical USB port as your anchor. With the micro-USB port facing up (away from you), Pin 1 (GP0) is always top-left. The left column runs odd pins (1, 3, 5... 19) top-to-bottom. The right column runs even pins (20, 22... 40) bottom-to-top. Verify continuity to the ground plane with your multimeter in diode/beep mode before applying power if markings are completely missing.
4. The 3.3V Absolute Limit
Unlike the ATmega328P (Arduino Uno) which is 5V tolerant, the RP2040 GPIO pins have an absolute maximum rating of 3.6V. Feeding a 5V logic signal (like from an HC-SR04 ultrasonic sensor) directly into GP0–GP28 will permanently destroy the input buffer. Always use a voltage divider (e.g., 2kΩ and 3.3kΩ resistors) or a logic level shifter when interfacing with 5V modules.
Interfacing with Mains: Bridging Embedded and Electrical Standards
The Pi Pico is a 3.3V DC device, but it is frequently used to trigger relays and optocouplers that switch 120V or 230V AC mains loads. When you cross the boundary from the breadboard to the junction box, you must abandon DC electronics wire colors and strictly follow your region's electrical code for the high-voltage side.
Never wire mains voltage directly to the Pi Pico. Always use an isolated relay module or solid-state relay (SSR). De-energize the circuit, lock out the breaker, and verify with a non-contact voltage tester and a multimeter before touching any screw terminals. Local codes (NEC/IEC) may require a licensed electrician for permanent mains wiring.
Below is the comparison-table for regional mains wiring colors. Notice how the low-voltage DC control side (Pico to Relay IN pin) remains consistent globally, while the load side changes drastically by region.
| Function | US / Canada (NEC 2023/2026) | EU / UK / AU (IEC 60446) | Pico DC Control Side (Global) |
|---|---|---|---|
| Line / Hot / Live | Black (or Red for 2nd phase) | Brown | N/A (Switched by Relay) |
| Neutral | White (or Grey) | Blue | N/A (Switched by Relay) |
| Earth / Ground | Green, Green/Yellow, or Bare | Green/Yellow | N/A (Chassis Bond) |
| Relay Trigger (IN) | N/A (Low Voltage) | Yellow or Orange (Signal) | |
| Relay VCC / GND | N/A (Low Voltage) | Red (3.3V/5V) / Black (GND) | |
Why This Distinction Matters on the Bench
A common and dangerous mistake is using standard black and red jumper wires for both the 3.3V DC Pico ground and the 120V/230V AC mains neutral. If a wire pulls loose from the breadboard and drapes across a mains terminal block, the visual similarity can lead to catastrophic miswiring during troubleshooting.
Rule of thumb: Keep your DC jumper wires (22 AWG to 28 AWG solid core) physically separated from your mains stranded wire (14 AWG to 12 AWG THHN/NM-B). Use bright, non-standard colors like Pink or Light Blue for your Pico's DC ground returns to ensure they are never confused with IEC Blue (Neutral) or NEC White (Neutral).
For deeper integration with Raspberry Pi ecosystems, including how to map these physical pins to the software headers in MicroPython and C SDK, refer to the official Pico Series documentation. Always cross-reference your specific board variant (Pico 1 vs Pico 2 / RP2350), as the RP2350 introduces additional GPIO pins and altered ADC routing that shifts the physical pin numbers on the newer boards.






