ADC not accurate

03 Jul 2012

I use MBED to build a breadboard prototype for voltage measurement.

The hardware is like that

MCU -> Isolator -> ADC(LTC1864) -> Low Pass Filter - > Instrumental Amplifier - > voltage sense resistor I use SPI to communicate with ADC The circuit works and now I am calibrating the circuit. However, the error is a little bit too big. When I applied 3.3 regulated voltage to the voltage sense resistor, the reading from ADC only give me 3.03V.

Where is the 0.3 V error coming from?

03 Jul 2012

What is the isolator circuit? Other parts should not give a large error provided bias currents and impedances have been acounted for.

03 Jul 2012

Can you show us a wireing diagram, etc (circuit)

and some code,

Quick note: MBED ADC is 0.0 -> 1.0 as FLOAT,

so you need to * 3.3 !

What voltage are you using for the REF for the LTC1864 ? This will affect the reported result !

Ceri

03 Jul 2012

I use the 5V output from a LDO to be the reference of the ADC. The isolator is IL711.

Thanks for your reply!

ceri clatworthy wrote:

Can you show us a wireing diagram, etc (circuit)

and some code,

Quick note: MBED ADC is 0.0 -> 1.0 as FLOAT,

so you need to * 3.3 !

What voltage are you using for the REF for the LTC1864 ? This will affect the reported result !

Ceri

03 Jul 2012

I use 16 bit ADC. 0V ->0 5V -> 65535. When I applied a 3.3 V. it gives me around 39000.

ceri clatworthy wrote:

Can you show us a wireing diagram, etc (circuit)

and some code,

Quick note: MBED ADC is 0.0 -> 1.0 as FLOAT,

so you need to * 3.3 !

What voltage are you using for the REF for the LTC1864 ? This will affect the reported result !

Ceri

03 Jul 2012

If you are powering from usb then you might not have 5V, so your ref. will be messed up !

Ceri

03 Jul 2012

As Ceri states, I think we need the circuit diagram. To summarise you have a current sense resistor which you measure the voltage across with an instrumentation amplifier. The IA has a low pass filter which feeds the ADC and ADC is driven by digital isolators from the mcu. The ADC reference is a 5V low dropout regulator. Well that all sounds very good design.

Can you test directly from the adc input, i.e. substitute a voltage inplace of the low pass filter output?

My hunch is either the LPF is not providing the expected gain or indeed it could be the IA. Also can you check linearity i.e. is something saturating at 3.03 V but the gain is correct at some point below this amplitude.

03 Jul 2012

I tested the input of ADC directly, and it is 3.3 Volt. So the IA and LPF are working properly.

Kevin Hobbs wrote:

As Ceri states, I think we need the circuit diagram. To summarise you have a current sense resistor which you measure the voltage across with an instrumentation amplifier. The IA has a low pass filter which feeds the ADC and ADC is driven by digital isolators from the mcu. The ADC reference is a 5V low dropout regulator. Well that all sounds very good design.

Can you test directly from the adc input, i.e. substitute a voltage inplace of the low pass filter output?

My hunch is either the LPF is not providing the expected gain or indeed it could be the IA. Also can you check linearity i.e. is something saturating at 3.03 V but the gain is correct at some point below this amplitude.

03 Jul 2012

In your original post you say

Haoyu Wang wrote:

When I applied 3.3 regulated voltage to the voltage sense resistor, the reading from ADC only give me 3.03V.

But the above

Haoyu Wang wrote:

I tested the input of ADC directly, and it is 3.3 Volt. So the IA and LPF are working properly.

Just to make sure I am clear, are you saying you measured at the ADC with a meter and get 3.3V, but mcu shows 3.03V?

If so this does imply the ADC is the issue. can you confirm how the ADC diff inputs are connected, i.e. does the -ve input goto 0V?

Is the ADC powered from 0 and 5V, if so is it possible you have an offset error taking the -ve ADC input out of its usable range, or indeed that ADC input has 0V as a valid input?

Any chance of a circuit diagram?

03 Jul 2012

Depending on your sens resistor, the copper tracks / cable will have > effect than the sens resistor !!

Any chance of circuit/photo/code

Ceri

03 Jul 2012

I mean I use multimeter to measure the voltage at the input terminal of the ADC, it shows 3.3V.

Kevin Hobbs wrote:

When I applied 3.3 regulated voltage to the voltage sense resistor, the reading from ADC only give me 3.03V.

But the above user Haoyu Wang wrote:

