Skip to the content
2 layers177 × 91.6 mmPower Charg AUTO 12V C, the printed circuit board in 3D

Experimental STM32G474-based high-current battery charger and programmable synchronous buck converter. KiCad hardware and STM32CubeIDE firmware.

Size
177 × 91.6 mm
Copper layers
2
Thickness
1.6 mm
Parts
160
Nets
65
Pads
365
Tracks, vias
902, 36
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
19 Jul 2026
Updated
19 Jul 2026

Overview

Power Charg AUTO 12V C is an open-source printed circuit board by Aleksei327, from the Aleksei327/STM32G474-Power-Charger repository on GitHub. It is a 2-layer board of 177 × 91.6 mm with 160 parts on 65 nets, routed with 902 tracks and 36 vias.

It is built around the IR2113S, AMS1117-3.3V and D882, with the IRFB4110, SS14 and B340 among its other parts. Its parts include 52 resistors, 45 capacitors, 18 diodes, 6 connectors and 5 ICs. It belongs with the power boards and the STM32 boards of this library.

Main components

6

README

README.md

STM32G474 Power Charger

Experimental high-current battery charger and programmable synchronous buck converter built around an STM32G474, HRTIM and an IR2113 gate driver.

Assembled charger prototype

[!WARNING] This repository is an engineering snapshot of a hand-built prototype. The power stage and bring-up firmware work, but the battery charging algorithms are not finished or certified. The design uses a modified mains-powered ATX supply, high currents and lithium-capable output voltages. Do not connect a battery or mains power unless you understand the schematic, protections, isolation and measurement setup. Never charge lithium cells without a suitable BMS/balancer and supervision.

Project Status

Hardware prototype: operational. Firmware: bring-up / experimental.

Verified on the assembled unit:

  • complementary HRTIM PWM at approximately 50.8 kHz with measured dead time of about 200 ns;
  • IR2113 high-side/low-side driver, MOSFET power stage, output inductor and battery relay;
  • voltage ADC channels for input, auxiliary 12 V, buck output and battery;
  • three parallel 10 mOhm current shunts, STM32 internal OPAMP and PWM-synchronous ADC sampling;
  • DAC + COMP1 + HRTIM external-event hardware over-current shutdown path;
  • reverse-polarity input and relay control;
  • ST7735 160 x 128 display, rotary encoder and buttons;
  • experimental CC/CV control loop;
  • short bench operation up to 12.5 A without abnormal heating;
  • approximately 20 mV p-p output ripple after adding two 1000 uF low-ESR output capacitors. This is a prototype measurement, not a guaranteed specification.

Still in progress:

  • production-ready charge state machine and profile validation;
  • Li-ion/LiFePO4, lead-acid and nickel charge termination algorithms;
  • persistent calibration/settings;
  • complete NTC-based thermal management and controlled fan logic;
  • long-duration thermal, fault and battery tests;
  • fabrication-ready PCB cleanup and a clean DRC result.

The current source is published so the implementation can be reviewed and improved. No ready-to-flash release binary is provided because the battery algorithms are not complete.

Architecture

BlockCurrent implementation
ControllerWeAct STM32G474CEU6 MiniCore, 104 MHz
Main inputModified ATX supply, approximately 18.8-19 V
ConverterSynchronous buck, IRFB4110 MOSFET pair
Gate driverIR2113, 12 V gate supply
PWMHRTIM Timer A, complementary outputs, 5-95% test range
Current sense3 x 10 mOhm in parallel, Kelvin wiring, internal OPAMP PGA x2
Fast protectionOPAMP output to PB1/COMP1, DAC threshold, HRTIM EEV6 shutdown
Voltage senseBattery, buck output, 18.8 V input and auxiliary 12 V dividers
User interfaceST7735 160 x 128 TFT, encoder, START/MENU/RESET buttons
Output connection12 V automotive relay with reverse-polarity check

KiCad PCB top render

Repository Layout

PathContents
hardware/kicad/KiCad 10 schematic, PCB, project and local libraries
hardware/plots/Schematic PDF and copper/silkscreen/edge PDF plots
firmware/STM32G474_Charger/STM32CubeIDE project and source
docs/hardware-design-spec.mdDetailed Russian engineering notes and design intent
docs/firmware-architecture.mdFirmware structure, pin map and bring-up history
docs/status-and-validation.mdBuild, ERC/DRC and bench-test status
docs/photos/Full-resolution prototype photographs

See hardware/README.md and firmware/README.md before opening or rebuilding the project.

Build

The firmware was built successfully with STM32CubeIDE 1.18.0:

  1. Import firmware/STM32G474_Charger as an existing project.
  2. Select the Debug configuration.
  3. Build the project.

Validation on 2026-07-19 completed with 0 compiler errors and 0 warnings. The resulting image size was 59,812 bytes of text, 120 bytes of data and 4,352 bytes of BSS.

CAD Validation

The included KiCad project opens and exports with KiCad 10.0.1. Current checks:

  • ERC: 0 errors, 3 warnings for symbols that differ from their library copies;
  • DRC: 184 violations and 5 unconnected-item reports.

Many DRC messages are caused by local footprint copies, silkscreen overlap, manual overrides and the several physical board sections kept in one PCB file. There are also connection/edge-clearance items that require individual review. Do not send this PCB directly to fabrication. See docs/status-and-validation.md.

Photos

Open prototype and modified ATX supply

The complete set is in docs/photos and selected views are listed in docs/photo-gallery.md.

License

No project-wide open-source license has been selected for this first public snapshot. Project-specific hardware, firmware and documentation remain copyright Aleksei Subbotin. STMicroelectronics HAL/CMSIS files retain their upstream licenses. See LICENSE-NOTICE.md.


Русское описание

Это экспериментальное мощное зарядное устройство и регулируемый синхронный buck-преобразователь на STM32G474 + HRTIM + IR2113.

Силовая часть собрана и работает: проверены ШИМ, dead-time около 200 нс, драйвер и ключи, дроссель, реле, измерение напряжений и тока, синхронный опрос АЦП, аппаратная защита через OPAMP -> COMP -> HRTIM, а также лабораторный контур CC/CV. Кратковременно проверена нагрузка до 12,5 А. После установки двух выходных конденсаторов 1000 мкФ low-ESR измеренная пульсация снизилась примерно до 20 мВ пик-пик.

Но это ещё не готовая серийная зарядка. Полные алгоритмы заряда лития, свинца и никеля, завершение заряда, температурные защиты и длительные испытания ещё предстоит доделать. Исходники опубликованы как рабочий инженерный снимок для изучения и совместной доработки; готовую прошивку для безопасной зарядки аккумуляторов пока не выпускаем.

Схема, плата, исходники, инженерные заметки и фотографии находятся в соответствующих каталогах выше. Перед изготовлением новой платы обязательно надо разобрать текущие замечания DRC и сверить плату с фактически собранным экземпляром.

Parts

160
QtyValueFootprintReferences
18100nFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC7, C10, C24, C27, C28, C29, C30, C31, C33, C35, C38, C44, C45, C234, C235, C236 +2
151N4148Diode_SMD:D_MiniMELFD4, D6, D7, D8, D9, D10, D11, D12, D13, D14, D15, D16, D17, D18, D19
1410kOmResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR15, R31, R32, R35, R36, R40, R41, R42, R43, R44, R45, R49, R51, R53
11, , , , , , , , , ,
10100Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR12, R13, R16, R17, R18, R19, R20, R29, R30, R37
8470uFCapacitor_THT:CP_Radial_D10.0mm_P5.00mmC11, C17, C18, C19, C20, C39, C40, C41
410Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR33, R34, R38, R39
410uFLocal:CP_Radial_D5.0mm_P2.0-3.5mm_H11mm_HandC13, C14, C15, C16
44.7kOmResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR23, R25, R26, R47
30.01Local:Shunt_U_Constantan_D1.5mm_P19.00mm_H10.00mmR6, R10, R11
31uFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC23, C34, C43
322kOmResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR22, R27, R28
2100kOmResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR4, R48
210nFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC21, C26
210uFCapacitor_SMD:C_1210_3225Metric_Pad1.33x2.70mm_HandSolderC22, C42
21kOmResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR14, R52
2220uFCapacitor_THT:CP_Radial_D10.0mm_P5.00mmC5, C6
2330uFCapacitor_THT:CP_Radial_D10.0mm_P5.00mmC1, C2
2470pFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC36, C37
2D882Package_TO_SOT_THT:TO-126-3_VerticalQ4, Q5
2IRFB4110Package_TO_SOT_THT:TO-220-3_VerticalQ1, Q2
2SS14Diode_SMD:D_SMAD2, D5
10 OmResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR00
11,2 kOmResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR1
110,5 kOmResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR2
1180kOmResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR7
11kOmLocal:R_Axial_D5.0mm_P20.00mm_2WR46
1200kOmResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR21
1220Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR8
122uHLocal:L_THT_Power_25x15mm_P20.00mm_H25mmL2
12nFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC32
1330Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderRNLDO
14.7uFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC46
1470Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR50
16.8kOmResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR24
1680Local:R_Axial_D5.0mm_P20.00mm_2WR3
168uHLocal:L_THT_LM2596_15x10mm_P10.00mmL1
1AMS1117-3.3VPackage_TO_SOT_SMD:SOT-223-3_TabPin2U5
1B340Diode_SMD:D_SMCD3
1BTN_MENUConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ4
1BTN_RESETConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ3
1BTN_STARTConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ5
1ENCODERConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ2
1FANLocal:Fan_2Wire_P5.08mm_WireOrTerminalJ6
1IR2113Package_DIP:DIP-14_W7.62mmU1
1JD1914Local:Relay_JD1914_30x30mm_TabSlots_DraftK1
1LCD_ST7735Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_VerticalJ1
1LM2596S-ADJ(12V)Package_TO_SOT_SMD:TO-263-5_TabPin3U4
1PC817Package_DIP:DIP-4_W7.62mmU6
1Thermistor_NTCLocal:Thermistor_2Pin_P2.54mm_WirePadsTH1
1WeAct_STM32G474CEU6_MiniCoreLocal:WeAct_STM32G474CEU6_MiniCoreU2

