Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC18F8722 ADC error in reading voltage accurately

Status
Not open for further replies.

sukhavsa

Newbie level 6
Joined
Nov 14, 2009
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,390
I am using the ADC on PIC18f8722 to measure the voltage output of a sensor. I have noticed a considerable error in the ADC readings.

To make sure the ADC was working fine i connected a regulated power suppy to the ADC and the error was still there.

The difference in the voltage measured and the actual voltage was ranging from 0.01V to 0.1V(which is considerable and not what the datasheet says)
the difference was low for lower voltages i.e 0.01 for an input of 0.5V and increased as the input voltage increased in an almost linear fashion.

I have tried oversampling but still the issue remained.
Any one has an idea the reason behind this behaviour!!!

here are my ADC config settings
ADCON1 = 0x00;
ADCON0 = 0b00010101; // AN5(RF0) as ADC input channel
ADCON2 = 0b10111110; //right justified, 20TAD, FOSC/64
 

There might be noise problems. I've faced this earlier. Between the voltage source and the ADC pin, connect an RC filter using 1k resistance and 0.1uF(100nF/104) capacitor. Notice the output then. You could also take a number of readings and average them. This should help.

Hope this helps.
Tahmid.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top