Skip to the content
2 layers150 × 100 mmPower distribution controller, the printed circuit board in 3D

WiFi-controlled 24-channel MOSFET switching system with SPI shift registers, custom KiCad PCB, ESP32 safety state machine, and PyQt5 GUI

Size
150 × 100 mm
Copper layers
2
Thickness
1.6 mm
Parts
146
Nets
117
Pads
407
Tracks, vias
788, 159
Pours
1
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
26 May 2026
Updated
26 May 2026

Overview

Power distribution controller is an open-source printed circuit board by RishiArora23, from the RishiArora23/24-channel-programmable-power-distribution-controller repository on GitHub. It is a 2-layer board of 150 × 100 mm with 146 parts on 117 nets, routed with 788 tracks and 159 vias.

It is built around the IRLZ44N, 74HC595 and B2B-XH-A, with the B9B-PH-K-S-GW and XT60PW-M among its other parts. Its parts include 52 resistors, 29 connectors, 25 diodes, 25 transistors and 6 capacitors. It belongs with the radio and wireless boards and the ESP32 boards of this library.

Main components

5

README

README.md

24-Channel Programmable Power Distribution Controller

An ESP32-based programmable firing controller for sequenced 24-channel power distribution. The system combines embedded firmware, a KiCad-designed PCB, and a PyQt5 desktop application to enable fully programmable, remotely triggered output sequences — with hardware safety interlocks and a real-time TFT display.

⚠️ Safety Notice: This system switches high-current loads via power MOSFETs. Always follow applicable electrical safety guidelines. Never connect live loads during programming or testing.


How It Works

Each of the 24 output channels is driven by an IRLZ44N N-Channel MOSFET (55 V, 47 A) switched via a 3× cascaded shift register chain. The ESP32 clocks channel states into the shift registers over SPI, allowing all 24 outputs to be independently toggled in any order or pattern. A 12 V rail MOSFET acts as a master power switch, controlled by software arm/disarm commands.

The desktop app (main.py) communicates with the ESP32 over Wi-Fi (TCP port 8080) or via UDP auto-discovery (port 4210). Sequences are authored graphically in the app, serialized to JSON, and uploaded to the ESP32 at runtime — no re-flashing required.


System Architecture

text
[ PyQt5 Desktop App ] ──WiFi TCP/UDP──► [ ESP32 Firmware ]
         │                                      │
   Sequence Editor                    Shift Registers (×3)
   Group/Pattern UI                         │
   Arm / Fire Controls              [ 24× IRLZ44N MOSFETs ]
                                            │
                                    [ Output Terminals J1–J24 ]

Hardware

Key components (from KiCad schematic):

  • MCU: ESP32 (Arduino framework)
  • Output switches: 24× IRLZ44N MOSFETs in TO-220 package
  • Channel indicators: 24× LEDs with 220 Ω series resistors
  • Gate drive: 10 kΩ pull-down resistors per MOSFET gate
  • Shift registers: 3× 8-bit shift registers (SRCLK → pin 23, RCLK → pin 21, SER → pin 22, OE → pin 19, SRCLR → pin 18)
  • Rail safety: MOSFET switch on pin 27, analog voltage sense on pin 34
  • Display: ILI9341 TFT (HSPI: MOSI 13, CLK 14, MISO 12, CS 5, DC 4, RST 17)
  • Output connectors: 24× 2-pin 5.08 mm terminal blocks (J1–J24)

Project files:

FileDescription
*.kicad_schSchematic (channel sub-sheets × 24 + top sheet)
*.kicad_pcbPCB layout
*.kicad_proKiCad project file

Firmware (*.ino)

Written in Arduino C++ for ESP32. Key responsibilities:

  • WiFiManager captive portal for first-time Wi-Fi setup (AP: Pyro-Setup-AP)
  • TCP server on port 8080 for desktop app communication
  • UDP listener on port 4210 for auto-discovery
  • Shift register management: channels fire for 1000 ms then auto-clear
  • JSON sequence parser (ArduinoJson) supporting up to 20 groups × 24 steps
  • Built-in web UI accessible from any browser on the network (manual fire, arm/disarm, sequence status)
  • Real-time TFT UI with state machine: IDLE → ARMED → COUNTDOWN → EXECUTING → FINISHED

ESP32 Pin Summary:

FunctionPin
Rail MOSFET (arm)27
Rail voltage sense34
Shift reg SRCLK23
Shift reg RCLK21
Shift reg SER22
Shift reg OE19
Shift reg SRCLR18
TFT MOSI/CLK/MISO/CS/DC/RST13/14/12/5/4/17

Desktop App (main.py)

PyQt5 GUI application. Requires Python 3 and the following packages:

bash
pip install PyQt5 pyserial

Features:

  • Initialize a sequence with N cues (up to 24)
  • Build named groups with patterns: Right Wave, Left Wave, Alternate, Center Burst, Inwards, All Fire
  • Set inter-step gap (ms) per group
  • Upload sequence as JSON to ESP32 over Wi-Fi
  • Arm/disarm rail, monitor live rail voltage safety status
  • Countdown display and per-channel LED flash feedback
  • Undo/redo, save/load sequences as JSON files (Ctrl+S / Ctrl+O)
  • UDP Auto-Discovery — finds the ESP32 on the local network automatically

