When you purchase through links on our site, we may earn an affiliate commission. Here’s how it works.
Raspberry Pi HATs let you add lights, motors, sensors and more. Lgbt Pin

The Raspberry Pi is an awesome platform for learning and experimentation. In its first 11 years it has helped many users learn to code, build robots and monitor the location of the International Space Station (they've even been onboard the ISS!), and so much more. But to make the most of the Pi, it helps to have the right expansion board. Originally the Raspberry Pi didn't have a standard definition for boards. The first official expansion, 2012's GertBoard was larger than the Pi itself. But all this changed when the HAT (hardware attached on top) standard was introduced along with the Raspberry Pi B+ in 2014. It provided a standardized means, similar to Arduino's Shields, to connect the Raspberry Pi’s set of 40 GPIO pins (increased from 26 to 40 with the B+) to add-ons providing functionality such as lights, motors, sensors and fans without a mess of wires. The HAT standard follows a similar standard used by Arduino boards, where they are called "shields". HATs are an easy way to add extra features without connecting a mess of wires.
There are hundreds, if not thousands of Raspberry Pi HATs on the market and most of them will work with any model of Pi that has 40 pins, which is every model launched from 2014, though you’ll need to attach the GPIO pins to the Pi Zero. If you intend to use a HAT with the Raspberry Pi 400 then you will also need a breakout connector, such as Pimoroni's Flat HAT Hacker HAT. If you are feeling adventurous, you can even use some HATs with the original 26 pin GPIO models of Raspberry Pi or the Raspberry Pi Pico W. Other Raspberry Pi alternative boards may claim compatibility with HATs, but do your research before connecting as you may inadvertently damage the boards.
To help you choose, we’ve listed the best Raspberry Pi HATs that we have personally tested, grouped by their use case. These expansion boards can be used for everything from general learning to implementing A.I. via Machine Learning. Or you could just build your own Raspberry Pi powered robot to explore the world around us.
Why you can trust Tom's Hardware Our expert reviewers spend hours testing and comparing products and services so you can choose the best for you. Find out more about how we test.
When buying a Raspberry Pi HAT, ask yourself these questions:
Best Raspberry Pi HATs at a glance:
Taking over from Pimoroni’s Explorer HAT Pro is a tough task, but this little board does an excellent job of incorporating lots of features into a small package.
Providing connections for up to four servos, two DC motors (via a DRV8833 motor controller), eight tiny, but bright RGB “NeoPixel” LEDs and an audio connection, this little board is packed full of fun.
All of this hardware is nothing without a companion software package and Pimoroni has stepped up to the plate and delivered. The Python module is easy to use and abstracts away the complexities of controlling the various forms of hardware.
The Inventor HAT Mini is a great board at a low price. Well worth your time and money.
MORE: Pimoroni Inventor HAT Mini Review
Merging Lego and Raspberry Pi together is a genius idea. Build HAT works with all 40-pin models of Raspberry Pi and it enables the use of LPF2 components, such as motors and sensors from the Spike, Mindstorms and Technic range of kits.
With four LPF2 connectors, we can easily add a combination of Lego components to build robots and elaborate sensor-controlled devices. When we tested Build HAT we found that the accompanying Python library abstracts the complexities of using the components, providing a frictionless approach to Python powered Lego projects. This is a great board to introduce coding concepts to children who have grown past block based coding, as the use of Lego provides a familiar construction material.
Read: Raspberry Pi Build HAT Review
Whether you need more GPIO pins or your project needs analog inputs, the IO Expander from Pimoroni is a cost effective and simple means to do just that for $10. The IO Expander provides up to 14 extra GPIO pins, with all offering digital input / output, six with PWM (Pulse Width Modulation), useful for precise control of motors, and eight analog inputs to be used with electronic components such as potentiometers.
The Pimoroni IO Expander is not a typical add on board for the Raspberry Pi. Measuring a mere 1 x 0.9 inch (25 x 23mm) the board has only five connections which are made to the GPIO. The need for so few connections is due to the IO Expander using I2C, a two wire serial communication protocol. These five pins can be soldered to using the included male / female header pins, then placed atop the I2C pins of the GPIO. This design is not accidental, rather it is deliberate as the IO Expander is part of Pimoroni’s Breakout Garden range of boards.
There is nothing not to like about the Pimoroni IO Expander, which is small in size but big in features and it should be in the bits box of every Raspberry Pi enthusiast.
If you want to build a retro arcade machine, complete with an arcade joystick and buttons, the Pimoroni Picade X HAT is the board to get. The X HAT has all the connectors you need to attach one joystick, and up to 12 buttons, including those for functions such as adding a coin or 1UP button.
The added “Hack Header” provides a connection to the I2C interface, handy for adding extra components. Picade X HAT also provides sound using an I2S interface via the GPIO and a 3W mono amplifier outputs the audio to an external speaker (sold separately). The Picade X HAT has a USB port that it uses to provide power both to the Pi itself and to any speakers.
The latest version of the Picade X HAT uses a Type-C connector, which means that it provides enough juice to power either a Raspberry Pi 4 or an earlier model. Older versions of the X HAT, which may still be on sale, use a microUSB connector that only has enough juice for a Pi 3 or earlier.
After you install a one-line script, the Picade X HAT works flawlessly in popular emulation platforms such as RetroPie and Lakka, both of which see it as a keyboard where you just assign each button to a function (like you’d assign a keyboard key).
One potential issue with the Picade X HAT is that, because gaming puts a load on your processor and the board covers your CPU, it can trap in heat, which is a particular problem for Raspberry Pi 4s. If you use a stacker to raise the height, you can put a fan or heat sink below it.
Despite being over five years old, Sense HAT is still the best all-around Raspberry Pi HAT for learning. Featuring onboard temperature, humidity, air pressure, accelerometer, gyroscope and magnetometer sensors can be used in science experiments via Python and Scratch. A joystick and 8 x 8 LED matrix can be used to make and control simple games.
If you’re working with kids or just want to have fun getting started with a Pi, the Sense HAT should be at the top of your shopping list. The amount of learning offered by this board is superb. Two Sense HATs live aboard the International Space Station and every year students compete to have their code run on it . . . from the AstroPi, a Raspberry Pi in space.
The I2C interface is hidden as part of the Raspberry Pi GPIO. It is an alternative configuration of the standard GPIO and it offers advanced users a four wire interface for multiple devices, connected in a chain. Breakout Garden is a Raspberry Pi HAT which offers a simple means to connect I2C devices.

Enamel Pin Hard Custom Additional breakout boards, ranging from LED matrices to air quality sensors and thermal cameras slot into one of the six slots and can be easily used thanks to a custom Python 3 library. This is a highly configurable and simple to use base for citizen science projects.