I’m using an AD7770 as my main ADC on a custom board I’m designing. I’ve been playing with some prototypes and experimenting with the AD7770’s built-in temperature sensor. Using the code from ADI’s website I’m reading back some odd values for temperature. Can you please help me figure out how to interpret this data?

Here’s how I’m reading the temperature sensor data:

// Set the ADC SAR up to measure DVbe

// Pull the SAR’s conversion start line low

// Wait at least 1 us
delay_us(1);

// Pull the SAR’s conversion start line high

// Wait at least 4 us
delay_us(4);

// Set the ADC’s SPI up to read back the SAR result

// Read the SAR data into the uint16_t global variable

If I then calculate the temperature as the datasheet seems to imply (below) I get the wrong values.
g_fTemperature = 25.0f - ((float)g_uiADCTemperature / 4095.0f - 0.6f) / 0.002f;

Using an empirically derived Ax + B seems to work pretty well
g_fTemperature = (0.787f) * (float)g_uiADCTemperature + (-1882.0f);

I put my board (with the AD7770) in a temperature chamber and monitored the reported temperature value (it updates every ~10 seconds) using the Ax + B method.
At -40C it reported -40.4 which implies a SAR value of 2340.
At +85C it reported 82.4 which implies a SAR value of 2496.
At ~28C it reported 27.3 which implies a SAR value of 2426.

I’m not sure how to use the datasheet’s formula for temperature… Thoughts?

• Hi Matthew,

What results are you getting? The temperature Sensor section of the datasheet, the formula referred already to 25C. Would the result be correct of you remove the 25 in your formula?

Regards,

Jonathan

• Hi Jonathan,

Around 0C.  I know it's wrong because as I increase the ambient temperature, the datasheet calculated value decreases and vice versa.

-Matt