Update Time:2025-08-22

Raspberry Pi Zero Pinout: Specs, Datasheet & Projects

Raspberry Pi Zero pinout guide: 40-pin GPIO layout, specs, datasheet, and project tips for safe wiring, sensor connections, and hardware expansion.

Components & Parts

Raspberry Pi Zero

Understanding the raspberry pi zero pinout helps you connect things like sensors and LEDs. It also helps you connect other hardware without worry. All raspberry pi zero models use the same 40-pin GPIO header layout. This includes the original, Zero W, Zero WH, and raspberry pi zero 2 w. You can see the differences in the table below:

ModelKey Pinout FeatureGPIO Header Type
Raspberry Pi Zero40-pin GPIO, unpopulatedUnpopulated
Pi Zero WSame as originalUnpopulated
Pi Zero WHSame as Pi Zero WPre-soldered
Pi Zero 2 WSame as othersUnpopulated

You can use this guide to help you build and test raspberry pi zero projects. It is good for quick reference.

Key Takeaways

  • Every Raspberry Pi Zero has the same 40-pin GPIO header. This makes it easy to use the same accessories and projects on all versions.

  • There are three ways to number the pins: physical, BCM, and WiringPi. You need to know these to avoid mistakes with wires. This helps your code match your hardware.

  • Be careful with the GPIO pins. They use 3.3V logic and give only a little current. Always use resistors and check your wires to keep your board safe.

  • Use a 5V power supply through the Micro-USB port for safety. You can power it through the GPIO pins, but this is risky without extra protection.

  • Try simple projects first, like blinking LEDs or using sensors. This helps you learn how to control the GPIO. Use online tools and datasheets to help you plan and build safely.

Raspberry Pi Zero Pinout

40-Pin Header

You will find a 40-pin GPIO header on every raspberry pi zero board. This header uses a 2x20 layout, which means there are two rows of 20 pins each. The raspberry pi zero pinout matches the layout used on other Raspberry Pi models like the Pi 2, Pi 3, and Pi 4. This standardization makes it easy for you to use accessories and HATs across different boards.

Here is a table that shows the main pin categories and their functions on the raspberry pi zero pinout:

PinNamePin CategoryFunction/Notes
13.3VPower3.3V Power
25VPower5V Power
3GPIO 2I2CSDA1 (Data)
45VPower5V Power
5GPIO 3I2CSCL1 (Clock)
6GNDGroundGround
7GPIO 4GPIOGeneral Purpose
8GPIO 14UARTTXD (Transmit)
9GNDGroundGround
10GPIO 15UARTRXD (Receive)
11GPIO 17GPIOGeneral Purpose
12GPIO 18PWMPWM0
13GPIO 27GPIOGeneral Purpose
14GNDGroundGround
15GPIO 22GPIOGeneral Purpose
16GPIO 23GPIOGeneral Purpose
173.3VPower3.3V Power
18GPIO 24GPIOGeneral Purpose
19GPIO 10SPIMOSI
20GNDGroundGround
21GPIO 9SPIMISO
22GPIO 25GPIOGeneral Purpose
23GPIO 11SPISCLK
24GPIO 8SPICE0
25GNDGroundGround
26GPIO 7SPICE1
27GPIO 0ID EEPROMReserved
28GPIO 1ID EEPROMReserved
29GPIO 5GPIOGeneral Purpose
30GNDGroundGround
31GPIO 6GPIOGeneral Purpose
32GPIO 12PWMPWM0
33GPIO 13PWMPWM1
34GNDGroundGround
35GPIO 19PWM/SPIPWM1/MISO1
36GPIO 16GPIOGeneral Purpose
37GPIO 26GPIOGeneral Purpose
38GPIO 20PWM/SPIPWM0/MOSI1
39GNDGroundGround
40GPIO 21PWM/SPIPWM1/SCLK1

You can see that the pin categories include power, ground, GPIO, I2C, SPI, UART, and PWM. Each pin has a specific function, and some pins support multiple features.

Tip: Always double-check your pin configuration before connecting any hardware. The raspberry pi zero does not have built-in protection on the GPIO header. Incorrect wiring can damage your board.

Pin Numbering Schemes

When you work with the raspberry pi zero pinout, you will notice three main numbering schemes:

  • Physical numbering: This counts pins from 1 to 40, starting at the top left of the header. It matches the physical position of each pin.

  • BCM numbering: This uses the Broadcom chip's GPIO numbers, such as GPIO 17 or GPIO 18. You will see this scheme in most programming libraries and official documentation.

  • WiringPi numbering: This uses a unique set of numbers, different from both physical and BCM. For example, GPIO 18 is physical pin 12 and WiringPi pin 1.

