Skip to the content
PCBKitNew board
2 layers204.5 × 113 mmSTM, the printed circuit board in 3D

Compact industrial mini PLC designed in KiCad

Size
204.5 × 113 mm
Copper layers
2
Thickness
1.6 mm
Parts
139
Nets
197
Pads
511
Tracks, vias
777, 61
Pours
1
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
16 Oct 2026
Updated
16 Oct 2026

Overview

STM is an open-source printed circuit board by Noraiz963, from the Noraiz963/Mini-PLC- repository on GitHub. It is a 2-layer board of 204.5 × 113 mm with 139 parts on 197 nets, routed with 777 tracks and 61 vias.

It is built around the CH340C, SP3485CN-L and LMR14030SDDA, with the AMS1117-3.3, IRLZ44N and SS14 among its other parts. Its parts include 55 resistors, 29 diodes, 13 ICs, 10 capacitors and 9 transistors. It belongs with the STM32 boards of this library.

Main components

9

README

README.md

STM32 Mini PLC v1.0

A compact industrial-style PLC board designed in KiCad, built around an STM32F407 microcontroller. It provides 8 optically isolated digital inputs, 8 relay outputs, RS-485 communication and USB-C serial/bootloader access, all powered from 24 VDC.

STM32 Mini PLC front view

Status: Hardware design v1.0 complete. The board has not been manufactured or tested, and no firmware has been written yet.


Table of contents


Key features

  • STM32F407 microcontroller as the processing core
  • 8 optically isolated digital inputs (optocoupler per channel)
  • 8 relay outputs, MOSFET-driven, with freewheeling diodes
  • RS-485 interface on a DB9 connector (suitable for Modbus RTU)
  • USB-C with CH340C USB-to-UART bridge for serial debugging and bootloader flashing
  • 5-pin SWD header for ST-LINK programming and debugging
  • 24 VDC industrial supply with fuse and reverse-polarity protection
  • Status LEDs on inputs and outputs
  • Reset button

Board gallery

3D render: top angle

Top angle

3D render: side view

Side view

3D render: back side

Back side showing input labels (X1 to X8), copper routing and relay output pads.

Back side

PCB layout (KiCad PCB editor)

Red traces are the top copper layer and blue traces are the bottom copper layer. The logic section (power, STM32, inputs, communication) is at the top, and the relay and output section is at the bottom.

PCB layout


Specifications

ParameterValue
MicrocontrollerSTM32F407
Supply input24 VDC
Digital inputs8, optically isolated
Relay outputs8, rated 250 VAC / 30 VDC, 5 A (per board silkscreen)
CommunicationRS-485 (DB9 connector), USB-C (UART bridge)
Programming / debug5-pin SWD header for ST-LINK
Design toolKiCad
Board layers2 (top and bottom copper)
Versionv1.0

System overview

mermaid
flowchart LR
    PWR[24 VDC input<br/>J1, F1, D1] --> BUCK[Buck converter U1]
    BUCK --> LDO[3.3 V regulator U2]
    LDO --> MCU[STM32F407<br/>U13]
    IN[Field inputs X1-X8<br/>J2] --> OPTO[Optocouplers<br/>U4-U11]
    OPTO --> MCU
    MCU --> FET[MOSFET drivers<br/>Q2-Q9]
    FET --> RLY[Relays K2-K9]
    RLY --> OUT[Outputs Y1-Y8<br/>J3]
    MCU <--> RS[RS-485 transceiver U12<br/>DB9 J4]
    MCU <--> USB[CH340C U14<br/>USB-C J19]
    MCU <--> SWD[SWD header J5]

Sub-systems

Sub-systemKey componentsDescription
Power stageJ1, F1, D1, U1, U2Accepts 24 VDC industrial input, protected by a fuse and a reverse-polarity diode. A switching buck converter (U1) and a 3.3 V linear regulator (U2) power the logic.
Processing coreU13 (STM32F407), C9 to C11Main microcontroller for application logic, with decoupling capacitors for stability.
Programming and debugJ5 (3V3, SWDIO, RST, SWCLK, GND)5-pin header for debugging and flashing with an external ST-LINK. Pin 1 is the 3.3 V reference (VTREF).
USB and serialJ19 (USB-C), U14 (CH340C)USB-to-UART bridge for serial monitoring (printf debugging) and bootloader flashing.
Isolated digital inputsJ2, U4 to U11 (optocouplers)8 optically isolated channels that protect the STM32 from field-side voltage transients.
Relay output stageK2 to K9, Q2 to Q9 (MOSFETs), D13 to D20, J38 electromechanical relays driven by MOSFET switches, with freewheeling diodes for inductive kickback protection.
Industrial communicationU12 (RS-485 transceiver), J4Differential serial interface for fieldbus networks. The hardware is suitable for Modbus RTU.

