Hey there! I have a setup with a GM3506 motor, a MKS Dual FOC Plus V3.2, a AS5048A encoder, and a WeAct STM32G474 board. I’m programming in the Arduino environment. With this I’ve run into an issue tuning the current vector PIDs, which I believe I have traced down to it reacting to noisy data from the current sense amplifiers.
This is the current from a single phase of the motor spinning in open loop velocity mode, measured with both a current clamp on the phase wire (blue) and an oscilloscope probe on the current sense input pin on the STM32 board (yellow):
And this is what the STM32 itself sees in the same situation:
With the motor disabled it’s better, but still a tad wilder than I’d expect:
What would the typical place be to start debugging this? Filtering in hardware? Finding the noise source? Configuring the ADCs better?