You must know which scheme your code or wiring diagram uses. Confusing these schemes is a common mistake. For example, if you connect an LED to physical pin 12 but your code uses BCM 12, the LED will not work as expected.

The raspberry pi zero uses the same 40-pin header and BOARD numbering as other models. However, always check the pinout for your specific board before connecting devices.

Note: You can use the pinout command in Raspberry Pi OS to see a real-time pin exploration of your board. Online tools like pinout.xyz and pinouts.vercel.app also offer an interactive pinout diagram for the raspberry pi zero 2 w and other models.

Pin Functions

The GPIO header on the raspberry pi zero gives you many options for connecting hardware. The main pin categories are:

  • Power pins: These provide 3.3V or 5V power to your circuits.

  • Ground pins: These complete the circuit and are essential for safe operation.

  • GPIO pins: You can use these as inputs or outputs. For example, you can read a button press or turn on an LED. Accessing the gpio lets you control many types of devices.

  • I2C pins: These allow you to connect multiple low-speed devices, like sensors, using only two wires (SDA and SCL).

  • SPI pins: These support high-speed communication with devices like displays and ADCs. SPI uses several pins for data and clock signals.

  • UART pins: These let you send and receive serial data. On the raspberry pi zero 2 w, UART is only available on pins 8 (TXD) and 10 (RXD).

  • PWM pins: These let you control things like motor speed or LED brightness by changing the signal's duty cycle.

The GPIO pins work at 3.3V logic levels. Never connect them directly to 5V signals. Always use resistors with LEDs and check your wiring to avoid short circuits.

You will also find a camera port (CSI) on the raspberry pi zero and raspberry pi zero 2 w. This port sits at the edge of the board and lets you connect a camera module for projects like photography or video streaming.

Common mistakes to avoid:

  1. Mixing up pin numbering schemes.

  2. Connecting components while the board is powered on.

  3. Using the wrong voltage levels.

  4. Forgetting current-limiting resistors for LEDs.

  5. Not checking for loose connections.

If you want to explore the raspberry pi zero pinout visually, use an interactive pinout diagram online. These tools help you see pin functions, pin configuration, and even highlight pin categories for easier understanding.

Specs

Raspberry Pi Zero Specs

Processor & Memory

You will find that the raspberry pi zero comes in different models, each with its own processor and memory setup. The table below shows the main differences:

Raspberry Pi Zero ModelProcessorMemory
Raspberry Pi Zero v1.3Single-core 1 GHz BCM2835 ARM1176JZF-S512 MB RAM
Raspberry Pi Zero 2 WQuad-core 64-bit ARM Cortex-A53 1 GHz512 MB SDRAM

The original raspberry pi zero uses a single-core processor, which works well for simple projects. The raspberry pi zero 2 w has a quad-core processor, so you get more power for multitasking and faster gpio operations. Both models have 512 MB of RAM, but the zero 2 w uses SDRAM for better performance. If you want to run more complex projects or handle multiple tasks, the zero 2 w gives you a clear advantage.

The processor and memory affect how fast your gpio projects run. A faster processor means you can toggle gpio pins more quickly and handle more devices at once.

Power & Voltage

Supplying the right power keeps your raspberry pi zero running smoothly. You should use a 5 V power supply, with a recommended current of at least 1.3 A for basic models and 2.5 A for the raspberry pi zero 2 w. Most people power the board through the Micro-USB port, but you can also use the gpio pins (pin 2 or 4 for 5 V, pin 6 for ground). Be careful—there is no protection if you power through the gpio header.

AspectDetails
Input Voltage5 V ± 5% (4.75 V to 5.25 V)
Recommended Current1.3 A (Zero), 2.5 A (Zero 2 W)
Powering MethodsMicro-USB (recommended), GPIO pins
ProtectionNo fuse/diode on GPIO power input

Never connect a power source to the 3.3 V pins. Using the wrong voltage can damage your raspberry pi zero.

Connectivity

The raspberry pi zero models offer different wireless features. The original model does not have Wi-Fi or Bluetooth. The raspberry pi zero w, zero wh, and zero 2 w all include 2.4 GHz Wi-Fi (802.11 b/g/n) and Bluetooth 4.1 with BLE. These features let you connect to networks and devices without extra adapters.

Raspberry Pi Zero ModelWi-FiBluetooth
ZeroNoneNone
Zero W / Zero WH802.11 b/g/n (2.4 GHz)Bluetooth 4.1 + BLE
Zero 2 W802.11 b/g/n (2.4 GHz)Bluetooth 4.1 + BLE

GPIO Features

The 40-pin gpio header gives you many options for connecting hardware. The gpio pins use 3.3 V logic, so you must avoid 5 V signals. Each gpio pin can supply up to 16 mA, but the total current from all gpio pins should not go over 50 mA. You can use protocols like I2C and SPI for sensors and displays. Libraries such as WiringPi, pigpio, and CircuitPython help you control gpio pins and use features like PWM.

  • Supported protocols: I2C, SPI, UART, PWM

  • Logic level: 3.3 V (not 5 V tolerant)

  • Max current per gpio pin: 16 mA (default 8 mA)

  • Total max current (all gpio): 50 mA

  • Use resistors to protect gpio pins

You can expand your raspberry pi zero with boards like the IO Pi Zero. These boards make it easier to connect more devices and add features like relays or extra headers.

Tip: Always check your wiring and use high-quality power supplies to keep your raspberry pi zero safe and reliable.

Datasheet

Official Reference

You can find the official Raspberry Pi Zero pinout datasheet on the Richard Electronics blog page. This datasheet covers every Raspberry Pi Zero model, like Zero W and Zero 2 W. It gives you a full look at the hardware features, pinout details, and supported protocols. The table below shows what is inside the datasheet:

SectionDetails
Processor and MemoryModel, CPU type and speed, RAM size
GPIO Header40-pin layout, pin functions, soldering requirements
Wireless ConnectivityWi-Fi and Bluetooth specifications
Camera InterfaceCSI port details for camera module connection
Power Requirements5V micro USB input, power consumption, recommended supply
Ports and ExpansionUSB, HDMI, microSD, composite video, HAT compatibility
Physical DimensionsBoard size, weight

Tip: The datasheet also tells you about the electrical features of each pin. You can use this to match your hardware with the right pins and keep it safe.

How to Use

When you start a project, the datasheet helps you pick the right pins and features. Begin by looking at the GPIO header section. This part lists all 40 pins, their numbers, and what they do. You will see which pins work with I2C, SPI, UART, and PWM. The datasheet uses Broadcom BCM names for GPIO pins, so make sure your code uses these names too.

Here are some steps for using the datasheet when planning a project:

  1. Decide what hardware you want to connect, like sensors or LEDs.

  2. Find out which protocol you need (I2C, SPI, UART, or PWM).

  3. Look for the matching pins in the datasheet and write down their physical and BCM numbers.

  4. Check which pins give power and ground for safe wiring.

  5. Read the electrical limits for each pin so you do not overload them.

Always make sure your power supply fits the board’s needs. Use the datasheet to check pin numbers in your code and make sure your wires are connected well. If you have problems, the datasheet can help you fix them by showing the right pinouts and power details.

You can also use the datasheet to learn how to set pin modes. Each GPIO pin can be input, output, or do something special. The datasheet explains how to use function select registers for more control. This helps you build Raspberry Pi Zero projects that work well and stay safe.

Projects

LED Control

You can start learning about the Raspberry Pi Zero by making an LED blink. This project helps you understand how to use gpio pins for output. Follow these steps to build a basic LED blinking project:

  1. Update your Raspberry Pi with sudo apt-get update.

  2. Install the GPIO library using sudo apt-get install rpi.gpio.

  3. Power off your Raspberry Pi Zero. Connect two LEDs and 220-ohm resistors to GPIO 27 and GPIO 22 using a breadboard and jumper wires.

  4. Write a Python script. Use the RPi.GPIO library and set the mode to BCM. Set GPIO 27 and GPIO 22 as outputs. Make a loop that turns each LED on and off with a one-second delay.

  5. Save your script as led.py.

  6. Run the script with python led.py.

  7. Watch the LEDs blink one after the other.

Always power off your Raspberry Pi before wiring. Use resistors to protect the gpio pins.

Sensor Projects

You can connect many types of sensors to the Raspberry Pi Zero. Common sensors include PIR motion sensors, ultrasonic distance sensors, IR sensors, and temperature sensors like DHT11 or DHT22. Connect the sensor’s power pin to 3.3V or 5V, ground to GND, and the signal pin to a gpio pin. Some sensors need extra parts, like a 10k-ohm pull-up resistor for DHT sensors. Use Python libraries such as Adafruit_DHT to read sensor data.

  • Double-check your wiring before powering up.

  • Use level shifters for 5V sensors.

  • Power off the Pi before connecting or disconnecting components.

Soldering the gpio header can be hard for beginners. Take your time and use the right tools for a strong connection.

I2C/SPI Devices

