The CIC filter already does the moving average ?
A CIC filter is just a particular way to implement a 1st order or higher
1) order moving average filter. A CIC structure is particularly useful in combination with down- or up-sampling.
I think that the first that have to do it's take long raw measurement from field and then find out best math (filters/DSP/etc), that will solve your problem (with something like MATCAD). And only after this start to implement algorithms in firmware.
I wanted to suggest the same. Collect at least a few minutes of data (or better an hour - even that's only 1.44 million samples @400Sa/S), and analyze it first.
And try to specify requirements like
- What is the desired accuracy / uncertainty?
- Do you want real-time display for instantaneous fill level and instantaneous weight loss per second?
- How much settling time / delay are you willing to accept?
1) An N-th order moving average filter is a concatenation of N equal 1st order moving average filters. Just send the output of the 1st stage into the next stage, and so on. It's also called sinc
N filter, which refers to the shape of the magnitude of the resulting frequency response.