Skip to the content
4 layers200 × 100 mmProjekt Mechatronik DC AC, the printed circuit board in 3D

Projekt Mechatronik DC AC

DriveLink-HM/DriveLink2

A Variable Frequency Drive, designed and built for Projekt Mechatronik in SoSe26

Size
200 × 100 mm
Copper layers
4
Thickness
1.6 mm
Parts
190
Nets
127
Pads
539
Tracks, vias
997, 166
Pours
24
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
20 Jul 2026
Updated
20 Jul 2026

Overview

Projekt Mechatronik DC AC is an open-source printed circuit board by DriveLink-HM, from the DriveLink-HM/DriveLink repository on GitHub, published under the GPL-3.0 licence. It is a 4-layer board of 200 × 100 mm with 190 parts on 127 nets, routed with 997 tracks and 166 vias.

It is built around the MP9488GS-P, AP63200WU and AMT0440007DB0000G, with the 1N6857UR-1, 1N914WT and GSF0301 among its other parts. Its parts include 59 capacitors, 46 resistors, 19 diodes, 11 connectors and 9 ICs. It belongs with the STM32 boards of this library.

Main components

9

README

README.md

DriveLink

An open-hardware variable frequency drive (VFD) for three-phase induction motors, developed for the course Projekt Mechatronik at Munich University of Applied Sciences (HM).

DriveLink rectifies single-phase 230 V AC mains into a ≈325 V DC link and drives the motor through an Infineon IM06B50GC1 CIPOS Mini intelligent power module (600 V / 50 A). The power stage is controlled by an STM32G474 whose firmware is generated from a PLECS model, while a detachable ESP32-S3 HMI provides an OLED display, rotary-encoder control, and a WiFi web dashboard. This repository contains everything needed to reproduce the device: KiCad schematics and PCB layouts, firmware, the PLECS model, enclosure CAD files, and documentation.

Fuly assembled DriveLink VFD in its enclosure

⚠️ Safety warning — This device connects directly to mains voltage and its DC link operates at ≈325 V. The DC-link capacitors store a lethal charge even after disconnection. This is a student prototype: it is not certified for mains-connected installations and must only be operated by qualified persons, behind an isolation transformer or RCD, inside a closed enclosure. Reproduce and operate it at your own risk.

Status: working prototype — see Known limitations.

Pitch video

https://github.com/user-attachments/assets/3f33c3a8-9b28-4335-b2a6-baa4afd1d7ac

Full quality Video (Download only)

Features

  • 230 V AC single-phase input: bridge rectifier, NTC inrush limiting, 4× 560 µF DC link
  • Three-phase output for induction motors, open-loop V/f control, 10 kHz sinusoidal PWM
  • Output frequency adjustable from −100 to +100 Hz (sign = direction of rotation)
  • Motor-control firmware generated from the PLECS model (PLECS Coder, STM32G4x target)
  • ESP32-S3 HMI with 128×64 OLED (SH1106), rotary encoder, and two buttons
  • Standalone WiFi access point with a live telemetry dashboard and JSON API
  • Telemetry: DC-link voltage, shunt-based phase currents, module temperature
  • KiCad 10 hardware projects, 3D-printable enclosure with Fusion 360 sources

System architecture

Block schematic of the DriveLink system

Block schematic of the implemented system (editable source: system-block-diagram.svg).

The system consists of two boards:

  • Mainboard (Mainboard/) — the complete power path: mains input with rectifier and NTC, DC link, IM06B50GC1 inverter stage, shunt current measurement, plus the STM32G474RE controller, auxiliary buck/step-down supplies, and fan control. The schematic is split into sheets (rectifier, VFD, STM, Buck_Converter, Step_Down_Converter, cooling).
  • HMI module (HMI/) — an ESP32-S3 board with display, encoder, and buttons that mounts in the enclosure front. It sends the frequency setpoint to the mainboard and receives telemetry over a 3-wire UART link.

The two boards speak a small framed serial protocol, specified in docs/UART_PROTOCOL.md.

Repository layout

PathContent
Mainboard/KiCad 10 project of the power/controller board, BOM (CSV), STEP model, PCB stand STL
HMI/PCB/KiCad 10 project of the HMI board
HMI/Firmware/PlatformIO project for the ESP32-S3 HMI firmware
HMI/pc_testing/PC-side test utilities for dashboard and UART development
plecs/PLECS model VFD_SW.plecs (simulation + STM32 code generation)
plecs/dirty_patch/Build script and reference copies of the UART code embedded in the model
case/Enclosure: Fusion 360 archive, STEP files, front bezel STL, fan impeller
docs/Project report (German), block diagram, datasheets, poster, protocol spec

Toolchain

ToolNeeded forNotes
KiCad 10+Viewing/editing PCBs, Gerber exportProject files are in KiCad 10 format and will not open in older versions
PLECS 5.0+ with PLECS CoderSimulation and STM32 code generationCoder license with the STM32 target family required
PlatformIOBuilding/flashing the HMI firmwareCLI or VS Code extension
Arm GNU Toolchain + GNU MakeCompiling the generated STM32 codearm-none-eabi-gcc and make must be on PATH
PowerShellRunning build.ps1Preinstalled on Windows; pwsh works on Linux/macOS
STM32CubeProgrammer + ST-LINKFlashing the STM32Any SWD-capable probe works
Python 3 (optional)PC test utilitiespip install pyserial requests
Fusion 360 / slicer (optional)Modifying/printing the enclosureSTEP and STL files are included

Building the hardware

DriveLink mainboard front and back Assembled DriveLink mainboard (front and back).

PCBs

  1. Open Mainboard/Projekt_Mechatronik_DC-AC.kicad_pro and HMI/PCB/VFD-HMI-Module.kicad_pro in KiCad 10.

  2. Export Gerber and drill files (File → Fabrication Outputs) and order the boards — the prototypes were manufactured by JLCPCB with default settings.

  3. Source the components: the mainboard BOM is included as Projekt_Mechatronik_DC-AC.csv (semicolon-separated, with datasheet links); export the HMI BOM from KiCad if needed. Key parts:

    FunctionPartManufacturer
    Power module (3-phase inverter)IM06B50GC1 (600 V / 50 A)Infineon
    Motor controllerSTM32G474RETxSTMicroelectronics
    HMI controllerESP32-S3 moduleEspressif
    RectifierGBU5010MCC
    Inrush limiter (NTC)SL32 5R020Ametherm
    DC-link capacitors4× ESMM401VSN561MA40S, 560 µF / 400 VChemi-Con
    Current shunts3× GMR100HJBFHR020, 20 mΩ / 7 WRohm
  4. Assemble and solder the boards (mostly SMD; the power module, connectors, and electrolytics are through-hole).

Enclosure

The case/ folder contains the printable enclosure:

  • housing.f3z / housing.step — the main enclosure (Fusion 360 archive and neutral STEP)
  • HMI_blende.stl — front bezel for display, encoder, and buttons
  • Propeller_groß.f3d / .step — impeller for the cooling fan
  • Mainboard/Ständer.stl — stand for bench operation of the bare PCB

Print the STLs on any FDM printer (no special settings required); use the STEP/F3Z sources to adapt the design.

Building the firmware

The device runs two firmwares: the HMI firmware (hand-written, PlatformIO) and the motor-control firmware (generated from the PLECS model).

HMI firmware (ESP32-S3)

sh
cd HMI/Firmware
pio run -e esp32-s3-devkitc-1                 # build
pio run -e esp32-s3-devkitc-1 -t upload       # flash via USB
pio device monitor -b 115200                  # serial log

platformio.ini defines two environments: esp32-s3-devkitc-1 for the actual HMI hardware and esp32 for bench tests on a generic ESP32 devkit. All library dependencies (U8g2, ESP32Encoder, ESPAsyncWebServer, ArduinoJson) are fetched automatically on first build.

Motor-control firmware (STM32G474)

The PLECS model is the single source of truth for the motor control — the STM32 code is generated, not written by hand:

  1. Open plecs/VFD_SW.plecs in PLECS (the Coder target STM32G4x is preconfigured in the model).

  2. Open Coder → Coder options…, choose an output directory (e.g. plecs/VFD_SW_codegen, which is gitignored), and click Build to generate the sources (VFD_SW_1.c, …) and the makefile VFD_SW.mk.

  3. Copy plecs/dirty_patch/build.ps1 into the output directory and run it:

    powershell
    cd plecs/VFD_SW_codegen
    pwsh ./build.ps1     # or run in Windows PowerShell

    The script activates the embedded UART code (see below) and runs make clean && make, producing an .elf binary.

  4. Connect an ST-LINK to the mainboard's SWD header and flash the .elf with STM32CubeProgrammer.

