I just discovered this useful page: http://www.schwietering.com/jayduino/filtuino/
Now I am reading encoder position and would like to smooth out spikes. But more than that, I want to get rid of long-term slow trends.
e.g. I am sampling at 1Hz rate. I only want to see signals from 1/500Hz to 1/20 Hz.
So using the above site I built a 4th-order Butterworth bandpass filter and.... it doesn't work.
The filtered value slowly goes to infinity. By this I assume the filters produced in the above site are IIR filters.
1) I notice that these filters only keep a history of 10-12 past values. How can they filter out something like 1/500 Hz? Is that even possible? (I'm thinking if there's a Nyquist frequency for high frequency cutoff, is there also something for low-frequency cutoff)
2) There's code floating around here for an FIR filter.. but where can I get the filter coefficients?