ADS112U04: K-Type Thermocouple Measurement
Part Number: ADS112U04
I am using a type-K thermocouple with ADS112U04. For thermocouple temperature measurement, I have used register settings as shown in section 126.96.36.199 Detailed Design Procedure(except conversion mode, using single-shot conversion) in the ADS112U04 datasheet. At room temperature (24°C )ADS112U04 reads thermocouple voltage (Vtc) between AIN0 and AIN1 around 0x0051 (Raw data 0x5100 with LSB first), which gives me Vtc = 0.2582 mV (1 LSB = Vref/ (gain * 2^15), where Vref=2048mV,gain=32) and so the equivalent thermocouple temperature using the NIST tables is 4°C, which is too low at normal room temperature. I have tried to heat up the thermocouple, Vtc increases but it's low comparatively. I have also measured the supply voltage Avdd for system monitor using register 0 settings and the resulting conversion is approx 3.288V which is correct. I am attaching the circuit design of temperature sensor . So can you please shed light on it what could possibly go wrong?
There are a couple of things to consider. The first thing is you need to determine the offset of the ADC. After you establish the proper register settings with respect to the reference and the PGA gain you are using, you need to set the mux settings to use the internal short to determine the device offset. Record the conversion offset in memory and then subtract this value from all conversions that follow to correct for the offset.
Second thing is to make sure that you are using the proper values for determining the value of the LSB. LSB is equal to +/- Vref/(Gain*2^16), or as you have stated is Vref/(Gain*2^15) = 2.048V/(32*2^15) = 1.953uV. The output voltage is codes * LSB = 81 codes * 1.953uV = 0.158 mV. So my calculation differs from yours.
Last thing is the cold-junction compensation (CJC). You need to correct for the junction temperature. I see that you are using the LM94022 in the schematic and I assume this device will be used for CJC . The voltage returned from the LMP94022 will need to be converted to a temperature, and then converted from the temperature to match the K-type TC output table for that temperature. You would then need to add the voltages of the measured TC and the CJ and then convert the voltage back to temperature.
I would suggest reviewing the material in A Basic Guide to Thermocouple Measurements.
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Bob Benjamin:
I have confirmed the conversion I am using is correct. (The final output voltage, I have mistakenly considered octal (121) of raw value (51h) instead of decimal (81) in the example and so your calculation differed from mine)
I have tried changing MUX settings to use the internal short to check offset and I've got offset ≈ (-0.771) which resulted into final output voltage (Vtc = 0.158 - (-0.771) = 0.929) of 0.929 which is quite close to what we expect at room temperature.
Also we are using LM94022 for CJC, but the temperature of the cold junction, T (CJ) , using the temperature sensor mode of the ADS112U04 is too high ≈ 24°C (changed register 00h to B1h for CJC measurement). So for the final thermocouple temperature, we are not adding Vtc and thermoelectric cold junction voltage Vcj.
In reply to hiral chaudhari:
If you are shorting the inputs together via the mux settings, then the offset should be no more than +/- 150uV which is the min/max of the ADS112U04 as given in the electrical characteristics table. The typical value is +/-5uV, so there is something not quite right as you should not be seeing an offset that is 5 times worse than the worst case operation of the ADC.
Do you have access to a logic analyzer so that we can verify the communication is being properly interpreted in your code? When you take the TC measurement or offset measurement are you applying any gain? Can you send me the raw codes? Can you send me the register settings you are using?
Also, instead of converting to a voltage and subtracting the voltages, it is much easier to take the two code values and subtract the offset as a value in codes as opposed to calculating the voltages. Converting to a voltage and then subtracting the voltages leads to rounding error.
Also, the TC table is based on the CJ at 0 deg C. To get the proper TC temperature you must properly compensate for the temperature of the CJ. This means you must convert the voltage measured from the LM94022 and convert to a temperature. Then this temperature must be converted to the mV reading for that temperature from the TC tables. The actual TC temperature is the addition of the TC measured voltage and the CJ voltage which is then looked up from the table.
For TC,CJ and offset measurement I am using register settings as shown below:
1) For TC
3) For offset
Using gain 32 for TC and offset measurement and as written in the section 188.8.131.52 Detailed Design Procedure, using the temperature sensor mode of the ADS112U04 to measure the temperature of the cold junction. I am reading the offset value (getting offset value as 0) but not including it in the final calculation of TC temperature. So Pseudo Code to calculate thermocouple temperature looks like,
Configure IC to read cold-junction temperature;
When data is ready, Caculate size of 14-bit LSB equals 0.03125°C (CJ_temp = codes * 0.03125);
Configure IC to read thermocouple voltage;
If data is ready, Calculate the size of code in uV (TC_uVolt = codes * 2048000/(32*32768));
Convert cold-junction temperature into an equivalent thermoelectric voltage(cjVolt) using equations;
Add TC_uVolt and cjVolt (in uVolt) and translate summation back into temperaure using equations (TC_temperature = VoltToTemp(TC_uVolt + cjVolt));
Also, attaching screenshots from Oscillloscope which shows communication between ADS112U04 and microcontroller. TX is data sent from microcontroller and RX is data received from ADS112U04.ADS_Communication.zip
You actually have the TS and the CJ register settings using the internal temperature sensor of the ADS122U04 (register 1 is set to 0x01 in both cases which enables the temperature sensor mode.) The returned values should be similar in both cases and they relatively similar. It would be good to verify using the other sensor as well to correlate the CJ temperature.
Can you tell me what temperature you expect from the TC? I am calculating about 0 deg C. Also, could you take a series of conversions that is continuous and contiguous of the TC of roughly 10 to 20 samples so that I can determine if there is significant noise present? One sample doesn't give me much information.
I made some manual calculation error previously. First let's start with the TC. The value transmitted is 0xA2FE, but as this is LSB first, the actual ADC code is 0xFEA2, which is a negative number when using binary 2's complement. This ends up being -351 decimal. Converting to a voltage, the value of one code is about 1.953uV. So the value returned is -351*1.953uV = -685.5uV.
Using a similar approach for the internal temperature sensor. The value returned was 0x2915, but as this is LSB first data the actual returned value is 0x1529. This data is 14-bit left-justified. Reformatting the data the code value to use is 0x054A or 1354 decimal. Converting to temperature 1354 * 0.03125 = 42.3 deg C. If we convert from the TC table, 42.3 deg to mV we get slightly more than 1.694mV.
If we add the TC voltage and the CJ voltage together, -0.6855mV + 1.694mV = 1.0085mV. Going back to the table, we see that this voltage results in approximately 25 deg C. I say approximately as I used the values closest to a degree. Interpolation of the tables would give a more precise result.
At Ambient temperature, we are getting TC voltage ≈ - 0.314 mV and CJ temperature ≈ 32°C (equivalent thermoelectric voltage,CJ_volt = 1.285mV) this results into final TC temperature ≈ 24°C (CJ_volt + TC_volt = 1.285 - 0.314 = 0.971 mV to look into table gives 24°C ) which looks valid. But as we heat up the thermocouple to 50°C, we get maximum TC voltage ≈ 0.101 mV with same CJ_temp = 32°C which results into final TC-temperature ≈ 35°C (too low,expected 50°C).
The attached file shows TC raw data received from ADS at different time (TICK ms) at Ambient temperature and hot temperature 50°C.
Why did you assume the CJ temperature stayed the same? And are you measuring the CJ with the internal temperature sensor of the ADS112U04 or with the external temp sensor? Have you compared the results of the 2 sensors? The cold junction should be in a thermally isolated point of where the TC wire connects to the the PCB. If you have connectors with dissimilar metals, there will be multiple CJs. I saw a case where a customer had to measure the temperature inside the connector, that is how critical the CJ measurement is to getting a good result. If the ADS112U04 is not in the thermally isolated area, the CJ temperature may not be measured properly. I would suggest that you try to measure the CJ after every 10 TC measurements. If the data rate is 20sps, this would be a CJ measurement every 500ms.
I'm measuring the CJ with internal temperature sensor of ADS as suggested in datasheet. How do you measure CJ with external temp sensor?
Attached is the thermocouple image that we are using (approx 2 ft. long). ADS112U04 and LM94022 (quite close to Thermocouple connects to the the board) are 2 ft away from the point at which we apply heat. So if we heat up the thermocouple, it's not going to affect CJ temp and CJ stays same.
Attached files show CJ temp raw data received from ADS (doesn't change much, CJ temp ≈ 32°C ) and TC volt with thermocouple heated to 100°C (Max TC volt is 2.166 mV, final TC temperature ≈ 32°C + 52°C = 82°C, expected ≈ 100°C ).
I see there is some confusion. The internal temperature sensor is the ADS112U04 and the external temperature sensor is the LM94022. Based on your previous register settings you never actually measure the LM94022. I would assume the LM94022 is the device that is at the cold junction (CJ).
Unfortunately I cannot see all of connection points, but it does appear you are using a board stackup and the TC connector in on the bottom of the stackup. The CJ measurement must be taken at the precise location of the connector. If the ADS112U04 is not placed at the connector, you will not get a valid measurement.
As to the stability of the CJ temperature, it will change due to convection currents and the heating of objects around the CJ. It may not be more than a few degrees, but it is not static.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.