Connectors

RefFunctionPins
J124 VDC power input24 V, 0 V
J2Digital inputsX1 to X8, GND (see silkscreen)
J3Relay outputsY1 to Y8, plus common terminals (see silkscreen)
J4RS-485 (DB9)Differential A/B, GND
J5SWD programming3V3, SWDIO, SWCLK, RST, GND
J19USB-CUART bridge and bootloader

PCB design

  • Logic section (power, MCU, optocoupled inputs, communication) kept separate from the relay section
  • Relays placed along the bottom edge with output terminals on the same side
  • Input terminal block along the top edge
  • Mounting holes in all four corners
  • Silkscreen labels for all terminals and ratings (Input: 24 V DC, Relay outputs: 250 VAC / 30 VDC, 5 A)

Project status and roadmap

  • Schematic design
  • PCB layout
  • 3D model review
  • Design rule check and final review
  • Manufacture the board
  • Write firmware
  • Hardware testing

Specifications above come from the design, not from measurements on a built board.


Tools

  • KiCad (schematic, PCB layout, 3D viewer)

Designed by: Noraiz

Parts

139
QtyValueFootprintReferences
1910KResistor_SMD:R_1210_3225Metric_Pad1.30x2.65mm_HandSolderR1, R4, R19, R20, R21, R22, R23, R24, R25, R26, R41, R42, R43, R44, R45, R46 +3
164.7KResistor_SMD:R_1210_3225Metric_Pad1.30x2.65mm_HandSolderR11, R12, R13, R14, R15, R16, R17, R18, R49, R50, R51, R52, R53, R54, R55, R56
16LEDLED_SMD:LED_1210_3225Metric_Pad1.42x2.65mm_HandSolderD5, D6, D7, D8, D9, D10, D11, D12, D22, D23, D24, D25, D26, D27, D28, D29
810Resistor_SMD:R_1210_3225Metric_Pad1.30x2.65mm_HandSolderR28, R29, R30, R31, R32, R33, R34, R35
8IRLZ44NPackage_TO_SOT_THT:TO-220-3_VerticalQ2, Q3, Q4, Q5, Q6, Q7, Q8, Q9
8PC817Package_DIP:DIP-4_W7.62mmU4, U5, U6, U7, U8, U9, U10, U11
8Panasonic_ALFG2PF241Relay_THT:Relay_SPST_Panasonic_ALFG_FormA_CircularHolesK2, K3, K4, K5, K6, K7, K8, K9
8SS14Diode_SMD:D_SMAD13, D14, D15, D16, D17, D18, D19, D20
4100nFCapacitor_SMD:C_0201_0603Metric_Pad0.64x0.40mm_HandSolderC3, C4, C9, C12
2100KResistor_SMD:R_1210_3225Metric_Pad1.30x2.65mm_HandSolderR2, R5
210kResistor_SMD:R_1210_3225Metric_Pad1.30x2.65mm_HandSolderR57, R58
21KResistor_SMD:R_1210_3225Metric_Pad1.30x2.65mm_HandSolderR8, R9
22.2ufCapacitor_SMD:C_0201_0603Metric_Pad0.64x0.40mm_HandSolderC10, C11
222Resistor_SMD:R_1210_3225Metric_Pad1.30x2.65mm_HandSolderR39, R40
247uFCapacitor_THT:CP_Radial_D8.0mm_P2.50mmC1, C2
25.1KResistor_SMD:R_1210_3225Metric_Pad1.30x2.65mm_HandSolderR37, R38
2SS34Diode_SMD:D_SMAD3, D21
2Screw_Terminal_01x10TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-10-5.08_1x10_P5.08mm_HorizontalJ2, J3
110uHInductor_SMD_Wurth:L_Wurth_WE-LQSH-4020L1
1120Resistor_SMD:R_1210_3225Metric_Pad1.30x2.65mm_HandSolderR10
115uFCapacitor_SMD:C_0201_0603Metric_Pad0.64x0.40mm_HandSolderC7
115uHInductor_SMD_Wurth:L_Wurth_WE-LQSH-4020L2
11N47xxADiode_THT:D_DO-41_SOD81_P10.16mm_HorizontalD1
147uFCapacitor_SMD:C_0201_0603Metric_Pad0.64x0.40mm_HandSolderC5
152.3KResistor_SMD:R_1210_3225Metric_Pad1.30x2.65mm_HandSolderR3
1AMS1117-3.3Package_TO_SOT_SMD:SOT-223-3_TabPin2U2
1CH340CPackage_SO:SOIC-16_3.9x9.9mm_P1.27mmU14
1Conn_ARM_SWD_TagConnect_TC2030Connector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_VerticalJ5
1DE9_PinsConnector_Dsub:DSUB-9_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mmJ4
1FQB47P06TM-AM002FQB47P06TM-AM002:TO-263-3_ONSEMIQ1
1FuseFuse:Fuse_2010_5025Metric_Pad1.52x2.65mm_HandSolderF1
1LMR14030SDDALMR14030SDDA:VREG_LM5017MR_NOPBU1
1SM712_SOT23Package_TO_SOT_SMD:SOT-23D4
1SMBJ36ASMBJ36A:DIOM4336X265ND2
1SP3485CNPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU12
1STM32F407VGTxPackage_QFP:LQFP-100_14x14mm_P0.5mmU13
1SW_PushButton_Switch_THT:SW_PUSH_6mmSW1
1Screw_Terminal_01x02TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_HorizontalJ1
1USB_C_Receptacle_USB2.0_16PConnector_USB:USB_C_Receptacle_GCT_USB4110J19

