2025-04-29 10:04 PM
[PN]: STM32G431CB (B-G431B-ESC1), Custom board with STM MCU
[VERSION]: MCSDK 6.3.0
[TOOL]: STM32CubeIDE 1.16.1, MotorControl Workbench 6.3.0
[DETAILS]:
I’m analyzing the Back-EMF sensing circuit of the B-G431B-ESC1 board for FOC.
In this circuit:
The back EMF from each motor phase is connected directly to the MCU ADC pin.
The battery voltage is up to 25V (6S).
Each BEMF line appears to be connected through a diode to 3.3V and GPIO_BEMF.
All BEMF signals seem to share a common GPIO_BEMF.
My confusion:
How is the high phase voltage (e.g., 25V) safely sensed by the MCU’s ADC which only accepts ~3.3V max?
How is this protection implemented with minimal components?
How does this translate into proper zero-cross detection for sensorless FOC?
I am building a custom ESC board (6S, 12S, and 20S variants) with similar sensorless FOC requirements. I want to design a robust and safe Back-EMF sensing system that:
Can safely interface high voltage (~50V or ~80V in 12S/20S) phase lines to MCU GPIO/ADC.
Still allows the use of sensorless motor startup and control.
[EXPECTED BEHAVIOR]:
I want to understand the working of the BEMF detection circuit on B-G431B-ESC1.
Then design a scalable and safe BEMF sensing circuit for higher voltage custom ESC boards.
Maintain compatibility with sensorless FOC in STM32 Motor Control SDK.
[HOW TO REPRODUCE]:
Refer to B-G431B-ESC1 schematic (specifically BEMF sensing circuit).
Try replicating a similar circuit for higher voltage ESC (6S, 12S, 20S).
Understand protection design and how MCU detects BEMF events directly.
2025-05-23 7:45 AM
Hi madhavP, the topology you are referring to is a 6-step algorithm BEMF sensing implementation. First, the diode D10 is put here to protect your ADC input against high voltage value. The Phase voltage on OUT1 signal for example will be divided by a 5.54 value divider thanks to the resistor bridge made by resistors R57 and R61 (divider = (R61 + R57)/R57 with the GPIO_BEMF signal connected to ground). This divider value has been defined to support the Vbus range of the board (8 to 28v). In consequence, you will need to define this divider based on your new Vbus input, Your (Vbus/divider) value must be in the definition range of [0 to 3.2v] of the ADC input. This is due to the fact that for the zero-crossing detection, it is possible to design a system that samples BEMF during the PWM on time rather than the PWM off time, using a comparison threshold equivalent to one half of the Vbus, rather than near zero. In addition, a Vbus threshold can also be used to detect BEMF zero crossing during PWM off time sensing when PWM is applied on low side MOSFET (i.e. for fast demagnetization).
Best regards.
Fabrice