At 09:21 AM 11/7/00 -0600, Lawrence Lile wrote: >I'm sampling a DC voltage with lots O noise. I've set up a routine that >takes a sample, waits a few milliseconds, then takes another sample, >etc. When 15 samples are taken, it takes the median of the samples as the >result. Still get false alarms due to noise pulses every once in a while. > >Now, I am not real sure if I will have 60 hz noise (picked up from the >air) or 120 hz noise (from a full wave rectified power supply) as the >major noise component. It may actually be both, at various times. I'd be tempted to hardware filter (RC network) any hash and sample often enough so that the 120 Hz component averages out. That means setting the sample rate to some multiple of 120 Hz - usually fairly easy to do. I have done jobs where I had to run unshielded a/d lines in the same 800 foot long conduit as the 208 Vac lines that were powering the system. The a/d lines went thru a RC network and into the PIC where I had trimmed the timer tick for exactly 8 samples per AC half cycle, for a total of 32 samples per a/d channel. No problems at all. dwayne Dwayne Reid Trinity Electronics Systems Ltd Edmonton, AB, CANADA (780) 489-3199 voice (780) 487-6397 fax Celebrating 16 years of Engineering Innovation (1984 - 2000) * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Do NOT send unsolicited commercial email to this email address. This message neither grants consent to receive unsolicited commercial email nor is intended to solicit commercial email. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu