12th Anniversary Sale 12% Off in July & August with the voucher code "SUMMER12" *excludes trade customers
Knowledge Base

The AB Electronics UK Knowledge Base provides support solutions, tutorials and troubleshooting guides.

Knowledge Base

Raspberry Pi GPIO Pins

Raspberry Pi GPIO Pin mapping and connections

The GPIO (General Purpose Input/Output) pins on a Raspberry Pi are versatile connections that allow the computer to interact with a wide variety of external devices and sensors. Each Raspberry Pi model from the Raspberry Pi B+ onwards features a 40-pin header, with 26 GPIO pins available for general use. The remaining pins provide power and ground connections, as well as specific functions like UART, SPI, and I2C interfaces. These GPIO pins can be configured as inputs or outputs, enabling the Raspberry Pi to read digital signals from sensors and switches or control LEDs, motors, and other actuators.

GPIO Pin Connections

Our Raspberry Pi Expansion boards use the GPIO header to communicate with the Raspberry Pi. Most of our boards only use a few GPIO pins for communication. All unused GPIO pins are available for other uses via the stacking header connector. 3.3V pins, 5V pins and ground pins used by our expansion boards can also be used for other Raspberry Pi Hats.

Many of our expansion boards use the I2C or SPI bus. In most cases, the I2C bus can also be used with other I2C devices on the Raspberry Pi as long as the I2C address does not conflict with the expansion board. The SPI bus can only be used by one expansion board.

Details of the pins used by our expansion boards can be found below. The physical pin number along with its use is included.

1 Wire Pi Plus and 1 Wire Pi Zero

The 1 Wire Pi Plus and 1 Wire Pi Zero use the following GPIO pins.

Pin Use
1 3.3V
2 5V
3 I2C SDA (GPIO 0)
4 5V
5 I2C SCL (GPIO 1)
6 GND
9 GND
14 GND
20 GND
25 GND
30 GND
34 GND
39 GND

The default I2C address is 0x18. The following I2C addresses can be selected using the address select jumpers.

  • 0x18
  • 0x19
  • 0x1A
  • 0x1B

ADC Pi

The ADC Pi uses the following GPIO pins.

Pin Use
1 3.3V
2 5V
3 I2C SDA (GPIO 0)
4 5V
5 I2C SCL (GPIO 1)
6 GND
14 GND
20 GND
30 GND
34 GND
39 GND

The default I2C addresses are 0x68 and 0x69. The following I2C addresses can be selected using the address select jumpers.

 

  • 0x68
  • 0x69
  • 0x6A
  • 0x6B
  • 0x6C
  • 0x6D
  • 0x6E
  • 0x6F

ADC Differential Pi

The ADC Differential Pi uses the following GPIO pins.

Pin Use
1 3.3V
2 5V
3 I2C SDA (GPIO 0)
4 5V
5 I2C SCL (GPIO 1)
6 GND
9 GND
14 GND
20 GND
25 GND
30 GND
34 GND
39 GND

The default I2C addresses are 0x68 and 0x69. The following I2C addresses can be selected using the address select jumpers.

  • 0x68
  • 0x69
  • 0x6A
  • 0x6B
  • 0x6C
  • 0x6D
  • 0x6E
  • 0x6F

ADC-DAC Pi Zero

The ADC DAC Pi Zero uses the following GPIO pins.

Pin Use
1 3.3V
6 GND
9 GND
14 GND
19 SPI MOSI (GPIO 10)
20 GND
21 SPI MSIO (GPIO 9)
22 GPIO 25 (Note: connects to MCP4822 LDAC pin)
23 SPI SCLK (GPIO 11)
24 SPI CE0 (GPIO 8)
25 GND
26 SPI CE1 (GPIO 7)
30 GND
34 GND
39 GND

Expander Pi

The Expander Pi uses the following GPIO pins.

Pin Use
1 3.3V
2 5V
3 I2C SDA (GPIO 0)
4 5V
5 I2C SCL (GPIO 1)
6 GND
14 GND
19 SPI MOSI (GPIO 10)
20 GND
21 SPI MSIO (GPIO 9)
22 GPIO 25 (Note: Not connected as supplied. When resistor R3 is removed and R4 bridged this pin connects to the MCP4822 LDAC pin)
23 SPI SCLK (GPIO 11)
24 SPI CE0 (GPIO 8)
25 GND
26 SPI CE1 (GPIO 7)
30 GND
34 GND
39 GND

