Temperature measuring method, device and temperature measuring system

By converting the first voltage value into the second voltage value under the ideal bandgap reference voltage in an incremental Sigma-Delta analog-to-digital converter, the problem of reducing measurement accuracy caused by temperature changes is solved, and a higher precision temperature detection is achieved.

CN115435916BActive Publication Date: 2025-08-19GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211071936.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-02
Publication Date
2025-08-19
Estimated Expiration
2042-09-02

AI Technical Summary

Technical Problem

Due to factors such as process deviation and device parasitic parameters, temperature changes cause the bandgap reference voltage to deviate from the ideal value, affecting the temperature measurement accuracy of the incremental Sigma-Delta analog-to-digital converter.

Method used

By obtaining the first voltage value of the analog-to-digital converter and converting it into the second voltage value under the ideal bandgap reference voltage according to the mapping relationship between the bandgap reference voltage and the temperature, querying the voltage-temperature meter to determine the accurate temperature value, reducing the impact of temperature fluctuations on the sampled data.

Benefits of technology

The accuracy of temperature measurement is improved, the impact of bandgap reference voltage fluctuations with temperature on measurement is reduced, and the temperature detection is achieved with higher accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115435916B_ABST
    Figure CN115435916B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device and temperature measurement system for measuring temperature. The method for measuring temperature includes: obtaining a first voltage value obtained by an analog-to-digital converter measuring the current temperature; determining a second voltage value based on the first voltage value and the mapping relationship between the bandgap reference voltage and the temperature, wherein the second voltage value is the measurement value of the analog-to-digital converter for the current temperature under an ideal bandgap reference voltage; and determining that the temperature value corresponding to the second voltage value is the temperature value of the current temperature based on the second voltage value and the mapping relationship between the measured voltage value and the temperature value. The embodiment of the present application takes into account the fact that the bandgap reference voltage fluctuates with temperature, and based on this factor, adjusts the voltage value output by the analog-to-digital converter before querying the mapping relationship between the voltage value and the temperature value, thereby reducing the influence of the bandgap reference voltage fluctuating with temperature on the sampled data, which helps to improve the temperature measurement accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of temperature measurement technology, and more specifically, to a method and device for measuring temperature, and a temperature measurement system. Background Art

[0002] Temperature sensors are increasingly used in electronic devices and integrated circuits. Sigma-Delta ADCs, particularly incremental Sigma-Delta ADCs, are widely used in electronic device temperature sensing due to their low power consumption, high precision, and ease of multi-channel sampling. For example, an incremental Sigma-Delta ADC calculates and compares the analog input temperature signal with a bandgap reference voltage, converting it into a digital signal for output. Therefore, the accuracy of the bandgap reference voltage has a significant impact on sampling accuracy. Due to factors such as process variations and device parasitics, temperature changes can cause the bandgap reference voltage to deviate from its ideal value, leading to deviations in the ADC's sampling results and reduced temperature measurement accuracy. Summary of the Invention

[0003] The embodiments of the present application provide a method, device, and temperature measurement system for measuring temperature. Various aspects of the embodiments of the present application are introduced below.

[0004] In a first aspect, a method for measuring temperature is provided, characterized in that it includes: obtaining a first voltage value obtained by an analog-to-digital converter measuring a current temperature; determining a second voltage value based on the first voltage value and a mapping relationship between a bandgap reference voltage and temperature, the second voltage value being the measurement value of the analog-to-digital converter for the current temperature under an ideal bandgap reference voltage; and determining, based on the second voltage value and a mapping relationship between the measured voltage value and the temperature value, that the temperature value corresponding to the second voltage value is the temperature value of the current temperature.

[0005] In a second aspect, a device for measuring temperature is provided, characterized in that it includes: a memory for storing a mapping relationship between a voltage value measured by an analog-to-digital converter and a temperature value; and a processor connected to the memory for executing the method described in the first aspect.

[0006] In a third aspect, a temperature measurement system is provided, characterized in that it includes: an analog-to-digital converter, which measures the current temperature based on a bandgap reference voltage to obtain a first voltage value; a storage module, which is used to store a mapping relationship between the measured voltage value and the temperature value; and a processing module, which is connected to the analog-to-digital converter and the storage module, and is used to execute the method described in the first aspect.

[0007] In a fourth aspect, a computer-readable storage medium is provided, characterized in that a computer program is stored thereon, and the computer program is used to execute the method described in the first aspect.

[0008] In one embodiment of the present application, the output voltage of the analog-to-digital converter based on the bandgap reference voltage at the current temperature is converted to an output voltage value based on the bandgap reference voltage at room temperature. Based on the converted output voltage value, a pre-stored mapping relationship between measured voltage values and temperature values is queried to determine the temperature value corresponding to the current temperature. In other words, this embodiment of the present application takes into account the influence of temperature fluctuations in the bandgap reference voltage. Based on this factor, the voltage value output by the analog-to-digital converter is adjusted before the voltage-temperature mapping relationship is queried, thereby reducing the impact of temperature fluctuations in the bandgap reference voltage on the sampled data and helping to improve temperature measurement accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 It is a schematic diagram of an analog-to-digital converter detecting the temperature of a device under test.

[0010] Figure 2 It is a schematic diagram of the temperature detection data processing flow.

[0011] Figure 3 It is a structural diagram of a single-stage incremental Sigma-Delta analog-to-digital converter.

[0012] Figure 4 This is a schematic diagram of collecting calibration data using automatic test equipment.

[0013] Figure 5 It is a flow chart of the method for measuring temperature provided in an embodiment of the present application.

[0014] Figure 6 It is a schematic diagram of a bandgap reference circuit.

[0015] Figure 7 Schematic diagram of the error introduced by bandgap reference voltage fluctuation.

[0016] Figure 8 is V at different temperatures offset and V trim Schematic diagram of the curve.

[0017] Figure 9 yes Figure 5 A flowchart of a possible implementation of the method shown is shown.

[0018] Figure 10 This is a flow chart of a fitting function for calculating a bandgap reference voltage provided in an embodiment of the present application.

[0019] Figure 11Schematic diagram of the structure of the device for measuring temperature provided in an embodiment of the present application.

[0020] Figure 12 Schematic diagram of a temperature measurement system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments.

[0022] Temperature sensors are increasingly used in electronic devices and integrated circuits. Their primary function is to detect the temperature of the chip's operating environment, ensuring that the chip operates within a certain temperature range. Furthermore, the performance parameters of certain circuits within the chip (such as crystal oscillators) vary with temperature, and accurate temperature sensing can better control the performance of these circuits.

[0023] Figure 1 This is a schematic diagram of an analog-to-digital converter (ADC) detecting the temperature of a device under test. Figure 1 As shown, the ADC uses a negative temperature coefficient resistor divider to detect the temperature of the device under test (DUT). Placing a negative temperature coefficient (NTC) resistor close to the device under test (DUT) causes changes in the DUT's temperature to cause the NTC's resistance to change, which in turn causes a corresponding change in the resistor divider's voltage. The DUT's temperature can be determined based on the voltage divider's value.

[0024] Figure 2 This is a schematic diagram of the temperature detection data processing flow. Figure 2 As shown, the ADC samples and quantizes the analog voltage signal on the NTC into a digital voltage V ADC , the processor reads V from the ADC ADC In order to eliminate the ADC conversion offset and gain errors, the formula (1) can be used to calibrate V ADC , get the calibrated voltage V Cali .

[0025]

[0026] V in formula (1) offset and V trim They represent the ADC input voltage at room temperature as zero and full amplitude V PH The voltage sampling value at this time. CaliThe temperature of the device under test can be determined by querying the voltage-temperature table stored in non-volatile memory (NVM). The voltage-temperature table stores a one-to-one correspondence between voltage and temperature.

[0027] There are many types of ADCs. Sigma-Delta ADCs, particularly incremental Sigma-Delta ADCs, are widely used in temperature sensing in electronic devices due to their low power consumption, high accuracy, and ease of multi-channel sampling. This article uses an incremental Sigma-Delta ADC as an example to provide a detailed explanation of its structure.

[0028] A temperature sensor typically consists of three components: a temperature detection circuit, a bandgap reference circuit, and an analog-to-digital conversion circuit. The bandgap reference circuit provides a precise bandgap reference voltage. The bandgap reference circuit can be independently configured or, in some embodiments, integrated into an incremental Sigma-Delta ADC. The analog-to-digital conversion circuit, such as an incremental Sigma-Delta ADC, calculates and compares the analog signal containing temperature information at its input with the bandgap reference voltage, converting it into a digital signal (0 or 1) for output. An accumulation unit accumulates the comparison results to obtain a quantized bit value.

[0029] Figure 3 This is a schematic diagram of the structure of a single-stage incremental Sigma-Delta analog-to-digital converter. Taking the unipolar Sigma-Delta ADC as an example, Figure 3 As shown, the input signal V containing temperature information IN After a times amplification, the difference between the feedback signal and the feedback signal is 0 or b*V REF , controlled by the output of the comparator, where V REF is the bandgap reference voltage. The difference result enters the integrator for integration. The output of the integrator is compared with the comparator to generate 0 or 1, which is used to control the feedback signal. At the same time, the accumulator accumulates the output of the comparator to obtain the ADC sampling result V ADC . V ADC It can be expressed as formula (2), where N is the number of clock cycles required for the unipolar incremental Sigma-Delta ADC to complete one conversion. IN The estimated value of is shown in formula (3).

[0030]

[0031]

[0032] Where V1[i] represents the output value of the comparator. After completing one sampling, the reset signal is used to reset the integrator and accumulator of the ADC, thus starting a new sampling. From equations (2) and (3), it can be seen that the accuracy of the ADC sampling result is closely related to the bandgap reference voltage V REF Directly related.

[0033] Figure 4 This is a schematic diagram of using automatic test equipment to collect calibration data. Figure 4 As shown, before the initial use of the incremental Sigma-Delta ADC, the voltage input of the ADC is connected to the GND signal and the full amplitude V PH signal, obtain V offset and V trim Then, we use equation (1) to calibrate the sampled data to eliminate the offset and gain errors of the ADC at room temperature. However, this method does not consider the impact of temperature changes.

[0034] The accuracy of the bandgap reference voltage has a crucial impact on sampling accuracy. A bandgap reference circuit is typically used to provide a precise bandgap reference voltage. Ideally, the bandgap reference voltage is unaffected by temperature. However, due to factors such as process variations and device parasitics, temperature changes can cause the bandgap reference voltage to deviate from its ideal value, leading to deviations in the ADC sampling results and ultimately reducing temperature measurement accuracy.

[0035] It should be noted that the problem of reduced temperature measurement accuracy of the incremental Sigma-Delta ADC mentioned above due to the change of the band reference voltage with temperature is only an example. The embodiments of the present application can be applied to any type of scenario where the temperature measurement accuracy is affected by the change of the band reference voltage with temperature.

[0036] Therefore, how to develop a solution to reduce the influence of the band reference voltage error on the temperature measurement accuracy is a problem that needs to be solved.

[0037] Based on this, an embodiment of the present application proposes a method for temperature measurement, which is described in detail below. Figure 5 This is a flow chart of a temperature measurement method provided in an embodiment of the present application. Figure 5 The method includes steps S510 to S530, and these steps of the method are described in detail below.

[0038] In step S510, a first voltage value measured by an analog-to-digital converter (ADC) based on the current temperature is obtained. An ADC for measuring temperature typically includes an ADC circuit that calculates and compares an analog voltage signal containing temperature information at its input terminal with a bandgap reference voltage, converts the signal into a digital voltage signal, and outputs a first voltage value. The first voltage value is the voltage value output by the ADC based on the bandgap reference voltage at the temperature to be measured.

[0039] The first voltage value may be an initial output voltage value of the analog-to-digital converter. In some embodiments, the first voltage value may also be a voltage value of the initial output voltage of the analog-to-digital converter after processing to eliminate ADC conversion offset and gain errors, such as a calibrated voltage value.

[0040] The mapping relationship table between the measured voltage values and temperature values stored in the device is obtained based on the characteristics of the ADC at room temperature. In industry, room temperature specifically refers to 25°C, and in this application, room temperature refers to 25°C. The mapping relationship table between the measured voltage values and temperature values is referred to as the voltage-temperature table for short, that is, the voltage-temperature table is obtained based on the bandgap reference voltage at room temperature, without considering the impact of temperature changes. In other words, the voltage-temperature table is the mapping relationship between the output voltage and temperature of the analog-to-digital converter measured under the assumption that the bandgap reference voltage is independent of temperature changes. It is also a mapping relationship reference table for converting the output voltage of the analog-to-digital converter at different temperatures into the voltage value and temperature value corresponding to the ideal bandgap reference voltage. The voltage-temperature table can be a query benchmark for the output voltage and temperature values of the same series of temperature measurement analog-to-digital converters.

