Post Go back to editing

RTD 'offset', CN-0326 Evaluation Kit,


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

  • 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



  • 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?

  • 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?


  • 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) {

        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)

  • Hi Marc, 

    Good to know that the issue was resolve by using setting the correct vref on and use that in the formula.  let me know if there are other issues or concern you encountered when using the reference eval board for your application.



  • Yes, maybe you can help me measure the reference voltage Vref. Since I use the evaluation Board, the reference voltage should be 210uA/5kOhm = 1.05V. But with the code above (Referenzspannung) i receive 1.017V. Is it possible to measure the external reference Voltage on ain3+,- with the internal reference ?

  • hi Marc,

    you can use the internal reference to measure the voltage on AIN3+/-.  you can use in the equation for the data conversion the actual voltage you measured across AIN3+/-.



  • Hi erbe,

    When i measure the Voltage with the voltmeter, i receive 1.024V. So the intern reference voltage has to be 1.18V (not 1.17V, but theres a 0.01%tolerance so it should be okay).

    The Problem is the value at avin is with the Formula ( code/2^n-1)-1)*Uref = 0.246, while it should be 0.242.

    I am unexperienced, but in my opinion the measured digital code from the ad7793 has to be false, since its the only variable, if my voltmeter is correct(which should be).

    What could cause the error in the digital code from ad7793?

    best regards,


  • Hi Marc, 

    As per the datasheet of the AD7793 which states that the tolerance for the current source is 5% max and from what you are measuring across the 5K(0.1% tol) resistor value, the current is around 203uA which is within the range of the tolerance for the current drive provided by the AD7793.  this might be another source of error in the measurement.