The Raspberry Pi Build HAT is an official Raspberry Pi add-on board designed in collaboration with LEGO® Education to make it easy to control LEGO® SPIKE™ Prime motors and sensors with the Raspberry Pi. The HAT combines the power of Raspberry Pi computing with LEGO® hands-on learning to enable a fun and creative learning experience for students, teachers and makers.
The Build HAT provides four connectors for LEGO Technic motors and sensors from the LEGO® Education SPIKE™ Prime range. The SPIKE™ Prime range includes a distance sensor, a colour sensor and a force sensor. The angular motors come in a range of sizes and include integrated encoders that can be queried to find their position.
The LEGO® Education SPIKE™ Prime set 45678 and SPIKE™ Prime Expansion set 45681, available separately from LEGO Education resellers, includes a collection of useful elements supported by the Build HAT. Connected compatible LEGO® devices can easily be controlled in Python, alongside standard Raspberry Pi accessories such as a camera module.
An official Raspberry Pi 8V 6A UK power supply designed specifically for the Build HAT is also available which is designed to power both the Build HAT and Raspberry Pi computer along with all connected LEGO® Technic devices.
The LEGO® Maker Plate, available separately from LEGO® retailers, allows users to easily attach Raspberry Pi computers to the LEGO® building system.
Build HAT Compatibility
The Build HAT is compatible with the most recent generation of LEGO® Technic™ motors and sensors included in the LEGO® Education SPIKE™
Prime portfolio. The LEGO® Education SPIKE Prime set 45678 and SPIKE Prime Expansion set 45681, available separately from LEGO Education resellers, includes a collection of useful elements supported by the Build HAT.
The Build HAT is not compatible with LEGO Mindstorms (EV3) because the plug system is different. The Build HAT/SPIKE™ Prime system uses LPF2 plugs whereas the Mindstorms system uses RJ12 plugs.
Raspberry Pi Compatibility
The Build HAT fits all Raspberry Pi computers with a 40-pin GPIO header, including (with the addition of a ribbon cable extension) the Raspberry Pi 400. Please note that the Build HAT cannot power the Raspberry Pi 400 as it does not support being powered via the GPIO headers.
Connected LEGO Technic devices can easily be controlled in Python, alongside standard Raspberry Pi accessories such as a camera module.
Build HAT Features
- Controls up to 4 LEGO® Technic motors and sensors
- Powers the Raspberry Pi (when used with a suitable external PSU)
- Easy to use from Python on the Raspberry Pi
- The second Raspberry Pi product, after the Raspberry Pi Pico, to be powered by the Raspberry Pi RP2040 microcontroller, which manages low-level control of LEGO Technic devices
- Requires an external 8V ±10% DC power source – like the Raspberry Pi Build HAT Power Supply or a 7.5V battery pack
- DC power connector: 2.1mm barrel jack, centre positive
- Dimensions 56.5mm x 65mm (x17mm max)
- Weight: 19g (board)
Build HAT Resources
Build HAT Links
- Raspberry Pi Build HAT Website
- Getting started with the Raspberry Pi Build HAT
- Raspberry Pi Build HAT Projects
- Raspberry Pi Build HAT Documentation and Python Library
LEGO Device compatibility
- Build HAT Announcement Article
- Meet LEGO® Education SPIKE™ Prime
- Getting started with LEGO® Education SPIKE™ Prime
- LEGO® Education SPIKE™ Prime Set (45678)
Build HAT Physical Specification
Payment & Accreditations
Your payment information is processed securely. We do not store credit card details nor have access to your credit card information.