electric1
Junior Member level 2
Hi,
I have a typical shunt based current sensing circuit, feeding analog voltage into ADC input, then MCU reads it and logs the current values.
This device is monitoring battery charge current, which is DC obviously.
When charge source is a clean DC current, everything is fine, I get stable and correct reading from MCU.
However, when charge source is a low frequency inverter/charger, or an alternator, etc. the current is a sine wave and my ADC reads wide range of values depending on the moment ADC takes the snapshot.
If I measure voltage with DVM across the shunt, it reads correct value, corresponding to DC value stated by the charger. I assume this is RMS value of the sine wave.
I want to make an RC filter on ADC input such that ADC "sees" smooth DC value, correctly representing DC current from the charger.
How can I calculate RC values to achieve this goal?
I understand the principle of RC time constant, but struggle to understand how signal frequency effects the voltage at the capacitor, depending on capacitor value.
Sample schematic and the scope image of the charge current attached for reference.
Any help is appreciated.
I have a typical shunt based current sensing circuit, feeding analog voltage into ADC input, then MCU reads it and logs the current values.
This device is monitoring battery charge current, which is DC obviously.
When charge source is a clean DC current, everything is fine, I get stable and correct reading from MCU.
However, when charge source is a low frequency inverter/charger, or an alternator, etc. the current is a sine wave and my ADC reads wide range of values depending on the moment ADC takes the snapshot.
If I measure voltage with DVM across the shunt, it reads correct value, corresponding to DC value stated by the charger. I assume this is RMS value of the sine wave.
I want to make an RC filter on ADC input such that ADC "sees" smooth DC value, correctly representing DC current from the charger.
How can I calculate RC values to achieve this goal?
I understand the principle of RC time constant, but struggle to understand how signal frequency effects the voltage at the capacitor, depending on capacitor value.
Sample schematic and the scope image of the charge current attached for reference.
Any help is appreciated.