---
title: "Get started with AI HAT+"
description: "Mount the AI HAT+ on a Raspberry Pi 5, install the DEEPX runtime, check the driver and firmware versions, and run a YOLOv5 detection demo on the NPU."
url: "https://docs.sixfab.com/edge-ai/ai-hat-plus/quickstart/"
last_updated: "2026-10-12"
---

# Get started with AI HAT+

Mount the AI HAT+ on a Raspberry Pi 5, install the DEEPX runtime, check the driver and firmware versions, and run a YOLOv5 detection demo on the NPU.

**Works with:** [AI HAT+](https://docs.sixfab.com/edge-ai/ai-hat-plus/) on Raspberry Pi 5

## Before you begin

**Required**

**Hardware**

- **Raspberry Pi 5**: 4 GB RAM or more. See [Compatibility](https://docs.sixfab.com/edge-ai/ai-hat-plus/#compatibility).
- **USB-C PD power supply, 27 W or more**: The official Raspberry Pi 27 W or 45 W supply. The Raspberry Pi 5 and AI HAT+ draw 13 to 15 W during inference; a 15 W supply causes under-voltage warnings.
- **Display, micro HDMI to HDMI cable, USB keyboard and mouse**: For the Raspberry Pi desktop, where the first inference opens its window. VNC works instead.
- **Raspberry Pi Active Cooler(Optional)**: Recommended. Keeps the Raspberry Pi 5 CPU from throttling under sustained load.
- **USB or CSI camera(Optional)**: The demo also runs on a video file.

**Software**

- **microSD card with Raspberry Pi OS (Trixie, 64-bit)**: Internet access is needed during the runtime install.

*The kit laid out: the AI HAT+ with its FFC cable connected, the 16 mm stacking header, four M2.5 × 16 mm spacers, eight M2.5 × 5 mm screws and the heatsink.*

**In the box** (6 parts)

- 1× **AI HAT+ board**: DEEPX DX-M1M NPU, 16-pin PCIe FFC connector, HAT+ ID EEPROM. The FFC cable comes connected to it.
- 1× **PCIe FFC cable, 16-pin**: Carries the PCIe link from the Raspberry Pi 5 to the AI HAT+.
- 1× **Stacking header, 16 mm**: 2 × 20 female, 2.54 mm pitch. Raises the GPIO connection to the AI HAT+.
- 4× **M2.5 × 16 mm spacer**: Female to female. Hold the AI HAT+ level and take the screw load off the header.
- 8× **M2.5 × 5 mm plastic screw**: Four fasten the spacers from below, four fasten the AI HAT+ from above.
- 1× **Passive heatsink**: With thermal pad, for the DEEPX DX-M1M NPU.

**Not included:** Raspberry Pi 5, power supply, microSD card, display, micro HDMI cable, keyboard and mouse, Active Cooler, camera.

## Assemble hardware

> [!WARNING]
> **Power off Raspberry Pi 5**
>
> The AI HAT+ is not hot-pluggable. Disconnect the USB-C supply before mounting or removing the board; mounting under power can damage the FFC connector, the NPU, or the Raspberry Pi 5.

1. **Fit spacers**

   Fasten the four M2.5 × 16 mm spacers to the Raspberry Pi 5 mounting holes with four M2.5 × 5 mm screws from below.

   - 4× M2.5 × 16 mm spacer
   - 4× M2.5 × 5 mm screw

   *Four spacers move down onto the Raspberry Pi 5 mounting holes while four screws come up through the holes from below.*

2. **Fit stacking header**

   Press the 16 mm stacking header fully onto the 40-pin GPIO header. The header carries the 3.3 V and 5 V rails and the I²C ID lines to the AI HAT+.

   The header body does not reach the AI HAT+. The board rests on the spacers, and the gap lets air flow between the two boards.

   - 1× Stacking header, 16 mm

   *The stacking header moves down onto the 40-pin GPIO header of the Raspberry Pi 5 and is pressed fully home.*

3. **Connect PCIe cable**

   The FFC cable comes connected to the AI HAT+. Pull up the latch on the Raspberry Pi 5 PCIe connector. Hold the AI HAT+ upright over the left end of the Raspberry Pi 5, insert the free end of the cable, marked `RPi5`, fully into the connector from above, and press the latch down.

   A reversed or partly inserted cable gives no PCIe link, and the NPU does not appear.

   - 1× AI HAT+ with FFC cable

   *The AI HAT+ is held upright over the left end of the Raspberry Pi 5 and the free end of its FFC cable goes down into the PCIe connector. A close-up shows the latch pulled up, the cable pushed fully in and the latch pressed down.*

4. **Seat board**

   Fold the AI HAT+ over onto the Raspberry Pi 5. Align its header with the stacking header and press the board straight down until it rests on the spacers. The cable curves at the left end, with the Sixfab logo facing out.

   *The AI HAT+ folds over onto the Raspberry Pi 5 and is pressed straight down onto the stacking header and the four spacers; the FFC cable bends at the left end, its Sixfab logo facing out.*

5. **Fasten board**

   Fasten the AI HAT+ to the spacers with the other four M2.5 × 5 mm screws from above.

   - 4× M2.5 × 5 mm screw

   *Four screws go down through the AI HAT+ mounting holes into the spacers and are turned in.*

6. **Fit heatsink (recommended)**

   Peel the film off the thermal pad, place the heatsink on the NPU as shown, and press evenly so the pad makes full contact.

   - 1× Heatsink

   *The protective film peels off the thermal pad, then the heatsink moves down onto the NPU and is pressed evenly.*

7. **Connect display, keyboard and mouse**

   Connect a display to HDMI0, the micro HDMI port next to the USB-C power port, with a micro HDMI to HDMI cable. Connect a USB keyboard and mouse, or their wireless receiver, to the USB ports.

   - 1× Display with a micro HDMI to HDMI cable
   - 1× USB keyboard
   - 1× USB mouse

   *The display's micro HDMI cable goes into the micro HDMI port next to the USB-C power port, and the USB cables of the keyboard and the mouse go into the USB ports on the right end of the Raspberry Pi 5.*

8. **Connect power**

   Connect the USB-C supply to the Raspberry Pi 5. On first power-up the AI HAT+ LED lights white briefly, then turns off. This is normal. See [LED indicators](https://docs.sixfab.com/edge-ai/ai-hat-plus/hardware-reference/specifications/#led).

   - 1× USB-C power supply, 27 W or more

   *The USB-C cable goes into the Raspberry Pi 5 power port. The AI HAT+ LED lights white for a moment, then turns off.*

> [!WARNING]
> **Finger-tight only**
>
> Tighten spacers and screws by hand. The threads are in the spacers; over-tightening strips them, and the spacer has to be replaced.

## Install runtime

Let the Raspberry Pi 5 boot and open a terminal. Add the Sixfab APT repository and install `sixfab-dx`:

```bash
sudo apt update
sudo apt install apt-repo-sixfab
sudo apt update && sudo apt install sixfab-dx
```

The package installs the kernel driver, the DEEPX runtime, and the tools `dxrt-cli`, `dxtop`, and `run_model`. The driver is built for the running kernel, so the first install takes 5 to 10 minutes.

> [!NOTE]
> **Dependency warnings**
>
> pip dependency warnings at the end of the install are not errors. The install succeeded when the output ends with `DEEPX Runtime installed successfully!` If another Python package needs a different version, upgrade or downgrade it with `pip`.

![Terminal output with pip dependency resolver errors followed by DEEPX Runtime installed successfully!](https://docs.sixfab.com/wp-content/uploads/sixfab-docs/image_8.png)

*pip dependency warnings, then the success line.*

## Enable PCIe Gen 3

The Raspberry Pi 5 runs the PCIe link at Gen 2 by default. Gen 3 gives the NPU more bandwidth and is recommended. Skip this section if `dxrt-cli -s` already reports `Gen3 X1`.

Open the boot configuration file:

```bash
sudo nano /boot/firmware/config.txt
```

Add these lines to the end of the file:

```text filename="/boot/firmware/config.txt"
dtparam=pciex1
dtparam=pciex1_gen=3
```

Save the file and reboot:

```bash
sudo reboot
```

## Verify installation

Check that the NPU is on the PCIe bus, then print the device status:

```bash
lspci | grep -i deepx
dxrt-cli -s
```

The report should show these values:

| Field | Expected | Meaning |
| --- | --- | --- |
| Device 0 | M1, Accelerator type | DEEPX M1 NPU, matches your DX-M1M |
| RT Driver version | v2.7.0 or newer | Runtime kernel driver |
| PCIe Driver version | v2.7.0 or newer | PCIe kernel driver |
| FW version | v2.7.6 or newer | Firmware on the NPU |
| PCIe | Gen3 X1 | Gen 2 until PCIe Gen 3 is enabled |
| NPU cores | 3 cores, 750 mV, 1000 MHz | Idle temperature about 43 to 55 °C at room temperature |

> [!NOTE]
> **Versions must match**
>
> The driver, runtime, and NPU firmware have separate version numbers. A mismatch causes version errors when a `.dxnn` file is loaded, a silent fallback to the CPU, or unstable inference.

## Run first inference

`sixfab-dx` includes a pre-compiled YOLOv5 detection demo. It opens a window, so run it on the Raspberry Pi desktop (monitor or VNC), not over SSH:

```bash
run_hello_world
```

The window shows the video with a box and label on each detected object. The model runs on the NPU, not on the CPU.

![YOLOv5 detection output window on Raspberry Pi with car, traffic light and person boxes on a street video](https://docs.sixfab.com/wp-content/uploads/sixfab-docs/run-hello-world.jpg)

*YOLOv5 detection running on the NPU.*

To see NPU load, temperature, voltage, and clock, run `dxtop` in a second terminal. Press <kbd>q</kbd> to quit.

```bash
dxtop
```

## Troubleshooting

### `lspci` lists no DEEPX device

Power off, reinsert the FFC cable at the Raspberry Pi 5 end with the latch fully closed, and power on. If the device is still missing, check that the kernel module is loaded (`lsmod | grep -i dx`) and look for driver errors (`dmesg | grep -i dx`). See [Troubleshooting](https://docs.sixfab.com/edge-ai/ai-hat-plus/troubleshooting/).

### `dxrt-cli -s` reports Gen 2

Check the two `dtparam` lines in `/boot/firmware/config.txt` and reboot.

### Version-mismatch error when loading a `.dxnn` file

The NPU firmware is older than the runtime expects. Update it with `dxrt-cli -u fw.bin`. See [FAQ](https://docs.sixfab.com/edge-ai/ai-hat-plus/faq/): How do I receive SDK and driver updates?

## Next steps

- [Sixfab Model Zoo](https://docs.sixfab.com/edge-ai/ai-model-deployment/sixfab-model-zoo/): Pre-compiled DXNN models for detection, classification, segmentation, and pose, with FPS on the AI HAT+.
- [Deployment workflow](https://docs.sixfab.com/edge-ai/ai-model-deployment/custom-models-dxnn-sdk/workflow/): Compile your own model from ONNX to DXNN.
- [System monitoring](https://docs.sixfab.com/edge-ai/ai-model-deployment/system-monitoring/): NPU load, temperature, voltage, clock, and memory with `dxrt-cli` and `dxtop`.
