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.
Raspberry Pi Zero GPIO Pinout in detail:
**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.
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
- BCM2835 single-core processor :1GHz ARM11 core
- 512MB of LPDDR2 SDRAM
- A micro-SD card slot
- A mini-HDMI socket for 1080p60 video output
- Micro-USB sockets for data and power
- An unpopulated 40-pin GPIO header
- An unpopulated composite video header
- Dimension: 65mm x 30mm x 5mm
- Composite video and reset headers
- CSI camera connector (v1.3 only)
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