You can use I2C and SPI devices for more advanced projects. Common devices include displays, EEPROMs, and digital-to-analog converters. To enable I2C or SPI:

  1. Open Raspberry Pi Configuration and enable I2C or SPI in the Interfaces tab.

  2. Or, use sudo raspi-config in the terminal and enable the interfaces.

  3. Reboot your Raspberry Pi Zero.

  4. Use tools like i2cdetect -y 1 to check for connected I2C devices.

I2C uses only two wires, making it simple for projects with many devices. SPI is faster and works well for displays or fast data transfer. Choose the protocol that fits your project needs.

FeatureI2C AdvantagesSPI Advantages
WiringTwo wires (SDA, SCL)Four wires (SCK, MOSI, MISO, SS)
SpeedUp to 3.4 MbpsHigher speeds possible
ScalabilityMany devicesFast, but fewer devices

Home Automation

You can build smart home projects with the Raspberry Pi Zero. Try these ideas:

  • Smart Door Sensor: Use magnetic sensors on doors to detect open or closed status. Send alerts or trigger alarms.

  • Weather Station: Connect DHT11 or DHT22 sensors to monitor temperature and humidity. Log and display the data.

  • Plant Watering System: Use soil moisture sensors and a relay to control a water pump. Water your plants automatically.

For safety, use strong passwords, update your software, and use a high-quality power supply. Secure your network and power off the Pi before wiring.

Project Resources

You can find many educational guides and project ideas online. The Pi4J project website offers detailed pinout diagrams, example projects, and community support. Forums and GitHub repositories provide help and code samples. Use these resources to learn more about gpio projects and get inspired for your next build.

Knowing the Raspberry Pi Zero pinout helps you make and fix projects. Keep the pinout and specs close when you try new things. Begin with easy GPIO projects to see how the pins work. Always use safety tips and check reference tools to keep your board safe. Careful wiring and planning help you finish your projects well.

FAQ

What is the difference between physical and BCM pin numbering?

Physical numbering counts pins from 1 to 40 based on their position. BCM numbering uses the Broadcom chip’s GPIO numbers. Always check which scheme your code or diagram uses to avoid wiring mistakes.

Can I power the Raspberry Pi Zero through the GPIO header?

Yes, you can use pin 2 or 4 for 5V and pin 6 for ground. You should use the Micro-USB port for safety. The GPIO header does not have built-in protection.

Are the GPIO pins 5V tolerant?

No, the GPIO pins only support 3.3V logic. Connecting 5V signals can damage your board. Always check voltage levels before wiring.

How much current can each GPIO pin handle?

Each GPIO pin can supply up to 16 mA. The total current for all GPIO pins should not go over 50 mA. Use resistors to protect your pins and devices.

Where can I find a Raspberry Pi Zero pinout diagram?

You can use the pinout command in Raspberry Pi OS. Online tools like pinout.xyz also show interactive pinout diagrams. These resources help you find pin functions quickly.

 

 

 

 


 

AiCHiPLiNK Logo

Written by Jack Elliott from AIChipLink.

 

AIChipLink, one of the fastest-growing global independent electronic   components distributors in the world, offers millions of products from thousands of manufacturers, and many of our in-stock parts is available to ship same day.

 

We mainly source and distribute integrated circuit (IC) products of brands such as BroadcomMicrochipTexas Instruments, InfineonNXPAnalog DevicesQualcommIntel, etc., which are widely used in communication & network, telecom, industrial control, new energy and automotive electronics. 

 

Empowered by AI, Linked to the Future. Get started on AIChipLink.com and submit your RFQ online today! 

 

 

Frequently Asked Questions

What is the difference between physical and BCM pin numbering?

Physical numbering counts pins from 1 to 40 based on their position. BCM numbering uses the Broadcom chip’s GPIO numbers. Always check which scheme your code or diagram uses to avoid wiring mistakes.

Can I power the Raspberry Pi Zero through the GPIO header?

Yes, you can use pin 2 or 4 for 5V and pin 6 for ground. You should use the Micro-USB port for safety. The GPIO header does not have built-in protection.

Are the GPIO pins 5V tolerant?

No, the GPIO pins only support 3.3V logic. Connecting 5V signals can damage your board. Always check voltage levels before wiring.

How much current can each GPIO pin handle?

Each GPIO pin can supply up to 16 mA. The total current for all GPIO pins should not go over 50 mA. Use resistors to protect your pins and devices.

Where can I find a Raspberry Pi Zero pinout diagram?

You can use the pinout command in Raspberry Pi OS. Online tools like pinout.xyz also show interactive pinout diagrams. These resources help you find pin functions quickly.

Share: