Hi all,
Looking through the VESC schematics and was wandering why the phase current signal has a switchable RC filter?
One being around 10kHz low pass (presumably to remove switching noise, and the other about 60kHz to (presumably to smooth the sharp edges)?
I'd have thought you'd have a single filter or none at all?
For background info, I might want to use the architecture and software for my own controller in the future.
Thanks ☺
Billy
The reason for the switchable filter is the inductance measurement. The VESC measures the motor inductance by sending voltage pulses, waiting for a known time and checking how high the current is. When doing that, the current measurement should be as fast as possible to get accurate values. When driving the motor on the other hand, the filter should be slow enough to not get too much aliasing from sampling when there is a lot of current ripple. This has quite large impact on low inductance motors (>2 µH) on low currents. I have determined the filter values by a lot of trial and error with a buch of tricky motors from my motor box.
Does the the Rds(on) resistance of the particular analog switch IC you chose come into play? I noticed it has a higher resistance than alternatives.