Hi,
Why don't you use RMS-DC converter ?? Even a simple one will serve you well.
That value will be what DVM reads.
I don't recommend this. It surely gives smooth values, but wrong values.
For charging current you need the
average current and
not the RMS current.
I agree with Crutschow.
In detail it may become complicated. Here my mathematical/physical input
But there are different ways.
*
If you want it the most flexible, then go ahead with nyquist theorem. It simply says the ADC input should contain no frequencies above half your sampling frequency. Example: If your sampling frequency is 100Hz, then all frequencies above 50Hz should be suppressed. But this does not mean you can use a low pass filter with 50Hz cutoff frequency. Because 50Hz is suppressed to 70% only. You should rather tend to 1% or less at 50Hz.
If there still is fluctuation in ADC values, then you may suppress it with software.
If you don't attenuate frequencies above half the sampling frequency, then this will cause alias frequencies. A 120Hz input signal will become a 20Hz ADC output signal when sampled with 100Hz.
This solution gives the fastest response. If you try to do a regulation loop, then you should avoid unnecessary delays to make the loop stable.
* If you want a
simple solution, especially to simplify software..
If you just want to suppress the 120Hz (and higher frequency) ripple.
Let's say to 1%. (100mV ripple will be 1mV ripple).
This is a factor of 100.
For a simple RC filter take the ripple frequency and divide it by the factor (this is only true if both frequencies are enough far apart): 120Hz : 100 = 1.2Hz.
This 1.2Hz is your cutoff frequency of the RC. Let's say you have R=10k, then according fc= 1/(2 × Pi × R×C)...you need a 13uF capacitor. Use 15uF.
This filter causes a signal delay of R × C = 150ms. Even a DC input signal may take about 1s to settle to 0.5% error
In both cases...the delay time may be too big.
Then you need to use a higher order filter.
To the second example this means you need to take the squareroot of the factor: sqrt(100) = 10.
Now you need a second order filter with 12Hz cutoff. Settling time is much faster than with the 1.2Hz filter.
Klaus