I tested the input of ADC directly, and it is 3.3 Volt. So the IA and LPF are working properly.

Just to make sure I am clear, are you saying you measured at the ADC with a meter and get 3.3V, but mcu sh

03 Jul 2012

Please measure the voltage on the REF. pin of ADC,

Also you need to make sure that the 2 I/P to the IA are between 0.25V and VRef-0.25V for good results !

Additionaly if you do not have a nice selection of decoupeling Caps. Then Noise will swamp results.

?? Circuit/Photo/Code ??

Ceri

03 Jul 2012

Looking at what you have described, I still think as per my earlier post it is to do with 0V and the -ve ADC input.

I just found this link, although I didn't find the details which implies the ADC input range should be above 0.4V...

http://circuits.linear.com/p2139-578

So this is the area I suggest investigating next.

And as Ceri says measure Vref.

03 Jul 2012

/media/uploads/firepick/sche.jpg The schematic is here. Thanks all you guys!

03 Jul 2012

FWIW I'd use an external reference for Vref. Using Vcc is OK for basic demo circuits and some resistance-sensing applications, but if you're going to that much effort to measure something then using Vcc makes little sense.

03 Jul 2012

Thanks! I consider this too. But do you think it is the reason I have 0.3V error?

Oliver Broad wrote:

FWIW I'd use an external reference for Vref. Using Vcc is OK for basic demo circuits and some resistance-sensing applications, but if you're going to that much effort to measure something then using Vcc makes little sense.

03 Jul 2012

Excellent schematic, glad you don't want to see any of mine ;-)

Having looked at the IA and ADC I cannot see anything wrong with your implementation.

I do think it worth looking at the +5V Vcc line with a scope for noise as Ceri indicated. I have found noise can cause all sorts of alias effects and even cause dc levels to shift.

I also presume the 5V VCC supply is derived from the +12V supply to maintain the break in GND and DGND. This again makes it worth checking the 5V VCC for noise as it can be transferred from the DC - DC converter.

Although I have never used the IL711 before (but may do now, thanks), again they look very good with minimal pulse distortion and are high speed, so should not be an issue.

So at the moment I feel that the VCC is suspect! Regarding the decoupling I presume these are ceramic capacitors? I would also suggest adding a 10nF in parallel with the 1uF just to ensure good high frequency decoupling

Having seen that this is multi channel, are the results the same on other channels?

Also you have given us one result at 3.3V, can you supply more and at least 0V as well?

04 Jul 2012

I looked up the tolerance for a 5v regulator and it appeared to be 4%. That could account for an error of about 0.1 but not 0.3v.

One oddity the LT example circuits show is low value resistors in series with the conv,sdo and sck lines. I believe this is to limit fast logic transitions, the data still gets through but ringing and fast edges are suppressed.

I've a distant recollection that the output of those DC-DC converters can be quite dirty and small value chokes or series resistors may help. Note that for low current circuits a RC filter can be far more effective than just adding C.

I don't know it in detail but I think that might be a charge-transfer ADC. I 've seen charge transfer ADCs show huge errors if a pin is driven beyond its supply rails and a protection diode conducts.

I'd like to know how variable the reading is, is it showing noise?

Can you report the "raw" ADC reading you obtained e.g. 16 bit integer?

05 Jul 2012

Thanks Kevin. For the other channels, they also have error. but the three channels have different error. I think maybe it is because it is a breadboard version and there are a lot of noise in the breadboard. I am going to implement the pcb and hope the performance could be improved.

Kevin Hobbs wrote:

Excellent schematic, glad you don't want to see any of mine ;-)

Having looked at the IA and ADC I cannot see anything wrong with your implementation.

I do think it worth looking at the +5V Vcc line with a scope for noise as Ceri indicated. I have found noise can cause all sorts of alias effects and even cause dc levels to shift.

I also presume the 5V VCC supply is derived from the +12V supply to maintain the break in GND and DGND. This again makes it worth checking the 5V VCC for noise as it can be transferred from the DC - DC converter.

Although I have never used the IL711 before (but may do now, thanks), again they look very good with minimal pulse distortion and are high speed, so should not be an issue.

So at the moment I feel that the VCC is suspect! Regarding the decoupling I presume these are ceramic capacitors? I would also suggest adding a 10nF in parallel with the 1uF just to ensure good high frequency decoupling

Having seen that this is multi channel, are the results the same on other channels?

Also you have given us one result at 3.3V, can you supply more and at least 0V as well?