

Bldcpcbclean
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
2IR2112PBF
DIP-14-40℃~+125℃ 10V~20V 2 200mA 40ns 420mA 80ns Enable shutdown、Interleaved conduction protection IGBT、MOSFET Low Side、High Side DIP-14 Gate Drivers ROHSInfineon TechnologiesGate Drive ICsLM393
SOP-8-16V~16V 0℃~+70℃ 2 2.5mA 250nA 2V~36V 36V 5mV 5nA Fail-safe function Open-drain SOP-8 Comparators ROHSMSKSEMIComparators
README
README.mdBLDC 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.
| Stage | What it does | Tools |
|---|---|---|
| PS-1 | Open-loop Hall-sensor commutation, CW/CCW switching, overcurrent cutoff | Proteus, Arduino |
| PS-2 | Closed-loop PI speed control (200–500 RPM) | Proteus, Arduino |
| Bonus | 2-layer power-stage PCB with current-rated traces | KiCad |
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.
| Target | Overshoot | Settled at |
|---|---|---|
| 200 RPM | ~15 RPM | ~190–195 RPM |
| 500 RPM | none | ~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| Qty | Value | Footprint | References |
|---|---|---|---|
| 7 | 1k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R1, R2, R3, R4, R5, R6, R9 |
| 6 | NMOS | Package_TO_SOT_THT:TO-220-3_Vertical | Q1, Q2, Q3, Q4, Q5, Q6 |
| 3 | 1000nF | Capacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mm | C1, C2, C3 |
| 3 | D | Diode_THT:D_DO-35_SOD27_P7.62mm_Horizontal | D1, D2, D3 |
| 3 | IR2112 | Package_DIP:DIP-14_W7.62mm | U1, U2, U3 |
| 1 | 0.1 | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R7 |
| 1 | 6k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R8 |
| 1 | Conn_01x02 | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J1 |
| 1 | Conn_01x03 | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J2 |
| 1 | Conn_01x08 | Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_Vertical | J3 |
| 1 | LM393 | Package_DIP:DIP-8_W7.62mm | U4 |
Similar boards
- 2 layers231.1 × 106.7 mm

- 2 layers130 × 80 mm

- 2 layers100 × 85 mm

- 4 layers292.1 × 88.3 mm

Snark barker mca
schlae/snark-barker-mca
A Sound Blaster compatible sound card for Micro Channel bus computers
177 parts69 - 2 layers133 × 98 mm

Precharge
michaelruppe/FSAE
Projects for Formula SAE Electric Vehicle competition (Australia 2019/2020)
121 parts59MIT - 4 layers285.1 × 48.1 mm

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 mm

Btmdpcb v04 eval
17o2/bluetooth-minidisc
Adding built-in bluetooth connectivity to a 20-year-old Mindisc player
115 parts45 - 2 layers29 × 27 mm

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.