Adc giving widely flactuating values


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Dec 2006
    Posts
    21

    Default Adc giving widely flactuating values

    Hi freinds ...
    Here is a code i made to measure temperature using a thermocouple and a two stage opamp amplifier ... Using my avo the amplifier gives 0.03 V at 0.c to 3.13 V at 300 0.c , I uses a pic16f877a , the problem is that i get on my pc a great fluctuation of values which is about 40 increments ... I don't know the impedance of my analog circuit ... How can i measure it ? Please tell me if the settings has something wrong ... Can you explain the effect of adjusting sampling time ? ... Many thanks for caring ... Bye

    DEFINE OSC 20
    trisa=255
    DEFINE ADC_BITS 10
    DEFINE ADC_CLOCK 3
    DEFINE ADC_SAMPLEUS 100
    temp var word

    adcon1=%10000000
    loop :
    adcin 0,temp 'measure temperature
    serout portB.7,4,["C",temp.byte0,temp.BYTE1] 'send result to PC
    pause 20
    goto loop

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Could you post your schematic here?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Dec 2006
    Posts
    21


    Did you find this post helpful? Yes | No

    Default here is the amplifier schematic

    see the .doc file
    Attached Files Attached Files

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    In theory, the impedance of your circuit is the impedance of your LM324 output. Few tenth of ohm from what i remind. So it shouldn't be the problem.

    What happen if you place a 0.1uF between pin 3 of your LM324 and GND?

    Can you monitor the LM324 output with a scope and post a screen-shot of it here?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    Dec 2006
    Posts
    21


    Did you find this post helpful? Yes | No

    Default the same problem

    It didn't help ... The flactuation is the same ... I only want tell you that i made a mdification on the schematic which is that i replced the 70 k by a 100 k resistor

  6. #6
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default What about your power supply?

    Hi,

    If you are using your VDD as Vref for the ADC then it is important that your power supply is clean and steady. Because that effects your overall conversion accuracy. General remedies are decoupling caps on the VDD-VSS pins of your PIC and a stable source.

    As steve mentioned there could be noise from the op-amps output too. So decouplers for them as well.
    Last edited by sougata; - 16th December 2006 at 16:02.
    Regards

    Sougata

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by tamersoss
    It didn't help ... The flactuation is the same ... I only want tell you that i made a mdification on the schematic which is that i replced the 70 k by a 100 k resistor

    Have you tried using a bit of software averaging? Read the input a bunch of times, sum the total of the reads, divide by the number of reads, use that number. I know it's not a perfect solution, but it's always worked for me (read that as I'm compensating for bad circuit design )
    JDG

Similar Threads

  1. Stable Adc Reading Routine
    By gebillpap in forum General
    Replies: 27
    Last Post: - 13th May 2015, 02:18
  2. 16F877A problem: "coupled" digital values
    By Lupo83 in forum General
    Replies: 16
    Last Post: - 4th December 2007, 12:46
  3. Scaling ADC values
    By purkolator in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th November 2007, 05:14
  4. ADC value with 2 decimals on an LCD
    By Squibcakes in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd December 2005, 15:54
  5. 12F675 ADC 'Issues'
    By harrisondp in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 31st March 2005, 01:55

Members who have read this thread : 1

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