The I2C address for the MCP23017 I/O controller is 0x20. The I2C address for the DS1307 RTC is 0x68.

I2C Switch

The I2C Switch uses the following GPIO pins.

Pin Use
1 3.3V
2 5V
3 I2C SDA (GPIO 0)
5 I2C SCL (GPIO 1)
6 GND
13 PCA9546A RESET (GPIO 27) (Note: this can be disconnected by removing resistor R2)
14 GND
20 GND
25 GND
30 GND
34 GND
39 GND

The default I2C address is 0x70. The following I2C addresses can be selected using the address select jumpers.

  • 0x70
  • 0x71
  • 0x72
  • 0x73
  • 0x74
  • 0x75
  • 0x76
  • 0x77

IO Pi Plus

The IO Pi Plus uses the following GPIO pins.

Pin Use
1 3.3V
2 5V
3 I2C SDA (GPIO 0)
4 5V
5 I2C SCL (GPIO 1)
6 GND
9 GND
14 GND
20 GND
25 GND
30 GND
34 GND
39 GND

The default I2C addresses are 0x20 and 0x21. The following I2C addresses can be selected using the address select jumpers.

  • 0x20
  • 0x21
  • 0x22
  • 0x23
  • 0x24
  • 0x25
  • 0x26
  • 0x27

IO Zero 32

The IO Zero 32 uses the following GPIO pins.

Pin Use
1 3.3V
2 5V
3 I2C SDA (GPIO 0)
4 5V
5 I2C SCL (GPIO 1)
6 GND
9 GND
14 GND
20 GND
25 GND
30 GND
34 GND
39 GND

The default I2C addresses are 0x20 and 0x21. The following I2C addresses can be selected using the address select jumpers.

  • 0x20
  • 0x21
  • 0x22
  • 0x23
  • 0x24
  • 0x25
  • 0x26
  • 0x27

RTC Pi

The RTC Pi uses the following GPIO pins.

Pin Use
1 3.3V
2 5V
3 I2C SDA (GPIO 0)
4 5V
5 I2C SCL (GPIO 1)
6 GND
9 GND
14 GND
20 GND
25 GND
30 GND
34 GND
39 GND

The I2C address for the DS1307 is 0x68.

RS485 Pi

The RS485 Pi uses the following GPIO pins.

