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:

PinNameDescriptionComments
1HS_CAN_HIGH / OBD_PIN_6Connection to CAN0 High line and directly to OBD pin
2HS_CAN_LOW / OBD_PIN_14Connection to CAN0 Low line and directly to OBD pin
3MS_CAN_HIGH / OBD_PIN_3Connection to CAN1 High line and directly to OBD pin
4MS_CAN_LOW / OBD_PIN_11Connection to CAN1 Low line and directly to OBD pin
5OBD_PIN_1Directly connected to OBD pin
6OBD_PIN_7Directly connected to OBD pin
7OBD_PIN_15Directly connected to OBD pin
8OBD_PIN_2Directly connected to OBD pin
9OBD_PIN_10Directly connected to OBD pin
10OBD_PIN_8Directly connected to OBD pin
11OBD_PIN_9Directly connected to OBD pin
12OBD_PIN_12Directly connected to OBD pin
13OBD_PIN_13Directly connected to OBD pin
14GNDGround
1512V_CAR / OBD_PIN_16Connection to 12V supply from the car on OBD pin 16
16RP2040_GPIO27Connection to RP2040 SPM on GPIO273.3V Level - See RPI2040 datasheet for details
175V_EXTControlable 5V supplyMaximum current rating 500mA
183V3_EXTControlable 3.3V supplyMaximum current rating 500mA
19DOIP_ACTConnection to RP2040 SPM on DoIP activate pin
20RPI_GPIO23Raspberry Pi CM4 GPIO233.3V Level - See CM4 datasheet for details
21RPI_GPIO24Raspberry Pi CM4 GPIO243.3V Level - See CM4 datasheet for details
22RPI_GPIO27Raspberry Pi CM4 GPIO273.3V Level - See CM4 datasheet for details
23GNDGround
24GNDGround
255V5V SupplyMaximum current rating 500mA
263V33.3V SupplyMaximum current rating 500mA
27ETH_TD0-Ethernet Data pin TD0-
28ETH_TD0+Ethernet Data pin TD0+
29ETH_TD1-Ethernet Data pin TD1-
30ETH_TD1+Ethernet Data pin TD1+
31RPI_PWRCM4 power status pin3.3V Level - See CM4 datasheet for details
32RP2040_GPIO17Connection to RP2040 SPM on GPIO173.3V Level - See RPI2040 datasheet for details
33RP2040_GPIO28Connection to RP2040 SPM on GPIO283.3V Level - See RPI2040 datasheet for details
34USB_DP_EXTUSB4 D+ Data line - HAT USB
35USB_DM_EXTUSB4 D- Data line - HAT USB
36RPI_GPIO22Raspberry Pi CM4 GPIO223.3V Level - See CM4 datasheet for details
37RPI_ID_SDRaspberry Pi CM4 ID_SD3.3V Level - See CM4 datasheet for details
38RPI_ID_SCRaspberry Pi CM4 ID_SC3.3V Level - See CM4 datasheet for details
39I2C1_SDAI2C1 Data line3.3V Level - See CM4 datasheet for details
40I2C1_SCLI2C1 Clock line3.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