Post Go back to editing

AD7414 - Seemingly Inaccurate Temperature Readings

The AD7414 on my board appears to be reading temperatures 10-20 C above the actual temperature.  The attached plot shows the AD7414 output in blue, and three thermocouples placed near the chip as the other three lines.  The test was repeated with two separate sets of thermocouple devices, placing thermocouples directly on the AD7414 case, the AD7414 ground pin, and the board surface next to the AD7414, all showing the same results. 

The chip is operated at 4.1V, so I expect a maximum +/- 3C error, as described in the datasheet.  Any idea what may cause the difference in measured temperature? 

  • Hi, can you confirm with a scope that the supply voltage to the AD7414 is stable (i.e. no ripple) and that you are using a 0.1uF decoupling cap along with a 10uF cap close to the AD7414 Vdd pin? Also have you a good ground connection? Have you tested AD7414 with the thermocouple removed from the ground pin? How repeatable are the temperature measurements from AD7414? Can you plot 50 measurements at 25C? Does you see this problem with more than AD7414?

    If problem persists, can you send on a schematic and scope plots (showing Vdd, SDA and SCL) of the device reading temperature so that I can investigate in more detail.

  • Found the problem.  We were supplying 4.1V on Vdd, and pulling AS to 5.0V.  Based on the current flowing through our pull-up resistor, the chip was powered through a 1K resistor, surely a lousy power supply.  Pulling AS to GND resulted in reasonable temp measurements.

    Thanks.

  • Hi,

    I'm not sure I followed 100% your code, but basically when reading negative temperatures you need to take the 10-bit word, eliminate DB9, and then substract 512 (200h) and divide by 4. Are you actually deleting that bit?

    If not, Tempy on the following piece of code will never be negative:

    "if(Tempy > 200)//negative temperaure, greater than 200(512)

    {

      Tempy = (Tempy-200)/4 ;

    }"

    am I right?

    If my understanding is correct you should add Tempy&=0x1FF just when entering the if loop?

    I mean, if I got back in binary 1110011100, according to table 5 it correspond to -55C. So, going into hex as you are working it that way. If you get 39Ch, as it is greater that 200h, your code will do (39C-200)/4=67C which is not what we expected. However if you get 39Ch, delete the MSB (sign bit) = 19Ch and then substract 200h and divide by 4, it results in (19C-200)/4 and convert into decimal it becomes -25C.

    In fact, deleting the MSB is also the same as substracting 200, so if I get 39Ch and then substract twice 200h and divide by 4:

    (39Ch-200h-200h)/4=FFC9h which is -55 in decimal.

    so modifying your formula to Tempy=(Tempy-200-200)/4 may work as well.

    I hope any of both ways works for you.

    Regards,

    Lluis.

  • hi, we are also using AD7414 chip on I2C to read the negative and positive temperature, we are facing problem for negative temperature, just see a glance tell the issue where it is in code. here I am sending snapshot of reading of negative temperature, please suggest the error:

    Below functions is working fine for positive temperature but not negative temperature, please tell the where is the issue in negative temperature.

    WORD Temperature_Value;

    BYTE Low_Voltage_Value, High_Voltage_Value;

    void VIDEO_Temperature(BYTE num[], BYTE k);

    gmt_RET_STAT  Read_Temperature(B_DevAddr)

    {

      gmt_RET_STAT W_Result;

      BYTE B_TemperatureBuffer[2];

      float temperature;

      WORD Tempy;

      W_Result = I2C_Dev_Write(B_DevAddr,0x00,0x00);

      if(W_Result == FAILED)

      {

       return FAILED;

      }

      W_Result = I2C_Dev_Read(B_DevAddr,0x00, B_TemperatureBuffer, 2);

      if(W_Result == FAILED)

      {

       return FAILED;

      }

      Tempy = TEMP_Decode(B_TemperatureBuffer);

      Temperature_Value = Tempy;

      return OK;

    }

    WORD TEMP_Decode(BYTE *Bp_Buf)

    {

    BYTE B_TemperaureBuffer[2];

    WORD Tempy;

    B_TemperaureBuffer[0] = Bp_Buf[0];

    B_TemperaureBuffer[1] = Bp_Buf[1];

    Tempy = B_TemperaureBuffer[0] & 0x00FF;

    Tempy = Tempy << 2 ;

    B_TemperaureBuffer[1] = B_TemperaureBuffer[1] >> 6 ;

    B_TemperaureBuffer[1] &=  0x03;

    Tempy |= B_TemperaureBuffer[1];

    if(Tempy > 200)//negative temperaure, greater than 200(512)

    {

      Tempy = (Tempy-200)/4 ;

    }

    else // positive temprature

    {

      Tempy = (Tempy)/4 ;

    }

    return Tempy;

    }

    regards -- riya

  • Hi,

    I actually meant suggesting that you coud make it on two different ways:

    if(Tempy > 200)//negative temperaure, greater than 200(512)

    {

        Tempy&=0x1FF;

      Negative_temp = (Tempy-200)/4 ;

    }

     

    or

     

    if(Tempy > 200)//negative temperaure, greater than 200(512)

    {

         Negative_temp = (Tempy-200-200)/4 ;

    }

     

    Please let me know if both of them work for you.

     

    Regards,

    Lluis.

  • thanks for your reply, please tell that following code is ok , because this time we are not able to simulate the exact condition, I want logic for both condition i.e. positive and negative; please execute your logic on this function and tell is this ok or correction required.

    int TEMP_Decode(char *Bp_Buf)

    {

    char B_TemperaureBuffer[2];

    int Tempy;

    B_TemperaureBuffer[0] = Bp_Buf[0]; // LSB

    B_TemperaureBuffer[1] = Bp_Buf[1]; //MSB

    Tempy = B_TemperaureBuffer[0] & 0x00FF;

    Tempy = Tempy << 2 ;

    B_TemperaureBuffer[1] = B_TemperaureBuffer[1] >> 6 ;

    B_TemperaureBuffer[1] &=  0x03;

    Tempy |= B_TemperaureBuffer[1];

    if(Tempy > 200)//negative temperaure, greater than 200(512)

    {

        Tempy&=0x1FF;

      Negative_temp = (Tempy-200-200)/4 ;

    }

    else // positive temprature

    {

      Tempy = (Tempy)/4 ;

    }

    return Tempy;

    }