@Owen_Williams I have lost many nights over this, and I’m still not sure how I will approach current sensing with my current hardware.
@robin2906 explained it perfectly. With the DRV8305 I’m doing low-side current sensing and this is straight from the ADC:
If I can’t figure out a way to sync the measurements with the PWM signal I’ll probably use a low-pass filter and use current sensing to apply/find a voltage limit in terms of current, and to detect collisions.
If somebody has any suggestions on how to do this with the ESP32 please let me know over: ESP32 Brushless controller - Dagor - #19 by Juan-Antonio_Soren_E