+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2019

    Default ADC input signal filter selection

    HI Folks, I'm brand new to the forum and really appreciate your support- Thank You!. I have a question; I recently designed an A/D circuit which worked wonderfully on my breadboard and also when I transitioned/soldered the hardware to a small prototype board. When I moved the same prototype board out to the truck and put it into service, the display values were jittery and jumped around quite a bit. The degree of variation was its worst at the very lowest end of the values and almost completely disappeared at the upper ranges. This seemed liked "signal noise" to me. Very unscientific conclusion. After doing some research I decided to add a larger capacitor (from 47 picofarad to 22 microfarad) on the signal line.

    My question is- is there a simple way to size a series resistor and capacitor for a typical A/D input for folks without an advanced degree in circuit design? Random selection seemed to work in this case but I'm hoping for some more scientific help. I read through Microchip's AN693 white paper and also looked at guidance on a low pass RC filters and downloaded Microchip's Filter Lab App. But none of that helped much. One of my goals is also to minimize space and components. Is there an easier or simpler starting point or some basic guidance on ways to select Resistor & Capacitor values for signal conditioning?

    Thanks in advance for any help and guidance and for your general support-

  2. #2
    Join Date
    Mar 2003
    Commerce Michigan USA

    Default Re: ADC input signal filter selection

    Well Mark, Its hard to say where your noise is coming from. You said it was working quite well on the bench but now you are having a/d display problems. For starters, what reference are you using for the a/d? Internal band gap or VCC/VDD? Also, what does the input network look like going to the PIC? I would like to know what kind of response you are looking for in the readout and what you are trying to measure.
    Dave Purola,

  3. #3
    Join Date
    Jan 2006

    Default Re: ADC input signal filter selection

    In addition to and similar to Dave's reply, there may be a Vref issue.
    Since the circuit is in a truck, I guess that the power supply may not be filtering the sparks and thus if the Vref is Vdd, then even if the signal is clear, ADC reading will jump up and down.

    A series resistor like 100R to Vdd pin and then a cap like 100uf to GND may lower this issue.
    An inductor from Vss pin of PIC to GND may also be a good filtering.
    Sampling the signal reading like 100 times may also lower the issue.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  4. #4
    Join Date
    Nov 2003

    Default Re: ADC input signal filter selection

    I prefer the inductor on the +Vdd side.

    Anyway, I'd suggest get 10 or more samples in an array, then sort them in order and keep the middle 5 values.

    Then add them together and divide by 5.

    The number may change as you like, say sample 20 values, sort, keep 10, add them and divide by 10.

    Consider also running average that is discussed again in this forum.

    But none will help if your signal or power/Vref is not clean enough. I'd use a low value resistor with a capacitor that depending on the speed of the signal can be low or high. But that resistor will introduce an error in the ADC since the ADC input has a spec of 10K max as the datasheet says. If you will use a larger resistor of say 100 ohms then it would be good to feed the filtered signal to a opamp follower and the opamp drive the ADC. This way you can raise the R value to 10s or 100's Kohms since opamp has very large input resistance.


  5. #5
    Join Date
    Apr 2011
    Portland, Oregon

    Default Re: ADC input signal filter selection

    Hi Mark, welcome to the forum.

    I'm a hobbyist (the hobbiest of hobbyists) and struggle similarly. I have come to the conclusion that I can spend time trying to quantify the noise - so as to know the capacitor value necessary to dampen it, or... I can just add successively larger (reasonable) capacitor values until the signal becomes stable (as you have done). I can think of a million - or more - reasons why my method is insufficient and only one reason why I keep doing it that way.

  6. #6
    Join Date
    Aug 2003

    Default Re: ADC input signal filter selection

    Depending on the application (if any latency is acceptable),
    you could take the mean of the last few readings and use that.
    Heart rate monitors typically do it. Things like speedometers, not such a good idea.

    If you are looking a the last five or so readings that provides opportunity to reject ridiculous readings.
    Anything too far above or below the rest could be ignored, or replaced with the mean of the remaining readings.

    For a heart rate monitor, for example, the readings: 70,71,70,166,69. You know the 166 reading was impossible.
    Last edited by Art; - 23rd February 2019 at 04:46.

Similar Threads

  1. Replies: 35
    Last Post: - 25th February 2016, 16:10
  2. New software filter for adc reading
    By aratti in forum Code Examples
    Replies: 28
    Last Post: - 16th January 2013, 19:40
  3. Noise on input signal
    By fanman in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 28th February 2012, 02:55
  4. Need help on ADC : Software R/C filter
    By luminas in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 27th November 2010, 14:33
  5. ADC filter
    By leonel in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 17th May 2005, 17:46

Members who have read this thread : 22

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts