• Sat. Dec 9th, 2023

North East Connected

Hopping Across The North East From Hub To Hub

Wherever I lay my HAT: a beginner’s guide to Raspberry Pi HATs

ByDave Stopher

Jun 6, 2023

There’s a lot to like about the Raspberry Pi. Once you have attached an array of carefully selected add-ons to the Pi, you can program this microcomputer to do many different things with them. 

Nonetheless, if you are a complete beginner to using the Raspberry Pi, you could understandably be confused by a lot of the jargon surrounding it. One good example is the term ‘HAT’ — which, as the Raspberry Pi Foundation explains, means ‘Hardware Attached on Top’. 

Tom’s Hardware reports that, as of 2023, there are “hundreds, if not thousands of Raspberry Pi HATs on the market”. What exactly are Raspberry Pi HATs, and how could they potentially benefit Pi-based creations of your own? 

Why was the Raspberry Pi HAT concept introduced?

Electro Schematics states: “When the original Raspberry Pi was released in early 2012, it came with a 26-pin GPIO output. User access to GPIO redefined the usefulness of a single-board computer.” 

Raspberry Pi users were able to wire projects up by connecting standard jumper wires to this GPIO (General Purpose Input/Output) interface. However, this was not exactly the most intuitive procedure, and so numerous add-on boards were introduced by third-party companies. 

Otherwise known as ‘capes’, these boards basically simplified the process of bringing fresh, in-depth functionality to the Pi, as they enabled makers to add the likes of buttons, sensors, LEDs, LCDs and microcontrollers with ease. 

The Raspberry Pi Foundation itself went even further with the core of this idea when introducing the Raspberry Pi B+ in 2014. To be more specific, the B+ was made to be compatible with a new type of add-on board referred to as a HAT. 

How does a Raspberry Pi HAT function?

The Raspberry Pi Foundation has explained that this HAT “conforms to a specific set of rules that will make life easier for users”. A HAT-ready Pi can “identify a connected HAT and automatically configure the GPIOs and drivers for the board, making life for the end user much easier.” 

A HAT is of a rectangular shape measuring 65mm by 56mm and, in its rounded corners, has four mounting roles that align with those on a Pi. Hence, a HAT is easy to connect to a Raspberry Pi not only in a technological sense but also physically. 

What HATs should you choose for your Raspberry Pi projects?

Of course, the answer to this question will very much depend on what exactly those projects entail. However, with each of them, another factor — at least to a certain extent — will be the specific Raspberry Pi model you have decided to use. 

For example, if you are looking to build something with the Raspberry Pi Zero W, one good idea could be for you to consider buying a ‘pHAT’ — that is, a smaller kind of Raspberry Pi HAT designed for the Zero W’s size, which is modest even by the usual Raspberry Pi standards. 

The Pi Hut’s Raspberry Pi Store offers an enticing selection of pHATs for you to peruse online and consider for your Pi creations.