## Accurately Measuring Temperature Using PSoC3/PSoC5

There are four types of sensors that are commonly used for temperature measurement: Thermocouple, Thermistor, Resistance Temperature Detector (RTD) and diode. Of these, RTD has the best linearity and repeatability and is the sensor of choice when it comes to accurate temperature measurement in -200°C to 850°C range.

The resistance of an RTD varies with temperature in the following manner.

Once we find the resistance of the RTD, the temperature can be found using (inverse of) the above equations. But finding the inverse equation is very math intensive. The optimal approach is to determine the polynomial fit to find resistance from temperature. Using a higher order polynomial is computation intensive while using a lower order polynomial may not yield accurate results. AN70698 Temperature Measurement with RTDs provides a PSoC Creator Component for RTD where you can easily choose an appropriate polynomial based on your temperature range and accuracy required.

The PSoC Creator Component solves one part of the puzzle: converting the measured resistance accurately to temperature. The bigger part is finding the resistance accurately. AN70698 discusses the pros and cons of some circuits commonly used for measuring resistance and describes a method (shown below) where the resistance can be measured accurately using PSoC3/PSoC5 s IDAC, 20-bit delta sigma ADC and one precise external resistance.

The application note lists all significant sources of error so you know beforehand what accuracy to expect at a certain temperature.

 Error Source Error Value at 150 °C (0.1% Reference Resistor, class B RTD) Error Value at 150°C (Both Reference Resistor and RTD Calibrated) Offset Error/drift 0 °C 0 °C Gain Error/drift 0 °C 0 °C ADC INL* 0.79 °C 0.79 °C Error due to reference resistor (Ambient Temperature = 25 °C) 0.43 °C limited only by calibration accuracy and reference resistor temperature coefficient(very accurate) Error due to RTD interchangeability (Class B RTD) 1.05 °C Limited only by calibration accuracy (very accurate) Polynomial fit error (fifth-order polynomial) 0.0003 °C 0.0003 °C RTD self-heating error < 0.01 °C <0.01 °C

Note(*): This error indicates the worst-case limit. The actual temperature error will be much lower, depending on the INL at that point. In most cases, the error will be < 0.1 °C.

Integrated 20-bit Delta Sigma ADC and IDAC combined with the RTD component simplifies designing with RTDs and gives you an experience no other design platform provides. PSoC3/PSoC5 also provides direct segment LCD drive for displaying temperature and a host of communication peripherals (I2C, SPI, UART, USB, SMBus, PMBus) for inter-IC communication or communication to a PC for data logging.

ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.