By Kevin McAleer, 4 Minutes
Page last updated November 24, 2026

Let’s put it together. Take your time here: the ribbon cable is the only fiddly part, and a careful fit saves you headaches later. Follow the official instructions at raspberrypi.com/documentation/accessories/ai-hat-plus.html alongside this lesson, since they have photos.
According to the documentation the HAT comes with four threaded spacers, four long screws (spacers to the Pi 5), four short screws (HAT to the spacers), a GPIO stacking header and a PCIe ribbon cable. The product page also lists an optional heatsink and a 16 mm stacking header.
You also need a Raspberry Pi 5 and a Phillips crosshead screwdriver. The documentation recommends the Raspberry Pi Active Cooler.
Disconnect the Pi 5 from power before you start.
flowchart TD
A["1. Active Cooler on the Pi 5"] --> B["2. Heatsink on the HAT"]
B --> C["3. Fit the four spacers"]
C --> D["4. Seat the stacking header"]
D --> E["5. Ribbon cable to the Pi 5"]
E --> F["6. Mount the HAT"]
F --> G["7. Ribbon cable to the HAT"]
The stacking header, spacers and screws are designed so the HAT fits with the Active Cooler still installed.
The software docs say to attach the camera before the AI hardware, and that a supported camera such as Camera Module 3 is recommended. Connect it to one of the Pi 5’s camera ports using the correct cable for the Pi 5.
If the Pi is going to live on a robot, check that nothing on the chassis presses on the ribbon cable, and think about airflow. The fan needs somewhere to breathe, and so does the heatsink.
Problem: The cable will not go in. Solution: Slide the retaining clip fully open first, and check the metal contacts face the right way. Why: The connector only accepts the cable one way round.
Problem: The HAT is not detected later. Solution: Power off and reseat both ends of the ribbon cable. Why: A cable that is not fully seated is a common cause of a missing PCIe device.
Comments