This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS122U04: Ambient dependent

Part Number: ADS122U04

Tool/software:

Hi,

We have made a design using the ADS122U04 just like the reference TIDA-01526E1 following the guide and using the example software.

Everything is working and it seems quite precise but now we have tested the influence of changes in ambient temperature and it looks like the ADS122U04 is very dependent.

Using a climate chamber for the board and high precision resistors (1K - 0.00C & 1K5 - 130.44C) (Not PT1000) as sensors outside the chamber gives 

  • Initial calibration 
    • Ambient 21.35C - Sensor 1 0.00C - Sensor 2 130.46C - diff 130.46C 
  • Cooling for 60min 
    • Ambient -1.00C -  Sensor 1 0.08C - Sensor 2 130.58C - diff 130.50C  
  • Heeting for 60min 
    • Ambient 47.47C - Sensor 1 -0.34C - Sensor 2 129.95C - diff 130.29C 
  • Max diff 0.21C 

the temperatures are not stable as you can see. Can you explain why and can we make it better changing away from internal reference or using another mode?

Best regards Peter

Init
	ADS122X_reset();                // send UART command
	__delay_cycles(8 * 150);        // 1 * 150 = 17,44 us, measured with Saleae 23. Oct'18
	ADS122X_writeReg(1, 0x0A);      //Normal mode, 90 SPS, Single shot, REFP/N as Reference
	//__delay_cycles(8*300);     // 8 * 300 = 153.6 us
	ADS122X_writeReg(2, 0x04);      //Conversion Counter off, 250 uA IDAC
	// __delay_cycles(8*600);     // 8 * 600 = 455 us
	ADS122X_writeReg(3, 0xA1);      //IDAC2 to REFP pin thru External Ref. Resistor., IDAC1 off, Autoread
	ADS122X_writeReg(4, 0x30);      //Configure GPIO0/1 as output low

Sample
	//Measure RTD2
	//ADS122X_writeReg(0, 0x63); //AIN2/3, Gain=2, PGA Bypassed --> see TechNote SBAA235.pdf Gain=4 for 0x65
	ADS122X_writeReg(0, 0x65);                      //AIN2/3, Gain=4, PGA Bypassed --> see TechNote SBAA235.pdf
	__delay_cycles(8 *  200);                       // 100 us after /RESET rising edge @ 8 MHz
	ADS122X_start();                                // send START command to ADS122X04
	__delay_cycles(8 *  200);                       // 100 us after /RESET rising edge @ 8 MHz
	ADS122X_getConversionData(&convDataRTD2);       //ignore 1st data, IDAC settling

	ADS122X_start();                                // send START command to ADS122X04
	__delay_cycles(8 *  200);                       // 100 us after /RESET rising edge @ 8 MHz

	ADS122X_getConversionData(&convDataRTD2);       //use 2nd data set
	if (convDataRTD2 & 0x800000) {                  // check if result is negative
		convDataRTD2 ^= 0x00FFFFFF;             //invert and make
		convDataRTD2 += 1;                      // two's complement
	}
	convDataRTD2 -= ADS122X_RTD2OffsetCorrection;
	convDataRTD2 = (long)((long long)(convDataRTD2) * ADS122X_RTD2GainCorrection / 100000);

	//Measure RTD1
	ADS122X_writeReg(0, 0x35); //AIN/0, Gain=4, PGA Bypassed --> see TechNote SBAA235.pdf
	// ADS122X_writeReg(0, 0xE5); //AIN/0, Gain=4, PGA Bypassed --> see TechNote SBAA235.pdf

	//using internal REF results are stable
	__delay_cycles(8 * 200);        // 100 us after /RESET rising edge @ 8 MHz
	ADS122X_start();                // send START command to ADS122X04
	__delay_cycles(16 * 800);       // 100 us after /RESET rising edge @ 8 MHz

	ADS122X_getConversionData(&convDataRTD1);
	if (convDataRTD1 & 0x800000) {          // check if result is negative
		convDataRTD1 ^= 0x00FFFFFF;     //invert and make
		convDataRTD1 += 1;              // two's complement
	}
	convDataRTD1 -= ADS122X_RTD1OffsetCorrection;
	convDataRTD1 = (long)((long long)(convDataRTD1) * ADS122X_RTD1GainCorrection / 100000);

	//Measure RTD1 "chopped" (AINx/AINy inverted)
	ADS122X_writeReg(0, 0x05);      //AIN0/1, Gain=4, PGA Bypassed --> see TechNote SBAA235.pdf
	__delay_cycles(8 * 200);        // 100 us after /RESET rising edge @ 8 MHz
	ADS122X_start();                // send START command to ADS122X04
	__delay_cycles(8 * 200);        // 100 us after /RESET rising edge @ 8 MHz

	ADS122X_getConversionData(&convDataRTD1chop);
	if (convDataRTD1chop & 0x800000) {      // check if result is negative
		convDataRTD1chop ^= 0x00FFFFFF; //invert and make
		convDataRTD1chop += 1;          // two's complement
	}
	convDataRTD1chop -= ADS122X_RTD1OffsetCorrection;
	convDataRTD1chop = (long)((long long)(convDataRTD1chop) * ADS122X_RTD1GainCorrection / 100000);

	//Measure RTD2 "chopped" (AINx/AINy inverted)
	ADS122X_writeReg(0, 0x75);              //AIN3/2, Gain=2, PGA Bypassed --> see TechNote SBAA235.pdf; Gain=4 for 0x75
	__delay_cycles(8 *  200);               // 100 us after /RESET rising edge @ 8 MHz
	ADS122X_start();                        // send START command to ADS122X04
	__delay_cycles(8 *  200);               // 100 us after /RESET rising edge @ 8 MHz

	ADS122X_getConversionData(&convDataRTD2chop);
	if (convDataRTD2chop & 0x800000) {      // check if result is negative
		convDataRTD2chop ^= 0x00FFFFFF; //invert and make
		convDataRTD2chop += 1;          // two's complement
	}
	convDataRTD2chop -= ADS122X_RTD2OffsetCorrection;
	convDataRTD2chop = (long)((long long)(convDataRTD2chop) * ADS122X_RTD2GainCorrection / 100000);

	ADS122X_powerdown(); // Powerdown to ADS122x04

	//calculate mean value RTD1
	convDataRTD1 = (convDataRTD1 + convDataRTD1chop) / 2;
	RTDtemperature1 = interpolateRTDTemperatureValue(convDataRTD1); // Get the RTD temperature and convert into millidegrees C

	//calculate mean value RTD2
	convDataRTD2 = (convDataRTD2 + convDataRTD2chop) / 2;
	RTDtemperature2 = interpolateRTDTemperatureValue(convDataRTD2); // Get the RTD temperature and convert into millidegrees C

	/* Result in RTDtemperature1 &  RTDtemperature2 */
	// uart_putLong(RTDtemperature1);
	// uart_putLong(RTDtemperature2);

  • Hi Peter,

    I'll bring this up to our team and will update you by the end of the week.

    Best Regards,

    Angel

  • Hi Peter,

    A way to make RTD temperature measurements more stable is to leverage using a ratiometric measurement of the RTD, by having the same IDAC set the external voltage reference to the ADC through a precision reference resistor, rather than using the internal reference.

    Is a ratiometric calculation being used for the RTD measurements?

    Are you setting external reference in your code? A schematic would also be helpful. 

    You can read more details about this in the following app note: A Basic Guide to RTD Measurements (Rev. A) (ti.com)

    Best Regards,

    Angel

  • Hi Angel,

    We are using a precision reference register and everything is made according to your material for TIDA-01526E1 and should be very precise as stated in the design guide. The schematic is a replica of https://www.ti.com/lit/df/tidrv83/tidrv83.pdf?ts=1729225619139 with the same BOM just added to eletronics almost identical to the https://www.ti.com/tool/EVM430-FR6047

    The setup is precise as long as we don't change the ambient temperature but that isn't mentioned in your material, so what can we do?

    Best regards Peter

  • Hi Peter,

    I will look into this and get back to you.

    Best Regards,

    Angel

  • Hi Peter,

    this design and example code has been developed and written by a colleague out of our central marketing organization. We are not very familiar with the code that was implemented ourselves unfortunately.

    I would agree, that the temperature drift seems to be higher than I would expect. A few additional questions:

    • Are you using the same Gain=4 for all measurements? The gain seems to switch between 2 and 4 in some instances in the example code.
    • I didn't find the function "interpolateRTDTemperatureValue" in the example code. Do you know by any chance which file of the example code that is included in? I want to check that the conversion from ADC code to RTD resistance is performed in a ratiometric fashion.
      The conversion should only use the Conversion code, Gain setting, R_RTD and R_REF in the equation.
    • What drift is specified for the reference resistor you are using?
      The reference resistor usually dominates the measurement accuracy across ambient temperature.
      From my rough calculations, it would seem like as if the R_REF drift would be in the 33ppm/°C range, which is very high. This would then explain the drift across temperature.
    • Have you tried the code without using the "chopped" measurements?
    • You mentioned in your initial post that you are using the internal VREF. The example code mentions that the external VREF is selected though. Could you please clarify?

    Regards,
    Joachim Wuerker

  • Hi Joachim,

    Thank you for answering, I'll try to explain further.

    • Gain is always 4 (0x65, 0x35,0x05, 0x75) with 5 in GAIN/PGA_BYPASS. We just took the example code unmodified and comments are a mess.
    • I've attached the file with interpolateRTDTemperatureValue, but you can find it in https://www.ti.com/tool/download/TIDC701
    • Our Rref is a MCT06030D3901BP500 Fixed Resistor, Thin Film, 0.1W, 3900ohm, 75V, 0.1% +/-Tol, 25ppm/Cel, Surface Mount, 0603
      We have alså tried a 2ppm/cel device without any difference (VIPG_S_A0009883494_1-2514823.pdf)
    • I haven't tried without chopped measurements, I trusted the example
    • My comment regarding VREF was a misleading. I was just trying to list examples of what to do differently 

    /*************************************************************************************************************************************************/
    /*!     RTD_Math.c
     *
     *       This code is designed to convert the conversion value returned from the ADS1220 (or other
     *       24 bit ADC) into an accurate temperature reading.
     *
     *       The software was adapted for MSP430FR6047
     *
     *
     */
    /**************************************************************************************************************************************************
    *       Copyright � 2014 Texas Instruments Incorporated - http://www.ti.com/                                                                      *
    ***************************************************************************************************************************************************
    *  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: *
    *                                                                                                                                                 *
    *    Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.                 *
    *                                                                                                                                                 *
    *    Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the        *
    *    documentation and/or other materials provided with the distribution.                                                                         *
    *                                                                                                                                                 *
    *    Neither the name of Texas Instruments Incorporated nor the names of its contributors may be used to endorse or promote products derived      *
    *    from this software without specific prior written permission.                                                                                *
    *                                                                                                                                                 *
    *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT          *
    *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT     *
    *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT         *
    *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY    *
    *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE      *
    *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.                                                                           *
    **************************************************************************************************************************************************///
    //#include <ADS122x04/MS_ADS122X04.h>
    #include "RTD_Math.h"
    #include <math.h>
    
    
    // This particular table has measurements at every degree C from -200 to 850 inclusive.
    // It is used to perform a linear interpolation between two points that surround the measurement. In this case, those points are 1 degree apart.
    //
    // Other tables can be used with more or less points, at the impact of changing the accuracy of the measurement.
    // Updated 25.9.17 with PGA=2, IDAC=1 and Rref=3900 Ohm
    //PT500 begins with 398351
    
    /*
       const long RTD_Points[] = {
                               398351  ,   407643  ,   416935  ,   426206  ,   435498  ,   444747  ,   454017  ,   463266  ,   472494  ,   481743  ,
                               490949  ,   500176  ,   509382  ,   518588  ,   527794  ,   536978  ,   546163  ,   555347  ,   564510  ,   573673  ,
                               582815  ,   591978  ,   601119  ,   610239  ,   619380  ,   628500  ,   637599  ,   646719  ,   655817  ,   664915  ,
                               673992  ,   683069  ,   692146  ,   701223  ,   710278  ,   719334  ,   728389  ,   737423  ,   746457  ,   755491  ,
                               764503  ,   773537  ,   782549  ,   791540  ,   800553  ,   809544  ,   818534  ,   827504  ,   836473  ,   845443  ,
                               854412  ,   863381  ,   872329  ,   881277  ,   890225  ,   899151  ,   908077  ,   917004  ,   925930  ,   934835  ,
                               943740  ,   952645  ,   961549  ,   970433  ,   979338  ,   988221  ,   997083  ,   1005966 ,   1014828 ,   1023690 ,
                               1032551 ,   1041392 ,   1050254 ,   1059094 ,   1067913 ,   1076753 ,   1085572 ,   1094412 ,   1103231 ,   1112028 ,
                               1120847 ,   1129644 ,   1138442 ,   1147239 ,   1156036 ,   1164812 ,   1173588 ,   1182363 ,   1191139 ,   1199915 ,
                               1208669 ,   1217423 ,   1226178 ,   1234932 ,   1243686 ,   1252419 ,   1261152 ,   1269885 ,   1278617 ,   1287329 ,
                               1296061 ,   1304773 ,   1313484 ,   1322195 ,   1330906 ,   1339596 ,   1348286 ,   1356975 ,   1365665 ,   1374355 ,
                               1383045 ,   1391713 ,   1400381 ,   1409049 ,   1417718 ,   1426386 ,   1435033 ,   1443701 ,   1452347 ,   1460994 ,
                               1469619 ,   1478266 ,   1486913 ,   1495538 ,   1504163 ,   1512788 ,   1521414 ,   1530039 ,   1538643 ,   1547246 ,
                               1555872 ,   1564475 ,   1573057 ,   1581661 ,   1590265 ,   1598847 ,   1607429 ,   1616011 ,   1624594 ,   1633176 ,
                               1641758 ,   1650319 ,   1658901 ,   1667461 ,   1676022 ,   1684583 ,   1693144 ,   1701683 ,   1710243 ,   1718783 ,
                               1727322 ,   1735861 ,   1744400 ,   1752939 ,   1761478 ,   1769996 ,   1778535 ,   1787053 ,   1795571 ,   1804088 ,
                               1812606 ,   1821102 ,   1829620 ,   1838116 ,   1846634 ,   1855130 ,   1863626 ,   1872122 ,   1880597 ,   1889093 ,
                               1897589 ,   1906064 ,   1914538 ,   1923013 ,   1931488 ,   1939962 ,   1948437 ,   1956911 ,   1965365 ,   1973839 ,
                               1982292 ,   1990745 ,   1999199 ,   2007652 ,   2016105 ,   2024537 ,   2032990 ,   2041421 ,   2049874 ,   2058306 ,
                               2066738 ,   2075169 ,   2083601 ,   2092011 ,   2100443 ,   2108853 ,   2117284 ,   2125695 ,   2134105 ,   2142515 ,
                               2150925 ,   2159335 ,   2167724 ,   2176134 ,   2184522 ,   2192932 ,   2201321 ,   2209710 ,   2218098 ,   2226487 ,
                               2234875 ,   2243243 ,   2251631 ,   2259998 ,   2268365 ,   2276732 ,   2285100 ,   2293467 ,   2301834 ,   2310201 ,
                               2318568 ,   2326914 ,   2335259 ,   2343626 ,   2351972 ,   2360317 ,   2368663 ,   2376987 ,   2385333 ,   2393678 ,
                               2402002 ,   2410326 ,   2418650 ,   2426996 ,   2435299 ,   2443623 ,   2451947 ,   2460271 ,   2468573 ,   2476898 ,
                               2485200 ,   2493503 ,   2501805 ,   2510108 ,   2518410 ,   2526691 ,   2534994 ,   2543275 ,   2551578 ,   2559859 ,
                               2568140 ,   2576421 ,   2584702 ,   2592983 ,   2601243 ,   2609524 ,   2617783 ,   2626064 ,   2634324 ,   2642583 ,
                               2650843 ,   2659102 ,   2667340 ,   2675600 ,   2683860 ,   2692098 ,   2700336 ,   2708574 ,   2716812 ,   2725050 ,
                               2733288 ,   2741526 ,   2749742 ,   2757980 ,   2766197 ,   2774413 ,   2782652 ,   2790868 ,   2799063 ,   2807280 ,
                               2815496 ,   2823691 ,   2831908 ,   2840103 ,   2848298 ,   2856493 ,   2864688 ,   2872883 ,   2881078 ,   2889251 ,
                               2897446 ,   2905620 ,   2913815 ,   2921988 ,   2930162 ,   2938335 ,   2946487 ,   2954661 ,   2962834 ,   2970986 ,
                               2979160 ,   2987312 ,   2995464 ,   3003616 ,   3011768 ,   3019899 ,   3028051 ,   3036203 ,   3044333 ,   3052464 ,
                               3060616 ,   3068746 ,   3076877 ,   3084986 ,   3093116 ,   3101246 ,   3109355 ,   3117486 ,   3125595 ,   3133704 ,
                               3141813 ,   3149922 ,   3158031 ,   3166118 ,   3174227 ,   3182315 ,   3190424 ,   3198511 ,   3206599 ,   3214686 ,
                               3222774 ,   3230861 ,   3238927 ,   3247015 ,   3255081 ,   3263168 ,   3271234 ,   3279300 ,   3287366 ,   3295432 ,
                               3303476 ,   3311542 ,   3319587 ,   3327653 ,   3335697 ,   3343742 ,   3351786 ,   3359831 ,   3367875 ,   3375920 ,
                               3383943 ,   3391987 ,   3400010 ,   3408033 ,   3416056 ,   3424079 ,   3432102 ,   3440125 ,   3448126 ,   3456149 ,
                               3464151 ,   3472173 ,   3480175 ,   3488176 ,   3496178 ,   3504179 ,   3512159 ,   3520161 ,   3528162 ,   3536142 ,
                               3544122 ,   3552102 ,   3560082 ,   3568062 ,   3576042 ,   3584022 ,   3591980 ,   3599960 ,   3607918 ,   3615877 ,
                               3623835 ,   3631794 ,   3639752 ,   3647710 ,   3655669 ,   3663606 ,   3671543 ,   3679501 ,   3687438 ,   3695375 ,
                               3703312 ,   3711249 ,   3719164 ,   3727101 ,   3735038 ,   3742953 ,   3750869 ,   3758784 ,   3766700 ,   3774615 ,
                               3782530 ,   3790446 ,   3798340 ,   3806255 ,   3814149 ,   3822043 ,   3829937 ,   3837831 ,   3845725 ,   3853619 ,
                               3861512 ,   3869385 ,   3877257 ,   3885151 ,   3893023 ,   3900896 ,   3908768 ,   3916641 ,   3924491 ,   3932364 ,
                               3940236 ,   3948087 ,   3955938 ,   3963789 ,   3971640 ,   3979491 ,   3987342 ,   3995192 ,   4003022 ,   4010873 ,
                               4018702 ,   4026531 ,   4034361 ,   4042190 ,   4050019 ,   4057849 ,   4065657 ,   4073486 ,   4081294 ,   4089123 ,
                               4096931 ,   4104739 ,   4112547 ,   4120355 ,   4128141 ,   4135949 ,   4143735 ,   4151543 ,   4159329 ,   4167116 ,
                               4174902 ,   4182689 ,   4190475 ,   4198240 ,   4206026 ,   4213791 ,   4221577 ,   4229342 ,   4237107 ,   4244872 ,
                               4252637 ,   4260401 ,   4268145 ,   4275910 ,   4283653 ,   4291396 ,   4299161 ,   4306904 ,   4314648 ,   4322370 ,
                               4330113 ,   4337856 ,   4345578 ,   4353321 ,   4361043 ,   4368765 ,   4376487 ,   4384209 ,   4391930 ,   4399631 ,
                               4407353 ,   4415053 ,   4422775 ,   4430475 ,   4438175 ,   4445876 ,   4453576 ,   4461255 ,   4468955 ,   4476655 ,
                               4484334 ,   4492013 ,   4499692 ,   4507371 ,   4515049 ,   4522728 ,   4530407 ,   4538064 ,   4545743 ,   4553400 ,
                               4561079 ,   4568737 ,   4576394 ,   4584051 ,   4591687 ,   4599344 ,   4607001 ,   4614637 ,   4622273 ,   4629909 ,
                               4637566 ,   4645180 ,   4652816 ,   4660452 ,   4668088 ,   4675702 ,   4683338 ,   4690952 ,   4698566 ,   4706181 ,
                               4713795 ,   4721409 ,   4729023 ,   4736616 ,   4744230 ,   4751823 ,   4759416 ,   4767009 ,   4774602 ,   4782194 ,
                               4789787 ,   4797380 ,   4804951 ,   4812544 ,   4820115 ,   4827686 ,   4835258 ,   4842829 ,   4850400 ,   4857971 ,
                               4865521 ,   4873092 ,   4880642 ,   4888192 ,   4895763 ,   4903313 ,   4910863 ,   4918391 ,   4925941 ,   4933490 ,
                               4941019 ,   4948547 ,   4956097 ,   4963625 ,   4971153 ,   4978681 ,   4986188 ,   4993716 ,   5001244 ,   5008751 ,
                               5016258 ,   5023786 ,   5031293 ,   5038800 ,   5046285 ,   5053792 ,   5061298 ,   5068784 ,   5076290 ,   5083775 ,
                               5091261 ,   5098746 ,   5106231 ,   5113716 ,   5121202 ,   5128665 ,   5136150 ,   5143614 ,   5151078 ,   5158542 ,
                               5166005 ,   5173469 ,   5180933 ,   5188396 ,   5195839 ,   5203302 ,   5210745 ,   5218187 ,   5225629 ,   5233071 ,
                               5240513 ,   5247956 ,   5255376 ,   5262818 ,   5270239 ,   5277660 ,   5285102 ,   5292523 ,   5299943 ,   5307343 ,
                               5314763 ,   5322184 ,   5329583 ,   5336982 ,   5344403 ,   5351802 ,   5359201 ,   5366601 ,   5373978 ,   5381377 ,
                               5388777 ,   5396154 ,   5403532 ,   5410910 ,   5418309 ,   5425665 ,   5433043 ,   5440420 ,   5447798 ,   5455154 ,
                               5462532 ,   5469888 ,   5477244 ,   5484600 ,   5491956 ,   5499313 ,   5506647 ,   5514003 ,   5521338 ,   5528694 ,
                               5536029 ,   5543364 ,   5550698 ,   5558033 ,   5565368 ,   5572681 ,   5580015 ,   5587328 ,   5594663 ,   5601976 ,
                               5609289 ,   5616603 ,   5623916 ,   5631207 ,   5638520 ,   5645812 ,   5653125 ,   5660417 ,   5667709 ,   5675000 ,
                               5682292 ,   5689583 ,   5696875 ,   5704145 ,   5711437 ,   5718707 ,   5725977 ,   5733247 ,   5740517 ,   5747787 ,
                               5755058 ,   5762328 ,   5769576 ,   5776825 ,   5784095 ,   5791344 ,   5798592 ,   5805841 ,   5813090 ,   5820338 ,
                               5827565 ,   5834814 ,   5842041 ,   5849268 ,   5856495 ,   5863722 ,   5870949 ,   5878177 ,   5885404 ,   5892609 ,
                               5899836 ,   5907042 ,   5914248 ,   5921453 ,   5928659 ,   5935864 ,   5943070 ,   5950276 ,   5957460 ,   5964665 ,
                               5971849 ,   5979033 ,   5986218 ,   5993402 ,   6000586 ,   6007770 ,   6014932 ,   6022116 ,   6029279 ,   6036442 ,
                               6043626 ,   6050788 ,   6057929 ,   6065092 ,   6072254 ,   6079396 ,   6086558 ,   6093699 ,   6100840 ,   6108003 ,
                               6115144 ,   6122263 ,   6129405 ,   6136546 ,   6143665 ,   6150806 ,   6157926 ,   6165045 ,   6172165 ,   6179285 ,
                               6186404 ,   6193524 ,   6200622 ,   6207741 ,   6214839 ,   6221937 ,   6229057 ,   6236155 ,   6243232 ,   6250330 ,
                               6257428 ,   6264504 ,   6271602 ,   6278679 ,   6285755 ,   6292853 ,   6299930 ,   6306985 ,   6314061 ,   6321138 ,
                               6328193 ,   6335270 ,   6342325 ,   6349380 ,   6356435 ,   6363490 ,   6370545 ,   6377600 ,   6384633 ,   6391688 ,
                               6398722 ,   6405755 ,   6412810 ,   6419844 ,   6426856 ,   6433889 ,   6440923 ,   6447935 ,   6454969 ,   6461981 ,
                               6468993 ,   6476005 ,   6483017 ,   6490029 ,   6497041 ,   6504053 ,   6511043 ,   6518055 ,   6525046 ,   6532036 ,
                               6539027 ,   6546017 ,   6553008 ,   6559998 ,   6566967 ,   6573958 ,   6580927 ,   6587896 ,   6594865 ,   6601834 ,
                               6608803 ,   6615772 ,   6622741 ,   6629688 ,   6636657 ,   6643605 ,   6650552 ,   6657500 ,   6664447 ,   6671395 ,
                               6678342 ,   6685290 ,   6692216 ,   6699142 ,   6706089 ,   6713015 ,   6719941 ,   6726867 ,   6733793 ,   6740697 ,
                               6747623 ,   6754528 ,   6761454 ,   6768358 ,   6775263 ,   6782167 ,   6789072 ,   6795976 ,   6802881 ,   6809764 ,
                               6816668 ,   6823551 ,   6830434 ,   6837317 ,   6844200 ,   6851083 ,   6857966 ,   6864827 ,   6871710 ,   6878572 ,
                               6885455 ,   6892316 ,   6899178 ,   6906039 ,   6912879 ,   6919740 ,   6926602 ,   6933442 ,   6940303 ,   6947143 ,
                               6953983 ,   6960823 ,   6967663 ,   6974503 ,   6981321 ,   6988161 ,   6994980 ,   7001820 ,   7008638 ,   7015457 ,
                               7022275 ,   7029093 ,   7035890 ,   7042709 ,   7049527 ,   7056324 ,   7063121 ,   7069918 ,   7076715 ,   7083512 ,
                               7090309 ,   7097106 ,   7103881 ,   7110678 ,   7117453 ,   7124229 ,   7131026 ,   7137801 ,   7144555 ,   7151330 ,
                               7158106 ,   7164860 ,   7171635 ,   7178389 ,   7185143 ,   7191897 ,   7198651 ,   7205405 ,   7212159 ,   7218913 ,
                               7225645 ,   7232399 ,   7239131 ,   7245864 ,   7252596 ,   7259328 ,   7266061 ,   7272772 ,   7279504 ,   7286215 ,
                               7292947 ,   7299658 ,   7306369 ,   7313080 ,   7319791 ,   7326502 ,   7333191 ,   7339902 ,   7346591 ,   7353302 ,
                               7359992 ,   7366681 ,   7373370 ,   7380060 ,   7386749 ,   7393417 ,   7400106 ,   7406774 ,   7413442 ,   7420110 ,
                               7426799 ,   7433446 ,   7440114 ,   7446782 ,   7453428 ,   7460096 ,   7466742 ,   7473410 ,   7480056 ,   7486703 ,
                               7493349 ,   7499974 ,   7506620 ,   7513245 ,   7519891 ,   7526516 ,   7533141 ,   7539766 ,   7546391 ,   7553016 ,
                               7559641 ,   7566265 ,   7572869 ,   7579472 ,   7586097 ,   7592700 ,   7599304 ,   7605907 ,   7612510 ,   7619092 ,
                               7625695 ,   7632277 ,   7638881 ,   7645462 ,   7652044 ,   7658626 ,   7665208 ,   7671790 ,   7678350 ,   7684932 ,
                               7691492 ,   7698074 ,   7704634 ,   7711195 ,   7717755 ,   7724315 ,   7730854 ,   7737414 ,   7743953 ,   7750514 ,
                               7757052 ,   7763591 ,   7770130 ,   7776669 ,   7783208 ,   7789746 ,   7796264 ,   7802803 ,   7809320 ,   7815837 ,
                               7822355 ,   7828872 ,   7835389 ,   7841906 ,   7848424 ,   7854920 ,   7861437 ,   7867933 ,   7874428 ,   7880924 ,
                               7887420 ,   7893916 ,   7900412 ,   7906886 ,   7913382 ,   7919856 ,   7926330 ,   7932826 ,   7939300 ,   7945775 ,
                               7952227 ,   7958702 ,   7965176 ,   7971629 ,   7978081 ,   7984556 ,   7991009 ,   7997461 ,   8003914 ,   8010345 ,
                               8016798 ,   8023229 ,   8029682 ,   8036113 ,   8042545 ,   8048976 ,   8055407 ,   8061838 ,   8068270 ,   8074701 ,
                               8081111 ,   8087521 ,   8093952 ,   8100362 ,   8106771 ,   8113181 ,   8119591 ,   8125979 ,   8132389 ,   8138777 ,
                               8145187 ,   8151575 ,   8157963 ,   8164352 ,   8170740 ,   8177107 ,   8183495 ,   8189883 ,   8196250 ,   8202617 ,
                               8209005 ,   8215372 ,   8221738 ,   8228083 ,   8234450 ,   8240817 ,   8247162 ,   8253529 ,   8259874 ,   8266219 ,
                               8272565 ,   8278910 ,   8285255 ,   8291579 ,   8297924 ,   8304248 ,   8310593 ,   8316917 ,   8323240 ,   8329564 ,
                               8335888 ,   8342212 ,   8348514 ,   8354837 ,   8361140 ,   8367442 ,   8373766 ,   8380068 ,   8386370 ,   8392651 ,
                               8398953 ,   8405255
       }; //PT500 = PT100 * 5
    
     */
    const long RTD_Points[] = {
    	79670,   81529,   83387,   85241,   87100,   88949,   90803,   92653,   94499,   96349,
    	98190,   100035,   101876,   103718,   105559,   107396,   109233,   111069,   112902,   114735,
    	116563,   118396,   120224,   122048,   123876,   125700,   127520,   129344,   131163,   132983,
    	134798,   136614,   138429,   140245,   142056,   143867,   145678,   147485,   149291,   151098,
    	152901,   154707,   156510,   158308,   160111,   161909,   163707,   165501,   167295,   169089,
    	170882,   172676,   174466,   176255,   178045,   179830,   181615,   183401,   185186,   186967,
    	188748,   190529,   192310,   194087,   195868,   197644,   199417,   201193,   202966,   204738,
    	206510,   208278,   210051,   211819,   213583,   215351,   217114,   218882,   220646,   222406,
    	224169,   225929,   227688,   229448,   231207,   232962,   234718,   236473,   238228,   239983,
    	241734,   243485,   245236,   246986,   248737,   250484,   252230,   253977,   255723,   257466,
    	259212,   260955,   262697,   264439,   266181,   267919,   269657,   271395,   273133,   274871,
    	276609,   278343,   280076,   281810,   283544,   285277,   287007,   288740,   290469,   292199,
    	293924,   295653,   297383,   299108,   300833,   302558,   304283,   306008,   307729,   309449,
    	311174,   312895,   314611,   316332,   318053,   319769,   321486,   323202,   324919,   326635,
    	328352,   330064,   331780,   333492,   335204,   336917,   338629,   340337,   342049,   343757,
    	345464,   347172,   348880,   350588,   352296,   353999,   355707,   357411,   359114,   360818,
    	362521,   364220,   365924,   367623,   369327,   371026,   372725,   374424,   376119,   377819,
    	379518,   381213,   382908,   384603,   386298,   387992,   389687,   391382,   393073,   394768,
    	396458,   398149,   399840,   401530,   403221,   404907,   406598,   408284,   409975,   411661,
    	413348,   415034,   416720,   418402,   420089,   421771,   423457,   425139,   426821,   428503,
    	430185,   431867,   433545,   435227,   436904,   438586,   440264,   441942,   443620,   445297,
    	446975,   448649,   450326,   452000,   453673,   455346,   457020,   458693,   460367,   462040,
    	463714,   465383,   467052,   468725,   470394,   472063,   473733,   475397,   477067,   478736,
    	480400,   482065,   483730,   485399,   487060,   488725,   490389,   492054,   493715,   495380,
    	497040,   498701,   500361,   502022,   503682,   505338,   506999,   508655,   510316,   511972,
    	513628,   515284,   516940,   518597,   520249,   521905,   523557,   525213,   526865,   528517,
    	530169,   531820,   533468,   535120,   536772,   538420,   540067,   541715,   543362,   545010,
    	546658,   548305,   549948,   551596,   553239,   554883,   556530,   558174,   559813,   561456,
    	563099,   564738,   566382,   568021,   569660,   571299,   572938,   574577,   576216,   577850,
    	579489,   581124,   582763,   584398,   586032,   587667,   589297,   590932,   592567,   594197,
    	595832,   597462,   599093,   600723,   602354,   603980,   605610,   607241,   608867,   610493,
    	612123,   613749,   615375,   616997,   618623,   620249,   621871,   623497,   625119,   626741,
    	628363,   629984,   631606,   633224,   634845,   636463,   638085,   639702,   641320,   642937,
    	644555,   646172,   647785,   649403,   651016,   652634,   654247,   655860,   657473,   659086,
    	660695,   662308,   663917,   665531,   667139,   668748,   670357,   671966,   673575,   675184,
    	676789,   678397,   680002,   681607,   683211,   684816,   686420,   688025,   689625,   691230,
    	692830,   694435,   696035,   697635,   699236,   700836,   702432,   704032,   705632,   707228,
    	708824,   710420,   712016,   713612,   715208,   716804,   718396,   719992,   721584,   723175,
    	724767,   726359,   727950,   729542,   731134,   732721,   734309,   735900,   737488,   739075,
    	740662,   742250,   743833,   745420,   747008,   748591,   750174,   751757,   753340,   754923,
    	756506,   758089,   759668,   761251,   762830,   764409,   765987,   767566,   769145,   770724,
    	772302,   773877,   775451,   777030,   778605,   780179,   781754,   783328,   784898,   786473,
    	788047,   789617,   791188,   792758,   794328,   795898,   797468,   799038,   800604,   802175,
    	803740,   805306,   806872,   808438,   810004,   811570,   813131,   814697,   816259,   817825,
    	819386,   820948,   822509,   824071,   825628,   827190,   828747,   830309,   831866,   833423,
    	834980,   836538,   838095,   839648,   841205,   842758,   844315,   845868,   847421,   848974,
    	850527,   852080,   853629,   855182,   856731,   858279,   859832,   861381,   862930,   864474,
    	866023,   867571,   869116,   870664,   872209,   873753,   875297,   876842,   878386,   879926,
    	881471,   883011,   884555,   886095,   887635,   889175,   890715,   892251,   893791,   895331,
    	896867,   898403,   899938,   901474,   903010,   904546,   906081,   907613,   909149,   910680,
    	912216,   913747,   915279,   916810,   918337,   919869,   921400,   922927,   924455,   925982,
    	927513,   929036,   930563,   932090,   933618,   935140,   936668,   938190,   939713,   941236,
    	942759,   944282,   945805,   947323,   948846,   950365,   951883,   953402,   954920,   956439,
    	957957,   959476,   960990,   962509,   964023,   965537,   967052,   968566,   970080,   971594,
    	973104,   974618,   976128,   977638,   979153,   980663,   982173,   983678,   985188,   986698,
    	988204,   989709,   991219,   992725,   994231,   995736,   997238,   998743,   1000249,   1001750,
    	1003252,   1004757,   1006259,   1007760,   1009257,   1010758,   1012260,   1013757,   1015258,   1016755,
    	1018252,   1019749,   1021246,   1022743,   1024240,   1025733,   1027230,   1028723,   1030216,   1031708,
    	1033201,   1034694,   1036187,   1037679,   1039168,   1040660,   1042149,   1043637,   1045126,   1046614,
    	1048103,   1049591,   1051075,   1052564,   1054048,   1055532,   1057020,   1058505,   1059989,   1061469,
    	1062953,   1064437,   1065917,   1067396,   1068881,   1070360,   1071840,   1073320,   1074796,   1076275,
    	1077755,   1079231,   1080706,   1082182,   1083662,   1085133,   1086609,   1088084,   1089560,   1091031,
    	1092506,   1093978,   1095449,   1096920,   1098391,   1099863,   1101329,   1102801,   1104268,   1105739,
    	1107206,   1108673,   1110140,   1111607,   1113074,   1114536,   1116003,   1117466,   1118933,   1120395,
    	1121858,   1123321,   1124783,   1126241,   1127704,   1129162,   1130625,   1132083,   1133542,   1135000,
    	1136458,   1137917,   1139375,   1140829,   1142287,   1143741,   1145195,   1146649,   1148103,   1149557,
    	1151012,   1152466,   1153915,   1155365,   1156819,   1158269,   1159718,   1161168,   1162618,   1164068,
    	1165513,   1166963,   1168408,   1169854,   1171299,   1172744,   1174190,   1175635,   1177081,   1178522,
    	1179967,   1181408,   1182850,   1184291,   1185732,   1187173,   1188614,   1190055,   1191492,   1192933,
    	1194370,   1195807,   1197244,   1198680,   1200117,   1201554,   1202986,   1204423,   1205856,   1207288,
    	1208725,   1210158,   1211586,   1213018,   1214451,   1215879,   1217312,   1218740,   1220168,   1221601,
    	1223029,   1224453,   1225881,   1227309,   1228733,   1230161,   1231585,   1233009,   1234433,   1235857,
    	1237281,   1238705,   1240124,   1241548,   1242968,   1244387,   1245811,   1247231,   1248646,   1250066,
    	1251486,   1252901,   1254320,   1255736,   1257151,   1258571,   1259986,   1261397,   1262812,   1264228,
    	1265639,   1267054,   1268465,   1269876,   1271287,   1272698,   1274109,   1275520,   1276927,   1278338,
    	1279744,   1281151,   1282562,   1283969,   1285371,   1286778,   1288185,   1289587,   1290994,   1292396,
    	1293799,   1295201,   1296603,   1298006,   1299408,   1300811,   1302209,   1303611,   1305009,   1306407,
    	1307805,   1309203,   1310602,   1312000,   1313393,   1314792,   1316185,   1317579,   1318973,   1320367,
    	1321761,   1323154,   1324548,   1325938,   1327331,   1328721,   1330110,   1331500,   1332889,   1334279,
    	1335668,   1337058,   1338443,   1339828,   1341218,   1342603,   1343988,   1345373,   1346759,   1348139,
    	1349525,   1350906,   1352291,   1353672,   1355053,   1356433,   1357814,   1359195,   1360576,   1361953,
    	1363334,   1364710,   1366087,   1367463,   1368840,   1370217,   1371593,   1372965,   1374342,   1375714,
    	1377091,   1378463,   1379836,   1381208,   1382576,   1383948,   1385320,   1386688,   1388061,   1389429,
    	1390797,   1392165,   1393533,   1394901,   1396264,   1397632,   1398996,   1400364,   1401728,   1403091,
    	1404455,   1405819,   1407178,   1408542,   1409905,   1411265,   1412624,   1413984,   1415343,   1416702,
    	1418062,   1419421,   1420776,   1422136,   1423491,   1424846,   1426205,   1427560,   1428911,   1430266,
    	1431621,   1432972,   1434327,   1435678,   1437029,   1438379,   1439730,   1441081,   1442432,   1443783,
    	1445129,   1446480,   1447826,   1449173,   1450519,   1451866,   1453212,   1454554,   1455901,   1457243,
    	1458589,   1459932,   1461274,   1462616,   1463958,   1465300,   1466638,   1467980,   1469318,   1470660,
    	1471998,   1473336,   1474674,   1476012,   1477350,   1478683,   1480021,   1481355,   1482688,   1484022,
    	1485360,   1486689,   1488023,   1489356,   1490686,   1492019,   1493348,   1494682,   1496011,   1497341,
    	1498670,   1499995,   1501324,   1502649,   1503978,   1505303,   1506628,   1507953,   1509278,   1510603,
    	1511928,   1513253,   1514574,   1515894,   1517219,   1518540,   1519861,   1521181,   1522502,   1523818,
    	1525139,   1526455,   1527776,   1529092,   1530409,   1531725,   1533042,   1534358,   1535670,   1536986,
    	1538298,   1539615,   1540927,   1542239,   1543551,   1544863,   1546171,   1547483,   1548791,   1550103,
    	1551410,   1552718,   1554026,   1555334,   1556642,   1557949,   1559253,   1560561,   1561864,   1563167,
    	1564471,   1565774,   1567078,   1568381,   1569685,   1570984,   1572287,   1573587,   1574886,   1576185,
    	1577484,   1578783,   1580082,   1581377,   1582676,   1583971,   1585266,   1586565,   1587860,   1589155,
    	1590445,   1591740,   1593035,   1594326,   1595616,   1596911,   1598202,   1599492,   1600783,   1602069,
    	1603360,   1604646,   1605936,   1607223,   1608509,   1609795,   1611081,   1612368,   1613654,   1614940,
    	1616222,   1617504,   1618790,   1620072,   1621354,   1622636,   1623918,   1625196,   1626478,   1627755,
    	1629037,   1630315,   1631593,   1632870,   1634148,   1635421,   1636699,   1637977,   1639250,   1640523,
    	1641801,   1643074,   1644348,   1645617,   1646890,   1648163,   1649432,   1650706,   1651975,   1653244,
    	1654513,   1655782,   1657051,   1658316,   1659585,   1660850,   1662119,   1663383,   1664648,   1665913,
    	1667178,   1668442,   1669703,   1670967,   1672228,   1673488,   1674753,   1676014,   1677274,   1678530,
    	1679791,   1681051
    
    
    }; //PT100; if PT1000 is used = just multiply by 10
    
    
    /*************************************************************************************************************************************************
     *  interpolateRTDTemperatureValue
     **************************************************************************************************************************************************/
    /*!
     * @brief Returns the temperature in millidegrees that corresponds to the RTD code value returned from the ADS1220.
     *
     * The function converts the code value returned from the RTD reading using the ADS1220 and returns the temperature value in millidegrees C.
     *
     * @param[in]   code                24 bit value provided from the ADS1220 from the RTD conversion
     *
     * @return  temperature             Temperature in millidegrees C.
     *
     **************************************************************************************************************************************************/
    long interpolateRTDTemperatureValue(long code)
    {
    	volatile long interimValue;
    	long targetValue;
    	//static float r_value;
    	volatile short index;
    
    	//r_value = calculateRValue (code);
    	index = findRTDInterpolationIndex(code);
    
    	// Interim value will be a fraction less than 1 valid for PT100
    	//interimValue = ((code - RTD_Points[index])*1000) / (RTD_Points[index+1] - RTD_Points[index]);
    
    
    	// Interim value will be a fraction less than 1 valid for PT1000
    	interimValue = ((code - 10 * RTD_Points[index]) * 1000) / (10 * RTD_Points[index + 1] - 10 * RTD_Points[index]);
    
    	// Interim value will be a fraction less than 1 valid for PT100
    	//  interimValue = ((code - 5 * RTD_Points[index])*1000) / (5 * RTD_Points[index+1] - 5 * RTD_Points[index]);
    
    
    	// The algorithm requires the table to be one value for every degree. Since the table is regular, the
    	//  interimValue will be the decimal portion of the temperature measurement. The Index show how deep
    	//  we are into the table with each step being one degree apart. If we add value in degree C of the
    	//  first measurement in the table we can convert into temperature
    	targetValue = interimValue  + ((long)index + MIN_RTD_TEMP_MEAS) * 1000; // Convert index out of unsigned variable to allow for negative number
    
    	return targetValue;                                                     // Note this is in MilliDegrees C
    }
    
    /*************************************************************************************************************************************************
     *  findRTDInterpolationIndex
     **************************************************************************************************************************************************/
    /*!
     * @brief Searches the Points table to locate the index where the input R value lands in between.
     *
     * The function requires a Points table (above) containing temperatures (in millidegrees), and R values. The R Values must be monotonically increasing.
     * This function will return the index of the lower of the two points surrounding the input R value. These points can then be used to perform
     * linear interpretation to get the approximate temperature.
     *
     * @param[in]   code                The code from the RTD return
     *
     * @return  index value             The index value pointing to the lower point that is closest to the input code.
     *
     * @note  Since the Interpolation table has one entry for degree C, starting at -200 C, you can subtract 200 from the index to get the associated
     *         temperature in degrees
     **************************************************************************************************************************************************/
    short findRTDInterpolationIndex(long code)
    {
    	unsigned long i;
    
    	for (i = 0; i < NUM_RTD_MEAS_POINTS; i++) {
    //#ifdef PT500
    //        if (5* RTD_Points[i] > code)
    //#endif
    //#ifdef PT1000
    		//PT1000 is used, then *10
    		if (10 * RTD_Points[i] > code) {
    //#endif
    			/*
    			 #ifdef PT100
    			      if (RTD_Points[i] > code)
    			 */
    			return i - 1;
    		}
    	}
    
    	return NUM_RTD_MEAS_POINTS - 1;
    }
    

    Best regards Peter Nielsen

  • Thanks a lot for the clarification Peter.

    To be honest, I cannot follow the code and how the look-up table was built. It looks very specific to the design. Means if other component values or settings are used it might not work anymore. However as you seem to get reasonable results, I would assume it is working in your case.
    (And yes, I fully agree, the comments are a mess.)

    The 25ppm/°C RREF would align with my error calculations. But then using a 2ppm/°C RREF should definitely improve the drift performance. We usually recommend RREFs with a drift in the <=5ppm/°C range.
    I am not sure where else the drift should come from. The ADC itself only has a gain drift in the 2ppm/°C range and you are removing the offset drift in principle by doing the "chopped" measurements.

    Regards,
    Joachim Wuerker

  • Hi Joachim,

    Thank you for answering. I've bought a ADS122U04EVM and will try to use the standard TI software library to see if this setup has the same issue.

    I'll post the outcome to let you know.

    Regards Peter Nielsen

  • Hi Peter,

    I am not sure if you will have much success with the EVM for this specific use case to be honest.
    I am also not sure how easy it will be to modify the EVM to connect the two RTDs in your configuration to it.
    The example code we provide for the ADS122U04 might not show how to convert the data in a ratiometric fashion.
    The temperature sensor firmware library we created for our ADCs might be a little more useful potentially: ADC-TEMP-SENSOR-FW

    From my calculations everything you are seeing makes sense based on the 25ppm/°C RREF you used. I am just not sure why using a lower drift RREF does not improve the situation. I would rather try to investigate that some more.

    Regards,
    Joachim Wuerker