RTD 'offset', CN-0326 Evaluation Kit,

Hello,

I am using the CN-0326 Evaluation Kit (pH and Temperature Measurement) and I am trying to make it work on my own microcontroller without the given Software. My Problem is the Temperature, I am using a PT1000 with two wires. The Problem is: the Resistance I measure is always a bit higher than it should be. For example if i pug in a 984Ohm Resistance, my Code tells me it is 1000Ohm (always about 10-20Ohms higher). Is there any way to fix/compensate it, or is it a known error? Since in the configuration in the given Software CN0326 you have to set the RTD(0°) Value. I already had to set the RTD0 value to 1014 there to get good results.


this is the part of the code if someone sees any mistakes:
unsigned long tcode = AD7793_ContinuousReadAvg(10);            //code: digitales temperatursignal avg

double tavin = (((double) tcode / (8388608)) - 1) * Vref;    //umrechnung von digitalem signal in Volt

double r = tavin / (Vref/5000);                                    //umrechnung in Wiederstand r
double tempWert = ((r / RTD) - 1.0) / 0.00385;            //umrechnung in °C

Vref is being measurent(about 1.017 and RTD is set to 1014

Thank you for your help,

Best regards, Marc

  • 0
    •  Analog Employees 
    on Sep 2, 2021 9:24 AM

    Hi Marc, 

    Each analog input channel of the AD7793 has a dedicated offset register that holds the offset calibration coefficient for the channel.   The offset register is a read/write register which you can read back and used that value for calibration. However, the AD7793 must be in idle mode or power-down mode when writing to the offset register. 

    These offset value is stored once internal Zero-Scale Calibration is performed through its registers.  And these registers can be seen on table 14 and table 15 on  the datasheet of the AD7793

    Cheers,

    Erbe

  • thank you for your answer. The problem is, the offset varies with the temperature: for example at 1000ohm (0°C) i measure 10014ohm (14ohm difference). But at 1200ohm(~55°C) i measure 12012ohm(12 ohm difference). So the offset is not always the same, so writing in the offset register will only guarentee a correct value for a given temperature.
    Or does the offset calibration eliminate the 10-20ohms offset regardless the temperature?

  • 0
    •  Analog Employees 
    on Sep 2, 2021 12:18 PM in reply to MarcH27

    Hi Marc,

    internal offset calibration should help eliminate the offset regardless the tempeareture.

    may i know the current(in uA) setting that drives the RTD?

    Cheers,
    Erbe

  • okay thank you, I will try this tomorrow. I use the 210uA setting on IOUT2. But I am only getting 203uA  (Reference Voltage measured at Ain3+-/5kohm)

  • sadly nothing has changed. Im performing:

    AD7793_Calibrate(AD7793_MODE_CAL_INT_ZERO, AD7793_CH_AIN2P_AIN2M);

    AD7793_Calibrate(AD7793_MODE_CAL_INT_FULL, AD7793_CH_AIN2P_AIN2M);.

    But i realised the problem is in the reference voltage. I measure a voltage of 1.03V reference with the multimeter, but in my code its 1.017. Maybe someone can find the mistake?:

    double Referenzspannung(void) {
        AD7793_SetIntReference(AD7793_REFSEL_INT);
        AD7793_SetExcitDirection(AD7793_DIR_IEXC1_IOUT2_IEXC2_IOUT1);
        AD7793_SetExcitCurrent(AD7793_EN_IXCEN_210uA);
        AD7793_SetChannel(AD7793_CH_AIN3P_AIN3M);

        unsigned long Code = AD7793_ContinuousReadAvg(10);
        double ReferenzAvin = (((double) Code / 8388608) - 1) * 1.17; // code in voltage

        return ReferenzAvin;

    }

    So basically I set internal reference and channel 3+-. Then i read the input and use the formula from the user guide. This should give me the Voltage at channel 3+- (the external reference made by the 210uA and 5kohm)