To run:

bash
python main.py

On first launch, connect the ESP32 to Wi-Fi via the Pyro-Setup-AP captive portal, then use Auto Connect in the app to discover it.


Repository Structure

text
├── *.ino               # ESP32 Arduino firmware
├── main.py             # PyQt5 desktop control application
├── *.kicad_sch         # KiCad schematics (top + 24 channel sub-sheets)
├── *.kicad_pcb         # PCB layout
└── *.kicad_pro         # KiCad project

License

This project is licensed under the MIT License.

Parts

146
QtyValueFootprintReferences
2510000Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR2, R4, R10, R12, R14, R16, R18, R20, R22, R24, R26, R28, R31, R35, R37, R39 +9
25IRLZ44NPackage_TO_SOT_THT:TO-220-3_VerticalQ1, Q2, Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q17, Q18, Q19, Q20, Q21, Q22, Q23 +9
24220Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR1, R3, R11, R13, R15, R17, R19, R21, R23, R25, R27, R29, R34, R36, R38, R40 +8
24Conn_01x021_TerminalBlock_2P_5mm:TerminalBlock_bornier-2_P5.08mmJ1, J2, J10, J11, J12, J13, J14, J15, J16, J17, J18, J19, J20, J21, J22, J23 +8
24LEDLED_THT:LED_D3.0mmD1, D2, D10, D11, D12, D13, D14, D15, D16, D17, D18, D19, D20, D21, D22, D23 +8
4100nFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC3, C4, C5, C6
4MountingHole_PadMountingHole:MountingHole_3.2mm_M3_PadH1, H2, H3, H4
374HC595Package_DIP:DIP-16_W7.62mmSR1, SR2, SR3
118KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR32
11uF 50VCapacitor_THT:CP_Radial_D5.0mm_P2.50mmC2
14.7KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR33
1470uF 16VCapacitor_THT:CP_Radial_D10.0mm_P5.00mmC1
1680Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR30
1B2B-XH-AB2B-XH-A:JST_B2B-XH-AJ28
1B4B-EH-A (SD-card connectors)Connector_JST:JST_PH_B4B-PH-K_1x04_P2.00mm_VerticalJ26
1B7B-PH-K-SB7B-PH-K-S:JST_B7B-PH-K-SJ29
1B9B-PH-K-SConnector_JST:JST_EH_B9B-EH-A_1x09_P2.50mm_VerticalJ27
1ESP32-WROOM-38 PinESP32-38Pin:ESP32_38Pin_THTESP1
1LEDLED_THT:LED_D5.0mmD30
1SW_SPSTTerminalBlock:TerminalBlock_bornier-2_P5.08mmSW1
1XT60PW-MXT60PW-M:AMASS_XT60PW-MJ25

Similar boards

  • 4 layers230 × 60 mmPSU, the printed circuit board in 3D

    PSU

    Thoric16/Power-Supply-Unit

    A custom-designed robotics Power Supply Unit (PSU) featuring multi-rail buck regulation, remotely switchable outputs, current monitoring, and a hardware E-Stop loop.

    157 parts1
  • 2 layers98 × 89.1 mm2025 MD mother f303, the printed circuit board in 3D

    2025 MD mother f303

    robohachi/robohachi_denki_2025

    説明のためのファイル

    82 parts
  • 2 layers99.1 × 99.1 mmFlipDotDriver, the printed circuit board in 3D

    FlipDotDriver

    bitluni/FlippyFlip

    49 parts14
  • 4 layers71.3 × 95.9 mmChessBotController, the printed circuit board in 3D

    ChessBotController

    cryptoAlgorithm/chess-printer

    A chess bot, but on steroids. Custom 3D printer control board with a few oddly specific features.

    55 parts3
  • 2 layersOrgan Serial to Parallel, the printed circuit board in 3D

    Organ Serial to Parallel

    locokepler/Pipe_Organ

    The repository of the pipe organ, over the different iterations of mechanical, electrical, and code design

    105 parts2
  • 2 layers163.5 × 55 mmIROC U Charging NMOS, the printed circuit board in 3D

    IROC U Charging NMOS

    24bec124-sketch/IROC-U-Charging-NMOS

    Developed for Team Arrow as part of IRoC-U (ISRO Robotics Challenge - URSC), a national student competition hosted by the Indian Space Research Organization (ISRO).

    41 parts1MIT
  • 2 layers103.1 × 77 mmPCB layout, the printed circuit board in 3D

    PCB layout

    Abdulsalam-Alsheikh/CircleOfLuck

    This project was developed to provide an efficient and engaging way to randomly select winners in competitions or events where the order of winners needs to be determined fairly and without bias.

    59 parts

Questions

How big is the Power distribution controller PCB?

It measures 150 × 100 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Power distribution controller use?

146 parts, built around the IRLZ44N, 74HC595, B2B-XH-A and B9B-PH-K-S-GW. 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 Power distribution controller KiCad files?

From the RishiArora23/24-channel-programmable-power-distribution-controller repository on GitHub, at the commit this page was made from: the board is hardware/kicad/power_distribution_controller.kicad_pcb and its schematic hardware/kicad/power_distribution_controller.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Power distribution controller design in my own project?

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