The 134 most common of 139 parts.

Questions

How big is the STM PCB?

It measures 204.5 × 113 mm and has 2 copper layers, 1.6 mm thick.

What parts does the STM use?

139 parts, built around the CH340C, SP3485CN-L, LMR14030SDDA and AMS1117-3.3. 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 STM KiCad files?

From the Noraiz963/Mini-PLC- repository on GitHub, at the commit this page was made from: the board is pcb/STM.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the STM design in my own project?

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

Similar boards

  • 2 layers95 × 95 mmFront controls, the printed circuit board in 3D

    Front controls

    techie66/EngineDataLogger-FrontControls

    Arduino code for front controls device.

    135 parts1GPL-2.0
  • 2 layers100 × 85 mmESP32 MediaCarrier routed, the printed circuit board in 3D

    ESP32 MediaCarrier routed

    xmyoot/esp32-media-carrier

    ESP32 multimedia carrier board with 7–24 V DC buck regulator, 3.2 W Class-D I2S audio amp, WS2812 LED ring driver, and SPI TFT display header

    97 partsMIT
  • 2 layers87 × 72 mmEkdome, the printed circuit board in 3D

    Ekdome

    KrogeChen/EASYLINK

    easy link protocol by homebus

    118 parts
  • 2 layers59.5 × 27.2 mmMbus, the printed circuit board in 3D

    Mbus

    nobodyguy/mbus_hardware

    M-bus to USB

    39 parts2MIT
  • 2 layers129.5 × 72.6 mmOpenPLC, the printed circuit board in 3D

    OpenPLC

    radioelf/OpenPlc

    Hardware for OpenPLC with raspberry PI Z and Mod. software OpenPlc

    165 parts7
  • 2 layers340 × 220 mmFg2 fdim surrogate routed, the printed circuit board in 3D

    Fg2 fdim surrogate routed

    lcsingleton/fg2-fdim-surrogate

    A carrier/backplane KiCad project that hosts four prefab modules (WeAct STM32F412RET6 Core Board, MCP2551 CAN breakout, LD24AJTA LED driver, two adjustable buck converters) and wires them into the Ford FG2 Falcon…

    21 parts1MIT
  • 2 layers77.5 × 55.6 mmMost reader, the printed circuit board in 3D

    Most reader

    Oleg-mk/JLR-MOST-Reader

    Listen-only MOST25 adapter for JLR: the factory stereo out over TOSLINK, the car's own volume controls applied digitally with no quality loss

    62 parts1CERN-OHL-S-2.0
  • 2 layers123.6 × 78.9 mmMost listener, the printed circuit board in 3D

    Most listener

    Oleg-mk/MOST25-to-AUDIO

    Passive MOST25 listener: Tang Nano 20K FPGA, ESP32 host, stereo I2S out with the head unit's volume, balance and tone

    172 parts1CERN-OHL-S-2.0