> Although you could low-pass filter the output of the sensor to reduce the > noise, you can also take another approach, if your PIC is "idling around" > waiting to take a reading every few seconds - or whenever. Instead of > using an op-amp to implement a low pass filter before the A/D conversion, > if the noise is random, you can implement a low-pass filter in software! > Simply take a large number of A/D samples in a given time period (say, for > the sake of arugment, in 5 seconds) and average them. If the noise is > randomly distributed (in amplitude), then this will have the same effect as > low-pass filtering. This works when the actual signal is a slowly varying > one w.r.t time, as is the case of the humidty sensor. Averaging is in many cases a less-than-ideal filtering method. There are some easy FIR and IIR methods that can work better. Alternatively, you could generate a simple median filter by running the following procedure many times a second: read sample if sample > myvalue myvalue = myvalue+1 else myvalue = myvalue-1 This method will not respond terribly quickly to changes in the input signal (it's sharply slew-rate limitted) but it has the advantage that a one-cycle noise glitch will affect the output by at most one count.