Skip to main content

Using the HAT

The AutoPi TMU CM4 comes with an integrated 40 pin header (1.27mm pitch). It is possible to use the header to design HAT (Hardware Attached on Top) boards that greatly extends the functionality of the device. The image below shows the placement of the HAT on the board. It has been designed, so that a new HAT can fit into the casing.

HAT Placement

HAT Component Parts#

TypeManufacturerPart NumberDatasheetComments
MaleGreenconnGPEC209-2002B009C1BFDatasheetAlternative manufacturer available
FemaleAmphenol ICC (FCI)20021321-00040C1LFDatasheetAlternative manufacturer available

Pinout#

The following table is an explanation of each pinout. The type describes the usage of the pin as defined in the RP2040 firmware:

PinNameDescriptionTypeComments
1HS_CAN_HIGH / OBD_PIN_6Connection to CAN0 High line and directly to OBD pinBi-directional
2HS_CAN_LOW / OBD_PIN_14Connection to CAN0 Low line and directly to OBD pinBi-directional
3MS_CAN_HIGH / OBD_PIN_3Connection to CAN1 High line and directly to OBD pinBi-directional
4MS_CAN_LOW / OBD_PIN_11Connection to CAN1 Low line and directly to OBD pinBi-directional
5OBD_PIN_1Directly connected to OBD pinBi-directional
6OBD_PIN_7Directly connected to OBD pinBi-directional
7OBD_PIN_15Directly connected to OBD pinBi-directional
8OBD_PIN_2Directly connected to OBD pinBi-directional
9OBD_PIN_10Directly connected to OBD pinBi-directional
10OBD_PIN_8Directly connected to OBD pinBi-directional
11OBD_PIN_9Directly connected to OBD pinBi-directional
12OBD_PIN_12Directly connected to OBD pinBi-directional
13OBD_PIN_13Directly connected to OBD pinBi-directional
14GNDGroundPWR
1512V_CAR / OBD_PIN_16Connection to 12V supply from the car on OBD pin 16PWR
16RP2040_GPIO27Connection to RP2040 SPM on GPIO27Output3.3V Level - See RPI2040 datasheet for details
175V_EXTControlable 5V supplyPWRMaximum current rating 500mA
183V3_EXTControlable 3.3V supplyPWRMaximum current rating 500mA
19DOIP_ACTConnection to RP2040 SPM on DoIP activate pinOutput
20RPI_GPIO23Raspberry Pi CM4 GPIO23Bi-directional3.3V Level - See CM4 datasheet for details
21RPI_GPIO24Raspberry Pi CM4 GPIO24Bi-directional3.3V Level - See CM4 datasheet for details
22RPI_GPIO27Raspberry Pi CM4 GPIO27Bi-directional3.3V Level - See CM4 datasheet for details
23GNDGroundPWR
24GNDGroundPWR
255V5V SupplyPWRMaximum current rating 500mA
263V33.3V SupplyPWRMaximum current rating 500mA
27ETH_TD0-Ethernet Data pin TD0-Bi-directional
28ETH_TD0+Ethernet Data pin TD0+Bi-directional
29ETH_TD1-Ethernet Data pin TD1-Bi-directional
30ETH_TD1+Ethernet Data pin TD1+Bi-directional
31RPI_PWRCM4 power status pinOutput3.3V Level - See CM4 datasheet for details
32RP2040_GPIO17Connection to RP2040 SPM on GPIO17InputWhen high the CM4 will wake - 3.3V Level - See RPI2040 datasheet for details
33RP2040_GPIO28Connection to RP2040 SPM on GPIO28Output3.3V Level - See RPI2040 datasheet for details
34USB_DP_EXTUSB4 D+ Data line - HAT USBBi-directional
35USB_DM_EXTUSB4 D- Data line - HAT USBBi-directional
36RPI_GPIO22Raspberry Pi CM4 GPIO22Bi-directional3.3V Level - See CM4 datasheet for details
37RPI_ID_SDRaspberry Pi CM4 ID_SDBi-directional3.3V Level - See CM4 datasheet for details
38RPI_ID_SCRaspberry Pi CM4 ID_SCBi-directional3.3V Level - See CM4 datasheet for details
39I2C1_SDAI2C1 Data lineBi-directional3.3V Level - See CM4 datasheet for details
40I2C1_SCLI2C1 Clock lineBi-directional3.3V Level - See CM4 datasheet for details

Example Dimensions#

The following picture shows an example layout of the HAT, together with positioning of the female connector. This specific HAT is designed to go around the CM4 board:

HAT Example