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.

PIC 10bit ADC linearity problem

Status
Not open for further replies.

Sobakava

Full Member level 6
Joined
Mar 27, 2002
Messages
350
Helped
8
Reputation
16
Reaction score
8
Trophy points
1,298
Activity points
3,342
I connected the output of Texs.Inst. Instrumentation
Amplifier output to PIC18F452's ADC input.
My instrumentation amplifier has good linearity.
I measure input signal (differential from a bridge sensor)
and I measure output signal. It's pretty good with
analog multiply factor 23.
But ADC does not measure signal correctly.

Input signal varies from 500mV to 4V. But I
divide input signal in mV to ADC value, it is
not linear. For instance:

Input(mV) , ADC Value , Ratio
560 129 4.341
720 161 4.47
800 178 4.494
980 216 4.53
1110 241 4.609
1130 284 3.97
1168 364 3.208

PIC clocked with 20MHz oscillator and ADC is
clocked with Clock div 32 option. I also tried
clock div 64 and internal RC....

I think it may be about impedance matching.

??? What do you think ???
 

measurement

Did you measure the amplifier output when it was attached to the PIC input? These measurements will give you a clue. Another thing to try is look at the signal path at each point with an oscilloscope to see if something is oscillating.
 

PIC adc linearity

I made the measurements while PIC is connected.
I connect probes between GND and PIC ADC input and
see ADC value at LCD screen and voltage at
voltmeter's screen.
 

binary - bcd

Your problem may be in your binary to BCD conversion code. Try putting a lab supply to the input of the ADC. Slowly vary the voltage and see if the LCD display numbers are monotonic or if they make big jumps up or down.
 

PIC ADC Linearity

I tried this at first with a potentiometer. PIC measures
voltage on pot. correctly. My problem is with Instrumentation
amplifier...

Probably it's output impedance does not match with
ADC's requirements.

Opinions?
 

What kind of Instr. amplifier are you using - Often problem is with impedance connected to amplifier Ref pin, it could decrease amplifier parameters. How about bias current return path? or maybe you have problem with input common voltage range?
Another idea - is PIC response stable on LCD? maybe your problem is with noise High impedance input could be very noisy.- every multimeter integrate signal, but PIC do not.
In some circuits connecting scope probe to the circuits could very change signal (input impedance), so maybe your PIC measure OK, but meter do not? I always prepeare circuits simulating input with known conditions and then you could check circuit point by point.

regards
KamW
 

PIC ADC Linearity

I use Burr Brown INA129 instrumentation amplifier.
You are right, I've to check circuit with an RC integrator first.

Amplifier is fed from +-12V power supply. Coupling
capacitors exists for each supply. Ref pin of amplifier
is connected to GND with a very short trace.
 

Microchip datasheet raccomand a maximum of 10Kohm impedance in analogic input, you can try pulldown the input with 4K7 resistor
 

Hello,

For sure you have to search the problem outside of the PIC or into your software.

Some time ago I checked all codes of ADC convertor and I could say that PIC ADC has excellent linearity.
The same I could say for their 12 bit ADC PIC - PIC16C774 - works great.

Even if you put capacitors on the inputs you could get wrong results if the PCB is not routed correctly.
 

yes I know it is linear if I use a potentiometer but
it is not with my sensor. I'll try to use a RC circuit
between amplifier and PIC.
koky, pulling the input with a resistor was one of the
first experiments. it did not help...
 

I am wondering if your problem it isn't the input voltage range. If your sensor circuit is float, then you could have problem with amplifier. I assume that the voltage you have written it was differential voltage. But what are the absolute voltages on amplifier inputs?
With INA129 and your supply you should have not more than +-10V on any amplifier input (internal too). Instrumentation amplifiers are very difficult to use becouse of this. Before I use any amplifier first I simulate it, so maybe you should measure absolute voltages on both inputs, then simulate it (I use p*r*o*t*e*l) using discrete amplifier and circuit from datasheet. For simulation purposes I always use much higher supply voltages, and then I could check every point.
If problem is with floating sensor you could try to ground it, and sometimes large resistor is enought

regards
KamW
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top