On 1 May 2008 at 12:01, John Ferrell wrote:
> Analog signal conditioning is an overwhelming thing to Google!
>
> Here is the problem: I need to measure a remote resistance of 0 to
> 500 ohms with the AD input on a Pic 16F877A. what ever I do, it
> has a lot of jitter on the reading. A super cheap Harbor Freight
> Ohmmeter works fine.
>
> Details: The Ohmmeter is using a 0.22 ma current for measurement.
> My circuit has tried to series the top of the pot with 4.3k down
> to 680 ohms. I have tried up to 0.22 UF capacitor in parallel with
> the port to no avail. The ohmmeter works all the way to the
> circuit board so I cannot see how I could have a wiring error. My
> development board is powered by the USB port and the program works
> with the Board's 5K pot across VCC.
>
> For the curious: The resistance I am trying to read with the PIC
> is at the end of about 80 feet of wire in my Ham Radio rotator. I
> took a lightning strike several years ago and have since dedicated
> a meter and toggle switch for a control box. I am just now looking
> for a better solution...
>
> I am not looking forward to exploring Ohm meters!
>
> John Ferrell W8CCW
Below is an old PIClist post explaining how to do the filter.
Mark Jordan - PY3SS
--------------------------------------
Pang wrote:
> How to perform low pass filtering in software?
FILT <-- FILT + FF*(NEW - FILT)
Is a single pole low pass filter if executed each new sample. NEW is
the new incoming sample this iteration, FILT is the filter output, and
FF is the "filter fraction". This adjusts how much the filter passes
the raw input versus how heavy the filter is. The 3dB point of the
filter in number of samples is a function of only FF. FF=0 is an
infinitely heavy filter in that the output never changes, FF=1 is no
filter at all since the input is just passed to the output. Useful
values are obviously in between.
This has been discussed many times before, and there must be tons of
literature on this and other digital filters out there.
*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts (978)
742-9014,
http://www.embedinc.com
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist