What is a Raspberry Pi HAT? What is it Used for?

The HAT can enhance the capabilities of your Raspberry Pi. Learn more about them in this article.
Warp Terminal

When you first get your Raspberry Pi, you essentially have a powerful little computer with the basics needed to operate.

But what if you want to expand its potential?

That’s where HATs come in.

What's a HAT?

HAT stands for Hardware Attached on Top, and it's an add-on board designed to sit perfectly on top of your Raspberry Pi.

HATs provide a neat, standardized way to expand your Raspberry Pi’s capabilities with things like displays, sensors, audio controllers, and even NVMe storage on Pi 5.

They were created to solve that problem by offering a standardized solution that makes hardware tinkering as accessible as software development. Think of them as equivalent to browser plugins or GNOME extensions.

The introduction of HATs allowed people to focus more on the fun part like building projects, rather than spending time on tedious setups.

You want to use Pi as NAS? Get a SATA HAT and focus on getting your NAS ready instead of figuring out how you will connect four SATA HDDs to the Pi.

SATA NAS HAT for Raspberry Pi
A SATA HAT to easily let you run a NAS on your Raspberry Pi

We reviewed a Raspberry Pi-based dog kit earlier. That, too, was using a custom HAT developed by the kit maker.

Raspberry Pi HATs are also electrically safe, meaning they come with an EEPROM chip that tells your Pi what hardware is connected, reducing the chances of frying your board accidentally.

πŸ“‹
Basically, a HAT (Hardware Attached at Top) is a "hardware extension" you can attach to the Raspberry Pi to achieve things like adding a NVMe SSD, run a NAS, use sensors, etc.

Assembly?

Putting your HAT on your Raspberry Pi is as easy as pie! ;)

Just align the pins on the HAT with the ones on your Pi, gently press them together, and that's it! It's like snapping a puzzle piece into place.

No soldering or complicated wiring required. Once it's connected, your Pi will automatically recognize the HAT and you're ready to start exploring its new functionalities.

Apologies for the cringe-worthy image, but it was necessary to illustrate the point

Official Raspberry Pi HATs

Here are a few HATs Raspberry Pi have launched:

Raspberry Pi M.2 HAT+

Source: Raspberry Pi

The Raspberry Pi M.2 HAT+ allows you to connect M.2 peripherals like NVMe drives and AI accelerators to your Raspberry Pi 5.

This enables fast data transfer speeds of up to 500 MB/s. It supports devices with the M key edge connector in the 2230 and 2242 form factors.

The HAT can provide up to 3A of power to connected devices. It is auto detected by the latest Raspberry Pi software/firmware and can be easily installed using the provided stacking header and threaded spacers.

PoE+ HAT

Source: Raspberry Pi

The Raspberry Pi PoE HAT enables your Raspberry Pi to receive power through its Ethernet port, eliminating the need for a separate power supply.

It is compatible with Raspberry Pi 4 and Raspberry Pi 3B+. You'll need a PoE+ power-sourcing equipment to use this HAT.

πŸ“‹
While there isn't an official Raspberry Pi PoE HAT for the Raspberry Pi 5 yet, you might consider the Waveshare PoE HAT as a potential alternative.

Sense HAT

Source: Raspberry Pi

The Sense HAT is an add-on board that provides your Raspberry Pi with sensors for monitoring pressure, humidity, temperature, color, orientation, and movement.

It also features an LED matrix for visualizing data and a joystick for user interaction.

Raspberry Pi DAC+

Source: Raspberry Pi

The Raspberry Pi DAC+ is a high-quality audio HAT that connects directly to your Raspberry Pi's GPIO header.

It provides stereo analog audio output and is compatible with all Raspberry Pi models with a 40-pin GPIO header.

Unofficial Raspberry Pi HATs

Let me list some other HATs that are not developed by Raspberry Pi but you can use them with your Pi devices.

Inventor HAT Mini

Image Source: PIMORONI

Inventor HAT Mini is a versatile expansion board for your Raspberry Pi. It simplifies the process of adding motors, servos, sensors, and LEDs to your projects.

With its pre-soldered headers, Qw/ST connector, and Python library, you can quickly and easily create interactive and engaging projects.

Whether you're building a robot, a kinetic sculpture, or a custom automation, Inventor HAT Mini provides the necessary tools to bring your ideas to life.

Picade X HAT USB-C

Image Source: PIMORONI

It transforms your Raspberry Pi into a retro gaming console. With built-in joystick and button inputs, a 3W I2S DAC/amplifier, and a soft power switch, it's the perfect solution for DIY arcade cabinet builds.

It's Raspberry Pi 4 and features a convenient USB-C power connector.

Simply plug in your power supply, connect your controls, and install our driver to start enjoying classic games on your Raspberry Pi.

Adafruit BrainCraft HAT - Machine Learning for Raspberry Pi 4

Image Source: Adafruit

The BrainCraft HAT for Raspberry Pi is designed for building edge-based machine learning projects with microcontrollers and microcomputers.

It features a 240Γ—240 TFT IPS display for inference results, a camera connector for imaging projects, dual microphones, stereo audio output, and a joystick for input control.

With its DotStar RGB LEDs, STEMMA connectors for servos or NeoPixels, and a fan for cooling during intensive tasks, it's ideal for audio/video AI projects.

Google Voice Kit (V1)

Image Source: Google

The Google Voice Kit v1 allows you to create a natural language recognizer and connect it to Google Assistant using the AIY Projects voice kit.

With this kit, you can add custom question-and-answer interactions alongside everything Google Assistant already offers, all packed into a neat cardboard cube powered by Raspberry Pi.

The kit includes a Voice HAT board, a microphone board, a speaker, an arcade-style push button, and essential cables, making it easy to build your own voice-controlled assistant.

If you don't have the kit, you can still integrate Google Assistant using the official SDK.

Cooling HAT with OLED Display

Raspberry Pi HAT with OLED display

Available for Pi 4 and Pi 3, this cooling fan HAT comes with OLED display to show the CPU and RAM usage and CPU temperature. This increases the usability in my opinion.

More than just a HAT. Pironman is an awe-inspiring case of your Raspberry Pi. You get a NVMe SSD slot, proper HDMI slots and more.

Pironman 5 Case With Tower Cooler and Fan

This dope Raspberry Pi 5 case has a tower cooler and dual RGB fans to keep the device cool. It also extends your Pi 5 with M.2 SSD slot and 2 standard HDMI ports.

Explore Pironman 5

Final Thoughts

HATs are a fantastic way to expand your Raspberry Pi's capabilities, but they're not a one-size-fits-all solution.

Before adding a HAT to your setup, carefully consider your project's specific requirements, the compatibility of the HAT with your Pi model, and the potential trade-offs in terms of power consumption and physical size.

The possibilities are endless with HATs. So, what will you create next?

About the author
Abhishek Kumar

Abhishek Kumar

I'm definitely not a nerd, perhaps a geek who likes to tinker around with whatever tech I get my hands on. Figuring things out on my own gives me joy. BTW, I don'tΒ useΒ Arch.

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world

itsfoss happy penguin

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.