Skip to the content
PCBKitNew board
4 layers75 × 35 mmCustom ESC, the printed circuit board in 3D

Closed-loop BLDC linear-actuator with custom pcb (STM32G4, DRV8316) — UiA bachelor project

Size
75 × 35 mm
Copper layers
4
Thickness
1.6 mm
Parts
118
Nets
99
Pads
350
Tracks, vias
887, 173
Pours
2
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
22 May 2026
Updated
22 May 2026

Overview

Custom ESC is an open-source printed circuit board by BenjaminM25, from the BenjaminM25/UiActuatorProject repository on GitHub, published under the MIT licence. It is a 4-layer board of 75 × 35 mm with 118 parts on 99 nets, routed with 887 tracks and 173 vias.

It is built around the DRV8316RQRGFRQ1, TPS62903RPJR and AP2112K-3.3, with the USBLC6-2SC6 and NCE3407 among its other parts. Its parts include 34 capacitors, 30 resistors, 21 connectors, 6 ICs and 5 diodes. It belongs with the robots and motor control boards and the STM32 boards of this library.

Main components

5

README

README.md

Closed-Loop Linear Actuator

Bachelor project, University of Agder (UiA), 2026 Custom BLDC motor controller for a leadscrew linear actuator with closed-loop position control.

Overview

This project contains code and production files for a small linear actuator using the lead screw principle with a custom pcb. The system consists of a 12 mm BLDC motor with a 1:24 gearbox, integrated hall- sensors for motor commutation, a AS5600L magnetic encoder module for position/velocity control. It also supports communication over CAN and USB-C.

A demonstration video of the actuator can be found here:

Demonstration video

Features

  • Trapezoidal 3-PWM/6-PWM commutation (Hall-sensor based)
  • Closed-loop position control (profiled trajectory + PID)
  • Phase current sensing via ADC
  • On-chip temperature monitoring with thermal protection
  • CAN (FDCAN) communication
  • Live telemetry over USB CDC (Teleplotter)

Hardware

ComponentPart
MCUSTM32G473RC
Gate driverDRV8316 (SPI)
Position encoderAS5600L (I2C)
CommutationHall sensors
CAN transceiverTCAN3403
Motor12 mm BLDC, 1:24

Third Party

The DRV8316 BLDC Driver has been adapted from theSIMPLEFOC GitHub library.

Building & flashing

The CubeIDE project contains custom files for the actuator within Core/Actuator. The DRV8316 driver, hall encoder and magnetic encoder is found in Drivers/DRV8316.

The .elf file generated in Debug after building the project is uploaded to the pcb using STM32CubeProgrammer. First time use of the pcb requires either a ST-Link debugger using swd or programming USB-C by setting the mcu in the DFU(device firmware upgrade) mode.

Disclaimer

Portions of this firmware were developed with the assistance of AI-generated code. All such content has been reviewed, tested, and adapted by the author.

License

This project is licensed under the MIT License — see the LICENSE file.

Parts

