The Raspberry Pi AI HAT+ (26T) is an advanced add-on board designed to bring artificial intelligence (AI) capabilities to Raspberry Pi projects. Manufactured by Raspberry Pi, this HAT features a high-performance neural processing unit (NPU) optimized for machine learning tasks, enabling real-time AI inference on edge devices. It also includes GPIO pins for seamless integration with sensors, actuators, and other peripherals, making it ideal for AI-driven IoT applications.
The Raspberry Pi AI HAT+ (26T) is packed with features to support a wide range of AI and machine learning applications. Below are the key technical details:
Parameter | Value |
---|---|
Manufacturer | Raspberry Pi |
Part ID | AI HAT+ |
Neural Processing Unit | 1 TOPS (Tera Operations Per Second) |
GPIO Compatibility | 40-pin Raspberry Pi GPIO header |
Power Supply | 5V DC (via Raspberry Pi GPIO or USB-C port) |
Operating Temperature | -20°C to 70°C |
Dimensions | 65mm x 56mm x 15mm |
The AI HAT+ connects to the Raspberry Pi via the standard 40-pin GPIO header. Below is the pin configuration for the HAT:
Pin Number | Pin Name | Description |
---|---|---|
1 | 3.3V Power | Power supply for the HAT |
2 | 5V Power | Main power input for the HAT |
3 | GPIO2 (SDA1) | I2C Data Line |
5 | GPIO3 (SCL1) | I2C Clock Line |
7 | GPIO4 | General-purpose input/output |
8 | GPIO14 (TXD) | UART Transmit |
10 | GPIO15 (RXD) | UART Receive |
12 | GPIO18 (PWM0) | Pulse-width modulation output |
16 | GPIO23 | General-purpose input/output |
18 | GPIO24 | General-purpose input/output |
20 | GND | Ground |
22 | GPIO25 | General-purpose input/output |
40 | GPIO21 (SDA3) | I2C Data Line (alternative) |
sudo apt update && sudo apt upgrade
sudo apt install ai-hat-plus-sdk
Below is an example Python script to perform object detection using the AI HAT+:
from ai_hat_plus import AIHAT import cv2
ai_hat = AIHAT()
model_path = "/home/pi/models/object_detection.tflite" ai_hat.load_model(model_path)
camera = cv2.VideoCapture(0)
while True: # Capture a frame from the camera ret, frame = camera.read() if not ret: print("Failed to capture frame. Exiting...") break
# Perform object detection
results = ai_hat.run_inference(frame)
# Display results on the frame
for obj in results:
# Draw bounding boxes and labels
x, y, w, h = obj['bbox']
label = obj['label']
confidence = obj['confidence']
cv2.rectangle(frame, (x, y), (x+w, y+h), (0, 255, 0), 2)
cv2.putText(frame, f"{label} ({confidence:.2f})", (x, y-10),
cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0, 255, 0), 2)
# Display the frame
cv2.imshow("Object Detection", frame)
# Exit on pressing 'q'
if cv2.waitKey(1) & 0xFF == ord('q'):
break
camera.release() cv2.destroyAllWindows()
HAT Not Detected:
High Temperature:
Model Incompatibility:
Power Issues:
Q: Can I use the AI HAT+ with Raspberry Pi Zero?
A: Yes, but performance may be limited due to the lower processing power of the Raspberry Pi Zero.
Q: What is the maximum model size supported?
A: The AI HAT+ supports models up to 512MB in size.
Q: Does the HAT support multiple camera inputs?
A: No, the HAT supports a single camera input via the Raspberry Pi's camera interface.
Q: Can I use the HAT for training models?
A: No, the HAT is designed for inference only. Use a more powerful system for training.
This concludes the documentation for the Raspberry Pi AI HAT+ (26T). For further assistance, refer to the official Raspberry Pi documentation or community forums.