Field Guide · hardware

Also known as: HAT, Hardware Attached on Top

A HAT (Hardware Attached on Top) is an add-on board that stacks onto a Raspberry Pi’s GPIO header to add hardware.1

HAT board EEPROM socket 40-pin header Raspberry Pi standoffs
A HAT drops onto the Pi's 40-pin header with corner standoffs holding it rigid; an onboard EEPROM identifies the board so the Pi can auto-configure the right pins the moment it powers up.

Overview

The HAT specification fixes the board size, mounting-hole positions, and 40-pin connector so add-ons fit predictably, and a small EEPROM on the HAT can identify itself so the Pi auto-configures the right pins at boot. That self-identification is the part that makes a HAT more than a generic daughterboard: the Pi reads the EEPROM, learns which pins the HAT drives, and applies the correct device-tree overlay without the user editing config files.

Typical HATs add displays, sensors, real-time clocks, motor drivers, power management, GPS, or radios — often talking to the Pi over I2C or SPI so they consume only a couple of the header’s pins for data. Other SBCs use similar stackable add-ons under different names (capes on the BeagleBone, for example), but the Raspberry Pi HAT is the most widely supported ecosystem.

Anatomy of the standard

Element What the spec fixes Why it matters
Form factor Board outline, mounting holes HATs and cases fit any Pi
Connector 40-pin GPIO header Consistent electrical pinout
EEPROM ID + pin configuration Pi auto-sets up the board
Data link Usually I2C / SPI Few pins, many peripherals
Power Feeds from the Pi’s rails No separate supply needed

Where it fits

A HAT is the quickest way to extend a board without designing your own electronics — a middle ground before committing to a custom carrier for a Compute Module. For GopherTrunk, a HAT can supply the parts a bare Pi lacks at the antenna: a real-time clock for accurate timestamps when the network is down, a fan and power controller for a sealed enclosure, or a GPS HAT that feeds a pulse-per-second signal in for precise timing on a capture node. Because HATs stack, one can carry several of these at once.

Sources

  1. Raspberry Pi HATs — Wikipedia, on the HAT add-on board standard. 

See also