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
1 Attachment(s)
here is the amplifier schematic
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.