← All Components  /  Embedded SBC Connectors
// Embedded SBC Connectors

Raspberry Pi HAT 40-Pin GPIO

Raspberry Pi 40-pin GPIO header (2×20) is the expansion interface for HAT (Hardware Attached on Top) add-on boards, providing SPI, I2C, UART, PWM, and GPIO signals plus 3.3V and 5V power.

// Specifications
Standard
Raspberry Pi HAT specification
Pitch
2.54mm
Pin Count
40 (2x20)
Signals
GPIO SPI I2C UART PWM I2S
Voltage
3.3V logic 5V power
Use Case
HAT boards sensors motor drivers displays
// Pin Reference Table
Pin Name Function Type
1 3V3 3.3V power PWR
2 5V 5V power PWR
3 GPIO2 SDA1 I2C data BUS
4 5V 5V power PWR
5 GPIO3 SCL1 I2C clock BUS
6 GND Ground GND
7 GPIO4 GPCLK0 clock output I/O
8 GPIO14 UART TXD transmit BUS
9 GND Ground GND
10 GPIO15 UART RXD receive BUS
11 GPIO17 General purpose I/O I/O
12 GPIO18 PCM_CLK PWM I/O
13 GPIO27 General purpose I/O I/O
14 GND Ground GND
15 GPIO22 General purpose I/O I/O
16 GPIO23 General purpose I/O I/O
17 3V3 3.3V power PWR
18 GPIO24 General purpose I/O I/O
19 GPIO10 SPI0 MOSI BUS
20 GND Ground GND
21 GPIO9 SPI0 MISO BUS
22 GPIO25 General purpose I/O I/O
23 GPIO11 SPI0 CLK BUS
24 GPIO8 SPI0 CE0 chip select BUS
25 GND Ground GND
26 GPIO7 SPI0 CE1 chip select BUS
27 ID_SD HAT ID EEPROM SDA BUS
28 ID_SC HAT ID EEPROM SCL BUS
29 GPIO5 General purpose I/O I/O
30 GND Ground GND
31 GPIO6 General purpose I/O I/O
32 GPIO12 PWM0 I/O
33 GPIO13 PWM1 I/O
34 GND Ground GND
35 GPIO19 SPI1 MISO PCM_FS BUS
36 GPIO16 SPI1 CE0 BUS
37 GPIO26 General purpose I/O I/O
38 GPIO20 SPI1 MOSI PCM_DIN BUS
39 GND Ground GND
40 GPIO21 SPI1 CLK PCM_DOUT BUS