

SuperHAT V2
HAT for Raspberry Pi 4 & 5.
- Size
- 65 × 56.5 mm
- Copper layers
- 4
- Thickness
- 1.6 mm
- Parts
- 82
- Nets
- 97
- Pads
- 325
- Tracks, vias
- 641, 151
- Pours
- 11
- Routed
- Yes
- KiCad
- KiCad 8.0 (file 20240108)
- Created
- 29 Mar 2026
- Updated
- 29 Mar 2026
Overview
SuperHAT V2 is an open-source printed circuit board by JHSRobo, from the JHSRobo/SuperHAT repository on GitHub, published under the MIT licence. It is a 4-layer board of 65 × 56.5 mm with 82 parts on 97 nets, routed with 641 tracks and 151 vias.
It is built around the DRV8871DDA, AOSS32136C and B03B-PASK-1, with the SM04B-GHS-TB, B02B-PASK-1 and B04B-PASK-1 among its other parts. Its parts include 19 resistors, 14 diodes, 12 capacitors, 12 connectors and 4 ICs.
Main components
6DRV8871DDA
SO-8-EP-40℃~+125℃ 1 10uA 3.6A 565mΩ PWM Yes SO-8-EP Brushed DC Motor Drivers ROHSTexas InstrumentsStepper Motor DriverAOSS32136C
-- Lack of specifications ROHSAlphaUncategorisedB03B-PASK-1
插件,P=2mmWire To Board ConnectorJSTSM04B-GHS-TB
SMD,P=1.25mm,卧贴-25℃~+85℃ 1 1.25mm 1A 1x4P 4 4.13mm 4.25mm 4P 50V 8.25mm Auxiliary Solder Pin GH PA9T Phosphor bronze Surface Mount, Right Angle Tin UL94V-0 White SMD,P=1.25mm,卧贴 Wire To Board Connector ROHSJSTWire To Board ConnectorB02B-PASK-1
插件,P=2mm2 Contacts, 2mm Pitch, Top Entry HeaderJSTWire To Board ConnectorB04B-PASK-1
插件,P=2mm4 Contacts, 2mm Pitch, Top Entry HeaderJSTWire To Board Connector
README
README.mdSuperHAT V2
A HAT (hardware attached on top) for the Raspberry Pi 4 & 5.
Power Rail Breakdown
SuperHAT receives external 5V and 12V power (with a common ground) from an MR30 connector. 12V is used for tools and motors. 5V is used for tools, servos, and powering the Raspberry Pi. When using the SuperHAT, do not plug in a USB-C power supply.
Feature Overview
- Four N-type MOSFETs for GPIO switching 5V or 12V tools.
- Six connectors for I²C interfacing.
- One dual H-bridge 12V motor driver.
- One stepper motor driver
- Two 5V servo connectors
- Overvoltage Protection
- Voltage & Current Sensing
1. MOSFET GPIO Switching
Schematic
N-Type MOSFET
The N-type MOSFET (AOSS32136C) in the schematic is routed for low-side switching. When testing, switching on the high side (before the load), resulted in a voltage drop. In an underwater environment, employing low-side switching means that the wires leading to the tool will be high (5V or 12V) when the tool is idling.
Back-EMF Protection
There is a standard diode (GSD2004WS-HE3-08) on the 5V and 12V lines. When the load is switched off, the diode prevents sensitive electronic components (the MOSFET in this case) from receiving voltage spikes generated by an inductive load (e.g. motor).
5V Configuration
To use a 5V you will need to solder the jumper (on the back of the board). Do not use a 12V tool when you solder the jumper because the 12V and 5V lines will short (because JP7 is closed and D3 leads to 5V). Technically, since MOSFETs can behave like variable resistors, and sending a PWM signal can "adjust" the voltage of the gate, it is possible to operate lower voltage tools. However, this is not recommended as there is no RC-filter at the gate to smooth these pulses. This RC-filter will be a feature in SuperHAT V3.
LED Indicator & Pulldown Resistor
In the schematic, there is an additional 10k $\Omega$ pulldown resistor in parallel with the LED circuit. This is because the LED can’t instantly pull down the voltage (since LEDs are non-ohmic). Intuitively, the green LED turns on when the GPIO is high.
2. I²C Interfacing
Schematic
Connectors
To ensure connectivity with a wide range of devices, there are six "I²C connectors": two right-angle JST-SH, two vertical JST-SH, and two right-angle JST-GH connectors. Note that JST-SH is the same as STEMMA QT by Adafruit and Qwiic by Sparkfun.
Pull-ups
There are no pullups for I²C on SuperHAT because the Raspberry Pi already incorporates 1.8k $\Omega$ pull-up resistors for SCL and SDA lines.
5V Device Support
Connector J10 is specifically designed for 5V I²C devices. While this connector provides 5V power to the device, the SDA and SCL logic lines remain at 3.3V levels. Ensure connected devices are 3.3V logic-compatible or include appropriate level-shifting circuitry.
3. Dual H-Bridge Motor Driver
Schematic
Operation
A 12V brushed DC motor can be driven in both directions with the DRV8871 motor driver. Input pins are set to GPIOs 9 and 10. To drive the motor, set one of the pins to high, and the other to low. Flip the status of both pins to drive the motor in the opposite direction. The motor won't move went both GPIOs are set to low. The 30k $\Omega$ resistor on pin 4 (ILIM) results in a trip current of about 2A (64 (kV) / RILIM (k $\Omega$)).
4. Stepper Motor Driver
Schematic
Operation
A 12V stepper motor can be driven by this motor driver (DRV8825). The pins for operation are GPIOs 21 and 26. Pulse GPIO 21 to move the stepper motor and set GPIO 26 to low or high to determine the direction of rotation. To test the stepper motor, run this code: https://github.com/Harry-IV/superhat_test/blob/main/stepper_motor.py.
Settings
To adjust the current limiting, use the screwhead on the potentiometer. The current limit is the voltage read on the screw head of the potentiometer multiplied by 2. To disable the stepper motor driver, solder jumper JP6.
Cooling
This IC gets hot, especially at higher currents. It would be wise to put a heat-sink.
5. Servo Driving
Schematic
Operation
GPIOs 12 and 13 can each drive one servo motor (a total of two for SuperHAT). Having a direct connection, especially with a Raspberry Pi due to their timing inconsistencies, can lead to jitter. This can be mitigated by using the pigpio library or by "sleeping" the pin while not moving the servo.
6. Overvoltage Protection
Schematic
Undervoltage Lockout (UVLO)
The TPS259621 will cut off power to the Raspberry Pi completely if the EN/UVLO pin does not receive a voltage above 1.2V (when rising). The UVLO threshold is set by a voltage divider consisting of resistors R18 (7.5kΩ) and R19 (2.61kΩ). These values yield an undervoltage cutoff of 4.85V. Note that the undervoltage cutoff when falling will be lower since it will cut off when the EN/UVLO pin does not receive a voltage above 1.1V. Ultimately, this part of the circuit isn’t really that necessary.
Overvoltage Clamping
What is more necessary is the overvoltage component. Here, there is no voltage divider. Texas Instrument's documentation calls for a 400k ohm resistor for the output clamp voltage to be 5.45V, but a 470k ohm resistor is used instead because they are a lot easier to come by.
Additional Resources
Video explanation by GreatScott!: https://www.youtube.com/watch?v=JOhQ3nsR7xo&t=440s
7. Voltage and Current Sensing
Schematic
INA3221
The INA3221 is a digital power-sensing IC that communicates via I²C. It features 3 channels, which are used to measure the voltage and current on the 3.3V, 5V, and 12V rails.
Shunt Resistors
Two 0.04 Ω resistors are placed at the 5V and 12V lines near the MR30 connector. All 5V and 12V power on the SuperHAT flows through these two shunts. This includes power draw at 5V from the Pi. A third 0.04 Ω resistor is placed on the 3.3V line near the 3.3V pin from the Raspberry Pi. This does not measure how much current the Pi draws at 3.3V, but rather how much SuperHAT draws (with I²C devices mainly).
Testing
To test the INA3221, run this code, which uses Adafruit's INA3221 library: [https://github.com/Harry-IV/superhat_test/tree/main/INA3221]
PCB Layout
4-layer Stackup
| Layer | Type |
|---|---|
| 1 | Signal |
| 2 | Ground |
| 3 | Power (3.3V, 5V, 12V) |
| 4 | Signal |
Design Notes
- Via-in-pad is used to condense routing.
- Copper pours help with thermal dissipation.
Email me at harry.c.ohagin@gmail.com if you have any questions.
Parts
82| Qty | Value | Footprint | References |
|---|---|---|---|
| 8 | ~ | Standard Diode:SOD2613X115N | D2, D3, D6, D8, D9, D11, D12, D14 |
| 7 | 0.1 uF | 0805 Ceramic Capacitor:CAPC2012X140N | C1, C5, C6, C7, C8, C10, C12 |
| 5 | SolderJumper_2_Open | Jumper:SolderJumper-2_P1.3mm_Open_TrianglePad1.0x1.5mm | JP6, JP7, JP8, JP9, JP10 |
| 4 | 100 | 0805 Resistor Moisture Resistant:RES_CHP0805_BRN | R3, R4, R5, R6 |
| 4 | 10k | 2 RES 10k Array:SMT_1002P1AT_VIS | RN1, RN2, RN4, RN5 |
| 4 | AOSS32136C | AOSS32136C:SOT23_AOS | Q1, Q2, Q3, Q4 |
| 4 | B03B-PASK-1 | 3 Pin JST-PA Vertical:B03B-PASK-1 | JP1, JP2, JP3, JP4 |
| 4 | ~ | 0805 Green LED:WL-SMCW_0805 | D1, D7, D10, D13 |
| 3 | 0.04 | WSLP 0805 Resistor:RES_VISHAY_WSLP0805_VIS | R9, R10, R11 |
| 2 | 0.1 | WSLP 0805 Resistor:RES_VISHAY_WSLP0805_VIS | R15, R16 |
| 2 | 10 nF | 0805 Ceramic Capacitor:CAPC2012X140N | C3, C11 |
| 2 | 10k | 0805 Resistor Moisture Resistant:RES_CHP0805_BRN | R12, R13 |
| 2 | 47 uF | 47 uF Tantalum Capacitor:CAPMP7.6X4.3_3.1N_KEM | C2, C9 |
| 2 | Conn_01x03 | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J2, J4 |
| 2 | MountingHole_2.7mm_M2.5 | MountingHole:MountingHole_2.7mm_M2.5 | MH1, MH2 |
| 2 | Qwiic_RA | QWIIC Connector RA:QWIIC Connector RA | J5, J10 |
| 2 | Qwiic_Vertical | SparkFun-Connector:JST_SMD_1.0mm-4_Vertical | J6, J7 |
| 2 | SM04B-GHS-TB | SM04B-GHS-TB:CONN_SM04B-GHS-TB_JST | J8, J9 |
| 2 | ~ | 0805 Red LED:WL-SMCW_0805 | D4, D5 |
| 1 | 0.47 uF | 0805 Ceramic Capacitor:CAPC2012X140N | C4 |
| 1 | 10k | 10k Potentiometer:POT_TC33_3X3P8_BRN | RV1 |
| 1 | 1M | CMP0805AFX:RES_CMP0805_BRN | R8 |
| 1 | 1k | TNPW0805:RES_TNPW0805_VIS | R2 |
| 1 | 2.61k | TNPW0805:RES_TNPW0805_VIS | R19 |
| 1 | 30k | SG73S2ATTD3002F:RESC2012X60N | R7 |
| 1 | 3k | TNPW0805:RES_TNPW0805_VIS | R1 |
| 1 | 453 | RESC2012X60N:RESC2012X60N | R14 |
| 1 | 470k | CMP0805AFX:RES_CMP0805_BRN | R17 |
| 1 | 7.5k | TNPW0805:RES_TNPW0805_VIS | R18 |
| 1 | B02B-PASK-1 | B02B-PASK-1:CONN_B02B-PASK-1_JST | J12 |
| 1 | B04B-PASK-1 | 4 Pin JST-PA Vertical:B04B-PASK-1 | JP5 |
| 1 | Conn_01x02 | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Horizontal | J11 |
| 1 | DRV8825PWPR | DRV8825:PWP28_5P18X3P1 | U3 |
| 1 | DRV8871DDA | Package_SO:Texas_HTSOP-8-1EP_3.9x4.9mm_P1.27mm_EP2.95x4.9mm_Mask2.4x3.1mm_ThermalVias | U4 |
| 1 | GPIO | Connector_PinSocket_2.54mm:PinSocket_2x20_P2.54mm_Vertical | J1 |
| 1 | INA3221 | Package_DFN_QFN:Texas_RGV0016A_VQFN-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm | U1 |
| 1 | TPS259621DDAR | TPS259631:SOIC_20DDAR_TEX | U2 |
| 1 | ~ | Connector_AMASS:AMASS_MR30PW-M_1x03_P3.50mm_Horizontal | J3 |
Questions
How big is the SuperHAT V2 PCB?
It measures 65 × 56.5 mm and has 4 copper layers, 1.6 mm thick.
What parts does the SuperHAT V2 use?
82 parts, built around the DRV8871DDA, AOSS32136C, B03B-PASK-1 and SM04B-GHS-TB. 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 SuperHAT V2 KiCad files?
From the JHSRobo/SuperHAT repository on GitHub, at the commit this page was made from: the board is SuperHAT V2.kicad_pcb and its schematic SuperHAT V2.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the SuperHAT V2 design in my own project?
Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).
Similar boards
- 2 layers33.7 × 36.8 mm