[0041] Therefore, if you directly query the voltage-temperature table using the first voltage value at the temperature to be measured under the bandgap reference voltage, the resulting temperature value will be inaccurate. You need to convert the first voltage value to the voltage value corresponding to the bandgap reference voltage at room temperature. Using the output voltage value corresponding to the bandgap reference voltage at room temperature to query the voltage-temperature table will yield a more accurate true temperature value.

[0042] In step S520, a second voltage value is determined based on the first voltage value and the mapping relationship between the bandgap reference voltage and temperature. The second voltage value is the voltage value measured by the analog-to-digital converter at the current temperature under an ideal bandgap reference voltage. The ideal bandgap reference voltage is also called a room-temperature bandgap reference voltage and is the bandgap reference voltage at 25°C.

[0043] The mapping relationship between the bandgap reference voltage and temperature can be pre-stored in a local memory or a cloud memory. Based on the pre-stored mapping relationship between the bandgap reference voltage and temperature, the first voltage value corresponding to the current temperature to be measured can be converted into a second voltage value corresponding to the ideal bandgap reference voltage.

[0044] In step S530 , according to the second voltage value and the mapping relationship between the measured voltage value and the temperature value, it is determined that the temperature value corresponding to the second voltage value is the temperature value corresponding to the current temperature.

[0045] The method of the embodiment of the present application is described in detail below. As mentioned above, temperature changes can cause the bandgap reference voltage to deviate from the ideal value. The following first analyzes the error generation mechanism of the bandgap reference voltage in detail.

[0046] The principle of a bandgap reference circuit is usually to use the positive temperature coefficient and the negative temperature coefficient to cancel each other out, thereby obtaining a voltage value that is independent of temperature. Figure 6 This is a schematic diagram of a bandgap reference circuit. Figure 6 As shown in the figure, R3 = R4. According to the principle of "virtual short" of the operational amplifier, V1 = V2. Therefore, the current I R3 =I R4 .

[0047] like Figure 6 As shown, the difference in collector-emitter voltage between transistors Q1 and Q2 can be expressed as follows:

[0048] V BE2 -V BE1 =I R3 R2 (4)

[0049] The bandgap reference voltage V can be obtained REF As shown below:

[0050]

[0051] When the holding current I R3 and I R4 When the voltage between the collector and emitter of Q2 is constant, the collector-emitter voltage of Q2 is expressed as follows:

[0052]

[0053] In the above formula, V g is the bandgap reference voltage at 0K, k is the Boltzmann constant, T is the temperature, q is the electron charge, and α and β are constants related to the transistor junction area, doping concentration, etc. When the base current of the transistor is ignored, the emitter current can be expressed as follows:

[0054]

[0055] Where, I Q1 and I Q2 are proportional to the emitter junction areas A1 and A2 of transistors Q1 and Q2, respectively. Therefore, the collector-emitter voltage difference in equation (5) is calculated as follows:

[0056]

[0057] Therefore, the bandgap reference voltage can be expressed as:

[0058]

[0059] The second term in formula (9) has a negative temperature coefficient, and the third term has a positive temperature coefficient. By adjusting R1 and R2, the reference voltage V REF The temperature coefficient is zero, and a bandgap reference voltage with zero temperature coefficient can be obtained. However, from formula (9), it can be seen that the second term in the reference voltage is a nonlinear component and the third term is a linear component. Adjusting R1 and R2 cannot make the temperature coefficient zero in the entire temperature range, so V REF It can be seen that the analog-to-digital converter outputs a first voltage value based on the bandgap reference voltage at the current temperature, and the bandgap reference voltage at the current temperature to be measured may be different from the bandgap reference voltage at room temperature.

[0060] The ideal bandgap reference voltage is the bandgap reference voltage at 25°C, which can be expressed as Taking the incremental Sigma-Delta ADC as an example, the real temperature T R The bandgap reference voltage under According to formula (3), the ADC data actually sampled is It can be expressed as follows:

[0061]

[0062] If the first voltage value is used If you check the voltage-temperature table, you will get the actual temperature T with measurement error. R This is because the voltage-temperature table stored in the device is based on the ADC's characteristics at room temperature, that is, the voltage-temperature table is based on the bandgap reference voltage at room temperature and does not consider the impact of temperature changes. Figure 7 This is a schematic diagram of the error introduced by the bandgap reference voltage fluctuation. Figure 7 As shown, the first voltage value It is based on the bandgap reference voltage output at the current temperature, so the first voltage value is used directly The temperature value obtained by querying the voltage-temperature table is inaccurate. Therefore, the first voltage value needs to be Convert the first voltage value to a voltage value under the ideal bandgap reference voltage. That is, convert the first voltage value to a second voltage value. Using the second voltage value under the ideal bandgap reference voltage to query the voltage-temperature table, a more accurate true temperature value can be obtained.

[0063] In some embodiments, the mapping relationship between the bandgap reference voltage and temperature can be represented by a fitting curve of the bandgap reference voltage with respect to temperature. The fitting curve is typically represented by a fitting function, i.e., the relationship between the bandgap reference voltage and temperature can be approximated using a fitting function, such as a piecewise linear fitting function or an nth-order polynomial fitting function. The fitting function can be calculated based on a least squares method. In some implementations, the nth-order polynomial fitting function can be expanded using a Taylor series.

[0064] In some embodiments, the fitting function of the bandgap reference voltage is expanded according to a Taylor series to obtain expressions at different temperature orders:

[0065] V REF =V g +a1T+a2T 2 +a3T 3 +… (11)

[0066] The fitting function for calculating the bandgap reference voltage needs to provide bandgap reference voltage values at different temperatures. Figure 8 The V of an ADC at different temperatures is offset and V trim Schematic diagram of the curve. Figure 8 As shown, in order to obtain the relationship between the bandgap reference voltage and temperature, it is necessary to measure V offset and V trim The values at different temperatures. As an ideal bandgap reference voltage at 25°C, the temperature T can be calculated using the following formula: n The bandgap reference voltage is:

[0067]

[0068] Among them, the temperature T n Indicates the current temperature to be measured. That is, the fitting curve or fitting function of the bandgap reference voltage and temperature must satisfy the above formula. It can be seen from the Taylor expansion of temperature T that to fit nth-order polynomial about T In addition to the data at room temperature, n values at different temperatures are also required. The fitting order n can be increased or decreased according to the actual situation. For example, consider For the second-order function relationship about T, we can add V at two different temperatures. offset and V trim Data can be obtained. After fitting the curve, the bandgap reference voltage at any temperature can be calculated.

[0069] The first voltage value may be an initial voltage signal directly output by the ADC. In some embodiments, the first voltage value may also be a voltage value after the ADC has been calibrated to eliminate conversion offset and gain errors.

[0070] In some embodiments, if the first voltage value is the initial voltage signal directly output by the ADC, in order to eliminate the ADC conversion offset and gain errors, the first voltage value V can be calibrated using formula (1): ADC , and obtain the calibrated voltage signal, namely:

[0071]

[0072] Where V offset and V trim They represent the ADC input voltage at room temperature, which is zero (or grounded) and full amplitude, V PH The voltage sampling value at time .

[0073] Then, the first voltage value corresponding to the bandgap reference voltage at the temperature to be measured is Convert to bandgap reference voltage at room temperature Corresponding sampling value That is, the second voltage value is used to query the voltage-temperature table. The expression of the second voltage value is as follows:

[0074]

[0075] It should be noted that is a function of temperature T, written as The voltage-temperature table is the corresponding relationship between the output voltage value and the temperature value, which can be expressed as a monotonic function V = F (T), and the corresponding inverse function is T = H (V). R The process is equivalently expressed as the following set of equations:

[0076]

[0077] Solving equation (13) yields T, the true temperature of the DUT. In the above equation, V and T are unknown quantities, and F(T) may not necessarily have an analytical expression. Substituting T = H(V) into the first equation of (13), we construct the function G(V) as follows:

[0078]

[0079] Solving the equation group (13) is transformed into solving the zero point problem of function (14). Most equations do not have a formula for finding the root, so finding the exact root is very difficult or even impossible, so finding the approximate root of the equation is particularly important. This type of zero point problem can be solved using an iterative method. The iterative method is a process of continuously using the old value of a variable to recursively deduce the new value. The opposite of the iterative method is the direct method, which solves the problem in one go. The iterative algorithm is also a basic method for solving problems with computers. It uses the characteristics of computers that have fast computing speed and are suitable for repetitive operations to let the computer repeatedly execute a set of instructions (or certain steps). Each time this set of instructions (or these steps) is executed, a new value of the variable is derived from its original value. Typical iterative methods include the "bisection method" and the "Newton iteration method."

[0080] The Newton down-hill method, also known as the Newton descent method, is a variation of the Newton method. It is an algorithm proposed to mitigate the limitations of the Newton method on the initial approximation. It is a combination of the Newton method and the descent method. The Newton down-hill method requires comparing the absolute value of each iteration with the previous one, ensuring that the absolute value of the approximation after each iteration is smaller than the previous one.

[0081] In some implementations, the Newton descent method can be used to iteratively solve the zero point of G(V), so And G(V) in According to the Taylor series expansion, ignoring the second-order and higher-order terms, we get the following formula:

[0082]

[0083] In the above formula, and H′(V) respectively represent and the derivative of H(V). By transforming the above formula, we can get the iterative relationship of V as follows:

[0084]

[0085] Formula (16) is the iterative process of Newton's descent method. Summarizing the above iterative relationship, we get the following solution process:

[0086]

[0087] In formula (17), represents the rate of change of the bandgap reference voltage with temperature. This value is a minimum value relative to the minuend 1. If it is ignored, equation (17) can be re-expressed as follows:

[0088]

[0089] In the above formula This represents the variation of the bandgap reference voltage with temperature. By gradually iterating the solution and gradually reducing the error caused by the bandgap reference voltage variation, higher-precision temperature data can be obtained.

[0090] In some implementations, an iteration stop condition can be set to determine whether the iteration calculation is finished. k If the preset iteration stop condition is met, the voltage value V k Determine the second voltage value. If the voltage value V k If the iteration stop condition is not met, the voltage value V k As the voltage value V k-1 Repeat the above steps until the voltage value V k The iteration stopping condition is met.

[0091] Use formula (18) to iteratively query the voltage-temperature table. For example, a temperature error threshold ε can be set. When T k -T k-1 <ε, that is, the temperature error obtained from two adjacent iterations is less than the threshold ε, and the iteration can be stopped. In some embodiments, a voltage error threshold can also be set. When V k -V k-1 When the voltage error is less than the voltage error threshold, that is, the voltage error obtained from two adjacent iterations is less than the voltage error threshold, the iteration can be stopped.

[0092] The temperature measurement method in the embodiments of the present application is not limited to front-end NTC temperature detectors and is also applicable to other detection modules that can convert temperature into voltage values based on a bandgap reference voltage. The embodiments of the present application do not limit the type of ADC used to measure temperature, nor do they limit the bandgap reference circuit used within the ADC.

[0093] Optionally, the analog-to-digital converter is a sigma-delta analog-to-digital converter.

[0094] The embodiment of the present application converts the output voltage of the analog-to-digital converter under the current temperature bandgap reference voltage into the output voltage value under the ideal bandgap reference voltage. Based on the converted output voltage value, the pre-stored mapping relationship between the voltage value and the temperature value based on the ideal bandgap reference voltage is queried to determine the temperature value corresponding to the current temperature. In other words, the embodiment of the present application takes into account the influencing factor that the bandgap reference voltage fluctuates with temperature, and based on this factor, adjusts the output voltage value of the analog-to-digital converter before querying the mapping relationship between the voltage value and the temperature value. The embodiment of the present application reduces the impact of the bandgap reference voltage fluctuating with temperature on the sampled data, helps to improve the measurement accuracy of temperature, and thus can better implement measures such as temperature compensation for electronic equipment.

[0095] Figure 9 yes Figure 5 A flowchart of a possible implementation of the method shown is shown. Figure 9 In the embodiment shown, the fitting curve of the bandgap reference voltage is first calculated to obtain the fitting curve The fitting curve can be pre-set The fitting parameters are stored in the memory. Then, the fitting curve is used to and its fitting parameters to measure the temperature of the ADC.

[0096] Figure 10 FIG. 1 is a flow chart of a fitting function for calculating a bandgap reference voltage provided by an embodiment of the present application. Figure 10 As shown, the fitting function for calculating the bandgap reference voltage includes steps S1010 to S1030 , which are described in detail below.

[0097] In step S1010, the fitting order n of the fitting function is set. The order n can be, for example, 2, 3 or higher.

[0098] In step S1020, (n+1) sets of calibration data at room temperature are collected and stored in a memory, which may be an NVM. offset (25℃), V trim (25℃), V offset (T1), V trim (T1), ..., V offset (T n ), V trim (T n ), a total of (n+1) sets of calibration data are stored in NVM.

[0099] In step S1030, the processor reads the calibration data from the memory and obtains the fitting function according to the method described above. That is, the fitting curve.

[0100] Known fitting function Then, perform temperature measurement on ADC. Figure 9 As shown, the method for measuring temperature in the embodiment of the present application includes steps S910 to S970, and these steps of the method are described in detail below.

[0101] In step S910, the ADC samples the temperature to be measured and obtains the conversion result, and obtains the initial voltage value V ADC .

[0102] In step S920, the voltage initial value V ADC Calibrate. Using the formula VADC Perform calibration to obtain the voltage value

[0103] That is the iteratively calculated voltage value V k-1 , the first voltage value can be a voltage value V k-1 The initial value of .

[0104] In step S930, the calibrated voltage value is used That is, the voltage value V k-1 Query the mapping relationship table of measured voltage value and temperature value to obtain the current temperature T to be measured k-1 When k = 1, T0 is the initial value of the current temperature. At this point, the initialization of the iterative calculation is completed.

[0105] In step S940, the temperature fitting function of the bandgap reference voltage is used. Calculate temperature T k-1 Bandgap reference voltage under

[0106] In step S950, the deviation introduced by the bandgap reference voltage is calibrated, and the voltage value V corresponding to the bandgap reference voltage at room temperature is calculated. k , in, is the bandgap reference voltage at room temperature. k That is the second voltage value. When k=1, V1 is the initial value of the second voltage value.

[0107] In step S960, V k Query the mapping relationship table of measured voltage value and temperature value to obtain the temperature T k .

[0108] In step S970, it is determined whether the iterative calculation is finished according to the iterative stop condition. k If the preset iteration stop condition is met, the voltage value V k Determine the second voltage value. If the voltage value V k If the iteration stop condition is not met, the voltage value V k As the voltage value V k-1 Repeat the above steps until the voltage value V k The iteration stopping condition is met.

[0109] For example, ε can be set as the temperature error threshold. If T k -T k-1 <ε, the calculation process ends and the temperature value T of DUT is obtained k Otherwise, let T k-1 =T k, jump to step S920, and repeat the above steps until the iteration stop condition is met.

[0110] The embodiment of the present application is based on the temperature fitting function of the bandgap reference voltage, converts the output voltage of the analog-to-digital converter based on the current temperature bandgap reference voltage into the output voltage value under the ideal bandgap reference voltage, and determines the temperature value corresponding to the current temperature by querying the pre-stored mapping relationship between the voltage value and the temperature value based on the ideal bandgap reference voltage. The embodiment of the present application takes into account the influence factor that the bandgap reference voltage fluctuates with temperature, and based on this factor, adjusts the output voltage value of the analog-to-digital converter before querying the mapping relationship between the voltage value and the temperature value. This reduces the impact of the bandgap reference voltage fluctuation on the sampled data, helps to improve the temperature measurement accuracy, and can better implement measures such as temperature compensation for electronic equipment.

[0111] Combined with the above Figures 1-10 , describes the method embodiment of the present application in detail, and the following is combined with Figure 11-12 , describes in detail the device and system embodiments of the present application. The device and system can be a terminal, a chip, or other hardware device that can implement the method embodiments described in this application. It should be understood that the description of the device and system embodiments corresponds to the description of the method embodiments. Therefore, for parts not described in detail, reference can be made to the above method embodiments.

[0112] Figure 11 Schematic diagram of the structure of the device for measuring temperature provided in the embodiment of the present application. Figure 11 As shown, the device 1100 for measuring temperature may include a memory 1110 and a processor 1120 .

[0113] The memory 1110 is used to store the mapping relationship between the voltage value measured by the analog-to-digital converter and the temperature value. The memory 1110 can be an NVM, a cloud storage, etc.

[0114] The processor 1120 is connected to the memory 1110 and is configured to execute any of the methods described above.

[0115] Optionally, the analog-to-digital converter is a sigma-delta analog-to-digital converter.

[0116] Figure 12 Schematic diagram of the temperature measurement system provided in the embodiment of the present application. Figure 12 As shown, the temperature measurement system 1200 may include an analog-to-digital converter 1210 , a storage module 1220 , and a processing module 1230 .

[0117] The analog-to-digital converter 1210 converts the analog voltage signal containing temperature information at the input terminal based on the bandgap reference voltage to obtain a first voltage value.

[0118] Optionally, the analog-to-digital converter 1210 is a sigma-delta analog-to-digital converter.

[0119] The storage module 1220 is used to store the mapping relationship between the measured voltage value and the temperature value.

[0120] The processing module 1230 is connected to the analog-to-digital converter 1210 and the storage module 1220 and is configured to execute any of the methods described above.

[0121] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. The computer program can be used to execute any of the methods described above.

[0122] It should be understood that in the various embodiments of the present application, "first", "second", etc. are used to distinguish different objects rather than to describe a specific order. The size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0123] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0124] In the several embodiments provided in this application, it should be understood that when a part is said to be "connected" or "connected" to another part, it means that the part can be not only "directly connected" but also "electrically connected" with another element intervening therebetween. In addition, the term "connected" also means that the part is "physically connected" and "wirelessly connected". In addition, when a part is said to "include" a certain element, unless otherwise stated, it means that the part can include the other element, rather than excluding the other element.

[0125] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0126] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0127] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for measuring temperature, characterized in that: include: Obtaining a first voltage value obtained by measuring the current temperature using an analog-to-digital converter; determining a second voltage value according to the first voltage value and a mapping relationship between a bandgap reference voltage and temperature, where the second voltage value is a measurement value of the current temperature by the analog-to-digital converter under a bandgap reference voltage at room temperature; Determine, according to the second voltage value and a mapping relationship between the measured voltage value and the temperature value, that the temperature value corresponding to the second voltage value is the temperature value of the current temperature; The determining of the second voltage value according to the first voltage value and a mapping relationship between a bandgap reference voltage and temperature includes: Step 1: According to the voltage value , query the mapping relationship between the measured voltage value and the temperature value, and obtain the temperature value , wherein the first voltage value is a voltage value The initial value of Step 2: According to the temperature value , and the mapping relationship between the bandgap reference voltage and temperature, determine the temperature value Corresponding bandgap reference voltage ; Step 3: Based on the bandgap reference voltage Determine the voltage value , making ,in, is the bandgap reference voltage at room temperature; If the voltage value If the preset iteration stop condition is met, the voltage value determining the second voltage value; If the voltage value If the iteration stop condition is not met, the voltage value As voltage value , repeat steps 1 to 3 until the voltage value The iteration stop condition is satisfied; The iteration stopping condition includes: The voltage value With the voltage value is less than a preset voltage threshold; and / or, The voltage value Corresponding temperature value and voltage value Corresponding temperature value The difference is less than the preset temperature threshold.

2. The method according to claim 1, characterized in that The mapping relationship between the bandgap reference voltage and temperature is a fitting curve of the bandgap reference voltage and temperature.

3. The method according to claim 2, characterized in that The fitting curve of the bandgap reference voltage and temperature satisfies the following formula: in, 、 Respectively represent the voltage sampling values when the input voltage of the analog-to-digital converter is zero and full amplitude, T n Indicates the current temperature value.

4. The method according to claim 1, wherein The obtaining of a first voltage value obtained by measuring the current temperature with an analog-to-digital converter includes: Obtaining an initial voltage value obtained by measuring the current temperature by the analog-to-digital converter; The initial voltage value is calibrated to obtain the first voltage value, so as to eliminate a conversion offset and / or gain error of the analog-to-digital converter.

5. The method according to claim 1, wherein The analog-to-digital converter is a sigma-delta analog-to-digital converter.

6. A device for measuring temperature, characterized in that: include: A memory, used to store a mapping relationship between a voltage value measured by the analog-to-digital converter and a temperature value; A processor, connected to the memory, and configured to execute the method according to any one of claims 1 to 5.

7. A temperature measurement system, characterized in that: include: an analog-to-digital converter, converting an input signal containing current temperature information to obtain a first voltage value based on a bandgap reference voltage; A storage module, used to store a mapping relationship between measured voltage values and temperature values; A processing module is connected to the analog-to-digital converter and the storage module, and is used to execute the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that A computer program is stored thereon, and the computer program is used to execute the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Corrected temperature sensor measurement

    US20160336947A1