Skip to the content
4 layers65 × 56.5 mmLEGHAT, the printed circuit board in 3D

This project was done in KiCad as I found it easier to work in and had more support throughout the industry as it is second in use only to Altium designer for PCB design tools.

Size
65 × 56.5 mm
Copper layers
4
Thickness
1.62 mm
Parts
5
Nets
31
Pads
86
Tracks, vias
66, 22
Pours
1
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
18 Oct 2026
Updated
27 Oct 2026

Overview

LEGHAT is an open-source printed circuit board by Chairwheels, from the Chairwheels/LEGHAT repository on GitHub. It is a 4-layer board of 65 × 56.5 mm with 5 parts on 31 nets, routed with 66 tracks and 22 vias.

README

readme.md

Raspberry Pi 5 Battery Power HAT

This project was done in KiCad as I found it easier to work in and had more support throughout the industry as it is second in use only to Altium designer for PCB design tools.

Project goal

Design a four-layer Raspberry Pi 5 HAT that powers the Pi through its 40-pin header from a 33.3–37.8 V battery instead of its USB-C power input. The board uses an isolated DC/DC converter, input protection, and a MOSFET-based backfeed protection. It also breaks out SPI for two encoders and a load-cell data-acquisition (DAQ) board, and includes a pushbutton and two LEDs for either USB or PI Shutdown.

PCB outline and references

  • The PCB outline and Raspberry Pi HAT+ mechanical template are based on MisterHW/RPi5-HATplus. The power circuitry and peripheral interface in this project are project-specific. Check the original repository and its CERN-OHL-S v2 licence when redistributing derived design files.
  • The 8-pin SPI connector concept was informed by the University of Michigan Neurobionics Lab's Open-Source Leg interface board, which documents an 8-pin Molex Pico-Clasp SPI-1 port with three chip selects. The load-cell DAQ concept references the Open-Source Leg DAQ board.
  • The OSL interface board references the MOLEX Pico-Clasp. The Micro-Clasp was used here as the Pico-Clasp is not available through JLCPCB

Parts and PCB designations

The designators below follow the current schematic and parts list.

PCB designationPart / selectionFunction
J1Raspberry Pi 40-pin header; Samtec SSW-120-01-F-DConnects power, ground, SPI, and control signals to the Pi GPIO header.
J2AMASS XT30UPB-FBattery input connector.
F1Bel Fuse 0680L3000-05, 3 AInput overcurrent protection
D1Vishay SS5P10-M3/86ASeries Schottky diode for input reverse polarity protection.
D2Vishay SMCJ43A-E3/57TTVS diode for input transient suppression.
C1Samsung CL31B105KCHNNNE, 1 µFHigh frequency bypass on the battery/converter input.
C2Panasonic EEEFK2A221AM, 220 µFBattery side bulk input capaciter.
PS1TRACO Power THN 30-4811WIIsolated DC/DC converter from battery voltage to the low-voltage rail.
R1Panasonic ERJPB3B4992V, 49.9 kΩFixed resistor in the converter trim network.
RV1Bourns 3224W-1-204E, 200 kΩAdjustable resistor in the converter trim network.
C3Samsung CL32B226KAJNNNE, 22 µFConverter output capacitance before the backfeed protection stage.
Q2Texas Instruments CSD18540Q5BMOSFET in the backfeed protection stage.
U4Analog Devices LTC4373IDD#PBFIdeal diode controller for the MOSFET backfeed protection stage.
C4TDK C1005X7R1E104KT000F, 100 nFLocal bypass capacitor for U4.
C5Panasonic 16SVPC100M, 100 µFBulk capacitance on the protected HAT_5V0 output.
J3Molex 55932-0810, 8-circuit MicroClasp headerPeripheral connector for 3.3 V, ground, SPI clock/data, and chip-select signals.
C7Vishay VJ0603Y104JXQCW1BC, 100 nFHigh frequency decoupling for the peripheral 3.3 V supply near J3.
C8Samsung CL10B105KP8NNNC, 1 µFLocal decoupling for the peripheral 3.3 V supply near J3.
SW1Omron B3SL-1022PPushbutton for the planned shutdown interface.
D3Lite-On LTST-C191KGKT, green LEDGreen status indicator (GREEN_LED).
D4Lite-On LTST-C191KRKT, red LEDRed status indicator (RED_LED).
R2, R3Yageo AC0603FR-07470RL, 470 ΩCurrent limiting resistors for the green and red LEDs.

