The Raspberry Pi 3B+ is an upgraded version of the popular Raspberry Pi 3B single-board computer. With a faster processor, dual-band wireless networking, and improved thermals, the Pi 3B+ is ideal for a wide range of DIY electronics and programming projects.

To effectively utilize the capabilities of the Pi 3B+, it is important to understand the pinout and functions of the various ports and pins. This guide provides a detailed overview of the Raspberry Pi 3B+ pinout configuration.

Overview of the Raspberry Pi 3B+ Specifications

Before jumping into the pinout, let‘s briefly summarize some key specs of the Raspberry Pi 3B+ board:

  • Processor: Broadcom BCM2837B0 quad-core A53 (ARMv8) 64-bit SoC @ 1.4GHz
  • RAM: 1GB LPDDR2 SDRAM
  • Wireless: 2.4 GHz and 5 GHz IEEE 802.11.b/g/n/ac wireless LAN
  • Bluetooth: Bluetooth 4.2, BLE
  • Ethernet: Gigabit Ethernet over USB 2.0
  • USB: 4 × USB 2.0 ports
  • GPIO: 40-pin GPIO header
  • Video & Audio: HDMI, MIPI DSI display port, MIPI CSI camera port, 4-pole stereo output and composite video port
  • Storage: MicroSD card slot for operating system and data storage
  • Ports: Micro USB power input, HDMI output, Ethernet port, Camera Serial Interface (CSI), Display Serial Interface (DSI)

With an understanding of the capabilities of the board, let‘s now dive deeper into the pinout and port functions.

Power Pins

The Raspberry Pi 3B+ requires a 5V micro USB power supply that can deliver a minimum of 2.5A. This powers the board itself as well as allows for providing power to external peripherals.

Pins 1 and 17 on the GPIO header are for the 3.3V power supply. These pins deliver a 3.3V supply voltage from the on-board switched-mode power supply chip. This voltage level can be used to power external circuits and accessories. The total current draw on these pins should not exceed 50mA.

Pins 2 and 4 deliver the 5V power supply from the micro USB input. This 5V power can be used to power peripherals but has a higher current rating than the 3.3V pins. The 5V supply can deliver a current of up to 2A when powered by a high-current power supply.

The ground pins 6, 9, 14, 20, 25, 30, 34, and 39 provide 0V ground references and should be used when external circuitry requires a ground connection.

By using the on-board 5V and 3.3V power supplies, many basic circuits and accessories can be powered directly through the GPIO header without requiring additional power supplies. Of course, for high power devices an external power supply may still be preferred to not overload the Pi itself.

GPIO Pins

The Pi 3B+ includes 40 GPIO (general purpose input/output) pins which can be configured as inputs or outputs and read or controlled by software. These flexible GPIOs provide the core building block that enables interacting with electronics hardware and building DIY devices and gadgets.

In the diagram below, you can see the layout and numbering of the GPIO pins on the header, as well as descriptions of their common functions. Pins labeled in bold support additional alternate functions described in later sections.

Raspberry Pi 3B+ 40-pin GPIO Header Layout and Pinout Diagram

For basic GPIO usage, library functions like RPi.GPIO for Python or WiringPi for C/C++ make it easy to configure pins as inputs or outputs, read pin states, and set output states, without needing to deal with low-level peripherals registers. This abstraction enables rapid prototyping when interfacing with devices and circuitry like LEDs, switches, motors, sensors, and more.

Beyond using the GPIOs for reading sensors and controlling actuators, many of these pins also support additional interface capabilities thanks to built-in dedicated hardware peripherals within the BCM2837 SoC. We will explore these additional functions next.

Inter-Integrated Circuit (I2C) Bus

The Pi 3B+ includes dedicated hardware support for the I2C (Inter-Integrated Circuit) serial bus communication protocol on GPIO pins 3 (SDA) and 5 (SCL). This bus can connect multiple external peripherals using just two wires for bidirectional data flow.

Common peripherals like environmental sensors, accelerometers, GPS modules, LCD displays, and more support I2C interfaces. The open-drain concept used in I2C enables cleanly connecting devices in parallel on the bus, with the pullup resistors built into the Pi 3B+.

Linux I2C driver frameworks make it possible to control I2C devices from C, Python, and other languages. For quick testing, utilities like i2cdetect and i2cdump allow inspecting attached I2C peripherals.

Serial Peripheral Interface (SPI) Ports

The Pi 3B contains two dedicated SPI ports to support interfacing external accessories using the Serial Peripheral Interface protocol.

SPI0 uses GPIO pins 19 (MOSI), 21 (MISO), 23 (SCLK), with CE0 on pin 24 and CE1 on pin 26 for accessing multiple devices on the bus.

SPI1 utilizes pins 12 (MOSI), 35 (MISO), 38 (SCLK), with CE0 on pin 36 and CE1 on pin 40.

SPI enables high speed full-duplex transfers for streaming data communications. Many integrated circuits like sensors, SD cards, and LCD screens commonly support SPI interfaces, making this a key capability of the Pi for building electronics projects.

The SPI framework included in Linux allows programmatically transferring data over the SPI buses to communicate with connected devices.

Universal Asynchronous Receiver/Transmitter (UART) Port

UART serial communications uses Tx/Rx lines to provide simple bidirectional data exchange between devices. Pins 8 and 10 on the GPIO header map to TxD0 and RxD0 lines which implement a hardware UART0 port to support serial communications at TTL level voltages.

This UART port can communicate with external serial devices using +3.3 volt signals. It can also be connected via a level shifter to interface with PCs, microcontrollers, and RS-232 serial ports that use +/- 12V higher voltage signals.

Common uses of serial UART on the Pi include:

  • Connecting to serial console port of networking hardware like routers to access configuration interfaces
  • Debugging output for microcontroller projects or low-level software development
  • Serial communication with peripherals like GPS receivers

Software libraries abstract away the complexity of interfacing over serial UART by handling communication parameters and data encoding automatically.

Pulse-code modulation (PCM) Audio Interface

PCM audio input and output is supported using alternate functions on GPIOs 12 (PCM_DOUT), 35 (PCM_DIN), 38 (PCM_CLK), and 40 (PCM_FS). This provides a low latency digital audio interface to a Digital-to-Analog (DAC) Converter or from an Analog-to-Digital Converter (ADC) with high bit depths and sample rates.

Use cases for leveraging the PCM interface include:

  • Streaming audio output to DACs and speakers
  • Recording audio input from ADCs with microphones and other analog audio sources

By interfacing analog audio components using the PCM interface, advanced audio processing functions can be developed leveraging the CPU horsepower of the Pi 3B+.

HDMI Port

The HDMI port is the primary video output interface of the Raspberry Pi 3B+, designed to connect to HDMI displays like monitors and TVs.

It provides a high quality digital video and audio interface, using a compact port that also allows for bundling additional signals relating to remote controls, content protection, and HDR metadata.

By default the Pi 3B+ outputs a baseline 1080p video signal from its HD graphics core, but configuration is possible by editing config.txt to fine tune display resolutions and timings as needed. For headless operation, the HDMI can instead be configured to mirror command line terminal text to the attached display.

Camera Serial Interface (CSI)

The MIPI CSI-2 port enables connecting external camera modules, such as Raspberry Pi cameras, to support capturing high resolution video and still photographs. The CSI interface provides dedicated high speed serial lanes only for carrying pixel data from cameras, enabling custom computer vision and image processing projects.

Compared to using generic USB webcams, integrating camera modules over CSI unleashes the potential for demanding low latency video processing projects leveraging the quad core CPU and advanced multimedia encoding/decoding hardware built into the Pi 3B+.

Display Serial Interface (DSI)

On the flip side of camera input, the MIPI DSI port provides dedicated output capabilities for integrating a Raspberry Pi touchscreen display. This eliminates the need for running HDMI and USB cables for incorporating a display with integrated touch input.

Example use cases include developing all-in-one Pi handheld projects, or integrating a streamlined touchscreen LCD into kiosks and embedded appliances.

CSI/DSI Combined Port

While the CSI and DSI ports have their own dedicated signals relating the specialized functions they fulfill, the physical connectors share a number of common signals as well.

By leveraging custom adapters, it is actually possible to electrically combine a camera and touchscreen display module into the shared CSI/DSI connector by merging connections appropriately. This helps minimize wiring when integrating compact camera and display functions together into a portable Raspberry Pi project in applications like smart cameras and computer vision IoT devices.

Ethernet Port

The Pi 3B+ incorporates a Gigabit Ethernet port to enable high performance wired networking connectivity. Internally the Ethernet interface connects to the SoC via a USB 2.0 link, but still achieves impressive 300-350 Mbps throughput in real world usage.

