The Raspberry Pi 3 Model B is a single-board computer developed by the Raspberry Pi Foundation. This board consists of a 1.2Ghz 64-bit quad-core ARM processor and an 802.11n Wireless LAN, Bluetooth 4.1, and Bluetooth Low Energy. Like the previous version (the Pi 2) it consists of 1 GB of RAM, 4 USB ports, and full HDMI support. Raspberry pi 3 GPIO Pinout or Pin diagram, and specifications are explained in detail in this post.
Raspberry Pi 3 GPIO Pinout / Pin diagram:
The Processor used in Raspberry Pi 3:
Broadcom BCM2837: It is a 1.2GHz 64bit ARM quad-core Cortex A53 processor, with 512 KiB shared L2 cache, dual-core VideoCore IV GPU @ 400 MHz supporting OpenGL ES 2.0, hardware-accelerated OpenVG, and 1080p30 H.264 high-profile decode.
**Download HD R-Pi 3 Model B Pinout image from here.
A 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, it consists of a 40-pin GPIO. A 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 3 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, 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. All the voltages are measured with respect to the GND voltage.
Raspberry Pi 3 Input/Outputs pins:
A GPIO pin that is set as an input will allow a signal to be received by the Raspberry Pi that is sent by a 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 connect a device with an input voltage above 3.3V to any of the GPIO pins, or else it will fry the Raspberry Pi.
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.
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 is available on all pins
- Hardware PWM is available on these pins only: GPIO12, GPIO13, GPIO18, GPIO19
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, then it will send data back using the MISO (Master In Slave Out) pin. There are 5 pins involved in SPI communication:
- GND: Connect all GND pins from all the slave components and the Raspberry Pi 3 board together.
- SCLK: Clock of the SPI. Connect all SCLK pins together.
- MOSI: It stands for Master Out Slave In. This pin is used to send data from the master to a slave.
- MISO: It stands for Master In Slave Out. This pin is used to receive data from a slave to the master.
- CE: It stands for Chip Enable. We need to connect one CE pin per slave (or peripheral devices) in our circuit. By default, we have two CE pins but we can configure more CE pins from the other available GPIO pins.
SPI pins on board:
- 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 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)
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 3 Model B Schematic(official):
To download the Raspberry Pi 3 Model B Schematic, click here.
Specifications of Raspberry PI 3 board:
- Quad-Core 1.2GHz Broadcom BCM2837 64bit CPU
- 1GB RAM
- BCM43438 wireless LAN and Bluetooth Low Energy (BLE) on board
- 100 Base Ethernet
- 40-pin extended GPIO
- 4 USB 2 ports
- 4 Pole 3.3mm stereo output and composite video port
- Full-size HDMI CSI (Camera Serial Interface) camera port for connecting a camera
- DSI (Display Serial Interface) display port for connecting a touchscreen display
- Micro SD port
- Micro USB power port (up to 2.5A)
- Size – 85 x 56 x 17 mm
How to program the Raspberry PI 3 Model B:
You can control the GPIO of Raspberry Pi 3 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