Raspberry Pi Build HAT

by Raspberry Pi

Connect Raspberry Pi computing power with LEGO® Technic™ motors and sensors.

The Raspberry Pi Build HAT fits any Raspberry Pi with a 40-pin GPIO header and lets you control up to four LEGO® Technic™ motors and sensors from the LEGO® Education SPIKE™ Portfolio, a flexible system with unlimited possibilities.

Build robust, intelligent machines that combine Raspberry Pi computing power with LEGO components.

Want to see what Build HAT can do? Follow Raspberry Pi's beginner friendly project path or check out Ruth's explosive video!

New motor bundles!

You can now buy a Build HAT bundled with two beefy official LEGO® motors, with integrated rotation sensors and absolute positioning for accurate speed and position control.

LEGO® Technic™ Large Motor Bundle contains:

  • Raspberry Pi Build HAT
  • 2x LEGO® Powered Up Technic™ Large Motor (88013)

LEGO® Large Angular Motor Bundle contains:

  • Raspberry Pi Build HAT
  • 2x LEGO® Powered Up Large Angular Motor (88017)

You'll also need to add the correct Build HAT power supply for your region.

Projects that make sense

The LEGO Education SPIKE Portfolio features a wide variety of sensors and motors that you can control with the Build HAT Python library on your Raspberry Pi. Explore the world around you with sensors to detect distance, force, and colour, and choose from a variety of motor sizes to suit any build. The Build HAT also supports motors and sensors from the LEGO® MINDSTORMS® Robot Inventor kit, as well as most other LEGO devices that use an LPF2 connector.

Explore the Build HAT Python library

The power of the Build HAT

With the Raspberry Pi Build HAT Power Supply, available separately, the Build HAT can power your Raspberry Pi (except Raspberry Pi 400) and all connected devices.

View Build HAT Power Supply

Build with Raspberry Pi and the LEGO® bricks you love

The new, specially designed LEGO Maker Plate is the first LEGO element ever designed to connect to something that isn’t another piece of LEGO. It allows you to attach your Raspberry Pi to your LEGO creations, and it's available with the SPIKE Prime Expansion Set (45681).

In the classroom

Easily integrate LEGO Education SPIKE Prime with Raspberry Pi computers. Supported by guided projects from the Raspberry Pi Foundation designed for secondary school students, the Raspberry Pi Build HAT delivers a unique hands-on learning experience that's accessible, engaging, and confidence-building for all students.

View Build HAT projects

Specification

  • Supports motors and sensors included in the LEGO® Education SPIKE™ Portfolio, along with those from the LEGO® MINDSTORMS® Robot Inventor kit and most other LEGO devices that use an LPF2 connector
  • Fits any Raspberry Pi computer with a 40-pin GPIO header (including, with the addition of a ribbon cable or other extension device, Raspberry Pi 400)
  • Specially developed Python library supports students and makers to create and learn
  • DC power connector: 2.1mm barrel jack, centre positive
  • Powers your Raspberry Pi computer (except Raspberry Pi 400) and connected LEGO Technic devices when used with an external 8V ±10% DC power source, such as the Raspberry Pi Build HAT Power Supply, or a 7.5V battery pack
  • Onboard Raspberry Pi RP2040 microcontroller manages low-level control of LEGO Technic devices

Documents