This is a huge upgrade over the 10/100 Mbps Ethernet built into earlier Pi models and the WiFi bandwidth limitations, making projects that need to shuttle data between Pis or the internet ideal candidates for utilizing hardwired Ethernet connectivity.

USB Ports

The Pi 3B+ provides 4 USB 2.0 ports supporting standard USB accessories like keyboards, mice, storage drives, webcams, control input devices, and more that follow standard HID and mass storage class protocols.

Note that one of the 4 ports is designated for power input, so effectively 3 ports are available when using a wall adapter for power. By connecting a self-powered USB hub, additional devices can easily be supported beyond the built-in ports.

While USB 2.0 limits transfer speeds compared to what USB 3.0 or later could provide, for simple HID input devices and external storage media the throughput is more than adequate for most applications. And avoiding USB 3.x complexity helps minimize cost and power draw.

5V and GND GPIO Pins

While all the communication interfaces and ports cover connectivity for data signals, the GPIO also conveniently broke out the board wide 5V supply and ground lines on pins 2, 4, 6, 9, 14, 20, 25, 30, 34, and 39.

By tapping into these pins with some jumper wires, you can cleanly distribute power to breakout boards or solderless breadboards without needing to splice into the USB power cord. Having readily available access to 5V, 3.3V, and ground makes prototyping new add-on circuits extremely convenient.

Alternate Function Pin Summary

For quick reference, here is a summary table of pins supporting alternate functions beyond generic GPIO:

Alternate Function GPIO Pin(s)
I2C SDA 3
I2C SCL 5
SPI0 MOSI 19
SPI0 MISO 21
SPI0 SCLK 23
SPI0 CE0 24
SPI0 CE1 26
SPI1 MOSI 12
SPI1 MISO 35
SPI1 SCLK 38
SPI1 CE0 36
SPI1 CE1 40
UART0 TXD 8
UART0 RXD 10
PCM CLK 38
PCM FS 40
PCM DIN 35
PCM DOUT 12

Common Raspberry Pi 3B+ GPIO Uses

To give you ideas of practical ways to utilize the GPIO capabilities of the Raspberry Pi 3B+, here are some of the most common uses and projects that leverage the flexible IO pins:

  • LED lighting projects – Easy way to get started with basic output control
  • Pushbutton interfaces – Debounce pins and detect input triggers
  • Switching higher voltage devices using GPIO to transistor circuits
  • Interfacing sensors like temperature, pressure, humidity, motion, light, gas, etc.
  • Motor control with PWM speed adjustment and directional outputs
  • Robotics projects tying various IO devices and sensors together under Pi brain
  • Home automation and IoT appliances – GPIO tied to physical interfaces
  • Software-defined radio using GPIO for antenna/RF interfaces
  • MIDI instruments and synthesizers – GPIO for digital musical data

The sky‘s truly the limit when it comes to creative ways to leverage the combined digital IO capabilities, peripheral interfaces, processing power, and linux software capabilities!

Tips for Utilizing GPIO Pins

When connecting into GPIO pins, keep in mind:

  • Avoid plugging 5V/3.3V directly into input pins
  • Use current limiting resistors when driving LEDs
  • Check max current limits for 5V/3.3V rails
  • Be careful of accidental shorts causing damage
  • Use level shifting circuits if needed for interfacing devices at higher voltages
  • Employ pull up/down resistors for switching uncertain input states

And some key best practices:

  • Reference detailed schematics for add-on boards before connecting
  • Double check wiring before applying power
  • Develop incrementally, checking outputs at each step
  • Prototype on a breadboard before going to PCB
  • Monitor overall Pi input current/temperature specs

Conclusion

Understanding the pinout and capabilities of the GPIO header enables developing all kinds of electronics projects leveraging the power of the Raspberry Pi 3B+ single board Linux computer.

The built-in peripheral interfaces like I2C, SPI, UART provide connectivity to a wide range of external components used in DIY maker builds. Combined with flexible GPIO and on-board rich multimedia capabilities, the sky‘s the limit for Raspberry Pi projects!

I hope this detailed guide to the Pi 3B+ pinout gives you the foundation to tap into interfacing real world devices with your own creative Raspberry Pi project ideas. Let me know in the comments if you have any other questions as you explore the possibilities with your Pi!

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *