Performing precision measurement with silicon temperature sensors - Embedded.com

Performing precision measurement with silicon temperature sensors

The electronics industry is demanding ever more levels of accuracy and temperature sensing is no exception. Many temperature sensing solutions exist, each with their benefits and drawbacks. Silicon temperature sensors, while being quite linear, have never offered the accuracy of other solutions. However, recent advances in silicon temperature sensing mean that high resolution and precision can now be achieved with a silicon solution.

A New Freezer

It was March 2020 and the UK was just about to go into lockdown. The world was stocking up on food in case the supermarkets closed, and the future looked uncertain. Then the freezer in the Bramble household stopped working. With the words of the Kenny Rogers song, “You Picked a Fine Time to Leave me…” echoing in my head, we went looking online for a new replacement.

A few days later our new freezer arrived, complete with a digital temperature display on the front panel, as was the desire of Mrs Bramble. The recommended setting was -18°C and after one hour, the appliance was at the correct temperature and ready to accept food. I was skeptical of the accuracy of the temperature readout but did not care as long as it froze the food. One problem, though, an engineering mind is a restless mind, and after days of the ostensibly sage digital readout unblinkingly staring at me, daring me with its confident pronouncements, I broke. I had to test the accuracy claims of this new addition to our kitchen.

Temperature Sensors

There is a wide variety of temperature sensors used in industrial applications, each with advantages and drawbacks. Since many texts detail the operation of various temperature sensors, I don’t repeat the details here, but offer a summary below.

Thermocouples

Thermocouples provide a low-cost, moderately-accurate way to measure very high temperatures. They rely on a voltage being generated between two junctions, each made of dissimilar metals, held at different temperatures, as discovered by Thomas Seebeck in 1821. In the case of a K-Type thermocouple (made of the alloys Chromel and Alumel) it outputs a voltage of about 41μV/°C and can be used to measure temperatures in excess of 1000°C. Nevertheless, the Seebeck effect relies on a temperature difference between two junctions, so while the ‘hot’ junction measures the temperature of interest, the ‘cold’ junction must be kept at a known temperature. Ironically, another temperature sensor is required at the cold junction for the temperature difference to be measured and parts such as the AD8494 providing the perfect solution to do this. Since thermocouples are physically small, they have low thermal mass, so give a fast response to changes in temperature.

RTDs

To measure moderate temperatures (<500°C), Resistive Temperature Detectors (RTDs) are widely used by industry. These devices consist of a metal element that exhibits a positive change in resistance with temperature, most commonly Platinum. Indeed, the PT-100 sensor is the most widely used RTD in industry and it gets its name from being made from Platinum (PT) and having a resistance of 100Ω at 0°C. While these devices do not measure to the high temperature of a thermocouple they are highly linear and their reading is repeatable. A PT100 needs a precise driving current, creating an accurate voltage drop across the sensor that is proportional to temperature. The resistance of the connecting wires of the PT100 creates an error in the resistance measurement of the sensor, so Kelvin-sensing is typical, resulting in 3- or 4-wire sensors.

Thermistors

If a low-cost solution is required and the temperature range is low, a thermistor often suffices. These devices are highly nonlinear, with a characteristic based on the Steinhart Hart equation, yielding resistance reduction with increasing temperature. The benefit of a thermistor is that the change in resistance is large with small changes in temperature, so a high level of accuracy can be achieved despite its nonlinearity. Thermistors also feature a fast thermal response. Individual thermistor nonlinearities are well defined, so they can be calibrated out, using components such as the LTC2986.

Diodes, Diodes everywhere, but not a (Vbe) Drop to Sink…

Finally, to test the veracity of the new member of the household, I opted for a silicon temperature sensor They work straight out of the box, need no cold junction temperature compensation or linearisation, are available with analogue and digital outputs and come pre-calibrated. Until recently, though, they have only offered moderate accuracy. While good enough for indicating the state of health of electronic equipment, they have never been accurate enough to measure, say, body temperature, usually requiring ±0.1°C accuracy (according to the ASTM E1112 standard). That has changed with the recent release of the ADT7422 and ADT7320 silicon temperature sensors that can measure to resolutions of ±0.1°C and ±0.2°C respectively.

A silicon temperature sensor exploits the temperature dependency of a transistor’s Vbe, as given by the Ebers Moll equation, approximated by:

where Ic is the collector current, Is is the reverse saturation current of the transistor, q is the charge on an electron (1.602 x 10-19 Coulombs), k is Boltzmann’s constant (1.38 x 10-23) and T is absolute temperature.

The above expression for collector current also holds true for the current in a diode; so why does every application circuit use a transistor and not a diode? In reality, the current in a diode also includes a recombination current resulting from the electrons recombining with holes as they pass through the depletion region of the pn junction and this presents a non linearity of the diode’s current with Vbe and temperature. This current also appears in a bipolar transistor, but flows into the base of the transistor so does not appear in the collector current, hence the non linearity is much less.

Rearranging the above gives

Is is small compared with Ic, so we can ignore the ‘1’ term in the equation above. We can now see that Vbe changes linearly according to a logarithmic change in Ic. We can also see that if Ic and Is are constant then Vbe changes linearly with temperature, since k and q are also constant. It is an easy task to force a constant collector current into a transistor and measure how the Vbe changes with temperature.

Is is related to the geometry of the transistor and has a strong dependency on temperature. Like many silicon devices, its value doubles with every 10°C rise in temperature. While the effect of this change in current is reduced by the ‘ln’ function we still have the problem that the absolute value of Vbe changes from transistor to transistor and thus calibration is needed. So practical silicon temperature sensors use two identical transistors and force a collector current of Ic into one and 10Ic into the other. Identical transistors and ratiometrically accurate currents are easy to fabricate in an integrated circuit which is why most silicon sensors use this architecture. The logarithmic change in current causes a linear change in Vbe and the difference in the Vbe‘s is then measured.

From the above equation, for two transistors held at the same temperature, the difference between their Vbe’s is given by

since

We can see that

By forcing different currents through each transistor and measuring the difference in Vbe, we have removed the nonlinear Is term, the effect of different absolute Vbe’s and all other nonlinear effects associated with the transistor’s geometry. Since k, q and ln10 are all constant, the change in Vbe is Proportional To Absolute Temperature (PTAT). For a 10x difference in currents, the difference in the two Vbe’s changes linearly with temperature at approximately 198μV/°C. A simplified circuit to achieve this is shown in Figure 1.


Figure 1. A Basic Circuit for Measuring Temperature.

The currents in Figure 1 must be carefully chosen. If the current is too high, significant self heating and voltage drops across the internal resistances inside the transistor corrupt the result. If the current is too low, leakage currents inside the transistor add significant errors.

It should also be noted that the equations above relate to the collector current of the transistor whereas Figure 1 shows a constant emitter current being injected into the transistor. The transistors can be designed such that the collector to emitter current ratio is well established (and close to unity), so collector current is proportional to the emitter current.

This is only the start of the story. To get ±0.1°C accuracy with a silicon temperature sensor, extensive characterization and trimming needs to be done.

Is it a Bird? Is it a Plane?

No, it’s a super thermometer. Yes, they do exist. The uncalibrated silicon temperature sensor needs to be placed into a bath filled with silicone oil and heated to a precise temperature, measured with a super thermometer. These devices can measure to an accuracy of better than five decimal places. Fuses inside the sensor are blown to tweak the gain of the temperature sensor and thus linearise its output using the equation y = mx + C. The silicone oil provides a very uniform temperature so many devices can be calibrated in a single cycle.

The ADT7422 has an accuracy of ±0.1°C, over a temperature range of 25°C to 50°C. This temperature range is centered around the typical human body temperature of 38°C making the ADT7422 ideal for accurate vital signs monitoring. For industrial applications, the ADT7320 is trimmed so has an accuracy of ±0.2°C, but over a wider temperature range of -10°C to +85°C.


Figure 2. The ADT7422 Mounted on a 0.8mm Thick PCB

The calibration of the silicon temperature sensor is not the only problem, however. As with extremely precise voltage references, stresses on the die can corrupt the accuracy of the sensor and the thermal expansion of the PCB, lead frame, plastic molding and exposed pads all need to be accounted for. The soldering process also adds its own problems. The solder reflow process increases the temperature of a part to 260°C, causing the plastic packaging to soften and the die’s lead frame to distort, such that when the part cools down and the plastic hardens, a mechanical stress is locked into the die. Analog Devices’ engineers expended many man months of delicate experimentation to discover that a PCB thickness of 0.8mm was the perfect sweet spot and a ±0.1°C accuracy could be achieved, even after soldering.

Inside the Software

The bulk of the system’s software is concerned with formatting the data from the ADT7320 and displaying it on the LCD. Getting the data from the ADT7320 is trivial. When the processor is initialized, both the CS and SCLK line are set high and the SCLK line idles high between conversions. The CS line is then taken low to initiate a data transaction. With SPI, data is read in to the ADT7320 on the rising edge of the SCLK line and out on the falling edge. The code below details the initialization routine.

To reset the serial interface, the CS line is taken low, the DOUT line is taken high and the SCLK is oscillated 40 times. The CS line is then taken high. This clocks 40 ‘1’s into the ADT7320, resetting the serial interface. A delay of at least 500us is needed after the SPI bus is reset.

The next block of code sends the command byte to the ADT7320 telling it whether the transaction is a Read or Write and which register to address. The line

