soldr.ai

Docs  /  Boards

Raspberry Pi Build HAT: specs and pinout

Raspberry Pi add-on board, made with LEGO Education, with four connectors for LEGO Technic motors and sensors, controlled from Python on a Raspberry Pi. It does nothing on its own: it requires LEGO Technic motors or sensors that you already own (not sold here).

Every value cites its sourceReference-design pinout

Buy on Compoden

Specs

SpecValueSource
PortsFour connectors for LEGO Technic motors and sensors (LPF2 connector): SPIKE Portfolio devices, MINDSTORMS Robot Inventor devices and most other LPF2 devicessource
Product brief p.3, Specification
ControllerRaspberry Pi RP2040 microcontroller manages low-level control of the LEGO Technic devicessource
Product brief p.3, Specification
Host compatibilityRaspberry Pi computers with a 40-pin GPIO header; Keyboard-series devices need a ribbon cable or other extension device and cannot be powered through the HATsource
Product brief p.2-3; documentation: About
DC power connector2.1 mm barrel jack, centre positive (5.5 mm x 2.1 mm x 11 mm)source
Product brief p.3; documentation: Power the Build HAT
External supply rating7.2 V to 8.5 V DC (product brief); the documentation says any reliable +8 V +/-10% supply capable of 48 Wsource
Product brief p.3, Specification; documentation: Power the Build HAT
What needs the external supplyLEGO Technic motors and the SPIKE colour and distance sensors need the external supply; motor encoders and the SPIKE force sensor can be read with the Raspberry Pi powered the usual way through its USB power socketsource
Documentation: Power the Build HAT, Note
Host serial linkUses the Raspberry Pi serial port (GPIO14 Tx, GPIO15 Rx); the serial console must be disabled and the serial port hardware enabledsource
Documentation: Prepare your Build HAT, Set up your Raspberry Pi
MountingComponents are on the underside; attach 9 mm spacers, or add a tall header and 15 mm spacers to reach the GPIO pinssource
Documentation: Prepare your Build HAT

Power

ValueSource
SupplyExternal DC 7.2 V to 8.5 V (product brief) on the barrel jack, which also powers the Raspberry Pi through the HAT; or the Raspberry Pi's own USB supply when only reading motor encoders and the force sensorsource
Product brief p.3; documentation: Power the Build HAT (supply capable of 48 W); no typical current is published

Pinout

The HAT plugs onto the Raspberry Pi 40-pin header. The only pin information in the official documents is the list of GPIO pins the HAT uses, shown here; the pin order of the four LEGO connectors is not given in the official documents.

PinFunctionVoltageNotesSource
GPIO0/1ID prom3.3 V logicused by the Build HAT itself; do not connect anything to itsource
Documentation: Prepare your Build HAT, pin table
GPIO4Reset3.3 V logicused by the Build HAT itself; do not connect anything to itsource
Documentation: Prepare your Build HAT, pin table
GPIO14Tx3.3 V logicused by the Build HAT itself; do not connect anything to itsource
Documentation: Prepare your Build HAT, pin table
GPIO15Rx3.3 V logicused by the Build HAT itself; do not connect anything to itsource
Documentation: Prepare your Build HAT, pin table
GPIO16RTS3.3 V logicstatus: unused; used by the Build HAT itself; do not connect anything to itsource
Documentation: Prepare your Build HAT, pin table
GPIO17CTS3.3 V logicstatus: unused; used by the Build HAT itself; do not connect anything to itsource
Documentation: Prepare your Build HAT, pin table

Build with it

Project ideas for the Raspberry Pi Build HAT. Each link opens Soldr with the prompt filled in; Soldr assigns the pins, checks power and shows how to wire every part.

Common mistakes

Not covered by the official source

Sources