How the "dirty patch" works

The generated firmware needs UART code (STM32 HAL) to talk to the HMI, but PLECS also compiles the model's C-Script for host-side simulation, where no HAL exists. The UART implementation therefore lives inside the model's C-Script blocks wrapped in comment guards:

c
/*//                      ← guard line: everything below is a comment…
#define UART_ENABLED
... real UART code ...
//*/                      ← …until here

#ifndef UART_ENABLED
void uart_init(void) {}   /* no-op stubs used during simulation */
...
#endif
  • In simulation the guards stay in place: the UART block is one big comment and the no-op stubs compile instead.
  • For the target build build.ps1 deletes the guard lines from the generated VFD_SW_1.c, activating the real implementation before calling make.

The files in plecs/dirty_patch/ (code_declarations.c, start_function_code.c, output_function_code.c) are reference copies of those C-Script sections. To change the UART code, edit it inside the PLECS model and keep the copies in sync.

Operating manual

  1. Assemble both boards into the enclosure, connect the motor phases, and close the case before applying mains power.
  2. Switch on the mains input. The NTC soft-start charges the DC link; the HMI boots into the STOPPED state (no output).
  3. Control the drive from the front panel:
ControlAction
Rotary encoderSelect the frequency setpoint (−100 … +100 Hz; negative values reverse rotation)
Encoder pushApply the selected setpoint to the output
Confirm buttonToggle static/dynamic mode — in dynamic mode the output follows the encoder live, without pressing
Back buttonEnable / disable the output (STOPPED)

The display shows the live output frequency (large, right) and the pending setpoint (left, in static mode) in the top half, and DC-link voltage plus module temperature in the bottom half. When the output is disabled, STOPPED is shown and 0 Hz is commanded.

Web dashboard & API

The HMI opens its own WiFi access point:

  • SSID: DriveLink — Password: DriveLink123
  • Dashboard: http://192.168.4.1 — live telemetry chart and remote frequency control

Web app

The dashboard is backed by a small JSON API that can also be used directly:

sh
# Read telemetry
curl http://192.168.4.1/api/status
# → {"frequency_hz":50.00,"voltage_v":324.10,"temperature_c":42.5,"output_disabled":false}

# Set the frequency setpoint (clamped to −100…+100 Hz)
curl -X PUT http://192.168.4.1/api/status \
     -H "Content-Type: application/json" \
     -d '{"frequency_hz": 42}'

Developing without hardware

HMI/pc_testing/ contains helpers for working on the HMI without a powered mainboard:

  • web_test.py — serves the dashboard locally at http://127.0.0.1:8000 with simulated telemetry, and can forward setpoints to a connected device; useful for dashboard UI work. The browser assets (static.html, chart.js) are the sources for the copies embedded in HMI/Firmware/include/web.h — after editing them, update the raw literals there.
  • uart_test.py — emulates a mainboard on a USB-UART adapter, answering setpoints with a rough induction-motor model. Note that it still speaks an older protocol revision (see docs/UART_PROTOCOL.md).

Known limitations

Honest notes from the project report and code:

  • The current measurement is unreliable — the amplifier signal arriving at the STM32 is too noisy, so phase currents are not displayed.
  • Due to a signal-wiring mix-up in the PLECS model, the temperature is transmitted in the L1-current telemetry slot; the HMI compensates in software (see docs/UART_PROTOCOL.md).
  • Rapid setpoint changes cause visible motor jerk — there is no frequency ramp yet.
  • At continuous 50 Hz operation the module reaches 60–70 °C; a larger fan is planned.
  • The telemetry frame has no checksum and no byte stuffing, so occasional frames are dropped (tolerated by design).

Documentation

Team

Developed as part of Projekt Mechatronik at Munich University of Applied Sciences (HM), supervised by Prof. Dr. Marek Galek and Prof. Dr. Ulrich Unterhinninghofen:

License

This project is licensed under the GNU General Public License v3.0 — see LICENSE.

Parts

