Post Go back to editing

CN-0359 RTD coding

Hi,

I would like to modify the CN-0359 RTD coding. Resistance to Temperature. I found the following detail in "CN0359-SourceCode-RevA" folder (ADC.cpp file)

Could ADI have any detail for the formula above? Such parameter Radc, 1V, 500nA/V.....

In CN-0359 datasheet, the following is the formula of RTD. It look different from the Coding 

Besides, if I follow the formula in ADC.cpp, it does not match the following in function - on_adc1(int argc, char *argv[]) :

The value is different from the RTD equation as well

Appreciate if you can advise further how RTD code is working.

Thank for your help in advance.

Mark.

  • Hi Mark,

    Radc is the input impedance of the ADuCM360's internal ADC. 1 V is the maximum output of that ADC's PGA (this is also the maximum input to the ADC in this case) and 500 nA/V is the typical input current of the ADC when operating in unbuffered mode. Calculating Radc from these parameters result in a value of 2 MΩ.

    It's a pretty big value compared to the 1.5 kΩ resistor or the RTD so it was likely omitted in the datasheet (it doesn't affect the RTD calculation significantly).

    The CN0359 software uses the ratio of the RTD voltage and the 1.5 kΩ resistor voltage for its RTD calculation. In the datasheet, an equation for the RTD is only given in terms of V5, V6, V7 and V8 - but that's really only the first step (what we really need is an equation in terms of the ADC data; i.e. the one you can find in the software files). Here is how I think the RTD equation was derived:

    This takes into consideration the effect of Radc, like in the software files.

    As for why the the equations in the on_adc1(int argc, char *argv[]) function are slightly different, it's because the software normalizes the RTD value to 1 at 0ºC when translating the RTD value to temperature. PT1000 and a PT100 RTDs should have resistances of 1 kΩ  and 100 Ω at 0ºC respectively, so we divide the PT1000 and PT100 readings by 1000 and 100 to normalize them to 1.

  • Hi,

    Thank for your detail explanation.

    Understand that 500nA/V is the typical input current of the ADC when operating in unbuffered mode.

    However, I find that the code excitation current setting in ADC.cpp is 610uA. Might I know which portion is setting the input current for 500nA?

    Thank for your help in advance.

    Thank you.

    Mark

  • Hi Mark,

    So the input current drawn by the ADC (unbuffered mode) is only listed as 500 nA/V in the datasheet. This value is a characteristic of the ADuCM360, not a programmable setting like the excitation current. Of course, the actual amount of current drawn by the ADC would still depend on the AIN voltage.

    That said, the 500 nA/V value is only used in the CN0359 code to determine the ADC input impedance (Radc). This impedance (also a characteristic of the device) is typically 2 MΩ - derived from Radc = Vadc/(Vadc x 500 nA/V) or simply Radc = 1/500 nA/V.

    The CN0359 software doesn't evaluate the actual ADC input current or use its value in the RTD calculation.