Pin Use
1 3.3V
6 GND
8 UART0 TXD (GPIO 14)
10 UART0 RXD (GPIO 15)
11 GPIO 17 (Note: Not connected as supplied. Moving resistor R6 to R7 will connect GPIO 17 and allow control over the RE/DE pins on the SN65HVD72D via R4 and Q1.
14 GND
20 GND
25 GND
30 GND
34 GND
39 GND

Serial Pi Plus and Serial Pi Zero

The Serial Pi Plus and Serial Pi Zero use the following GPIO pins.

Pin Use
1 3.3V
6 GND
8 UART0 TXD (GPIO 14)
10 UART0 RXD (GPIO 15)
14 GND
20 GND
25 GND
30 GND
34 GND
39 GND

Servo PWM Pi

The Servo PWM Pi uses the following GPIO pins.

Pin Use
1 3.3V
2 5V
3 I2C SDA (GPIO 0)
4 5V
5 I2C SCL (GPIO 1)
6 GND
7 GPIO 4 (Note: not connected as supplied. Connects to Output Enable via the OE pads. Bridge pads to connect.
14 GND
20 GND
30 GND
39 GND

The default I2C address for the DS1307 is 0x40.

Any address between 0x40 and 0x7F can be selected using the address select pads. An additional address can be set in software for the All Call function available on the PCA9685.


Was this article helpful? Yes No

Please tell us how we can improve this article:

Submit

Related Expansion Boards

Order a 1 Wire Pi Plus Photo of 1 Wire Pi Plus
1 Wire Pi Plus

1 Wire interface for the Raspberry Pi

£14.39 Ex VAT: £11.99
Order a 1 Wire Pi Zero Photo of 1 Wire Pi Zero
1 Wire Pi Zero

1 Wire interface for the Raspberry Pi Zero

£13.79 Ex VAT: £11.49
Order a ADC Differential Pi Photo of ADC Differential Pi
ADC Differential Pi

8 Channel 18-bit Differential Analogue to Digital converter for the Raspberry Pi

£17.99 Ex VAT: £14.99
Order a ADC Pi Photo of ADC Pi
ADC Pi

8 Channel 17-bit Single-Ended Analogue to Digital converter for the Raspberry Pi

£19.19 Ex VAT: £15.99
Order a ADC-DAC Pi Zero Photo of ADC-DAC Pi Zero
ADC-DAC Pi Zero

2 Channel ADC and 2 Channel DAC for the Raspberry Pi

£14.99 Ex VAT: £12.49
Order a Expander Pi Photo of Expander Pi
Expander Pi

Analogue, Digital and RTC Expansion Interface for the Raspberry Pi

£27.59 Ex VAT: £22.99
Order a I2C Switch Photo of I2C Switch
I2C Switch

4 channel I2C Switch for the Raspberry Pi

£10.79 Ex VAT: £8.99
Order a IO Pi Plus Photo of IO Pi Plus
IO Pi Plus

32 channel MCP23017 digital I/O expander for the Raspberry Pi

£14.39 Ex VAT: £11.99
Order a IO Zero 32 Photo of IO Zero 32
IO Zero 32

32 channel digital I/O expander for the Raspberry Pi

£13.19 Ex VAT: £10.99
Order a RS485 Pi Photo of RS485 Pi
RS485 Pi

RS485 serial interface for the Raspberry Pi

£14.39 Ex VAT: £11.99
Order a RTC Pi Photo of RTC Pi
RTC Pi

Real-time clock for the Raspberry Pi

£11.39 Ex VAT: £9.49
Order a Serial Pi Plus Photo of Serial Pi Plus
Serial Pi Plus

RS232 Serial Port for the Raspberry Pi

£13.19 Ex VAT: £10.99
Order a Serial Pi Zero Photo of Serial Pi Zero
Serial Pi Zero

RS232 serial interface for the Raspberry Pi Zero

£11.39 Ex VAT: £9.49
Order a Servo PWM Pi Photo of Servo PWM Pi
Servo PWM Pi

16-channel, 12-bit PWM controller for driving LEDs and RC servos

£11.39 Ex VAT: £9.49

Related Articles

Customs and Manufacturing Information
Customs and Manufacturing Information for our boards
PCB Header Assembly Jig
Using the PCB Header Assembly Jig
Samba Setup on Raspberry Pi
How to install and setup Samba on the Raspberry Pi
Cases to use with our boards
Suitable enclosures to use with our boards
Raspberry Pi GPIO Pins
Raspberry Pi GPIO Pin mapping and connections
Expansion Board Compatibility on the Raspberry Pi
Expansion Board Compatibility on the Raspberry Pi
ADC Bit Rates and Resolution
ADC Pi, ADC Differential Pi and ADC-DAC Boards Bit Rate and Resolution
Analogue to digital converter Buyers Guide
Choosing an analogue to digital converter for your Raspberry Pi
Set a static IP Address on Raspberry Pi OS Bookworm
How to use a static network IP Address on the Raspberry Pi
test
test
I2C Part 1 - Introducing I2C
An introduction to the I²C protocol
I2C Part 2 - Enabling I2C on the Raspberry Pi
How to enable I2C on the Raspberry Pi
I2C Part 3 - I2C tools in Linux
An introduction to I²C tools in Linux
I2C Part 4 - Programming I2C with Python
Get started with Programming I²C with Python and SMBus
SPI and Python on Raspberry Pi OS
Enabling SPI on the Raspberry Pi and installing python py-spidev
Using Pythonpath with our Python Libraries
Adding the library path to startup
Connecting Expansion Boards to the Raspberry Pi 400
Expanding the Potential of Your Raspberry Pi 400
RoHS and REACH Compliance and Certificates
Downloads for RoHS - REACH Compliance and Certificates