Skip to the content
2 layers68.5 × 84.2 mmAm32stc8051u, the printed circuit board in 3D

Using PWMA to output 3 sets of complementary PWM for driving MOSFEET, Using PWMB for capturing external throttle signals, Using ADC to sample voltage and current, for low voltage protection and over current…

Size
68.5 × 84.2 mm
Copper layers
2
Thickness
1.6 mm
Parts
110
Nets
102
Pads
454
Tracks, vias
522, 292
Pours
380
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
22 Dec 2024
Updated
22 Aug 2025

Overview

Am32stc8051u is an open-source printed circuit board by Icey7122, from the Icey7122/AM32_AI8051U repository on GitHub. It is a 2-layer board of 68.5 × 84.2 mm with 110 parts on 102 nets, routed with 522 tracks and 292 vias.

It is built around the CH330N, EG2181 and MT3608, with the TPS5450DDA, RT9048GSP and SS54 among its other parts. Its parts include 34 resistors, 32 capacitors, 19 diodes, 9 ICs and 6 transistors. It belongs with the 8051 (CH55x, STC, AT89) boards of this library.

Main components

7

README

README.md

80251 ESC Base on AI8051U

Introduction

The AM32 firmware has been ported to the 80251 platform, and the controller has chosen as AI8051U. It can be compiled on Keil C251. At the same time, the bootloader program has been ported, and tool of Esc_Config_Tool_1_82_WIN can be used to configure and upgrade firmware for ESC.

Hardware

MCU

The resources of MCU(datasheet) are shown in the following figure,You can see that it has many peripheral resources.For more information, you can refer to the STC

mcu

MCU Pins Diagram

mcu_Pins

Using PWMA to output 3 sets of complementary PWM for driving MOSFEET, Using PWMB for capturing external throttle signals, Using ADC to sample voltage and current, for low voltage protection and over current protection(But I'm not done yet). Using internal OPA and BEMF to estimate rotor position. TMR0 and TMR1 is used to calculate commutation time and motor timing.TMR2 is used for the serial port. TMR3 and TMR11 are used for the delay function (in fact, only one is needed). TMR4 is used to complete some periodic tasks.

PINS

PINS

AH AL BH BL CH CL: PWMA outputs;
INPUT: PWMB used to capture external throttle signals;
A_BEMF: A-Phase BEMF, connect to P46;
B_BEMF: B-Phase BEMF, connect to P51;
C_BEMF: C-Phase BEMF, connect to P50;
CC_BEMF: Neutral point BEMF, connect to P45/P44(Note that for this mcu, P45 and P44 are the same pins);
ADC_V: Voltage sampling channel;
ADC_I: Current sampling channel;

In order to unify the interrupt entry of OPA, the outputs of OPA are merged into P41, Using pin interrupts of P41 for zero crossing comparison processing.

P30 and P31 are used to download bootloader via STC-LINK1, UART or internal USB.

For detailed information, please refer to the schematic diagram.

Config (New PCB)

Flashing BootLoader

  1. For empty chips, BootLoader needs to be flashed via STC-LINK1, UART or internal USB, Connect according to the diagram below.

    connect
  2. Open the Bootloader project using AIapp-ISP and download it directly after compilation.

    download
  3. Use a one-wire serial port(You can connect the RX and TX of the USB to serial chip,such as CH340, together and then connect them to the board) to connect to ESC and use tools to configure and update firmware. I used CH340 to perfom, and the wiring is shown in the following figure.

    config config

    If the Bootloader is burned correctly, Open the configuration tool Esc_Config_Tool_1_82_WIN.exe and power on the ESC. Follow the steps in the following figure to click. When connecting for the first time, 'No EEprom' will be displayed!

    first

    Directly click on Send Default Settings below to burn the default values. After successful burning, power on again. Connect again and click M1. The default parameters we just burned will be displayed.

    then
  4. Flashing firmware and configurations
    The firmware can be compiled using Keil C251, and the compiled firmware is in the \Objects folder.

    hex

    Open the HEX file with a text editor.I prefer to use VScode.To support HEX file editing, you need to install the Hex Editor or Intel HEX format plug-in. The plug-in can be installed in the extension market. After installation, open the HEX file.

    plug-in

    In this HEX file, please pay attention to the first line.
    :03000000023E5865
    You should change the value of the 0000 to 1000 and the value of the 65 to 55. Then save the file.
    :03100000023E5855
    Note that the value of the 0000 is the starting address of the program, and the value of the 65 is the checksum. The value of the 1000 is the starting address of the program after the bootloader is burned. The value of the 55 is the new checksum. The starting address of the program after the bootloader is burned is 0x1000, so the value of the 0000 is changed to 1000. The checksum is calculated by adding all the data in the line except the starting colon and the checksum itself, and then taking the two's complement of the last byte of the sum. The value of the 65 is changed to 55. The specific calculation method can be found in the link. If you use VScode with the plug-in, you can directly click on the address value to modify it, and the plug-in may automatically calculate the new checksum.

    Hexline Hexchange

    Returning to the FLASH interface of the tool, we click on Load Firmware, select the firmware we just modified, and the FLash Firmware button will pop up. Click to start updating the program.

    updata

    After the update is completed, power on again and connect ESC again to configure ESC. The specific meaning of configuration values can be found in the following links.

    para

Hardware design

The circuit design is located in docs: pcb, and the design is carried out using KiCAD, please note that the design is not particularly reasonable, please refer to it carefully.(Now I redesign the PCB on LCEDA, and the new PCB project also in docs folder.)

New design: new_f new_b

Test

The version I ported is V2.16, which supports signals such as dshot300, dshot600, and PWM.(But for some reason, I only implemented PWM, dshot can't be used).

Reference

Thanks

  • HDU students have discovered some porting bugs, these bugs caused the ESC to be slow to respond.

Parts

110
QtyValueFootprintReferences
11SS54Diode_SMD:D_SMA_HandsolderingD1, D4, D5, D6, D9, D10, D11, D14, D15, D16, D17
910KPCM_Resistor_SMD_AKL:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR5, R6, R7, R8, R9, R10, R17, R20, R30
9CCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC6, C7, C8, C11, C12, C13, C16, C17, C18
70.1uFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC1, C19, C20, C28, C29, C30, C31
610RPCM_Resistor_SMD_AKL:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR11, R12, R13, R14, R15, R16
61KPCM_Resistor_SMD_AKL:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR2, R3, R4, R27, R28, R29
61N5819Diode_SMD:D_SOD-323_HandSolderingD2, D3, D7, D8, D12, D13
6TPH1R005PLPCM_Package_SON_AKL:Infineon_PG-TDSON-8Q1, Q2, Q3, Q4, Q5, Q6
45.1KResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR23, R24, R31, R32
4Conn_01x03_PinConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ2, J3, J4, J5
310uFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC2, C24, C26
3CCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC4, C9, C14
3CCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC5, C10, C15
3EG2181Package_SO:SOP-8_5.28x5.23mm_P1.27mmU2, U3, U4
210KResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR33, R34
210uHPCM_Inductor_SMD_Handsoldering_AKL:L_6.3x6.3_H3L1, L2
24.7uFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC21, C27
2LEDLED_SMD:LED_0603_1608Metric_Pad1.05x0.95mm_HandSolderD18, D19
2SW_PushButton_Switch_SMD:SW_SPST_CK_RS282G05A3SW1, SW2
2USB_C_Receptacle_USB2.0_16PConnector_USB:USB_C_Receptacle_GCT_USB4105-xx-A_16P_TopMnt_HorizontalJ1, J6
10.01uFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC23
10RPCM_Resistor_SMD_AKL:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR1
11.11KPCM_Resistor_SMD_AKL:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR19
1100KPCM_Resistor_SMD_AKL:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR22
1100nFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC25
11uFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC3
12.6KPCM_Resistor_SMD_AKL:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR18
1330uFCapacitor_Tantalum_SMD:CP_EIA-6032-15_Kemet-U_Pad2.25x2.35mm_HandSolderC22
15.1KPCM_Resistor_SMD_AKL:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR26
16.38KPCM_Resistor_SMD_AKL:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR21
1CH330NPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU9
1C_PolarizedCapacitor_THT:CP_Radial_D10.0mm_P5.00mmC32
1INA199xxDCKPackage_TO_SOT_SMD:SOT-363_SC-70-6U8
1MT3608Package_TO_SOT_SMD:SOT-23-6U7
1RT9048Package_SO:HSOP-8-1EP_3.9x4.9mm_P1.27mm_EP2.3x2.3mmU6
1R_2512PCM_Resistor_SMD_AKL:R_2512_6332MetricR25
1STC8051U-32KxPackage_QFP:LQFP-48_7x7mm_P0.5mmU1
1TPS5450Package_SO:SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.29x3mmU5

Similar boards

  • 4 layers91.7 × 66.8 mmPico expansion board, the printed circuit board in 3D

    Pico expansion board

    eamars/RaspberryPi-Pico-Motor-Expansion-Board

    A raspberry pi pico expansion board designed for OpenTrickler project

    68 parts18GPL-3.0
  • 2 layers49 × 40 mmESP32, the printed circuit board in 3D

    ESP32

    Cloud-Lightning/ESP32_Distribution_board

    text BUS+ / GND |-- 7 x XT30 原始总线电源分配 | -- TPS5450DDA --> +5V --> AMS1117-3.3 --> +3.3V | | | -- ESP32、CH340K、逻辑电路 -- 5V 外设接口

    61 parts
  • 2 layers21.2 × 43.5 mmDsi adapter, the printed circuit board in 3D

    Dsi adapter

    mgalleguilloscespedes-png/proyectro-stm32

    en mi afán por el diseño 3d y la electrónica decidí crear mi propia versión de una placa controladora para impresora 3d, basándome en el microcontrolador stm32h723zet6 y la pcb de bigtreetech manta mp8

    15 parts
  • 2 layers60 × 40 mmForcegauge, the printed circuit board in 3D

    Forcegauge

    szbeni/forcegauge

    Traning for climbing. Load cell with HX711 and real time plotting,

    77 parts18GPL-3.0
  • 2 layers150 × 150 mmHUB75 RP2840, the printed circuit board in 3D

    HUB75 RP2840

    mortens-lab/HUB75-PICO-shield

    HUB75 matrix display shield controlled by a Raspberry Pi Pico W

    50 parts16
  • 2 layers70 × 50 mmDeerWatch Carrier, the printed circuit board in 3D

    DeerWatch Carrier

    SEAS2025/mmwave-deer-scan

    mmWave FMCW radar deer detection for roadside ambulance safety

    39 parts
  • 2 layers100 × 100 mmFYP PCB, the printed circuit board in 3D

    FYP PCB

    usmanmehmood55/FYP-PCB

    140 partsGPL-3.0

Questions

How big is the Am32stc8051u PCB?

It measures 68.5 × 84.2 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Am32stc8051u use?

110 parts, built around the CH330N, EG2181, MT3608 and TPS5450DDA. 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 Am32stc8051u KiCad files?

From the Icey7122/AM32_AI8051U repository on GitHub, at the commit this page was made from: the board is docs/pcb/kicad/Am32stc8051u.kicad_pcb and its schematic docs/pcb/kicad/Am32stc8051u.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Am32stc8051u design in my own project?

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