Connections

Power path

  1. Battery positive enters at J2 pin 2, then passes through F1 and D1 to the input of PS1.
  2. Battery negative enters at J2 pin 1 and is labelled Bat_Neg. D2, C1, and C2 are connected across the battery side input as shown in the schematic.
  3. PS1 provides isolated low-voltage output. The input side and output side are seperate circuits and have seperate ground planes on the inner copper layers of the PCB.
  4. R1/RV1 form the converter trim network.
  5. Q2/U4 provide the planned backfeed-protection stage in the form of a MOSFET/Ideal Diode configuration. The protected rail is labelled HAT_5V0 and feeds the Pi header at J1 pins 2 and 4.

J3 — 8-pin encoder / DAQ SPI connector

This table records the signal order shown in the current schematic. It is the pinout for the molex connector. The OSL pinouts were used as reference.

J3 pinNetPurpose
1HAT_3.3V3.3 V peripheral supply
2SPI1_CSn2SPI1 chip-select net 2
3SPI1_CSn1SPI1 chip-select net 1
4SPI1_CSn0SPI1 chip-select net 0
5SPI1_SCLKSPI clock
6SPI1_MISOPi-to-peripheral data return (peripheral output)
7SPI1_MOSIPi-to-peripheral data (Pi output)
8HAT_GNDPi-side ground reference

The two encoders and the DAQ share SPI1_SCLK, SPI1_MOSI, and SPI1_MISO. Each device uses its own chip-select. The load cell connects to the DAQ, then to the Pi.

J1 — Raspberry Pi 40-pin header Pinouts

The Pi header assignments below use the standard Raspberry Pi 40-pin header pinout and the SPI1 mapping.

J1 pinIntended net / signalPurpose
1, 17HAT_3.3V3.3 V rail for peripheral logic
2, 4HAT_5V0Protected 5 V supply to the Pi
6, 9, 14, 20, 25, 30, 34, 39HAT_GNDPi-side ground
11SPI1_CSn1SPI1 chip select 1 / GPIO17
12SPI1_CSn0SPI1 chip select 0 / GPIO18
18GREEN_LEDGreen LED control / GPIO24
22RED_LEDRed LED control / GPIO25
35SPI1_MISOSPI1 MISO / GPIO19
36SPI1_CSn2SPI1 chip select 2 / GPIO16
37PWR_SwitchShutdown button signal / GPIO26
38SPI1_MOSISPI1 MOSI / GPIO20
40SPI1_SCLKSPI1 clock / GPIO21

The SPI1 mapping follows the Raspberry Pi documentation: CE0 on physical pin 12, CE1 on pin 11, CE2 on pin 36, MISO on pin 35, MOSI on pin 38, and SCLK on pin 40. The SPI1_CSn0, SPI1_CSn1, and SPI1_CSn2 nets on J1 should connect to the corresponding chip-select signals on J3.

Test Points and PCB Measurement Locations

The PCB includes six numbered test points to simplify power testing and troubleshooting. Ground measurement references are provided by vias connected to the appropriate ground planes.

Test Point Locations