190
QtyValueFootprintReferences
141nFCapacitor_SMD:C_0805_2012MetricC2, C3, C4, C5, C6, C12, C13, C14, C17, C20, C21, C51, C52, C53
13TestPoint_2PoleTestPoint:TestPoint_2Pads_Pitch2.54mm_Drill0.8mmTP4, TP5, TP6, TP7, TP9, TP10, TP11, TP12, TP13, TP14, TP15, TP20, TP21
11100Resistor_SMD:R_0805_2012MetricR6, R7, R8, R9, R10, R11, R20, R21, R22, R45, R48
10100nFCapacitor_SMD:C_0805_2012MetricC1, C9, C11, C19, C29, C64, C65, C66, C67, C68
8100nCapacitor_SMD:C_0603_1608MetricC_bypass_STM2, C16, C42, C43, C44, C45, C46, C48
71kResistor_SMD:R_0805_2012MetricR1, R2, R3, R4, R28, R32, R37
722µFCapacitor_SMD:C_1206_3216MetricC7, C8, C10, C32, C33, C34, C35
7AMT0440007DB0000GBenutzerdefiniert:AMT0440007DB0000GJ5, J6, J8, J9, J10, J11, J12
7MountingHoleMountingHole:MountingHole_3.2mm_M3H4, H5, H6, H7, H8, H9, H10
610kResistor_SMD:R_0805_2012MetricR5, R18, R25, R26, R36, R38
41mFCapacitor_THT:CP_Radial_D35.0mm_P10.00mm_SnapInC54, C55, C56, C57
420VDiode_SMD:D_MiniMELFD1, D2, D3, D4
31N6857URDiode_SMD:D_MELFD13, D14, D15
31µFCapacitor_SMD:C_0805_2012MetricC23, C49, C63
39.09kResistor_SMD:R_0805_2012MetricR27, R31, R35
3GMR100HJBFHR020Benutzerdefiniert:GMR100HJBFHR020R13, R14, R15
3MCP6N11-001E_SNBenutzerdefiniert:SOIC127P600X175-8NIC2, IC3, IC4
3MountingHoleMountingHole:MountingHole_2.2mm_M2H1, H2, H3
21.2mHInductor_SMD:L_TDK_NLV32_3.2x2.5mmL1, L2
2100kResistor_SMD:R_0805_2012MetricR46, R49
2100nF, @450VCapacitor_SMD:C_1206_3216MetricC24, C25
2100µF, @35VCapacitor_SMD:CP_Elec_6.3x7.7C50, C62
210µFCapacitor_SMD:C_0805_2012MetricC18, C28
210µF, @450VCapacitor_THT:CP_Radial_D12.5mm_P5.00mmC36, C58
21N4148Diode_SMD:D_SOD-323D5, D10
21N914WTDiode_SMD:D_SOD-523D16, D19
21uCapacitor_SMD:C_0603_1608MetricC15, C47
22.2µFCapacitor_SMD:C_0805_2012MetricC37, C60
2220nFCapacitor_SMD:C_0805_2012MetricC39, C61
223.7kResistor_SMD:R_0805_2012MetricR16, R39
22kResistor_SMD:R_0805_2012MetricR40, R41
23kResistor_SMD:R_0805_2012MetricR19, R44
24.99kResistor_SMD:R_0805_2012MetricR17, R43
2470pFCapacitor_SMD:C_0805_2012MetricC38, C59
26,8pCapacitor_SMD:C_0603_1608MetricC40, C41
2AR1FJ-M3_HBenutzerdefiniert:SODFL3718X108ND6, D12
2BLM21AG601SN1DInductor_SMD:L_0805_2012MetricL9, L10
2GSF0301Package_TO_SOT_SMD:SOT-523Q1, Q2
2LEDLED_SMD:LED_0805_2012MetricD8, D9
2MP9488GS-PBenutzerdefiniert:SOIC127P600X175-8NIC1, IC5
2RB588VYM100FHTRBenutzerdefiniert:TDZVTR51D17, D18
2STTH1R06AFBenutzerdefiniert:SODFL4724X103ND7, D11
2SolderJumper_3_OpenJumper:SolderJumper-3_P1.3mm_Open_RoundedPad1.0x1.5mm_NumberLabelsJP1, JP2
10Resistor_SMD:R_0805_2012MetricR29
1100Resistor_SMD:R_0603_1608MetricR42
1100pFCapacitor_SMD:C_0805_2012MetricC30
118,2kResistor_SMD:R_0603_1608MetricR23
122nFCapacitor_SMD:C_0504_1310MetricC22
14u7Capacitor_SMD:C_0603_1608MetricC31
16,2kResistor_SMD:R_0603_1608MetricR24
16.8uBenutzerdefiniert:NRS5030T6R8MMGJL6
168Resistor_SMD:R_0805_2012MetricR12
180; 0,2WResistor_SMD:R_0805_2012MetricR47
1AP63200WUPackage_TO_SOT_SMD:TSOT-23-6U2
1Conn_01x02_MountingPinConnector_JST:JST_GH_BM02B-GHS-TBT_1x02-1MP_P1.25mm_VerticalJ1
1Conn_01x05_PinConnector_JST:JST_PH_B5B-PH-K_1x05_P2.00mm_VerticalJ2
1Conn_01x06_PinConnector_PinHeader_1.27mm:PinHeader_1x06_P1.27mm_VerticalJ7
1Conn_ST_STDC14Connector_PinHeader_1.27mm:PinHeader_2x07_P1.27mm_Vertical_SMDJ3
1GBU5010-BPBenutzerdefiniert:GBU6MBPC01BR1
1IM06B50GC1Benutzerdefiniert:IM564-X6DU1
1J107F1CS2012VDC.45Benutzerdefiniert:J107F1CS2012VDC45K1
1NX2016SA24S08891Crystal:Crystal_SMD_2016-4Pin_2.0x1.6mmY2
1SL325R020Benutzerdefiniert:SL325R020RT1
1STM32G474RETxPackage_QFP:LQFP-64_10x10mm_P0.5mmU4
1SolderJumper_2_OpenJumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mmJP3
1TLV9041IDBVRG4Benutzerdefiniert:SOT95P280X145-5NIC6
1TestPoint_2PoleTestPoint:TestPoint_2Pads_Pitch5.08mm_Drill1.3mmTP19

