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.

ADS1248: Ads1248 temperature convert formula

Part Number: ADS1248

Hi sir,

My name is amarr. I am interfacing ads1248 interfacing with C8051F020 through SPI for reading temperature by connecting RTD sensor(pt100).  Till now I configure ads1248 by setting all registers like MUX0, SYS0 etc

and I am able to read ADC raw data but I don't know how to convert it into temperature.  So please share me the formula for it based on my target MCU.

Sorry for my bad English.

Thank you in advance for your help.

Regards.

Amarr

  • Hi Amarr,

    http://www.ti.com/lit/an/sbaa275/sbaa275.pdf

    Here is a link to "A Basic Guide for RTD Measurements" which should be able to help you convert your ADC codes to temperature. Note that the exact formula will change based on the configuration that you're using the measure the RTD voltage, so make sure you use the correct configuration. Within each section there will be formula for converting the output code to the RTD resistance. This resistance can then be translated into temperature, as shown in section 1.1 of the document.  

  • Hi Smith

    Thank you for your quick response.

    I saw your suggested section 1.1 for converting ADC value into temperature. In that formula we should know about temaparature for finding rrtd value but my aim is to find temaparature only.

    Below settings I did for my ads1248, based on below settings please share me formula for converting ADC value to temaparature.

    Idac currents for two sources (exc1 and exc2) = 1mAmp

    Analog pins are which I connect rtd sensor is AIN0 and AIN1.

    Avdd = 5v Avss = ground

    Dvdd = 3.3 DVDs = ground

    Lead resistances are 6.04kohms

    Vref = 2.40v

    Rref = 1.2kohm

    Gain  = 4

    Datarate = 20sps

    Digital filter settings I kept in default.

    Internal reference enabled.

    Please help me Smith.

    Thank you.

    Regards.

    Amarr

  • Hi Amarr,

    The formula goes both ways. If you know the RTD resistance value and the properties of the sensor, you can calculate the temperature based on the resistance. 

    Depending on your configuration, (2, 3, 4-wire, high or low side reference, etc,) the formula for converting ADC code to RTD resistance will change. You can see this in the document. Once you know the RTD resistance you can convert to temperature. 

  • Hi Smith,

    If I know the rtd resistance? How can I convert ADC value to temaparature. Let us assume rtd resistance value is 101ohms.

    Thank you.

  • Hi Smith,

    My ads1248 confirmation is 3 wire lowside reference

    Thank you

  • Hi Amarr,

    So you'll be using a circuit similar to what is shown in section 2.3, which means the RTD equation is Rrtd = RREF • Output code / (2^22 • Gain)

    Then you use equations 1 and 2, found in section 1.1.

    For T < 0: RRTD(T) = R0 • {1 + (A • T) + (B • T^2 ) + [(C • T^3 ) • (T – 100)]} 

    For T > 0: RRTD(T) = R0 • [1 + (A • T) + (B • T^2 )]

    R0 is 100 Ω

    A = 3.9083 • 10-3

    B = –5.775 • 10-7

    C = –4.183 • 10-12

  • Hi Smith,

    Rrtd should submit in above two equations for finding temaparature.  For below 0 degree we should use first one and for above 0 degree we should use another one equation. Is it right Smith?

    How can I use one equation for finding temaparature using above Rrtd value.

    Thank you.

    Regards,

    Amarr

  • Hi Amarr,

    That is correct. If you look at the graph in the document you will see that at 0 degrees C, the RTD resistance is 100ohms. So if the RTD resistance is less than 100 ohms, use the equation for T < 0. If the RTD resistance is greater that 100 ohms, use the equation for T > 0. This can be accomplished using an if statement in your code. 

  • Hi smith,

    Thank you, how can take T value to the LHS from those two equations? I tried some mathematics but I can't. Please can you provide it.

    Thank you so much.

    Regards

    Amarr

  • Hi Amarr,

    Some microcontrollers are capable of complex math and some are not. For those that are not capable of complex math, a lookup table is the best solution. 

    If the microcontroller is capable of advanced math calculations, more than likely you will need a header of some sort for the compiler, as an example, "math.h" before calling on the program to perform the calculation. 

    We are currently working on some temperature sensing example code that may help, we are hoping it will be ready to release in the next few weeks. 

     

  • Hi Smith,

    Thank you. Present I am working project is based on the C8051F020 and I should close it by next two days. So if don't mind can you please provide lookup table for RTD Sensor(PT100) for my C8051F020 target MCU?  

    Thank you.

    Regards,

    Amarr

  • Hi Amarr,

    C8051F020 is not a TI device so I cannot provide support for your target MCU.

    Unfortunately I do not have a lookup table to provide.This app note may help: http://www.ti.com.cn/cn/lit/ug/tidu182a/tidu182a.pdf

  • Hi Smith,

    Thank you so much for your help. I resolved my issue by your valuable suggestions and provided links.

    Once again thank you so much.

    Regards,

    Amarr