Greetings -
This is really a general question, not specific to AVR except for integer constraints.
As some of you know, I manufacture accelerometers that are used mostly for scientific research, especially tree sway. These accelerometers are three axis, 14 bit data in 16 bit words and are set for a fixed 100Hz sample rate. Lower sample rates are created by averaging N samples to produce an effective sample frequency at 100Hz/N in 32 bit integer data.
I am trying to add a trigger capability. To that, I need to look at small changes in the sensor output. Typically, one axis is nearly aligned with the gravity vector while others are approximately normal to that vector. All three axis have a potential zero offset that can be as large as 10mg. One bit is 0.6mg.
To do that, I have been trying to use a high-pass digital filter to remove the static background "DC" signals (offset and gravity). I then determine the magnitude of the effective result vector which should be very close to zero without any dynamic acceleration. Here is where I get into problems. I am trying to generate the trigger from the raw 100Hz sensor output. I am hard pressed to get a filter zero much below 0.5Hz due to integer limitations (Yes, I have been playing games, with fixed point multiplications to get even where it is now). I would LIKE to be able to trigger on signals as low as 0.1Hz while removing temperature variations in the DC offset (typically below .001Hz).
Moving average filters WOULD work except that a really long shift register (or ring buffer) is needed to get a low enough frequency, and I don't have that much RAM space left. Any of the standard recursive filters require coefficients of finer resolution for such low frequencies) than what I can get with 8-bit fractional part fixed point numbers.
So.... I wonder if anyone here has experience with unusually low frequency filters compared to the sample frequency and might be able to share hints, possible solutions, etc, that might help me move on from this current impasse.
Many thanks
Jim