More from DriveLink-HM/DriveLink

1
  • 2 layers65 × 35 mmVFD HMI Module, the printed circuit board in 3D

    VFD HMI Module

    DriveLink-HM/DriveLink

    A Variable Frequency Drive, designed and built for Projekt Mechatronik in SoSe26

    21 parts2GPL-3.0

Similar boards

  • 2 layers97.4 × 45.7 mmTsal ail, the printed circuit board in 3D

    Tsal ail

    olin-electric-motorsports/olin-electric-motorsports

    OEM Monorepo

    71 parts14
  • 2 layers81.2 × 42.7 mmVoltage Measurement KR, the printed circuit board in 3D

    Voltage Measurement KR

    UCDFS/Circuits

    KiCad projects and PCB designs for UCDFS electronic circuits.

    56 parts1
  • 2 layers110 × 124 mmVision arm, the printed circuit board in 3D

    Vision arm

    deanasmith/vision-arm

    should be any of the following: - calibrate: Calibrate the cameras with the charuco board - track: Start tracking with multiple cameras - mono: Start with a single camera (mostly for debugging)

    68 parts
  • 2 layers85 × 45 mmHeater pad driver, the printed circuit board in 3D

    Heater pad driver

    Queens-Rocket-Engineering-Team/gse-control-node

    The GSE control node is the control PCB for GSE systems to integrate with launch control. This includes actuator control, fan control, and a load cell reading.

    30 parts
  • 2 layers50 × 50 mmStepDown, the printed circuit board in 3D

    StepDown

    AlejandroKT/KiCad-Projects

    Some small Projects made in KiCaD v8.0

    15 parts
  • 2 layers85 × 73 mmPico ecg, the printed circuit board in 3D

    Pico ecg

    prototipado/ECG_Phantom

    Ecosistema abierto para el diseño, simulación, generación de bioseñales electrocardíacas y monitoreo en tiempo real.

    164 partsMIT
  • 4 layers65 × 30 mmIcepi zero, the printed circuit board in 3D

    Icepi zero

    cheyao/icepi-zero

    An ECP5 FPGA Dev Board in a Pi Zero form

    163 parts869

Questions

How big is the Projekt Mechatronik DC AC PCB?

It measures 200 × 100 mm and has 4 copper layers, 1.6 mm thick.

What parts does the Projekt Mechatronik DC AC use?

190 parts, built around the MP9488GS-P, AP63200WU, AMT0440007DB0000G and 1N6857UR-1. 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 Projekt Mechatronik DC AC KiCad files?

From the DriveLink-HM/DriveLink repository on GitHub, at the commit this page was made from: the board is Mainboard/Projekt_Mechatronik_DC-AC.kicad_pcb and its schematic HMI/PCB/VFD-HMI-Module.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Projekt Mechatronik DC AC design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).