A/D-conversion noisy - how to filter it?


Closed Thread
Results 1 to 6 of 6
  1. #1
    oldtoddler's Avatar
    oldtoddler Guest

    Default A/D-conversion noisy - how to filter it?

    Got any easy way to get A/D conversion filtered?

    Problem: I got filtered, noiseless 2.5V in ANx and ADCIN gives result which keeps jumping randomly betveen 496..527, which is way too much for me..

    I'm affraid I got no time in my code to make multible measurements to average the value.. Does anyone got fast way (for 18F458@20MHz) to make filtered A/D conversion, using other than (slow) ADCIN-command?

    Thnx adv!
    Marko

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    If you truely have filtered, noisless input on your ADC pin like you say, it won't be jumping about they way it does. Movement by one or two counts is possibly expected - but not by twenty or thirty.

    As a start, increase your Sample Time and/or change your Clock Source. It's a good possibility that you are not letting the sampling Capacitor enough time to charge properly before you take your reading.

    It's also a possibility you have set the wrong Justification for a WORD variable. Double-check this also.

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,651


    Did you find this post helpful? Yes | No

    Wink Don't forget a clan "Vref" ....

    Hi, Toddler

    Do not forget to have a good filtring on your Vref ( may be Vdd ??? ) ... as the Adc always compares the Vref and Vin ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Another thing you can do is put the PIC to sleep while taking the A/D sample. This reduces noise due to internal switching.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5
    oldtoddler's Avatar
    oldtoddler Guest


    Did you find this post helpful? Yes | No

    Default AD converion still jumpy..

    Quote Originally Posted by Melanie
    If you truely have filtered, noisless input on your ADC pin like you say...

    As a start, increase your Sample Time and/or change your Clock Source. It's a good possibility that you are not letting the sampling Capacitor enough time to charge properly before you take your reading.

    It's also a possibility you have set the wrong Justification for a WORD variable. Double-check this also.
    Vdd is filtered by 4700uF and I got 12V/7.2Ah battery to feed +5V regulator -> power supply should be ok.

    The input voltage should be stable since there are 10k resistor + 4700uF + 220nF capasitors in parallel (connected ANx -> Gnd) and there is 10-turn 10k potentiometer from Anx -> +5V, should make it steady enough - at least it looks that way in my scope.. I dunno..

    ADCS is 010 (Fosc/32) - should be ok?

    Increasing sampling time has unwanted, negative influence into responce time.. ok, I did increase sampling time up to 300uS and it did help quite a lot - still the measurement is jumpy, 508..516... that is best I can get out of it?

    I will rewire all ground lines and let's see if that helps.

    Thnx, if u have any ideas, please let me know!

  6. #6
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Lightbulb

    Since you are using 20 MHz OSC; Fosc/32 could be the solution as it helped me solve a similar problem I had (with 50uS sampling time).

    Since you had good result with 300uS sampling time, with Fosc/32 you should be having much better result.



    Could you also post the filter schematic? I would like to get some ideas how others design a filter in these types of issues.



    ---------------------
    Last edited by sayzer; - 21st April 2006 at 07:44.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

Similar Threads

  1. A/D conversion with PIC18F67J50
    By ScaleRobotics in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 8th May 2009, 01:48
  2. A/D conversion problem in 18F2520, 2523, 2550 etc.
    By selimkara in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 10th March 2008, 16:26
  3. A/D conversion problem on 18F4431
    By ttease in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 10th April 2007, 23:03
  4. A/D converter fails?
    By egberttheone in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 13th February 2006, 18:57
  5. Strange A/D conversion...
    By Christos_K in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th June 2005, 01:35

Members who have read this thread : 0

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