The 146 most common of 160 parts.

Similar boards

  • 2 layers230.1 × 118.5 mmPOWER 0-50, the printed circuit board in 3D

    POWER 0-50

    Aleksei327/STM32G474-Precision-Lab-Power-Supply

    Precision 0–50 V programmable laboratory PSU with 1 mV/1 mA setting steps, hybrid synchronous-buck + linear regulation, STM32G474 control, INA228 metering, and layered hardware protection.

    207 parts4
  • 2 layers40 × 60 mmScaner v1, the printed circuit board in 3D

    Scaner v1

    Aleksei327/ESP32-C5-OBD2-Scanner

    DIY dual-CAN OBD2 adapter on Seeed XIAO ESP32-C5 with a Flutter Android app. Working prototype, tested on a Citroën C3 II: full read-only ECU scan, PSA fault codes, live data. Single-sided home-etched KiCad board.

    34 parts2
  • 2 layers47 × 84 mmBQ76925 ATMEGA328P 6S 20A BMS, the printed circuit board in 3D

    BQ76925 ATMEGA328P 6S 20A BMS

    M-S-Ali/raven-i-sentinel

    6S - 24V - 20A Battery Management System (BMS) based on TI BQ76925 and Microchip Atmega328P.

    79 parts2
  • 2 layers160.3 × 50.8 mmAPortableInductionHeater, the printed circuit board in 3D

    APortableInductionHeater

    jdelouche/aPortableInductionHeater

    This is a hardware design that can be used to create a portable induction heater.

    27 parts1
  • 4 layers114.3 × 134.5 mmExoskeleton, the printed circuit board in 3D

    Exoskeleton

    Bihyungbetter/exoskeleton

    Exoskeleton is a powered lower-limb exoskeleton with six actuated joints — hip flexion, hip abduction, and knee flexion per leg.

    60 parts
  • 2 layers121 × 75.5 mmJlctest, the printed circuit board in 3D

    Jlctest

    cjheath/jlcbasic

    JLC Basic parts library for Kicad fetched and converted from EasyEDA

    46 parts5
  • 2 layers183.5 × 133 mmGateDriver, the printed circuit board in 3D

    GateDriver

    christopherwj/SDG3

    A place for all of our files related to our project

    77 parts1
  • 4 layers190 × 91 mmInv v1, the printed circuit board in 3D

    Inv v1

    reljamar/singlePhaseInverter

    A precursor project to a future three-phase inverter for driving synchronous motors

    160 parts1MIT

Questions

How big is the Power Charg AUTO 12V C PCB?

It measures 177 × 91.6 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Power Charg AUTO 12V C use?

160 parts, built around the IR2113S, AMS1117-3.3V, D882 and IRFB4110. 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 Charg AUTO 12V C KiCad files?

From the Aleksei327/STM32G474-Power-Charger repository on GitHub, at the commit this page was made from: the board is hardware/kicad/Power_Charg_AUTO_12V_C.kicad_pcb and its schematic hardware/kicad/Power_Charg_AUTO_12V_C.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Power Charg AUTO 12V C design in my own project?

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