- 2 layers59.5 × 101 mm

Mouse
unknownusername504/WirelessMouse
A wireless mouse with open source pcb/schematic as well as drivers to come.
54 parts35GPL-3.0 - 6 layers174.6 × 124.6 mm

Tartarus Liquid Rocketry Control System-2025-05-01 175504
BarrettT123/Tartarus-Liquid-Rocketry-Project
Files and photos related to my work on the Tartarus Project of the Space Hardware Club
356 parts - 4 layers24.9 × 49.9 mm

Cosmos Camera Spinner Sensors
BarrettT123/CanSat-Team-Cosmos
(The software I contributed to this project can be found in the CanSat-Team-Cosmos-Software repository)
52 parts - 2 layers30 × 15 mm

TFHT01
ThunderFly-aerospace/TFHT01
Airborne Humidity and Temperature sensor for UAVs.
34 parts10GPL-3.0 - 2 layers25 × 23 mm

TFI2CADT01
ThunderFly-aerospace/TFI2CADT01
I2C address translator module, allows connection of multiple I2C devices with the same address to one bus.
38 parts10GPL-3.0 - 2 layers37.5 × 19 mm

TFRPM01
ThunderFly-aerospace/TFRPM01
Revolutions per minute (RPM) meter for UAV, rotors, wheels and engines.
28 parts9GPL-3.0 - 2 layers25 × 15 mm

TFI2CEXT01
ThunderFly-aerospace/TFI2CEXT01
I2C bus wire length extension module. Enabling the use of more extensive bus interconnection.
26 parts8GPL-3.0