Raspberry Pi is a mini single-chip computer. It is developed by the Raspberry Pi Foundation in the United Kingdom along with the association of Broadcom. Raspberry Pi Zero is the smallest chipset in the Raspberry Pi series and is 40% faster than the original Raspberry Pi but nearly half of its size. Raspberry pi Zero GPIO Pinout or Pin diagram, and programming methods are explained in detail in this post.
The Raspberry Pi Zero supports mini connectors (like mini HDMI, mini USB power, and USB on-the-go port) to save more space. And the 40pin GPIO is unpopulated which provides the flexibility to use only the connections that the project requires. It consists of a 1GHz BCM2835 single-core processor, 512 MB RAM, mini-HDMI, USB On-The-Go ports, and a camera connector.
Note: The raspberry pi Zero and Zero w have a mini HDMI port, not a micro HDMI one.
Raspberry Pi Zero Specs
Detailed features and specifications of R-Pi zero are given below:
|Processor||BCM2835 single-core processor :1GHz ARM11 core|
|Memory||512MB LPDDR2 SDRAM|
|Connectivity||• 2 × USB 2.0 interface with OTG|
• HAT-compatible 40-pin I/O header footprint
• MicroSD card slot
• Mini HDMI port
• CSI camera connector
|Video||• HDMI interface|
• Composite video
|Input power||5V DC 2.5A|
|Form Factor||65mm × 30mm × 5mm|
Raspberry Pi Zero GPIO Pinout
**Download HD R-Pi Zero Pinout image from here.
One powerful feature of the Raspberry Pi is the row of GPIO (general-purpose input/output) pins along the extreme right edge of the board. Like every Raspberry Pi chipset, Zero consists of a 40-pin GPIO.
The standard interface for connecting a single-board computer or microprocessor to other devices is through General-Purpose Input/Output (GPIO) pins. GPIO pins do not have a specific function and can be customized using the software.
Some of the popular GPIO pin functions are given below:
|Pin Type||GPIO pins||Description|
|PWM pins||GPIO12, GPIO13, GPIO18, GPIO19||Used for Pulse Width Modulation|
|SPI pins||SPI0: GPIO9 (MISO), GPIO10 (MOSI), GPIO11 (SCLK), GPIO8(CE0)/ GPIO7(CE1)|
SPI1: GPIO19 (MISO), GPIO20 (MOSI), GPIO21 (SCLK), GPIO18 (CE0)/ GPIO17(CE1)/GPIO17(CE2)
|Used for Serial Peripheral Interface|
|I2C Pins||Data: (GPIO2), Clock: (GPIO3)|
EEPROM Data: (GPIO0), EEPROM Clock: (GPIO1)
|Used for Inter-Integrated Circuit communication|
|UART Pins||TX: (GPIO14)|
|To communicate between two microcontrollers or the computers.|
Raspberry PI Zero Power Pins:
The board consists of two 5V pins, two 3V3 pins, and 9 ground pins (0V), which are unconfigurable.
5V: The 5v pins directly deliver the 5v supply coming from the mains adaptor. This pin can use to power up the Raspberry Pi zero, and it can also use to power up other 5v devices.
3.3V: The 3v pin is there to offer a stable 3.3v supply to power components and to test LEDs.
GND: Ground is commonly referred to as GND. GND pin is from where all voltages are measured and it also completes an electrical circuit.
Raspberry Pi Zero Input/Outputs pins:
A GPIO pin that is set as an input pin, receives the incoming voltage signal sent by the device connected to this pin. A voltage between 1.8V and 3.3V will be read by the Raspberry Pi as HIGH and if the voltage is lower than 1.8V will be read as LOW.
Note: Do not give voltage more than 3.3V to GPIO pins, or else it will fry the Raspberry Pi zero.
A GPIO pin set as an output pin sends the voltage signal as high (3.3V) or low (0V). When this pin is set to HIGH, the voltage at the output is 3.3V and when set to LOW, the output voltage is 0V.
Other Important Pins on Raspberry Pi Zero:
Along with the simple function of input and output pins, the GPIO pins can also perform a variety of alternative functions. Some specific pins are:
PWM (pulse-width modulation) Pins:
- Software PWM available on all pins
- Hardware PWM available on these pins: GPIO12, GPIO13, GPIO18, GPIO19
SPI PINS on R-Pi Zero:
SPI (Serial Peripheral Interface) is another protocol used for master-slave communication. It is used by the Raspberry pi board to quickly communicate between one or more peripheral devices. Data is synchronized using a clock (SCLK at GPIO11) from the master (RPi) and the data is sent from the Pi to our SPI device using the MOSI (Master Out Slave In) pin. If the SPI device needs to communicate back to Raspberry Pi, it sends the data back using the MISO (Master In Slave Out) pin.
- SPI0: GPIO9 (MISO), GPIO10 (MOSI), GPIO11 (SCLK), GPIO8 (CE0), GPIO7 (CE1)
- SPI1: GPIO19 (MISO), GPIO20 (MOSI), GPIO21 (SCLK), GPIO18 (CE0), GPIO17 (CE1), GPIO16 (CE2)
I2C Pins on R-Pi Zero:
I2C is used by the Raspberry Pi board to communicate with devices that are compatible with Inter-Integrated Circuit (a low-speed two-wire serial communication protocol). This communication standard requires master-slave roles between both the devices. I2C has two connections: SDA (Serial Data) and SCL (Serial Clock). They work by sending data to and using the SDA connection, and the speed of data transfer is controlled via the SCL pin.
- Data: (GPIO2), Clock (GPIO3)
- EEPROM Data: (GPIO0), EEPROM Clock (GPIO1)
UART Pins on R-Pi Zero:
Serial communication or the UART (Universal Asynchronous Receiver / Transmitter) pins provide a way to communicate between two microcontrollers or the computers. TX pin is used to transmit the serial data and RX pin is used to receive serial data coming from a different serial device.
- TX (GPIO14)
- RX (GPIO15)
Raspberry Pi Zero Schematic(official):
To download the Raspberry Pi Zero Schematic, click here.
**Source: R-Pi Zero official store
Different Programming Guide for R-Pi Zero( Learning Material):
You can control the GPIO of Raspberry Pi Zero using many programming languages. Some of the popular languages along with learning material is given below:
- GPIO Programming using Python
- GPIO Programming using Scratch 1.4
- GPIO Programming using Scratch 2
- Programming GPIO with C/C++ using standard kernel interface via libgpiod
- Programming GPIO with C/C++ using 3rd party library pigpio
- GPIO Programming using Processing3
Prefer Book? Read this article on Best Raspberry Pi Books for beginners
Where to buy R-Pi Zero?
You don’t have to purchase RPI zero now as RPI Zero W and RPI Zero 2W, its updated versions are now available. You can get the original Raspberry Pi Zero W board from different stores. But if you want to get it from Amazon, we recommend you the following sellers: