# Software linearization of an RTD sensor

April 6, 1998
Interfacing a resistance-temperature detector (RTD) to a computerized data-acquisition system requires a resistance-to-voltage (or current) converter (bridge, voltage divider, etc.). Also, it will be necessary to incorporate software routines to...

Interfacing a resistance-temperature detector (RTD) to a computerized data-acquisition system requires a resistance-to-voltage (or current) converter (bridge, voltage divider, etc.). Also, it will be necessary to incorporate software routines to convert the ADC units of the data acquisition system back into resistance values. Once the readings from the RTD are converted back into resistance values, the following algorithms can be used to generate temperature readings.

The relationship between the temperature and the electrical resistance is described by an equation developed by Callendar and later refined by Van Dusen:

where t is temperature (°C), Rt is resistance at 0°C (Ω), δ is the linearity constant, and β is a constant determined by the boiling point of oxygen.

If the RTD operates at or above 0°C, the third term drops out (β = 0). The actual value of δ can be determined by measuring sensor resistance at the triple point of water (0.01°C), the boiling point of water (100°C at sea level), and a third point (RT) that can be generated with calibration equipment. Using the measured resistance and temperature values, the equation is solved for d.

If the RTD is to operate at temperatures less than 0°C, the accuracy of the equation is improved by incorporating a third term. To calculate the value of the β coefficient for the third term, it’s necessary to measure sensor resistance at the boiling point of oxygen (−182.962°C). Using the resistance values measured at the boiling point of oxygen as RT, the triple point of water, and the boiling point of water, two equations are written and solved for the values of δ and β.

To design an algorithm to solve the Callendar-Van Dusen equation, it’s necessary to generate an intermediate result (t) from the first term. The intermediate value then is used to calculate correction values from the δ and β (if present) terms. The correction values are then algebraically added to the original intermediate value to generate a temperature magnitude.

A simpler, and less accurate, conversion equation can be used to convert the RTD resistance value to a temperature magnitude. This algorithm is based on an approximation of the resistance-to-temperature relationship between 0°C and 100°C for platinum sensors:

where t is temperature (°C), Rt is resistance at t (Ω), R0 is resistance at 0°C, and α is the temperature coefficient of resistance (Ω/Ω/°C). Two standards exist for the temperature coefficient of resistance—in the U.S. α = 0.00392 and in Europe α = 0.00385.

The listing illustrates C++ functions that implement the linearization algorithms given in this article.

### What are the Important Considerations when Assessing Cobot Safety?

April 16, 2024
A review of the requirements of ISO/TS 15066 and how they fit in with ISO 10218-1 and 10218-2 a consideration the complexities of collaboration.

### Wire & Cable Cutting Digi-Spool® Service

April 16, 2024
Explore DigiKey’s Digi-Spool® professional cutting service for efficient and precise wire and cable management. Custom-cut to your exact specifications for a variety of cable ...

### DigiKey Factory Tomorrow Season 3: Sustainable Manufacturing

April 16, 2024
Industry 4.0 is helping manufacturers develop and integrate technologies such as AI, edge computing and connectivity for the factories of tomorrow. Learn more at DigiKey today...

### Connectivity – The Backbone of Sustainable Automation

April 16, 2024
Advanced interfaces for signals, data, and electrical power are essential. They help save resources and costs when networking production equipment.