Skip to the content
2 layers80 × 80 mmBldcpcbclean, the printed circuit board in 3D

Sensored 6-step BLDC motor controller using an Arduino and three IR2112 gate drivers. Includes open-loop and closed-loop PI speed control, shunt-based overcurrent protection and a KiCad PCB layout. Simulated in Proteus.

Size
80 × 80 mm
Copper layers
2
Thickness
1.67 mm
Parts
28
Nets
39
Pads
111
Tracks, vias
252, 0
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
20 Oct 2026
Updated
20 Oct 2026

Overview

Bldcpcbclean is an open-source printed circuit board by akp333, from the akp333/bldc-motor-control repository on GitHub. It is a 2-layer board of 80 × 80 mm with 28 parts on 39 nets, routed with 252 tracks and 0 vias.

It is built around the IR2112PBF and LM393. Its parts include 9 resistors, 6 transistors, 4 ICs, 3 capacitors and 3 diodes. It belongs with the robots and motor control boards of this library.

Main components

2

README

README.md

BLDC Motor Controller (Arduino, PI Control and Custom PCB)

Sensored 6-step BLDC motor control built around an Arduino and three IR2112 half-bridge gate drivers. It covers open-loop speed control, closed-loop PI speed control, hardware overcurrent protection and a KiCad PCB layout. The simulation was done in Proteus.

StageWhat it doesTools
PS-1Open-loop Hall-sensor commutation, CW/CCW switching, overcurrent cutoffProteus, Arduino
PS-2Closed-loop PI speed control (200–500 RPM)Proteus, Arduino
Bonus2-layer power-stage PCB with current-rated tracesKiCad

Hardware

  • Power stage: 3 half-bridges (6 N-MOSFETs) driven by 3x IR2112. Each phase has a bootstrap diode and capacitor so the high-side gate can be driven to VS + 12 V.
  • Sensing: 3 Hall sensors with 1k pull-ups give rotor position.
  • Overcurrent protection: a single 0.1 Ω shunt on the shared low-side return feeds a comparator. Only 2 phases conduct at a time, so one shunt sees the total current. The comparator trips an Arduino input, which turns every MOSFET off.
  • Controls: a potentiometer sets speed and a button toggles direction.

PS-1: Open-Loop Control

  • Found the Hall code for each of the 6 commutation steps experimentally. I forced each step, read the Hall bits, and noticed that the two values seen per step correspond to CW vs CCW.
  • Added a manual 6-step startup kick, because the motor can't self-start from Hall feedback alone.
  • Mapped the pot to the delay between commutation steps. This targeted RPM much more predictably than PWM duty did, with slight oscillation about the target.
  • Overcurrent trips immediately and all gates go low. RPM then coasts down slowly because the simulation has little friction.

PS-2: Closed-Loop PI Control

  • The pot sets a target of 200–500 RPM. Measured RPM is computed from the time between Hall transitions, and the PI controller adjusts PWM duty on the high-side switches.
  • Hall transitions stood in for a rotary encoder, since Proteus has no encoder compatible with this motor model. This gives only 6 updates per electrical revolution, so resolution is lower.
  • Integral control reduces steady-state error.
  • The accumulated error is capped to prevent overshoot.
  • Kp = 2, Ki = 1.2, tuned by hand along with motor friction and load.
TargetOvershootSettled at
200 RPM~15 RPM~190–195 RPM
500 RPMnone~490 RPM

The residual steady-state error is a deliberate trade-off. Raising Ki further caused overshoot, oscillation and Proteus "timestep too small" errors. Less overshoot at 500 RPM is likely because friction rises with speed.

Bonus: PCB (KiCad)

  • Reused the PS-1 power and comparator schematic. The motor, Hall sensors and button are brought out to headers, and the comparator Vref comes from a fixed voltage divider instead of a pot.
  • Connectors: J1 (+12 V / +5 V), J2 (3-phase motor output), J3 (8-pin Arduino interface).
  • Ran ERC (added PWR_FLAGs and the LM393 supply pins), assigned footprints, and routed the board in 2 layers on 80 x 80 mm.
  • Trace sizing: the sustained current measured in simulation was ~7 A, which needs ~2.2 mm width at a 10 °C rise using the KiCad calculator. 1 oz copper made this too wide to route, so I switched to 2 oz (70 µm). Signal traces use the default width.
  • A ~8 A transient spike was ignored for sizing, since trace heating depends on sustained rather than instantaneous current.
  • DRC passed and the board was checked in 3D view.

Known Limitations

  • Simulation only, no hardware build or physical testing.
  • Tuning is specific to the 200–500 RPM range and the load and friction I set in Proteus.
  • Single pole-pair motor assumed in the RPM calculation (POLE_PAIRS = 1).
  • Footprints for PCB were chosen from online research and not checked against real component availability.

Parts

28
QtyValueFootprintReferences
71kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1, R2, R3, R4, R5, R6, R9
6NMOSPackage_TO_SOT_THT:TO-220-3_VerticalQ1, Q2, Q3, Q4, Q5, Q6
31000nFCapacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mmC1, C2, C3
3DDiode_THT:D_DO-35_SOD27_P7.62mm_HorizontalD1, D2, D3
3IR2112Package_DIP:DIP-14_W7.62mmU1, U2, U3
10.1Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR7
16kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR8
1Conn_01x02Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ1
1Conn_01x03Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ2
1Conn_01x08Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_VerticalJ3
1LM393Package_DIP:DIP-8_W7.62mmU4

Similar boards

  • 2 layers231.1 × 106.7 mmSnark barker, the printed circuit board in 3D

    Snark barker

    schlae/snark-barker

    A 100% compatible replica of the famed SB 1.0 sound card

    199 parts687
  • 2 layers130 × 80 mmSmu main 1, the printed circuit board in 3D

    Smu main 1

    jaromir-sukuba/J-SMU

    DIY source-measure unit

    210 parts244
  • 2 layers100 × 85 mmVNA, the printed circuit board in 3D

    VNA

    profdc9/VNA

    Vector Network Analyzer based on the STM32F103C8T6 bluepill

    178 parts93
  • 4 layers292.1 × 88.3 mmSnark barker mca, the printed circuit board in 3D

    Snark barker mca

    schlae/snark-barker-mca

    A Sound Blaster compatible sound card for Micro Channel bus computers

    177 parts69
  • 2 layers133 × 98 mmPrecharge, the printed circuit board in 3D

    Precharge

    michaelruppe/FSAE

    Projects for Formula SAE Electric Vehicle competition (Australia 2019/2020)

    121 parts59MIT
  • 4 layers285.1 × 48.1 mmAyab esp32, the printed circuit board in 3D

    Ayab esp32

    AllYarnsAreBeautiful/ayab-hardware

    Contains the schematics and layouts for the AYAB Arduino shield

    246 parts50CC-BY-SA-4.0
  • 4 layers72.4 × 44.4 mmBtmdpcb v04 eval, the printed circuit board in 3D

    Btmdpcb v04 eval

    17o2/bluetooth-minidisc

    Adding built-in bluetooth connectivity to a 20-year-old Mindisc player

    115 parts45
  • 2 layers29 × 27 mmUSB C-3-way splitter V5, the printed circuit board in 3D

    USB C-3-way splitter V5

    bluepylons/USB-C-3-way-splitter

    A splitter board (for making a cable splitter) for turning a 5V 3A USB power source to 3 5V 1A USB sources

    39 parts40MIT

Questions

How big is the Bldcpcbclean PCB?

It measures 80 × 80 mm and has 2 copper layers, 1.67 mm thick.

What parts does the Bldcpcbclean use?

28 parts, built around the IR2112PBF and LM393. 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 Bldcpcbclean KiCad files?

From the akp333/bldc-motor-control repository on GitHub, at the commit this page was made from: the board is Bonus/bldcpcbclean.kicad_pcb and its schematic Bonus/bldcpcbclean.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Bldcpcbclean design in my own project?

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