Stable ADC readings


Closed Thread
Results 1 to 40 of 91

Hybrid View

  1. #1
    Join Date
    Jul 2010
    Posts
    19

    Default Stable ADC readings

    I am trying to get stable ADC readings.

    I got a PIC 16F688 hooked up to a battery with a voltage regulator and with proper bypass capacitors. Each time I poll the ADC using ADCIN I get a different reading. Even averaging 50 samples is not enough to get a stable value. I have tried both internal and external oscillators (up to 20MHz).

    I am testing it using a simple voltage divider with two resistors of the same value so that I get a value around 512 (ADC in 10 bit mode).

    Is there anything I can do to stabilize the readings? And what is the source of all the noise?

    Typically I am getting values oscillating from 432 up to 457, that's about a 5% oscillation.

    There has to be a way to make the readings more accurate.6

  2. #2
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default Voltage reference

    If you use VDD as the voltage reference for your AD then it is most likely a not stable powerline. I know you said battery and voltage regulator but have you tried to measure the VDD with an ocsillocope?

    If you really need to get high accuracy reading you might have to consider an external high precition voltage reference. That one you can connect to the VREF pin and then you can set up the AD to use that one.

    Also if you are switching other stuff while doing the measurement it might affect the power supply to the pic as well.

    I would start with making sure the power nice and clean and batteries are not the best source when you start doing new designs.

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


    Did you find this post helpful? Yes | No

    Default

    Hi,

    May we get a scheme , plus your program ???

    Crystal ball is out of range ...

    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
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Adding to what Jumper said, I also face similar issues.
    Usually, using 7805 or 78L05 may not provide a stable 5V.
    Say it is actually between 4.98V and 5.02V. (approx 5% datasheet statement)

    So, if you are using 10-bit reading there is your problem.
    Eventually, Jumper's suggestion of having a high precision voltage reference is a good idea.

    Another issue :
    Pausing 2ms after each ADCIN command may help.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    And...

    More CAPs.
    A capacitor from the ADC pin to VSS will help smooth things out. Will not make up for a bad power supply though.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    Hi, Sayzer

    I am testing it using a simple voltage divider with two resistors of the same value so that I get a value around 512 (ADC in 10 bit mode).
    That means he works in ratiometric mode and supply changes do not interfere here ...
    so, problem is elsewhere ...

    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 " !!!
    *****************************************

  7. #7
    Join Date
    Nov 2011
    Posts
    2


    Did you find this post helpful? Yes | No

    Default Re: Stable ADC readings

    Hello to all
    I'm new in this forum and there is no other way to tell this: i'm the most ignorant in terms of electronics.
    My english also sucks, but i will try my best to communicate.
    I have the same Mazoul72's issues. I have the same steering wheel remotes and want to build some interface PIC based to enable the buttons to work with my Kenwood DNX5260BT, but in the last months i have been looking for the kenwood values, but achieve to nothing and i'm so frustrated. It appears that Pioneer's communication protocol is the resistive type, but kenwood is via data and i don't know what to do.
    Do you experts think that is possible to build one interface like the mazoul72 did and try to change the values in order to work with kenwood?
    Or, what else can i do? I have a ir remote control that works with radio. This is a good think?

    Thank you all
    Karlos

  8. #8
    Join Date
    Aug 2011
    Posts
    40


    Did you find this post helpful? Yes | No

    Default Re: Stable ADC readings

    Hello Karl ,
    glad to see you in this forum .
    I hope that you will find for this new type of Car radio steering wheel command's .
    I had news and very usefull help from mister_e , i hope you will have these information .
    Do you have a Line-K or Bus can wires behind your radio car ?
    Perhaps , it is the best to access to all car radio commands ??

    Regards.
    Mazoul72

Members who have read this thread : 2

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