Raspberry Pi – Add-on Boards (HATs & Extensions) (2025 Expansion Guide)


Introduction – Unlock New Features with Raspberry Pi HATs

Add-on boardsβ€”commonly known as HATs (Hardware Attached on Top)β€”extend the capabilities of your Raspberry Pi far beyond the GPIO pins. These stackable hardware modules allow for plug-and-play access to sensors, displays, motors, audio, power control, and moreβ€”without complex wiring.

In this guide, you’ll learn:

  • What HATs and pHATs are and how they work
  • Popular categories of Raspberry Pi extensions
  • How to install and configure HATs
  • Project examples using common HATs and expansion boards

What Is a HAT (Hardware Attached on Top)?

A HAT is an officially recognized add-on board that:

  • Connects via the 40-pin GPIO header
  • Includes an EEPROM to auto-configure drivers
  • Matches the Raspberry Pi’s form factor

Related Terms:

Term Description
HATFull-size board for standard Pi models
pHATβ€œPartial HAT” for Pi Zero form factor
BonnetAdafruit’s name for compact add-on boards
ShimThin boards with minimal soldering needed

Installing HATs – Quick Steps

  1. Power off your Raspberry Pi
  2. Carefully align the HAT pins with the 40-pin GPIO header
  3. Press the HAT firmly onto the GPIO header
  4. Power on the Raspberry Pi
  5. If it has an EEPROM, it may auto-load required drivers

Some boards require additional librariesβ€”check the HAT’s documentation.


Popular Types of Raspberry Pi Add-on Boards

Category Example HATs Use Case
Motor ControlAdafruit DC & Stepper HAT, Pimoroni Automation HATControl DC/stepper motors, relays
DisplaysPiTFT, OLED Bonnet, Unicorn HAT HDAdd touchscreens, RGB matrices
SensorsEnviro+, Sense HAT, BME688 HATEnvironmental data, temp, humidity
Sound/AudioDAC HAT, Audio Injector, HiFiBerryAudio output, recording, speaker control
NetworkingPoE HAT, LTE/NB-IoT HATAdd LTE, 4G, PoE Ethernet
Power ManagementPiJuice HAT, UPS HAT, LiFePO4wered/PiBattery, UPS, solar-powered systems
PrototypingGPIO Extender HAT, Cobbler, Proto HATEasier GPIO testing and custom circuits
AI & VisionGoogle Coral Edge TPU, Pi AI Kit, ReSpeaker Mic HATOn-device AI, voice processing, ML tasks

Example 1: Sense HAT (Sensors + LED Matrix)

Features:

  • Temperature, pressure, humidity, gyroscope
  • 8Γ—8 RGB LED matrix
  • Joystick input

Python Example:

from sense_hat import SenseHat

sense = SenseHat()
sense.show_message("Hello!", scroll_speed=0.08)

temp = sense.get_temperature()
print(f"Temperature: {temp:.2f} Β°C")

Ideal for educational projects, data logging, and space simulation.


Example 2: Motor HAT with Stepper Motor

Python Example:

from adafruit_motorkit import MotorKit
import time

kit = MotorKit()

# Run motor forward
kit.stepper1.onestep()
time.sleep(0.5)

# Reverse
kit.stepper1.onestep(direction=kit.stepper1.BACKWARD)

Control robotics, smart cars, conveyor systems.


Power HAT – UPS or PiJuice Setup

Feature Use
Battery backupPrevent SD card corruption on power loss
Safe shutdownAuto-off when battery is low
I2C interfaceMonitor battery level
Solar charging supportSustainable power for outdoor IoT setups

Add pijuice software for battery monitoring via Python.


Tips for Using Multiple HATs

  • Use GPIO stacking headers if you need more than one board
  • Check for GPIO pin conflicts (e.g., I2C, SPI, UART usage)
  • Consider I2C multiplexers for multiple sensors of the same type
  • Use Proto HATs to combine custom electronics with standard boards

Summary – Recap & Next Steps

HATs and add-on boards allow Raspberry Pi to grow into specialized rolesβ€”from IoT sensors to motor controllers, audio hubs, and vision systems.

Key takeaways:

  • HATs connect via GPIO and expand your Pi’s hardware capabilities
  • Sense HAT, DAC HAT, Motor HAT, and PoE HAT are popular examples
  • Always check for GPIO conflicts when stacking boards
  • Many HATs come with Python libraries for easy programming

Real-world relevance: Power your robot, build a weather station, run a UPS, or control motorsβ€”all with the right add-on.


FAQs – Raspberry Pi Add-on Boards (HATs)

Can I stack multiple HATs on one Raspberry Pi?

Yes, but only if there’s no pin conflict and you use stacking headers or I2C expansion logic.


What’s the difference between HAT and pHAT?

HATs follow the full-size Raspberry Pi form factor; pHATs are smaller and designed for Pi Zero models.


Do all HATs require software drivers?

Most come with Python libraries or kernel modules. Some (like Proto HATs) are passive.


Can I create my own HAT?

Yes. Use a Proto HAT board or custom PCB, and optionally include an EEPROM for driver auto-detection.


Will HATs work on Pi 5 and Pi Zero?

Yesβ€”most HATs use standard 40-pin GPIO headers, compatible across all modern Raspberry Pi boards.


Share Now :
Share

πŸ”Œ Raspberry Pi – Add-on Boards (HATs & Extensions)

Or Copy Link

CONTENTS
Scroll to Top