118
QtyValueFootprintReferences
15AConnector_Wire:SolderWirePad_1x01_SMD_1x2mmJ4, J5, J6, J7, J9, J11, J12, J13, J14, J15, J16, J17, J18, J19, J20
10TestPointTestPoint:TestPoint_Pad_D1.0mmTP1, TP2, TP3, TP4, TP5, TP6, TP7, TP8, TP9, TP10
80.1uFPCM_JLCPCB:C_0402C17, C18, C19, C20, C21, C23, C25, C26
610kPCM_JLCPCB:R_0402R6, R8, R17, R18, R19, R20
51uFPCM_JLCPCB:C_0402C1, C14, C15, C22, C24
4MountingHoleMountingHole:MountingHole_2.2mm_M2H1, H2, H3, H4
30.1 uFPCM_JLCPCB:C_0402C3, C5, C7
31000 OhmPCM_JLCPCB:R_0402R2, R3, R4
3100kPCM_JLCPCB:R_0402R7, R9, R10
3100nFPCM_JLCPCB:C_0402C32, C33, C34
31kPCM_JLCPCB:C_0603R21, R22, R23
330pFPCM_JLCPCB:C_0402C8, C9, C10
35.1kPCM_JLCPCB:R_0402R1, R28, R29
3C_SmallPCM_JLCPCB:C_0603C27, C30, C31
3greenLED_SMD:LED_0603_1608MetricD1, D2, D4
2100PCM_JLCPCB:R_0402R12, R16
2100uFnewfootprints:CAP_T55D_VISC28, C29
210uFCapacitor_SMD:C_0603_1608MetricC12, C16
22.2kPCM_JLCPCB:R_0402R25, R26
222uFCapacitor_SMD:C_0603_1608MetricC11, C13
2AConnector_Wire:SolderWirePad_1x01_SMD_2x4mmJ8, J10
2SolderJumper_2_OpenJumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mmJP1, JP2
11 uFPCM_JLCPCB:C_0402C4
110 uFCapacitor_SMD:C_0603_1608MetricC2
1120PCM_JLCPCB:R_0603R24
113PCM_JLCPCB:D_SOD-123FLD5
11uHInductor_SMD:L_Coilcraft_XxL4020L1
122PCM_JLCPCB:R_0402R5
132.4kPCM_JLCPCB:R_0402R13
1330RPCM_JLCPCB:L_0603FB1
133kPCM_JLCPCB:R_0402R27
13Anewfootprints:FUSE_SMDF050-2F1
147 nFPCM_JLCPCB:C_0402C6
1470PCM_JLCPCB:R_0402R11
1520PCM_JLCPCB:R_0402R15
176.8kPCM_JLCPCB:R_0402R14
182kPCM_JLCPCB:R_0402R30
1AP2112K-3.3Package_TO_SOT_SMD:SOT-23-5U3
1DRV8316RQRGFRQ1footprints:RGF0040E-IPC_AU1
1EVQ-PLHA15newfootprints:EVQPLHA15_pushbuttonS1
1NCE3407Package_TO_SOT_SMD:SOT-23Q1
1SG-7050CANX1G0044810014:X1G004481009712_EPSY1
1STM32G473RCTxPackage_QFP:LQFP-64_10x10mm_P0.5mmU4
1TCAN3403Package_TO_SOT_SMD:SOT-23-8_HandsolderingU5
1TPS62903RPJRTPS609032_Buck:TPS62903RPJRRPJ0009AU2
1USBLC6-2SC6Package_TO_SOT_SMD:SOT-23-6U6
1USB_C_Receptacle_USB2.0_14PConnector_USB:USB_C_Receptacle_GCT_USB4105-xx-A_16P_TopMnt_HorizontalJ21
1comTestPoint:TestPoint_Pad_D1.0mmJ2
1ncTestPoint:TestPoint_Pad_D1.0mmJ1
1noTestPoint:TestPoint_Pad_D1.0mmJ3
1redLED_SMD:LED_0603_1608MetricD3

Questions

How big is the Custom ESC PCB?

It measures 75 × 35 mm and has 4 copper layers, 1.6 mm thick.

What parts does the Custom ESC use?

118 parts, built around the DRV8316RQRGFRQ1, TPS62903RPJR, AP2112K-3.3 and USBLC6-2SC6. 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 Custom ESC KiCad files?

From the BenjaminM25/UiActuatorProject repository on GitHub, at the commit this page was made from: the board is KiCad/Custom_ESC.kicad_pcb and its schematic KiCad/Connectors.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Custom ESC design in my own project?

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

Similar boards

  • 4 layers64.1 × 72.8 mmBeeFASYER SPARROW, the printed circuit board in 3D

    BeeFASYER SPARROW

    beewarden/BeeFASYER_SPARROW

    Each BEEFASYER monitoring network is centered on exactly one Sparrow.

    142 parts1CERN-OHL-S-2.0
  • 6 layers49.9 × 49.9 mmMTR Tiny MD, the printed circuit board in 3D

    MTR Tiny MD

    MoreThanRobotsFR/MTR_Tiny_MD

    This Arduino project utilizes SimpleFOC library for sensor-based brushless motor control with a DRV8316 driver. It also incorporates an Adafruit NeoPixel for visual feedback.

    101 parts10MIT
  • 4 layers160 × 90 mmMotherboard v3C, the printed circuit board in 3D

    Motherboard v3C

    Astronuat21/4DS

    An unnofficial succesor to the Nintendo 3DS.

    373 parts5AGPL-3.0
  • 4 layers60.8 × 61.3 mmOS3M Mouse, the printed circuit board in 3D

    OS3M Mouse

    spoter368/os3m-hardware

    All the hardware needed to build your own OS3M Mouse!

    51 parts399
  • 2 layers390 × 120.2 mmKeyboard, the printed circuit board in 3D

    Keyboard

    joshajohnson/entropy

    Strange keyboard with a left hand numpad

    334 parts97
  • 2 layers89 × 124 mmHub20, the printed circuit board in 3D

    Hub20

    joshajohnson/Hub20

    Hub20 is a numpad with a bunch of features you never knew you needed.

    183 parts68
  • 2 layers84.2 × 100 mmFabpack out v5 8, the printed circuit board in 3D

    Fabpack out v5 8

    yuz207/agentpad13

    agentpad13 — open-source 13-key macropad for agentic work (RP2040, vial-qmk, planar joystick, Raw HID agent-status protocol)

    126 parts41
  • 2 layers80.8 × 30 mmStm32 dev, the printed circuit board in 3D

    Stm32 dev

    brainstorm/bbtrackball-rs

    Experimenting with Blackberry trackball for keyboard ergonomics

    61 parts34