pnaven03
Posts: 139
Joined: Thu Feb 16, 2017 5:21 pm

Raspberry pi 3 --> adc accuracy (0.01)

Wed Apr 19, 2017 10:06 am

Hi Team,

We are using raspberry pi 3 and kernel version Linux raspberrypi 4.4.11-v7+ #888 SMP Mon May 23 20:10:33 BST 2016 armv7l GNU/Linux . In board three calibration resistors (1000,850,680) are connected, first reading differential voltage (AIN0 -AIN1) second reading differential current (AIN1 - AIN2) using these two values calculating resistance.when am reading resistance
1000 output value is 10007 like some hardware error getting , so how to remove the error using calibration resistors.
please help on this.

Regards,
Nv

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26659
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry pi 3 --> adc accuracy (0.01)

Wed Apr 19, 2017 11:18 am

Sorry, really not sure what you are doing.

There is no ADC on the Pi, so how are you measuring the resistance? What additional hardware do you have attached and how?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

pnaven03
Posts: 139
Joined: Thu Feb 16, 2017 5:21 pm

Re: Raspberry pi 3 --> adc accuracy (0.01)

Wed Apr 19, 2017 11:24 am

we are integrated adc (ads1247) with raspberry pi 3 via spi communication.
reading PT1000 sensor data.

User avatar
Gavinmc42
Posts: 4526
Joined: Wed Aug 28, 2013 3:31 am

Re: Raspberry pi 3 --> adc accuracy (0.01)

Wed Apr 19, 2017 11:43 am

Unless someone here has used these chips before then I suggest reading the datasheet for this section
Self and System Calibration
Section 9.4.5 Calibration?

24bit ADC powered from 3V3 digital bus?
Hope you paid good attention to the power supply.

Doing a running average helps filter the noise and gets a few more bits.
I usually start with an average of 16 readings. It is sort of how the chip works.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

pnaven03
Posts: 139
Joined: Thu Feb 16, 2017 5:21 pm

Re: Raspberry pi 3 --> adc accuracy (0.01)

Wed Apr 19, 2017 12:07 pm

Thanks for the reply,

Power supply and all are fine , when am reading calibration resistor some error values are getting like
1000 -> 1007 ohms
820 -> 828 ohms
650 ->657 ohms
above values are expected some leakage in hardware side,using calibration resistors remove hardware error using application.
so any methods to remove hardware error using calibration resistors.

Regards,
Nv

User avatar
Gavinmc42
Posts: 4526
Joined: Wed Aug 28, 2013 3:31 am

Re: Raspberry pi 3 --> adc accuracy (0.01)

Wed Apr 19, 2017 12:12 pm

That is what the calibration registers are for, you change them until the values match.
They all read high so start there and see how to get lower readings.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

pnaven03
Posts: 139
Joined: Thu Feb 16, 2017 5:21 pm

Re: Raspberry pi 3 --> adc accuracy (0.01)

Wed Apr 19, 2017 12:19 pm

How can i change the values ?
calibration resistors are fixed hardware side,
any formula's to remove error ?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26659
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry pi 3 --> adc accuracy (0.01)

Wed Apr 19, 2017 1:33 pm

pnaven03 wrote:How can i change the values ?
calibration resistors are fixed hardware side,
any formula's to remove error ?
As gavinmc says, there are registers in the device for calibrate it. You need to set those registers, probably by trial and error (a binary search would be quick), to do the calibration. Registers are set over the SPI bus.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

pnaven03
Posts: 139
Joined: Thu Feb 16, 2017 5:21 pm

Re: Raspberry pi 3 --> adc accuracy (0.01)

Thu Apr 20, 2017 9:57 am

Thanks for the reply,

I tried to set registers but same problem.

any idea using Newton Divided-Difference to sensor resistance to remove hardware error ?


Regards,
Nv

texy
Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Raspberry pi 3 --> adc accuracy (0.01)

Thu Apr 20, 2017 12:57 pm

I would concentrate on getting the calibration right, not adding additional circuitry. If it has 'the same problem' after you have set the registers them maybe it wasn't done correctly.
There's lots of hits via google on this, eg
http://e2e.ti.com/support/data_converte ... 337/903844
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

pnaven03
Posts: 139
Joined: Thu Feb 16, 2017 5:21 pm

Re: Raspberry pi 3 --> adc accuracy (0.01)

Sat Apr 22, 2017 10:08 am

Thanks to all for support ,

This issue resolved by to apply newton divided difference method in application code and using fixed calibration resistors.
removed the hardware resistance.

Regards,
Nv

Return to “General discussion”