We use some essential cookies to make our website work.

We use optional cookies, as detailed in our cookie policy, to remember your settings and understand how you use our website.

Build HAT

By Ben Everard. Posted

This article was originally published as part of HackSpace magazine, which has since been incorporated into Raspberry Pi Official Magazine.

Build HAT

LEGO® has introduced generations of children to making. The little blocks slot together in almost endless possibilities and, if you add in mechanical components from Technic sets, you can create some complex builds.
Through the years, LEGO® has built a few different programmable electronics systems for adding silicon brains to your builds. MINDSTORMS® and SPIKE Prime Sets have given users an interface for controlling their plastic bricks with code and, through this, have introduced countless children to physical computing.

Advertisement

Starter electronics: how to build and program circuits with a Raspberry Pi or Raspberry Pi Pico.

or free PDF for contributors

Of course, LEGO® is not the only organisation helping children learn physical computing, so perhaps it’s inevitable that LEGO® and Raspberry Pi have worked together to create the Build HAT. This add-on to Raspberry Pi computers lets you control the latest generation of LEGO® motors and sensors from Python code running on your Raspberry Pi. Here, of course, you have access to the full range of modules and hardware that you can usually connect to your Raspberry Pi. With extended headers, you can connect additional HATs, or other components, to the GPIO pins as long as they don’t use the UART connection (14 and 15).

To make it easy to mount your Raspberry Pi, LEGO® has created the Maker Plate. This lets you attach your Raspberry Pi securely to your build.

More power

While you can power the Build HAT directly from Raspberry Pi, the motors run at 7.5 V, so you’ll need an additional power connection to the barrel jack on the Build HAT if you want to run motors. Raspberry Pi has also launched an official power supply for this.

There are four connections on the Build HAT that can talk to sensors and motors from the SPIKE Prime kits, or the most recent generation of LEGO® Technic. The available options include motors with integrated sensors for precise control, distance sensors, force sensors, colour sensors, LED matrices, and more.

The Build HAT and power supply are available now from all the usual Raspberry Pi suppliers, for $25 and $15 respectively.

While the Build HAT was designed for education, there’s plenty for makers to get their teeth into. Want to live-stream video from your LEGO® car? Add a Raspberry Pi camera. Want to trigger your LEGO® build from data on the internet? If you can get the data onto your Raspberry Pi, you can send it to your LEGO® build. Want a platform to quickly prototype an idea for a project? There aren’t many quicker ways of building than plugging LEGO® bricks together.

Ben Everard photo

Ben is the Editor of HackSpace magazine. When not wrangling words, he enjoys cycling, gardening, and attempting to identify wild mushrooms.

Subscribe to Raspberry Pi Official Magazine

Save up to 37% off the cover price and get a FREE Raspberry Pi Pico 2 W with a subscription to Raspberry Pi Official Magazine.

Subscribe

Sign up to the newsletter

Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.