The question requires
an inductive brushless ESC.
The question analysis
is mainly divided into power supply, main control, driver, and operational amplifier. It supports FOC, but it has not been developed yet. It is just a simple ESC at the moment. The
schematic design explains
the power
gate drive power supply, 3S- 6S power supply, if it is only a 3S battery, this buck can be soldered or not, just wire it directly.

It is powered by a chip. It needs to be modified. I later found out that the speed regulator I bought required 5v, and then I remembered that the cw32 chip can be powered by 3.3/5v, so I changed it to 5V later. I happened to have it in my hand, and it is the same as this LDO. A series of SPX3819-5.0;

gate drive, bootstrap boost;

current and voltage, three phases are reserved for future expansion and development;

three-phase six-arm bridge;
20ohm resistor function (if there is no 20ohm, 100ohm is also a common gate Series resistor):
to prevent oscillation; generally the I/O output port or PCB trace of a microcontroller will have some stray inductance, which may form LC oscillation with the gate capacitance when the voltage changes suddenly. When R17 is connected in series between them, The damping can be increased to reduce the oscillation effect and
reduce the gate charging peak current; when the gate voltage is raised, the gate capacitor will be charged first. Check the data sheet (IRFR1025). The gate charging amount Qc is 65nC and rises The time tr is 69ns, the turn-on delay time td(on) is 7.3ns, calculated according to the formula = 0.85A, which has exceeded the I/O output capability of the microcontroller. After connecting R17 in series, the charging time can be slowed down and the gate charging current can be reduced. .
Protect the DS pole of the field effect transistor from breakdown; when the gate is turned off, when the DS pole of the NA-tube changes from the on state to the off state, the drain-source voltage Vds will increase rapidly. If dV/dt is too large , will break down the device, so adding a gate resistor can make the gate voltage change slowly (slowing down the charging and discharging of the gate capacitor) without causing the device to break down;

PCB design instructions
1. Large-capacity capacitors are close to the power module or circuit board power entry point placement. In motor drive system design, large-capacity capacitors can greatly reduce the impact of low-frequency current transients and store charges to provide the required large current when the motor driver switches;

2. Dual NMOS motor drive devices use charge pump capacitors or A bootstrap capacitor is used to fully switch the gate of the high-side N-channel MOSFET. These capacitors should be placed as close as possible to the motor drive device;

3. Place the capacitors as close as possible to the power input pins and ground pins of the device. The bypass capacitor will minimize the high-frequency noise entering the power pin of the device;

4. The placement and layout of common MOSFETs in two typical configurations: half-bridge stacked and half-bridge side-by-side; can minimize the impact of high-side MOSFETs. The inductance between the source and the drain of the low-side MOSFET prevents ringing (switch node ringing is an LC oscillation on the switch node due to the parasitic effects of the PCB and power MOSFET. Switch node ringing can cause EMI and produce excessive Overshoot and undershoot voltages, these values will exceed the absolute maximum ratings of the MOSFET drain-source voltage and gate driver pins, and will also reduce the efficiency of the power stage);
5. Use the correct voltage for the complete high-current loop . Trace width, minimizing this inductance minimizes voltage ripple and noise and reduces the need for additional bypass capacitors. The picture on the right is the best layout, you can refer to it;
6. For current detection Kelvin connection, a differential pair must be used to complete the wiring of the sensing signal; (I will see later that it is wrong to leave the Kelvin connection like this for lightning protection).

The correct posture is as follows :

Or use a special current-sensing resistor:
the software explains
the basic functions, and it can be turned; first dig a hole for the current loop, and it is not certain whether it is filled or not.
Physical display shows

precautions
and safety precautions;