- From: Tuomas Räsänen <tuomas.rasanen_at_ssf.fi>
- Date: Thu, 03 Mar 2005 10:26:27 +0200
Hi, Why not analog filtering? If your signal varies at under 1 Hz rate, as your sampling frequency suggests, and you suspect tens of Hz noise, you can easily cut that off by say, a 2nd order low-pass filter, which should be fairly easy to make with operational amplifiers. Sandy Pond wrote: > On Wed, 2005-03-02 at 22:25 -0500, Daniel Nilsson wrote: > >> Hi All, >> >> I'm working on a project where I'm trying to sample more really slow >> varying inputs, I'm only interested in getting a new value every 500ms >> or so and the data will not vary much in this time period. >> >> From looking at the Comedi API I find function designed to help out >> sampling such data, though they all have the status deprecated. Why >> are the functions deprecated ? Is there something else that provides >> the same functionality ? >> >> If not, does anyone have any filter code that you can share the is >> designed to filter out any noise that might be present on the inputs ? >> The issues that I'm having right now is that the inputs don't vary >> much but I'm getting a measurement values that move back and forth >> around the actual value. I assume some of this is digital noise and >> some is analog noise (60Hz noise from the mains for example). I would >> think someone had already written some code to filter out such noise ? >> >> Any other suggestions would be welcome. I'm trying to measure the >> voltage and current of a Ni-Cd battery that is being discharged >> through a resistor if anyone was curious... >> >> Thanks > > > First a little DSP info: If there's noise on your input you'll need to > sample at twice the maximum frequency of the noise in order to digitally > filter the noise. Otherwise you'll end up with alias errors in your > recorded input. If this isn't possible then you need to alter your > setup to reduce stray noise or install a hardware filter before the > input to eliminate the higher frequency noise. > > Once you collect the samples it is easy to digitally filter the signal > by either using a commercial program like matlab, open source tools like > python, of writing a small C program. If you google around on "digital > filtering" you will find programs. For instance: > > http://ccrma.stanford.edu/software/stk/ > > > _______________________________________________ > comedi mailing list > comedi_at_comedi.org > https://cvs.comedi.org/cgi-bin/mailman/listinfo/comedi -- Tuomas -------------------------------------------------------------- Tuomas Räsänen tuomas.rasanen_at_ssf.fi Space Systems Finland +358 9 613 28654 Kappelitie 6, 02200 Espoo mobile: 050 330 1758
Received on 2005-03-03Z08:26:27