Current shunt filtering

Hi All!
We are developing an inverter that is loosely based on the oDrive using the DRV8353S as a gate driver. While doing the recherche on the possible solutions I also investigated separate shunt resistors and found an interesting note on filtering on page 25 of the datasheet of the INA181, one of TI’s most basic shunt amplifiers (https://www.ti.com/lit/gpn/ina181). There is not a lot stated about the shunt signal filtering in the datasheets of DRV8301 or 8353, but the topology seems to be the same. So the rather large and unbalanced filter resistor used int the oDrive 3.5 could have quite some impact on the precision of the measurement.
As the filtering should take place after the amplifier anyway, we replaced the 120R in a test design by a jumper - and ran into strange problems with the measurement when running the motor at high speeds. It turned out to be an oscillation of the measurement signal at the microcontroller as the shunt amp is not stable with its rather large capacitive load resulting from the 22R, 2n2 filter. On the original design the missing stability was no problem as the amp never had to deal with real steps in the input signal as this was (suboptimally) filtered.
So we modified the filter to optimize the stability while not sacrificing too much bandwidth or capacitance for the ADC’s sampling caps. Using 100R and 1n yielded way better performance and then again the sampling time was the limiting factor for the maximum possible band width. I appended a snapshot of the comparison measurements using the resistance measurement feature, with one channel using 22R, 2n2 in cyan and another one 100R, 1n in purple. The shorter oscillation is pretty easy to see.


With some further tinkering this could be improved even further, but the principle of filtering behind the amp with a low-capacitance filter should increase the performance by quite a bit.

Have fun rotating stuff,
ArcToubey

2 Likes

Great post! Analog design is always challenging. Out of curiosity, what does your oscilloscope measurement setup look like?

Interesting… The shunt measurement on the ODrive is indeed quite noisy, i’d be interested to see if it can be improved this way…

Also I’d love to see your inverter project, can you post a link? :slight_smile:

Thanks a lot wetmelon! We had indeed some problems with noise stemming from out measurement setup and did lots of reference runs where we measured ground to see if we have interferences radiating into the measurement. In the end we used two wires soldered to the pads of the filtering cap at the STM32 for each channel that were twisted and run ~10cm away from the inverter. Then we used a normal oscilloscope probe there. For validations we also added the current of a phase measured by a simple clamp meter and one of the gate driver input signals (blue and yellow).

I think that this will not improve the experienced noise too much - but should reduce the systematic gain error and increase the stability at higher duty cycles. The oscillations sometimes caused the measured currents to drop when they actually rose, resulting in an instable current control.

Unfortunately I cannot give to deep insights into the design itself as it is a commercial project. But you can get and overview at our homepage, we are building an integrated triple inverter for our autonomous robot (https://www.arculus.de/) :D.