Test PointNetPCB LocationPurpose
TP1J2-Pin_2At J2's battery connection before F1Measures the battery voltage before the fuse and input protection.
TP2D1-K (On D1)Between F1 and D1Measures if the battery voltage passes through the input fuse.
TP3D1-K (On C1After D1, near the positive input pin of PS1Measures the voltage reaching the TRACO DC/DC converter after input protection.
TP4PS1-+VOUTAt the converter output, near C3 and the converter-side terminal of Q2Measures the converter output before the MOSFET backfeed protection.
TP5HAT_5V0On the protected side of Q2, near C5 and J1Measures the final 5 V supply delivered to the Raspberry Pi.
TP6HAT_3.3VNear J3 pin 1, on the peripheral 3.3 V supplyMakes sure the MOLEX connector receives its 3.3 V supply from the Raspberry Pi.

Ground Reference Vias

Two separate ground reference vias are used for measurements:

  • BAT_NEG via: Located between TP1 and D1. Use this as the reference when measuring TP1, TP2, and TP3.
  • HAT_GND via: Located between TP4 and TP5 near HAT_5V0 net. Use this as the reference when measuring TP4, TP5, and TP6.

Parts

5
QtyValueFootprintReferences
4MountingHole 3.2mmMountingHole:MountingHole_3.2mm_M3_DIN965H1, H2, H3, H4
1Conn_02x20_Odd_EvenConnector_Samtec_Reverse:Samtec_HLE-120-02-xxx-DV-BE-A_2x20_P2.54mm_Horizontal_ReverseJ1

More from Chairwheels/LEGHAT

1
  • 4 layers65 × 56.5 mmLEGHAT+, the printed circuit board in 3D

    LEGHAT+

    Chairwheels/LEGHAT

    This project was done in KiCad as I found it easier to work in and had more support throughout the industry as it is second in use only to Altium designer for PCB design tools.

    34 parts

Similar boards

  • 4 layers28.5 × 28 mmPmod gpdevboard, the printed circuit board in 3D

    Pmod gpdevboard

    azonenberg/openfpga

    Open FPGA tools

    5 parts259
  • 4 layers16 × 13.2 mmSiw, the printed circuit board in 3D

    Siw

    loxodes/vna

    Under development open hardware microwave vector network analyzer

    5 parts205
  • 4 layers105 × 36 mmTdr standard, the printed circuit board in 3D

    Tdr standard

    azonenberg/starshipraider

    Open hardware test equipment

    5 parts193BSD-3-Clause
  • 4 layers22.4 × 46.8 mmPCB1, the printed circuit board in 3D

    PCB1

    lukasloetkolben/OpenpilotHardware

    Welcome to the Openpilot Hardware Collection!

    5 parts95MIT
  • 4 layers108 × 31.8 mmSimm72 ram 16M55, the printed circuit board in 3D

    Simm72 ram 16M55

    agranlund/raven

    Homemade MC68060 + DSP56303 Atari-compatible computer. Hardware, firmware, and software stack

    5 parts87
  • 4 layers35.1 × 25.3 mmT41-si5340-Oscillator daughterboard, the printed circuit board in 3D

    T41-si5340-Oscillator daughterboard

    DRWJSCHMIDT/T41

    This is the repository for the officially released V10, V11, and V12 versions of the T41 Software Defined Transceiver hardware and kits.

    5 parts66
  • 4 layers37.5 × 25.5 mmCoupler nightly, the printed circuit board in 3D

    Coupler nightly

    matthuszagh/fmcw

    6GHz frequency-modulated continuous-wave radar with real-time range detection

    5 parts66Apache-2.0

Questions

How big is the LEGHAT PCB?

It measures 65 × 56.5 mm and has 4 copper layers, 1.62 mm thick.

What parts does the LEGHAT use?

5 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the LEGHAT KiCad files?

From the Chairwheels/LEGHAT repository on GitHub, at the commit this page was made from: the board is HATPlus/LEGHAT.kicad_pcb and its schematic HATPlus/LEGHAT+.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the LEGHAT design in my own project?

Its repository states no licence, so its author keeps all rights: ask Chairwheels before reusing the design.