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
34
Nets
44
Pads
132
Tracks, vias
177, 37
Pours
6
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 34 parts on 44 nets, routed with 177 tracks and 37 vias.

It is built around the CSD18540Q5B. Its parts include 7 capacitors, 4 diodes, 3 resistors, 3 connectors and 1 IC.

Main components

1

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

34
QtyValueFootprintReferences
6TestPointTestPoint:TestPoint_Pad_D1.0mmTP1, TP2, TP3, TP4, TP5, TP6
4MountingHole 3.2mmMountingHole:MountingHole_3.2mm_M3_DIN965H1, H2, H3, H4
2CCapacitor_SMD:C_0603_1608MetricC7, C8
2LEDLED_SMD:LED_0603_1608MetricD3, D4
2RResistor_SMD:R_0603_1608MetricR2, R3
1100nFCapacitor_SMD:CP_Elec_6.3x5.8C4
1100uF 16VCapacitor_SMD:C_0402_1005MetricC5
11uF 100VCapacitor_SMD:C_1206_3216MetricC1
1200kPotentiometer_SMD:Potentiometer_Bourns_3224W_VerticalRV1
1220uF 100VEEE-FK2A221AM-SM:CAP_EEEFK2A221AMC2
122uF 25VCapacitor_SMD:C_1210_3225MetricC3
149.9kResistor_SMD:R_0603_1608MetricR1
1CSD18540Q5Bul_CSD18540Q5B:DNK0008AQ2
1Conn_01x02Connector_AMASS:AMASS_XT30UPB-F_1x02_P5.0mm_VerticalJ2
1Conn_01x08Connector_Molex:Molex_MicroClasp_55932-0810_1x08_P2.00mm_VerticalJ3
1Conn_02x20_Odd_EvenConnector_PinSocket_2.54mm:PinSocket_2x20_P2.54mm_VerticalJ1
1D_Schottky_AAKPackage_TO_SOT_SMD:TO-277AD1
1D_ZenerDiode_SMD:D_SMCD2
1Fusebelfuse0680L3000-05:FUSC6125X279NF1
1LOGOBoardDewsign:logogoG***
1LTC4373IDD-PBFLTC4373IDD-PBF:DFN8_DD_05-08-1698_ADIU4
1SW_PushButton_Switch_SMD:SW_SPST_B3SL-1022PSW1
1THN_30-4811WIConverter_DCDC:Converter_DCDC_TRACO_THN30-xxxx_THTPS1

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.

    5 parts

Similar boards

  • 4 layers58 × 50 mmBldc motor cntroller, the printed circuit board in 3D

    Bldc motor cntroller

    azmat-bilal/bldc_motor_controller_pcb

    A Brushless DC Motor controller board. The design is inspired and is compatible with Odrive project (https://github.com/madcowswe/ODriveHardware) except that this one has a single channel.

    146 parts112MIT
  • 4 layersMoco od501, the printed circuit board in 3D

    Moco od501

    ziteh/moco

    PMSM/BLDC motor controller/driver PCBs

    102 parts24CERN-OHL-P-2.0
  • 8 layers90.5 × 49.5 mmOpen race v2, the printed circuit board in 3D

    Open race v2

    teehee567/Aevia

    gnss module collecting track data

    337 parts5
  • 4 layers45 × 60 mmHPM5361-RMCS Slave V1.0, the printed circuit board in 3D

    HPM5361-RMCS Slave V1.0

    Kaiser041224/HPM5361-RMCS_Slave-Pro

    HPM5361-RMCSSlave-V1.0 是一个基于 KiCad 9 的硬件工程,核心主控为 HPM5361ICB1。从顶层框图、层级原理图和关键器件选型来看,这块板更像一块面向机器人/运动控制场景的从控板,用于通信汇聚、PWM 外设输出、姿态感知、板载存储和基础人机交互。

    222 parts2
  • 4 layers51.4 × 40.8 mm12S UAV UGV PMU, the printed circuit board in 3D

    12S UAV UGV PMU

    Manoj-Davu/pcb-design-portfolio

    43 parts2
  • 4 layers69 × 46 mmBQ40Z80, the printed circuit board in 3D

    BQ40Z80

    acha666/BQ40Z80

    97 parts1GPL-3.0
  • 4 layers40.5 × 40.5 mmHPM5361-RMCS Slave Lite, the printed circuit board in 3D

    HPM5361-RMCS Slave Lite

    Kaiser041224/HPM5361-RMCS_Slave-Lite

    HPM5361-RMCSSlave-Lite 是一个基于 HPM5361IEG1 的嵌入式控制板。以下说明是根据当前 KiCad 工程中的原理图层级、器件选型和 PCB 丝印整理出来的硬件简介;从接口组合来看,这块板更像是一个面向机器人或分布式控制系统的从控/通信节点。

    179 parts1

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?

34 parts, built around the CSD18540Q5B. 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.