data = 0b00001000;

instructs the ADT7320 to Write to register 0x01. The ADT7320 is then programed to output data to 16 bit resolution using the line

data = 0b10000000;

The DOUT line is pre-conditioned to ‘0’, the MSB of the data byte is interrogated and the DOUT line is set high if the MSB is ‘1’. The SCLK line is taken high to clock the data into the ADT7320.

void reset_adt7320(void)            /* initialise ADT7320 */
{
     unsigned char n, data;
    
        /* reset the serial interface */
        clearbit(PORTA, CS);
        setbit(PORTA, DOUT);
        for(n=40; n>0; n--)
        {
                clearbit(PORTA, SCLK);
                setbit(PORTA, SCLK);
        }
        setbit(PORTA, CS);
 
        delay_10ms();                               /* must wait >500us after reset */
    
        /* set to 16 bit mode */
        clearbit(PORTA, CS);
    
        data = 0b00001000;                          /* clear bit 6 (write), reg #001 */
        /* send command byte */
        for(n=8; n>0; n--)
        {
                clearbit(PORTA, SCLK);
                clearbit(PORTA, DOUT);              /* precondition DOUT */    
                if checkbit(data, (n-1))
                {
                        setbit(PORTA, DOUT);
               }
                setbit(PORTA, SCLK);                /* clock data in on rising SCLK */
        }
        data = 0b10000000;                          /* continuous conversion, 16 bits */
        /* send data byte */
        for(n=8; n>0; n--)
        {
                clearbit(PORTA, SCLK);
                clearbit(PORTA, DOUT);              /* precondition DOUT */    
                if checkbit(data, (n-1))
                {
                        setbit(PORTA, DOUT);
                }
                setbit(PORTA, SCLK);
        }
        setbit(PORTA, CS);
}

The function call to get the temperature data is similar as shown below. The line

data = 0b01010000;

tells the ADT7320 to read register 2 for the 16 bit data.

The code then waits for at least 240ms for the ADT7320 to perform a temperature conversion. 16 bits of temperature data are then clocked out, then the CS line is set high.

 
    clearbit(PORTA, CS);
   
    /* data = command byte */
    data = 0b01010000;                          /* read mode, register 2 */ 
  
    /* read ADT7320 */
    for(n=8; n>0; n--)
    {
         clearbit(PORTA, SCLK);
            clearbit(PORTA, DOUT);                  /* precondition DOUT */    
            if checkbit(data, (n-1))
            {
                    setbit(PORTA, DOUT);
            }
            setbit(PORTA, SCLK);
    }
    delay_150ms();                                  /* temperature conversion */
    delay_150ms();
       
    /* read temperature data */
    for(n=16; n>0; n--)
    {
         clearbit(PORTA, SCLK);
            if checkbit(PORTA, DIN)
            {
                    setbit(temp, (n-1));
            }
            setbit(PORTA, SCLK);
    }
 
    setbit(PORTA, CS);

The complete code set is available here.

So how Cold are my Sausages, exactly?

The ADT7320 was left inside the freezer for about 30 minutes to see what the temperature our new purchase settled at.

Figure 3 shows the freezer temperature to be -18.83°C.


Figure 3. The Temperature of the Freezer at -18.83°C

I considered this to be impressively accurate given that food does not need to be stored to this level of temperature precision. I then measured the temperature in my office on a summer’s day in the UK. 22.87°C as shown in Figure 4. 


Figure 4. The Temperature of my Office at 22.87°C

Conclusion

Silicon temperature sensors have come a long way, becoming extremely precise, enabling vital signs monitoring to be accomplished to a high level of accuracy. While the technology inside them is based on well-founded principles, the trimming required to get them to sub-degree accuracy levels requires significant effort. Even if this level of accuracy is achieved, mechanical stresses and soldering can easily erase gains achieved from hours of calibration.

The ADT7320 and ADT7422 represent the pinnacle of years of characterisation to achieve sub-degree level precision even after being soldered onto the PCB.

References

Huijsing, Johan and Michiel Pertijis. Precision Temperature Sensors in CMOS Technology. Springer, 2006.
Horowitz, Paul and Winfield Hill. The Art of Electronics. Cambridge University Press, April 2015.
Analog Circuit Design, Volume 2, Chapter 32. Linear Technology, December 2012.
AD590 datasheet. Analog Devices, Inc., January 2013.
ADT5912 data sheet (to be released). Analog Devices, Inc.


Simon Bramble graduated from Brunel University in London in 1991 with a degree in electrical engineering and electronics, specializing in analog electronics and power. He has spent his career in analog electronics and worked at Linear Technology (now part of Analog Devices). He can be reached at simon.bramble@analog.com.

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.