The B-G431B-ESC1 Discovery Kit is a programmable ESC 6S Lipo (40A peak) available for only 18USD. See : https://www.st.com/en/evaluation-tools/b-g431b-esc1.html. This compact ESC (20x40mm) has USB, CAN and PWM user interfaces. The STM32G431 may be reprogrammed with a custom firmware, in order to drives a home made brushless servo (MAD 5008 240Kv). A position-velocity-torque regulation, with velocity and acceleration profil, has been tested. With a 1:10 planetary gear box (3d printed), the torque may exceeds 50kg.cm (5Nm) at 24V @ 5A, and the velocity is quite good (about 0.1s/60°).
The latest firmware update improves the bandwidth of the position and torque PID controller.
This test was performed with my robot powered by Lipo 4S battery. The robot is under development. It is a 8-dof quadruped using MAD 5008 240kV motors, B-G431B-ESC board, 3D printed planetary gearbox (ratio: 1:4.5) and a M5Stack Fire.
The Discovery kit embeds the hardware circuit for encoder sensor. A supply voltage line is provided with 5 V and GND lines in J8 solder pads. Solder encoder leads on +5V, GND and one PWM input capture pad (A or B).
Load servo control firmware into the STM32G431 using the USB daughter board