Since the resistance value of a thermistor cannot be directly measured by a microcontroller alone, it is converted into voltage with a voltage divider circuit and read. For a temperature detection circuit using an NTC thermistor, a voltage divider circuit is configured by connecting a fixed resistor with a known resistance value (R1) and the NTC thermistor in series, and the voltage corresponding to their resistance ratio can be obtained by applying a supply voltage.
Since the current flowing through R1 and the NTC thermistor is common to both in a series circuit, the voltage applied to each element is determined by the resistance ratio. When measuring the voltage applied to R1 using this property, the voltage across the thermistor can be determined from the voltage division ratio. From this, we can calculate the resistance value of the thermistor (RNTC).
If the resistance value of the thermistor can be determined with the voltage divider circuit, it can be converted into temperature using a temperature conversion equation prepared in advance. This method offers the advantage of not needing to directly measure the thermistor current, and the temperature can be detected using only the voltage measurement function (AD converter) of the microcontroller.
A voltage divider circuit may be classified as either a resistance-grounded type or an NTC-grounded type depending on which side is connected to GND (ground) as viewed from Vout. The voltage divider circuit above is a resistance-grounded type. In this type, Vout increases with the rise in temperature as RNTC decreases due to the temperature increase.
On the other hand, in an NTC-grounded type where the positions of the NTC thermistor and R1 are switched, Vout decreases as the temperature increases according to the following equation.
In this way, the temperature characteristic of the output voltage changes depending on whether the NTC thermistor is placed on the Vin side or on the GND side. Therefore, the temperature characteristic of the output voltage (increase/decrease) can be selected according to the application or circuit design policy when configuring a voltage divider circuit. As shown in the diagram below, there are multiple patterns for voltage divider circuit configurations. Each pattern has its own features, so the optimal circuit must be determined on a case-by-case basis.
Thus far, we have provided an explanation of voltage divider circuits. In the next section, we will explain a practical AD converter input circuit equipped with a low-pass filter.
The circuit shown in the diagram below is an example of the most basic voltage divider circuit for temperature detection, which connects an NTC thermistor and a fixed resistor R1 in series. R1 and the NTC thermistor are placed between the supply voltage Vin and GND. The voltage at the midpoint (Vout) is measured by an AD converter built into the microcontroller. In this way, the resistance value of the thermistor, which changes in response to the temperature, can be converted into a voltage value by configuring a voltage divider circuit with a thermistor and a fixed resistor R1.
Furthermore, a capacitor is connected between Vout and GND. This functions as a low-pass filter (LPF) to remove high-frequency components such as switching noise and external noise. Since the AD converter input is susceptible to noise, inserting a capacitor in this way enables a more stable voltage measurement.
The circuit above uses an NTC thermistor with characteristics such that the resistance value is 10kΩ at 25℃ and 5kΩ at 45℃. The sensitivity of the voltage change relative to the temperature change is highest when the voltage division ratio is roughly 1:1. Therefore, 10kΩ is selected for the fixed resistor R1 because it is close to the reference resistance value of the thermistor (at 25℃). By selecting R1 in this way, it is possible to obtain a large amount of change in the input voltage to the AD converter relative to the temperature change.
Let us calculate the actual output voltage Vout under these conditions. When the supply voltage Vin is 3 V, Vout is expressed by the following equation.
From this equation, at 25℃ (RNTC = 10kΩ) the equation is as follows.
At 45℃ (RNTC = 5kΩ) the equation is as follows.
In other words, the resistance of the NTC thermistor decreases as the temperature increases, and Vout also decreases accordingly (for this circuit configuration). The temperature can be determined by reading this change in Vout with the AD converter and using a temperature conversion equation prepared in advance. This kind of voltage divider circuit has a simple configuration, is easy to handle, and is used in many temperature detection applications. In the next section, we explain the key points to pay attention to when designing this circuit and design innovations for improving accuracy.
For a detailed explanation of how to make a temperature detection circuit using a microcontroller, refer to the following video.
When designing a temperature detection circuit using an NTC thermistor, it is necessary to take into account not only the configuration of the voltage divider circuit but also various factors that impact the measurement accuracy and stability. Here, we explain the key design points which require particular attention.
First, it is important to select the value of the voltage-dividing resistor R1. When the resistance value of the NTC thermistor and the resistance value of R1 are close, the voltage division ratio becomes roughly 1:1, and the amount of change in output voltage relative to the temperature change reaches the maximum. Therefore, the standard approach is to select a value for the voltage-dividing resistor R1 that is roughly equivalent to the resistance value of the thermistor at its reference temperature (25℃ in many cases).
Next, it is important to pay attention to the stability of the supply voltage. Since the output voltage Vout of the voltage divider circuit is proportional to Vin, supply voltage fluctuations directly appear as errors in the temperature-converted results. When performing high-precision temperature measurements, it is essential to use a stable power supply or to consider circuit configurations and correction methods that are less susceptible to power supply fluctuations.
Noise suppression for the AD converter input is also critical. Since AD converters are susceptible to high-frequency noise, it is common to place a capacitor between Vout and GND to configure a low-pass filter. This reduces switching noise and external noise, which enables stable voltage measurement. Furthermore, it is important to also pay attention to the self-heating of the thermistor. If the current flowing through the thermistor is large, the temperature of the thermistor itself rises due to that power, which may cause a value higher than the actual ambient temperature to be measured. To suppress errors caused by self-heating, it is necessary to make the current passed through the thermistor as small as possible.
In applications with particularly strict measurement accuracy requirements, pulse measurement, which passes a current only during sampling, may be used as a method to further suppress self-heating. With this method, applying voltage to the thermistor only at the moment of measurement can reduce average heat generation. In addition, it is important to also pay attention to the placement of the thermistor. If the thermistor gets too close to a heat source to be measured (CPU, FET, or power supply IC, etc.), the effects of localized heat generation may cause a discrepancy with the temperature that you wish to determine. Therefore, the key point is to place it in a location that accurately reflects the temperature that you want to measure. Furthermore, since longer wiring traces make the circuit more prone to picking up noise, it is preferable to place the thermistor and AD converter as close together as possible.
Utilizing design support tools is an effective way to proceed with these design evaluations in an efficient manner. By using Murata Manufacturing’s Design Support Software “SimSurfing,” you can evaluate circuit conditions based on the thermistor characteristics and simulate the temperature-voltage characteristics. Use this tool to reduce sources of anxiety in the design stage and realize a high-precision temperature measurement circuit.
For a detailed explanation of how to use SimSurfing, refer to the following video.