Using the Raspberry Pi GPIOs with the Hailo AI HAT

Using the Raspberry Pi GPIOs with the Hailo AI HAT

The Hailo AI HAT brings powerful AI acceleration to the Raspberry Pi 5 via the PCIe M.2 interface. However, many users wonder whether they can still use the Raspberry Pi’s GPIO pins when the AI HAT is attached.

In this post, I’ll clarify the role of the GPIO header in the Hailo AI HAT setup, explain why some pins are used, and suggest ways to access GPIOs for additional hardware.


:electric_plug: Why Does the Hailo AI HAT Use the Raspberry Pi’s GPIO?

The 40-pin GPIO header on the Raspberry Pi is often used to connect sensors, displays, and other peripherals. However, when you install the Hailo AI HAT, it covers this header. Does this mean you lose access to all the GPIOs? Not necessarily.

The HAT Uses the GPIO Header for Two Main Purposes:

:one: EEPROM Identification

  • The Hailo AI HAT includes an EEPROM chip, which is connected via the I2C0 pins (pins 3 and 5, GPIO 2 and 3).
  • This EEPROM allows Raspberry Pi OS to automatically detect the HAT and configure the necessary settings, such as setting PCIe to Gen3.
    :warning: If this is not connected, the PCIe will operate in Gen2 mode, leading to significantly reduced performance.
  • More on HAT EEPROMs: Raspberry Pi HAT+ Specification

:two: Power and Ground

  • While the AI HAT receives power from the PCIe slot, it also connects to 5V (pins 2 & 4) and GND (pins 6, 9, 14, etc.) via the GPIO header.
  • These additional connections ensure stable power delivery, and are required to make sure the HAT can get enough power, preventing issues when running AI inference.

Should I use the GPIO header? (TL;DR: Yes!)

While you might be able to get things working without the GPIO header connected, you may encounter performance and power issues, especially under high loads. The AI HAT is designed to work optimally with the GPIO header connected.


:arrows_counterclockwise: Can I Still Use the Raspberry Pi GPIOs?

Yes, you can definitely use them!

The GPIO header included in the Raspberry Pi AI Kit physically blocks access to the pins, but this is just a physical limitation—not a functional one. The Hailo AI HAT follows the RPi HAT+ specification, and it is Raspberry Pi’s decision which GPIO header is included in the kit.

So, what can you do?

:small_blue_diamond: Option 1: Use an Extra-Long GPIO Header

You can purchase an extra-long GPIO header or a GPIO extension header to regain access to the pins underneath.

:small_blue_diamond: Option 2: Quick & Dirty Solution

If you need a fast workaround, you can:

  1. Remove the standoffs on the GPIO header side of the AI HAT.
  2. Push the HAT slightly to expose the necessary pins.
  3. Use jumper wires to connect your peripherals.

:warning: Important Note:

The I2C pins (GPIO 2 & 3) used as part of the HAT+ standard should be used with caution, as they are required during boot to read the EEPROM. Be sure to check Raspberry Pi’s documentation before using these pins for other purposes.

:speech_balloon: Have you tried accessing GPIOs with the AI HAT? Share your setup, mods, or solutions in the comments below! :rocket: