Temperature reading circuit, correction method, chip and electronic equipment

By improving the dual-slope integral analog-to-digital converter circuit and digital computing circuit, and utilizing voltage divider and charge/discharge switching technology, accurate reading of PTAT voltage is achieved, solving the problems of high cost and low accuracy in existing technologies, realizing high-precision temperature measurement and reducing testing costs.

CN122016090APending Publication Date: 2026-05-12ZHUHAI NANXIN SEMICON TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHUHAI NANXIN SEMICON TECH CO LTD
Filing Date
2026-02-12
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In the existing technology, although the Σ-Δ architecture analog-to-digital converter circuit has high precision and low power consumption, it occupies a large layout area and has high cost. In addition, the dual-slope integral analog-to-digital converter circuit introduces operational amplifier offset, resulting in low temperature measurement accuracy, which makes it difficult to meet the needs of cost-sensitive chip applications with small area requirements.

Method used

It employs a dual-slope integral analog-to-digital converter circuit and a digital arithmetic circuit. A reference voltage with a specific relationship is generated through a voltage divider circuit. Combined with a charge-discharge switching circuit and a counting control circuit, multi-stage voltage switching and counting are performed. Calibration is then performed using digital arithmetic to achieve accurate reading of the PTAT voltage.

Benefits of technology

While reducing costs, it improves temperature measurement accuracy, reduces testing costs through single-point temperature calibration, and avoids the need for high and low temperature testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122016090A_ABST
    Figure CN122016090A_ABST
Patent Text Reader

Abstract

The invention provides a temperature reading circuit, a correction method, a chip and electronic equipment, and relates to the technical field of temperature detection, the temperature reading circuit comprises a digital operation circuit and a double-slope integral analog-to-digital conversion circuit, and the double-slope integral analog-to-digital conversion circuit comprises a voltage division circuit, a charging and discharging switching circuit and a counting control circuit; the voltage division circuit divides the band-gap reference voltage to obtain a first reference voltage, a second reference voltage and a third reference voltage; the charging and discharging switching circuit determines a preset adjustment value; third reference voltage and second reference voltage are accessed in the first stage, first temperature detection voltage and second temperature detection voltage are accessed in the third stage, second reference voltage and first reference voltage are accessed in the second stage and the fourth stage, and a counting control circuit counts to obtain a first measurement value and a second measurement value; the digital operation circuit calculates a first calibration value according to the first measurement value, the second measurement value and a preset adjustment value; and obtaining a target temperature value according to the temperature deviation value. The cost is reduced, and the precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of temperature detection technology, and in particular to a temperature readout circuit, calibration method, chip, and electronic device. Background Technology

[0002] Temperature detection plays an important role in modern industry, agriculture, scientific research, and daily life. It is often necessary to monitor the temperature of enclosed environments, industrial equipment, or electronic equipment, and take corresponding measures or issue alarms when the temperature is too high or too low.

[0003] See Figure 1 , Figure 1 This refers to a circuit architecture for a chip temperature acquisition circuit provided in related technologies, such as... Figure 1 As shown, the architecture typically used for reading chip temperature includes an analog front-end circuit, an analog-to-digital converter circuit, and a digital circuit. The analog front-end circuit generates a PTAT (Proportional to Absolute Temperature) voltage V, which is proportional to the Kelvin temperature, using a bias circuit and a bipolar junction transistor (BJT). PTAT and the bandgap reference voltage V REF Then, the bandgap reference voltage V is converted through an analog-to-digital conversion (ADC) circuit. REF As a reference voltage, for the PTAT voltage V PTAT The data is read out; finally, a digital circuit performs counting to obtain the temperature value. Generally, the larger the count value obtained by the digital circuit, the larger the corresponding temperature value. For example, a count value of 240 corresponds to a temperature of 23℃, and a count value of 300 corresponds to a temperature of 28℃. The analog-to-digital converter circuit mostly adopts a Σ-Δ architecture, which features high precision and low power consumption. Furthermore, after chip manufacturing is complete, temperature calibration is usually required. Current technology often uses two-point temperature calibration, selecting two temperature points (e.g., a high-temperature point and a low-temperature point) for calibration to further improve the accuracy of temperature measurement.

[0004] While the Σ-Δ architecture offers advantages such as high precision and low power consumption, its large footprint increases chip cost, making it unsuitable for widespread adoption in cost-sensitive chips requiring smaller footprints. Furthermore, two-point temperature calibration necessitates additional equipment for high- and low-temperature testing, further increasing testing costs.

[0005] In related technologies, the dual-slope integral analog-to-digital converter (i.e., dual-slope ADC) provides a simple and low-cost solution. However, the dual-slope integral analog-to-digital converter introduces errors caused by operational amplifier offset, which leads to deviations in temperature readings and results in low temperature measurement accuracy. Summary of the Invention

[0006] This application provides a temperature readout circuit, calibration method, chip, and electronic device to improve temperature measurement accuracy while reducing costs.

[0007] In a first aspect, this application provides a temperature readout circuit, the temperature readout circuit comprising: a dual-slope integral analog-to-digital converter circuit and a digital arithmetic circuit; the dual-slope integral analog-to-digital converter circuit comprising: a voltage divider circuit, a charge / discharge switching circuit and a counting control circuit; the charge / discharge switching circuit is electrically connected to the voltage divider circuit and the counting control circuit respectively; The voltage divider circuit is used to divide the bandgap reference voltage to obtain a first reference voltage, a second reference voltage, and a third reference voltage. The difference between the third reference voltage and the second reference voltage is equal to one-third of the difference between the first reference voltage and the second reference voltage, and the first reference voltage is greater than the second reference voltage. The charge / discharge switching circuit is used to determine a preset adjustment value; it is also used to connect the third reference voltage and the second reference voltage in the first stage to start charging, and stop charging when the counting control circuit counts to the preset adjustment value; in the second stage, connect the second reference voltage and the first reference voltage to start discharging, and the counting control circuit starts counting from zero, and stops counting when its output voltage is lower than the flip threshold, obtaining a first measurement value; in the third stage, connect the first temperature detection voltage and the second temperature detection voltage to start charging, and stop charging when the counting control circuit counts to the preset adjustment value; in the fourth stage, connect the second reference voltage and the first reference voltage to start discharging, and the counting control circuit starts counting from zero, and stops counting when its output voltage is lower than the flip threshold, obtaining a second measurement value; The digital processing circuit is used to calculate a first calibration value based on the first measured value, the second measured value, and the preset adjustment value; it is also used to obtain the current temperature value detected by the temperature reading circuit at room temperature, calculate the difference between the current temperature value and the room temperature value to obtain a temperature offset value; and calculate the difference between the first calibration value and the temperature offset value to obtain a target temperature value, wherein the room temperature value is a digital quantity corresponding to room temperature.

[0008] In one possible design, the voltage divider circuit includes: a first resistor, a second resistor, a third resistor, and a fourth resistor; the resistance values ​​of the first resistor, the third resistor, and the fourth resistor are all equal, and the resistance value of the second resistor is twice the resistance value of the third resistor. The first end of the first resistor is connected to the bandgap reference voltage, and the second end of the first resistor is electrically connected to the first end of the second resistor, and serves as the first output terminal of the voltage divider circuit for outputting the first reference voltage. The second end of the second resistor is electrically connected to the first end of the third resistor and serves as the third output terminal of the voltage divider circuit for outputting the third reference voltage. The second end of the third resistor is electrically connected to the first end of the fourth resistor and serves as the second output terminal of the voltage divider circuit for outputting the second reference voltage. The second terminal of the fourth resistor is grounded.

[0009] In one possible design, the charge / discharge switching circuit includes: a first switch, a second switch, a third switch, a fourth switch, a fifth switch, a sixth switch, a charge / discharge control switch, a reset switch, a fifth resistor, an integrating capacitor, a first operational amplifier, and a second operational amplifier; The first terminal of the first switch is used to connect to the first temperature detection voltage, the first terminal of the third switch is used to connect to the first reference voltage, the first terminal of the fifth switch is used to connect to the second reference voltage, and the second terminal of the first switch is electrically connected to the second terminal of the third switch, the second terminal of the fifth switch, and the non-inverting input terminal of the first operational amplifier, respectively. The first terminal of the second switch is used to connect to the second temperature detection voltage, the first terminal of the fourth switch is used to connect to the second reference voltage, the first terminal of the sixth switch is used to connect to the third reference voltage, and the second terminal of the second switch is electrically connected to the second terminal of the fourth switch, the second terminal of the sixth switch, and the non-inverting input terminal of the second operational amplifier, respectively. The inverting input terminal of the first operational amplifier is electrically connected to the output terminal of the first operational amplifier and the first terminal of the charge / discharge control switch, respectively, and the second terminal of the charge / discharge control switch is electrically connected to the first terminal of the fifth resistor; The second end of the fifth resistor is electrically connected to the inverting input of the second operational amplifier, the first end of the integrating capacitor, the first end of the reset switch, and the counting control circuit, respectively. The second terminal of the integrating capacitor is electrically connected to the second terminal of the reset switch, the output terminal of the second operational amplifier, and the counting control circuit.

[0010] In one possible design, the counting control circuit includes: a second comparator, a latching logic circuit, an oscillator, and a counter; The non-inverting input of the second comparator is electrically connected to the output of the second operational amplifier, the inverting input of the second comparator is electrically connected to the second terminal of the fifth resistor, and the output of the second comparator is electrically connected to the latch logic circuit; the latch logic circuit is electrically connected to the counter and the charge / discharge switching circuit, respectively, and the oscillator is electrically connected to the counter; The oscillator is used to provide a clock signal; The comparator is used to compare the output voltage of the charge-discharge switching circuit with the flip threshold and output a comparison result logic signal. The latch logic circuit is used to latch the comparison result logic signal to obtain a latch signal, so that the charge-discharge switching circuit controls the switching states of the first switch, the second switch, the third switch, the fourth switch, the fifth switch and the sixth switch according to the latch signal; The counter is used to count based on the clock signal and the latch signal.

[0011] In one possible design, the difference between the first temperature detection voltage and the second temperature detection voltage is the PTAT voltage.

[0012] In one possible design, the charge / discharge switching circuit is specifically used to control the third switch and the fourth switch to be in the on state, detect the absolute value of the difference between the voltage at the inverting input terminal of the first operational amplifier and the voltage at the inverting input terminal of the second operational amplifier, and obtain the error voltage. The temperature difference change voltage is obtained, wherein the temperature difference change voltage is the change in the PTAT voltage corresponding to a 1 degree Celsius change in temperature; Calculate the ratio between the error voltage and the temperature difference change voltage to determine the preset adjustment value.

[0013] In one possible design, the digital processing circuit is used to calculate the first calibration value based on the first measurement value, the second measurement value, and the preset adjustment value, using the formula N3=N2-(3N1-Nfix) / 4, where N3 is the first calibration value, N1 is the first measurement value, N2 is the second measurement value, and Nfix is ​​the preset adjustment value.

[0014] Secondly, this application provides a temperature readout circuit calibration method, which is applied to the temperature readout circuit as described in the first aspect, and the temperature readout circuit calibration method includes: The bandgap reference voltage is divided to obtain a first reference voltage, a second reference voltage, and a third reference voltage. The difference between the third reference voltage and the second reference voltage is equal to one-third of the difference between the first reference voltage and the second reference voltage, and the first reference voltage is greater than the second reference voltage. Determine the preset adjustment value; In the first stage, the third reference voltage and the second reference voltage are connected to enable the charge-discharge switching circuit to start charging. When the counting control circuit counts to a preset adjustment value, charging stops. In the second stage, the second reference voltage and the first reference voltage are connected to enable the charge-discharge switching circuit to start discharging. The counting control circuit starts counting from zero. When its output voltage is lower than the flip threshold, the counting control circuit stops counting and obtains the first measurement value. In the third stage, the first temperature detection voltage and the second temperature detection voltage are connected to start the charging and discharging switching circuit to start charging. When the counting control circuit counts to the preset adjustment value, charging stops. In the fourth stage, the second reference voltage and the first reference voltage are connected to start the charging and discharging switching circuit to start discharging. The counting control circuit starts counting from zero. When its output voltage is lower than the flip threshold, the counting control circuit stops counting and obtains the second measurement value. Calculate the first calibration value based on the first measurement value, the second measurement value, and the preset adjustment value; The temperature reading circuit obtains the current temperature value detected at room temperature, calculates the difference between the current temperature value and the room temperature value, and obtains the temperature offset value. The difference between the first calibration value and the temperature offset value is calculated to obtain the target temperature value, wherein the room temperature value is the digital quantity corresponding to room temperature.

[0015] Thirdly, this application provides a chip including: a temperature readout circuit as described in the first aspect.

[0016] Fourthly, this application provides an electronic device, including: a chip as described in the third aspect.

[0017] The beneficial effects of the embodiments of this application are as follows: In this embodiment, the temperature readout circuit includes a dual-slope integral analog-to-digital converter circuit and a digital arithmetic circuit; the dual-slope integral analog-to-digital converter circuit includes a voltage divider circuit, a charge / discharge switching circuit, and a counting control circuit; wherein, the voltage divider circuit is used to divide the bandgap reference voltage to obtain a first reference voltage, a second reference voltage, and a third reference voltage, the difference between the third reference voltage and the second reference voltage is equal to one-third of the difference between the first reference voltage and the second reference voltage, and the first reference voltage is greater than the second reference voltage. The charge / discharge switching circuit first determines a preset adjustment value. In the first stage, it connects a third reference voltage and a second reference voltage to initiate charging. Charging stops when the counting control circuit reaches the preset adjustment value. In the second stage, it connects a second reference voltage and a first reference voltage to initiate discharging, and the counting control circuit starts counting from zero. Counting stops when the output voltage falls below a flip threshold, yielding a first measured value. In the third stage, it connects a first temperature detection voltage and a second temperature detection voltage to initiate charging, stopping when the counting control circuit reaches the preset adjustment value. In the fourth stage, it connects a second reference voltage and a first reference voltage to initiate discharging, and the counting control circuit starts counting from zero. Counting stops when the output voltage falls below a flip threshold, yielding a second measured value. The digital processing circuit calculates a first calibration value based on the first measured value, the second measured value, and the preset adjustment value, thus controlling the PTAT voltage V. PTAT The first calibration is performed; it is also used to obtain the current temperature value detected by the temperature readout circuit at room temperature, calculate the difference between the current temperature value and the room temperature value to obtain the temperature offset value; calculate the difference between the first calibration value and the temperature offset value to obtain the target temperature value, thereby realizing the adjustment of the PTAT voltage V. PTAT The second calibration; by measuring the detected PTAT voltage V PTAT Performing the first and second calibrations improves the accuracy of temperature detection; and the use of single-point temperature calibration eliminates the need for additional equipment for high and low temperature testing, thus reducing testing costs. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.

[0019] Figure 1 This refers to a circuit architecture for a chip temperature acquisition circuit provided in related technologies; Figure 2A schematic diagram of the circuit structure of a dual-slope integral analog-to-digital converter circuit is provided for related technologies; Figure 3 A schematic diagram of the circuit structure of a temperature readout circuit provided in an embodiment of this application; Figure 4 A schematic diagram of the circuit structure of a voltage divider circuit provided in an embodiment of this application; Figure 5 A schematic diagram of the circuit structure of a charge / discharge switching circuit and a counting control circuit provided in an embodiment of this application; Figure 6 A timing diagram of a temperature readout circuit provided in an embodiment of this application; Figure 7 This is a flowchart of a temperature readout circuit calibration method provided in an embodiment of this application. Detailed Implementation

[0020] In this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c alone can mean: a alone, b alone, c alone, a combination of a and b, a combination of a and c, a combination of b and c, or a, b, and c, where a, b, and c can be single or multiple. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0021] The terms “center,” “longitudinal,” “lateral,” “up,” “down,” “left,” “right,” “front,” and “rear,” etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.

[0022] The terms "connected" and "connected" should be interpreted broadly. For example, in circuit structures, "connected" or "connected" can refer not only to physical connections but also to electrical or signal connections. This could be a direct connection (physical connection) or an indirect connection via at least one intermediate component, as long as the circuit is connected. It could also refer to the internal connection between two components. Similarly, a signal connection can refer to a connection via a circuit or a medium, such as radio waves. Those skilled in the art will understand the specific meaning of these terms in this application based on the specific circumstances.

[0023] See Figure 2 , Figure 2 A circuit structure diagram of a dual-slope integral analog-to-digital converter circuit is provided for related technologies, such as... Figure 2 As shown, the dual-slope integral analog-to-digital converter circuit may include: a single-pole double-throw switch S0, a series resistor R0, a capacitor C0, an operational amplifier A1, a first comparator D1, a timing control logic circuit, an oscillation circuit, an AND gate D2, and a counter circuit; the electrical connections of each device and circuit are as follows: the first input terminal of the single-pole double-throw switch S0 is used to connect the input voltage V. IN The second input terminal of the single-pole double-throw switch S0 is used to connect the reference voltage -V. REF The output terminal of the single-pole double-throw switch S0 is electrically connected to the first terminal of the series resistor R0; the second terminal of the series resistor R0 is electrically connected to the inverting input terminal of the operational amplifier A1 and the first terminal of the capacitor C0, respectively. The non-inverting input terminal of the operational amplifier A1 is grounded. The second terminal of the capacitor C0 is electrically connected to the output terminal of the operational amplifier A1 and the non-inverting input terminal of the first comparator D1, respectively. The inverting input terminal of the first comparator D1 is grounded. The output terminal of the first comparator D1 is electrically connected to the timing control logic circuit. The timing control logic circuit is also electrically connected to the single-pole double-throw switch S0, the reset terminal RES of the counter circuit, the first input terminal of the AND gate D2, and the oscillation circuit. The oscillation circuit is electrically connected to the second input terminal of the AND gate D2. The output terminal of the AND gate D2 is electrically connected to the clock input terminal CLK of the counter circuit. The output terminal of the counter circuit is used to output the counting result.

[0024] When a dual-slope integral analog-to-digital converter circuit is used in a scenario where chip temperature is acquired, the input voltage V IN It can be the PTAT voltage V PTAT See Figure 2 Since the circuit of a dual-slope integral analog-to-digital converter provided by the related technology includes an operational amplifier A1, although the dual-slope integral analog-to-digital converter circuit (i.e., dual-slope ADC) provides a simple and low-cost solution, the presence of the operational amplifier A1 will also introduce errors caused by operational amplifier offset, resulting in deviations in temperature readings and lower temperature measurement accuracy.

[0025] To improve temperature measurement accuracy while reducing costs, this application improves upon a dual-slope integrating analog-to-digital converter circuit provided by related technologies and innovatively uses a correction method to calibrate the error caused by operational amplifier offset, thereby achieving accurate measurement of the PTAT voltage V. PTAT The accurate readings reduce costs while improving the precision of temperature measurement.

[0026] See Figure 3 , Figure 3 A schematic diagram of the circuit structure of a temperature readout circuit provided in an embodiment of this application is shown below. Figure 3 As shown, the temperature reading circuit 1000 may include: a dual-slope integral analog-to-digital converter circuit 100 and a digital operation circuit 200; the dual-slope integral analog-to-digital converter circuit 100 includes: a voltage divider circuit 10, a charge / discharge switching circuit 11 and a counting control circuit 12; the charge / discharge switching circuit 11 is electrically connected to the voltage divider circuit 10 and the counting control circuit 12 respectively.

[0027] A voltage divider circuit is used to divide the bandgap reference voltage VBG to obtain the first reference voltage V. REF1 Second reference voltage V REF2 and the third reference voltage V REF_DIV Among them, the third reference voltage V REF_DIV With the second reference voltage V REF2 The difference between them is equal to the first reference voltage V. REF1 With the second reference voltage V REF2 One-third of the difference between them, and the first reference voltage V REF1 Greater than the second reference voltage V REF2 .

[0028] The charge / discharge switching circuit 11 is used to determine the preset adjustment value Nfix; it is also used to connect the third reference voltage V in the first stage. REF_DIV With the second reference voltage V REF2 To initiate charging, the counting control circuit 12 counts to a preset adjustment value Nfix, at which point charging stops; in the second stage, a second reference voltage V is applied. REF2 With the first reference voltage V REF1 This allows the circuit to begin discharging, and the counting control circuit 12 starts counting from zero. When the output voltage of the circuit is lower than the flip threshold, the counting control circuit 12 stops counting, obtaining the first measured value N1. In the third stage, the first temperature detection voltage V is applied. BE1 With the second temperature detection voltage V BE2 To initiate charging, the counting control circuit 12 counts to a preset adjustment value Nfix, at which point charging stops; in the fourth stage, a second reference voltage V is applied.REF2 With the first reference voltage V REF1 This allows the circuit to start discharging itself, and the counting control circuit 12 starts counting from zero. When its output voltage is lower than the flip threshold, the counting control circuit 12 stops counting and obtains the second measurement value N2.

[0029] The digital processing circuit is used to calculate the first calibration value N3 based on the first measurement value N1, the second measurement value N2, and the preset adjustment value Nfix; it is also used to acquire the current temperature value detected by the temperature reading circuit 1000 at room temperature, calculate the difference between the current temperature value and the room temperature value to obtain the temperature offset value Noffset; and calculate the difference between the first calibration value N3 and the temperature offset value Noffset to obtain the target temperature value, wherein the room temperature value is the digital quantity corresponding to room temperature.

[0030] The temperature readout circuit in this application can be used as a standalone circuit module or as part of a circuit within a chip to monitor the PTAT voltage V. PTAT The data is read out to detect the chip's temperature. This application does not impose specific limitations on this.

[0031] See Figure 3 The temperature readout circuit 1000 includes: a dual-slope integral analog-to-digital converter circuit 100 and a digital processing circuit 200; wherein, the dual-slope integral analog-to-digital converter circuit 100 is used to read the PTAT voltage V. PTAT The system acquires analog signals and converts them into digital signals. It also calibrates these digital signals to reduce errors. The digital circuitry is used to perform the relevant calculations during the calibration process.

[0032] The dual-slope integral analog-to-digital converter circuit 100 includes a voltage divider circuit 10, a charge / discharge switching circuit 11, and a counting control circuit 12. The charge / discharge switching circuit 11 is electrically connected to the voltage divider circuit 10 and the counting control circuit 12, respectively. The voltage divider circuit 10 provides various reference voltages to the charge / discharge switching circuit 11, namely the first reference voltage V. REF1 Second reference voltage V REF2 and the third reference voltage V REF_DIV The charge / discharge switching circuit 11 controls its own charging and discharging by receiving different signals at different stages, and counts them through the counting control circuit 12 to obtain the first measurement value N1, the second measurement value N2, and the preset adjustment value Nfix. This allows the digital processing circuit to calculate the target temperature value based on the first measurement value N1, the second measurement value N2, the preset adjustment value Nfix, and the temperature offset value Noffset.

[0033] In existing technologies, the bandgap reference voltage VBG is obtained by superimposing the PTAT voltage and the CTAT (Complementary to Absolute Temperature) voltage in an appropriate ratio, and then performing temperature compensation to obtain a stable, temperature-independent voltage. Wherein, the PTAT voltage V... PTAT It is obtained from the voltage difference between the bias circuit and the emitters of the two transistors. In the embodiments of this application, the PTAT voltage V PTAT The first temperature detection voltage V BE1 With the second temperature detection voltage V BE2 The difference between them, i.e., V PTAT =V BE1 -V BE2 First temperature detection voltage V BE1 Second temperature detection voltage V BE2 This refers to the voltage across the emitters of the two transistors. The bandgap reference voltage VBG is typically 1.2V.

[0034] In this application, a voltage divider circuit divides the bandgap reference voltage VBG to obtain a first reference voltage V. REF1 Second reference voltage V REF2 and the third reference voltage V REF_DIV and the first reference voltage V REF1 Second reference voltage V REF2 and the third reference voltage V REF_DIV The data is transmitted to the charge / discharge switching circuit. To facilitate the implementation of related operational logic by the digital circuitry, in this application, the first reference voltage V... REF1 Second reference voltage V REF2 and the third reference voltage V REF_DIV The relationship between them was defined, specifically, the third reference voltage V REF_DIV With the second reference voltage V REF2 The difference between them is equal to the first reference voltage V. REF1 With the second reference voltage V REF2 One-third of the difference between them, i.e., V REF_DIV -V REF2 = (V REF1 -V REF2 ) / 3, and the first reference voltage V REF1 Greater than the second reference voltage V REF2 V REF1 >V REF2 .

[0035] The charge / discharge switching circuit 11 first needs to determine the preset adjustment value Nfix and write the determined preset adjustment value Nfix into the register. Then, in the first stage, the third reference voltage V is connected. REF_DIV With the second reference voltage V REF2 This allows the circuit to begin charging, and charging stops when the counting control circuit 12 counts to a preset adjustment value Nfix. The duration of the charging phase is the time it takes for the counting control circuit 12 to count to the preset adjustment value Nfix. In the second phase, a second reference voltage V is connected. REF2 With the first reference voltage V REF1 To initiate discharge, when the charge / discharge switching circuit 11 begins discharging, the counting control circuit 12 is reset to zero and starts counting from zero. As the charge / discharge switching circuit 11 discharges, its output voltage gradually decreases. When its output voltage falls below the flip threshold, the counting control circuit 12 stops counting and outputs the counting result, obtaining the first measurement value N1, which is then saved. Through the first and second stages, one charge and discharge cycle is completed, yielding the first measurement result, i.e., the first measurement value N1.

[0036] Based on this, a second measurement is required. Specifically, in the third stage, the first temperature detection voltage V is connected. BE1 With the second temperature detection voltage V BE2 This initiates charging. When the counting control circuit 12 counts to the preset adjustment value Nfix, charging stops. The charging / discharging switching circuit 11 maintains the same charging duration in the third stage as in the first stage. In the fourth stage, a second reference voltage V is applied. REF2 With the first reference voltage V REF1 To initiate discharge, the charging / discharging switching circuit 11 starts discharging. When this circuit begins discharging, the counting control circuit 12 is reset to zero and starts counting from zero. As the charging / discharging switching circuit 11 discharges, its output voltage gradually decreases. When the output voltage falls below the flip threshold, the counting control circuit 12 stops counting and outputs the counting result, obtaining the second measurement value N2, which is then saved. Through the third and fourth stages, one charging and discharging cycle is completed, yielding the second measurement result, i.e., the second measurement value N2.

[0037] The switching threshold can be set according to the needs of the application. For example, the switching threshold can be set to 0V or a voltage value slightly higher than 0V, such as 100mV.

[0038] During the first stage of charging, the third reference voltage V is applied. REF_DIV With the second reference voltage V REF2Due to the third reference voltage V REF_DIV With the second reference voltage V REF2 The difference between them is equal to the first reference voltage V. REF1 With the second reference voltage V REF2 One-third of the difference between them, i.e., V REF_DIV -V REF2 = (V REF1 -V REF2 If the first measured value N1 is 1 / 3, then the error introduced by the charge / discharge switching circuit 11 is included in the first measured value N1.

[0039] During the third stage of charging, the first temperature detection voltage V is applied. BE1 With the second temperature detection voltage V BE2 Due to PTAT voltage V PTAT The first temperature detection voltage V BE1 With the second temperature detection voltage V BE2 The difference between them, i.e., V PTAT =V BE1 -V BE2 The second measured value N2 includes the error introduced by the charge / discharge switching circuit 11 and the detected PTAT voltage V. PTAT The existing error. Since both the first measurement value N1 and the second measurement value N2 include the error introduced by the charge-discharge switching circuit 11, subtracting the second measurement value N2 from the first measurement value N1 can eliminate the error introduced by the charge-discharge switching circuit 11.

[0040] The digital processing circuit 200 calculates the first calibration value N3 based on the first measured value N1, the second measured value N2, and the preset adjustment value Nfix. Since subtracting the first measured value N1 from the second measured value N2 can eliminate the error introduced by the charge / discharge switching circuit 11, the first calibration value N3 only includes the detected PTAT voltage V. PTAT The existing error can be corrected by using the first measurement value N1 and the second measurement value N2 to determine the detected PTAT voltage V. PTAT Perform the first calibration.

[0041] Based on this, this application further calibrates the first calibration value N3 a second time. Specifically, it acquires the current temperature value detected by the temperature readout circuit 1000 at room temperature, calculates the difference between the current temperature value and the room temperature value, and obtains the temperature offset value Noffset. For example, if the temperature readout circuit 1000 detects a current temperature value of 260 at room temperature of 25℃, and the digital value corresponding to room temperature (i.e., the room temperature value) is 255, the difference between the current temperature value and the room temperature value is calculated to be 5, then the temperature offset value Noffset is 5. Finally, the difference between the first calibration value N3 and the temperature offset value Noffset is calculated to obtain the target temperature value. For example, when the first calibration value N3 is 280 and the temperature offset value Noffset is 5, the difference between the first calibration value N3 and the temperature offset value Noffset is calculated to be 275. When 275 corresponds to a temperature of 26℃, the target temperature value is 26℃. Alternatively, Celsius can be converted to the corresponding Kelvin temperature; 26℃ corresponds to a Kelvin temperature of 299.15K.

[0042] By calculating the difference between the detected temperature and the actual temperature at room temperature, the first calibration value N3 is calibrated, thereby achieving the calibration of the detected PTAT voltage V. PTAT A second calibration is performed. Furthermore, this application only performs one calibration at room temperature, i.e., single-point temperature calibration. Compared to the two-point temperature calibration provided in related technologies, single-point temperature calibration eliminates the need for additional equipment for high and low temperature testing, thus reducing testing costs. The PTAT voltage V obtained from the test is then analyzed. PTAT Performing the first and second calibrations improved the accuracy of temperature detection.

[0043] In this embodiment, the temperature readout circuit includes a dual-slope integral analog-to-digital converter circuit and a digital arithmetic circuit; the dual-slope integral analog-to-digital converter circuit includes a voltage divider circuit, a charge / discharge switching circuit, and a counting control circuit; wherein, the voltage divider circuit is used to divide the bandgap reference voltage to obtain a first reference voltage, a second reference voltage, and a third reference voltage, the difference between the third reference voltage and the second reference voltage is equal to one-third of the difference between the first reference voltage and the second reference voltage, and the first reference voltage is greater than the second reference voltage. The charge / discharge switching circuit first determines a preset adjustment value. In the first stage, it connects a third reference voltage and a second reference voltage to initiate charging. Charging stops when the counting control circuit reaches the preset adjustment value. In the second stage, it connects a second reference voltage and a first reference voltage to initiate discharging, and the counting control circuit starts counting from zero. Counting stops when the output voltage falls below a flip threshold, yielding a first measured value. In the third stage, it connects a first temperature detection voltage and a second temperature detection voltage to initiate charging, stopping when the counting control circuit reaches the preset adjustment value. In the fourth stage, it connects a second reference voltage and a first reference voltage to initiate discharging, and the counting control circuit starts counting from zero. Counting stops when the output voltage falls below a flip threshold, yielding a second measured value. The digital processing circuit calculates a first calibration value based on the first measured value, the second measured value, and the preset adjustment value, thus controlling the PTAT voltage V. PTAT The first calibration is performed; it is also used to obtain the current temperature value detected by the temperature readout circuit at room temperature, calculate the difference between the current temperature value and the room temperature value to obtain the temperature offset value; calculate the difference between the first calibration value and the temperature offset value to obtain the target temperature value, thereby realizing the adjustment of the PTAT voltage V. PTAT The second calibration; by measuring the detected PTAT voltage V PTAT Performing the first and second calibrations improves the accuracy of temperature detection; and the use of single-point temperature calibration eliminates the need for additional equipment for high and low temperature testing, thus reducing testing costs.

[0044] In one possible embodiment, see Figure 4 , Figure 4 A schematic diagram of a voltage divider circuit provided in an embodiment of this application is shown below. Figure 4 As shown, the voltage divider circuit 10 may include: a first resistor R1, a second resistor R2, a third resistor R3, and a fourth resistor R4; the resistance values ​​of the first resistor R1, the third resistor R3, and the fourth resistor R4 are all equal, and the resistance value of the second resistor R2 is twice the resistance value of the third resistor R3.

[0045] The first terminal of the first resistor R1 is connected to the bandgap reference voltage VBG. The second terminal of the first resistor R1 is electrically connected to the first terminal of the second resistor R2, and serves as the first output terminal of the voltage divider circuit 10, used to output the first reference voltage V. REF1 .

[0046] The second terminal of the second resistor R2 is electrically connected to the first terminal of the third resistor R3, and serves as the third output terminal of the voltage divider circuit 10, used to output the third reference voltage V. REF_DIV .

[0047] The second terminal of the third resistor R3 is electrically connected to the first terminal of the fourth resistor R4, and serves as the second output terminal of the voltage divider circuit 10, used to output the second reference voltage V. REF2 .

[0048] The second terminal of the fourth resistor R4 is grounded.

[0049] The resistances of the first resistor R1, the third resistor R3, and the fourth resistor R4 are all equal, and the resistance of the second resistor R2 is twice that of the third resistor R3. For example, if the resistances of the first resistor R1, the third resistor R3, and the fourth resistor R4 are all set to 10KΩ, then the resistance of the second resistor R2 can be set to 20KΩ. The bandgap reference voltage VBG is divided using the first resistor R1, the second resistor R2, the third resistor R3, and the fourth resistor R4 to obtain the first reference voltage V. REF1 Second reference voltage V REF2 and the third reference voltage V REF_DIV And transmit each reference voltage to the charge / discharge switching circuit 11.

[0050] In one possible embodiment, see Figure 5 , Figure 5 A schematic diagram of the circuit structure of a charge / discharge switching circuit and a counting control circuit provided in an embodiment of this application is shown below. Figure 5 As shown, the charge / discharge switching circuit 11 may include: a first switch K1, a second switch K2, a third switch K3, a fourth switch K4, a fifth switch K5, a sixth switch K6, a charge / discharge control switch K7, a reset switch K8, a fifth resistor R5, an integrating capacitor C1, a first operational amplifier AMP1, and a second operational amplifier AMP2.

[0051] The first terminal of the first switch K1 is used to connect the first temperature detection voltage V. BE1 The first terminal of the third switch K3 is used to connect the first reference voltage V. REF1 The first terminal of the fifth switch K5 is used to connect the second reference voltage V. REF2The second terminal of the first switch K1 is electrically connected to the second terminal of the third switch K3, the second terminal of the fifth switch K5, and the non-inverting input terminal of the first operational amplifier AMP1.

[0052] The first terminal of the second switch K2 is used to connect the second temperature detection voltage V. BE2 The first terminal of the fourth switch K4 is used to connect the second reference voltage V. REF2 The first terminal of the sixth switch K6 is used to connect the third reference voltage V. REF_DIV The second terminal of the second switch K2 is electrically connected to the second terminal of the fourth switch K4, the second terminal of the sixth switch K6, and the non-inverting input terminal of the second operational amplifier AMP2.

[0053] The inverting input terminal of the first operational amplifier AMP1 is electrically connected to the output terminal of the first operational amplifier AMP1 and the first terminal of the charge / discharge control switch K7, respectively. The second terminal of the charge / discharge control switch K7 is electrically connected to the first terminal of the fifth resistor R5.

[0054] The second end of the fifth resistor R5 is electrically connected to the inverting input of the second operational amplifier AMP2, the first end of the integrating capacitor C1, the first end of the reset switch K8, and the counting control circuit 12.

[0055] The second terminal of the integrating capacitor C1 is electrically connected to the second terminal of the reset switch K8, the output terminal of the second operational amplifier AMP2, and the counting control circuit 12.

[0056] By controlling the switching states of the first switch K1, the second switch K2, the third switch K3, the fourth switch K4, the fifth switch K5, and the sixth switch K6, the charge / discharge switching circuit 11 can be connected to different input voltages at different stages. For example, by controlling the fifth switch K5 and the sixth switch K6 to be in the on state, the charge / discharge switching circuit 11 can be connected to the third reference voltage V in the first stage. REF_DIV Second reference voltage V REF2 And start charging. Control the third switch K3 and the fourth switch K4 to be in the conducting state, so that the charge / discharge switching circuit 11 is connected to the second reference voltage V in the second or fourth stage. REF2 and the first reference voltage V REF1 And begin discharging. Controlling the first switch K1 and the second switch K2 to be in the conducting state, so that the charge / discharge switching circuit 11 is connected to the first temperature detection voltage V in the third stage. BE1 With the second temperature detection voltage V BE2 And it started charging.

[0057] When the charge / discharge switching circuit 11 starts charging or discharging, the charge / discharge control switch K7 is in the ON state. After charging or discharging is completed, the charge / discharge control switch K7 is in the OFF state. The reset switch K8 is used to reset the integrating capacitor C1. Generally, before charging the integrating capacitor C1, the reset switch K8 needs to be in the ON state to reset the integrating capacitor C1.

[0058] The inverting input of the first operational amplifier AMP1 is electrically connected to its output, making the voltages at both terminals equal, and equal to the voltage at the non-inverting input. Considering the offset voltage of AMP1, the voltage at either the inverting input or the output is equal to the sum of the voltage at the non-inverting input and the offset voltage. The second operational amplifier AMP2, the fifth resistor R5, and the integrating capacitor C1 constitute the integrating circuit.

[0059] The first switch K1, the second switch K2, the third switch K3, the fourth switch K4, the fifth switch K5, the sixth switch K6, the charge / discharge control switch K7, and the reset switch K8 can be any one of the following: gallium nitride transistor, bipolar junction transistor, insulated gate bipolar transistor, metal-oxide-semiconductor field-effect transistor, field-controlled thyristor, gate turn-off thyristor, and transmission gate.

[0060] In one possible embodiment, see Figure 5 The counting control circuit 12 may include: a second comparator COMP, a latching logic circuit, an oscillator, and a counter.

[0061] The non-inverting input of the second comparator COMP is electrically connected to the output of the second operational amplifier AMP2, the inverting input of the second comparator COMP is electrically connected to the second terminal of the fifth resistor R5, and the output of the second comparator COMP is electrically connected to the latch logic circuit. The latch logic circuit is electrically connected to the counter and the charge / discharge switching circuit 11, respectively, and the oscillator is electrically connected to the counter.

[0062] An oscillator is used to provide a clock signal.

[0063] The comparator is used to compare the output voltage of the charge / discharge switching circuit 11 with the switching threshold and output the comparison result logic signal.

[0064] The latch logic circuit is used to latch the comparison result logic signal to obtain a latch signal, so that the charge / discharge switching circuit 11 controls the switching states of the first switch K1, the second switch K2, the third switch K3, the fourth switch K4, the fifth switch K5, and the sixth switch K6 according to the latch signal.

[0065] A counter is used to count based on clock signals and latch signals.

[0066] In this embodiment, the inverting input of the second comparator COMP is electrically connected to the second terminal of the fifth resistor R5, and the flip threshold is the voltage value at the inverting input of the second comparator COMP. The second comparator COMP is used to compare the voltage at the output of the second operational amplifier AMP2 (i.e., the output voltage of the charge / discharge switching circuit) with the flip threshold and output the comparison result. For example, when the output voltage of the charge / discharge switching circuit is greater than the flip threshold, the logic signal of the comparison result output by the second comparator COMP is high; when the output voltage of the charge / discharge switching circuit is less than the flip threshold, the logic signal of the comparison result output by the second comparator COMP is low.

[0067] The latching logic circuit latches the comparison result logic signal output from the second comparator COMP, obtaining a latch signal. This latch signal controls the switching states of the first switch K1, second switch K2, third switch K3, fourth switch K4, fifth switch K5, and sixth switch K6. For example, when the latch signal is 1, the first switch K1 and second switch K2 are turned on, while the third switch K3, fourth switch K4, fifth switch K5, and sixth switch K6 are turned off. The oscillator provides a clock signal, allowing the counter to count based on both the clock signal and the latch signal.

[0068] In one possible embodiment, the first temperature detection voltage V BE1 With the second temperature detection voltage V BE2 The difference between them is the PTAT voltage V. PTAT .

[0069] PTAT voltage V PTAT The first temperature detection voltage V BE1 With the second temperature detection voltage V BE2 The difference between them, i.e., V PTAT =V BE1 -V BE2 .

[0070] In one possible embodiment, see Figure 5The charging and discharging switching circuit 11 is specifically used to control the third switch K3 and the fourth switch K4 to be in the conducting state, detect the absolute value of the difference between the voltage at the inverting input terminal of the first operational amplifier AMP1 and the voltage at the inverting input terminal of the second operational amplifier AMP2, and obtain the error voltage V0.

[0071] Obtain the temperature difference change voltage ΔV, where the temperature difference change voltage is the change in temperature detection voltage corresponding to a 1 degree Celsius change in temperature.

[0072] Calculate the ratio between the error voltage V0 and the temperature difference change voltage ΔV, and determine the preset adjustment value Nfix.

[0073] In this embodiment, a specific step is provided to determine the preset adjustment value Nfix, see [link to documentation]. Figure 5 First, the third switch K3 and the fourth switch K4 are turned on. At this time, the non-inverting input of the first operational amplifier AMP1 is connected to the first reference voltage V. REF1 The non-inverting input of the second operational amplifier AMP2 is connected to the second reference voltage V. REF2 Connect the inverting input terminal of the first operational amplifier AMP1 and the inverting input terminal of the second operational amplifier AMP2, detect the voltage difference between the voltage at the inverting input terminal of the first operational amplifier AMP1 and the voltage at the inverting input terminal of the second operational amplifier AMP2, and calculate the absolute value of the difference to obtain the error voltage V0.

[0074] The connection point between the inverting input terminal and the output terminal of the first operational amplifier AMP1 is defined as node A; the connection point between the inverting input terminal and the second terminal of the fifth resistor R5 is defined as node B. By connecting nodes A and B respectively, the voltage difference between nodes A and B is measured, and the absolute value of the difference is calculated to obtain the error voltage V0.

[0075] The temperature difference voltage ΔV is the change in PTAT voltage corresponding to a temperature change of 1 degree Celsius (i.e., 1℃). In other words, the temperature difference voltage ΔV is the slope of the temperature characteristic curve of the detected PTAT voltage. Therefore, the temperature difference voltage ΔV can be obtained in advance.

[0076] The preset adjustment value Nfix is ​​determined by calculating the ratio between the error voltage V0 and the temperature difference voltage ΔV, i.e., Nfix = V0 / ΔV, and is then written into the register for programming. In the first and third stages, the charging duration of the charge-discharge switching circuit 11 is the time taken for the counting control circuit 12 to count up to the preset adjustment value Nfix.

[0077] In this embodiment of the application, in the process of determining the preset adjustment value Nfix, it is necessary to first calculate the error voltage V0. In the process of calculating the error voltage V0, it is necessary to connect the non-inverting input terminal of the first operational amplifier AMP1 to the first reference voltage V. REF1 The non-inverting input of the second operational amplifier AMP2 is connected to the second reference voltage V. REF2 This process can be used to adjust the first reference voltage V. REF1 Second reference voltage V REF2 The corresponding error is adjusted using a preset adjustment value Nfix. Additionally, the temperature difference voltage ΔV needs to be obtained. ΔV represents the slope of the temperature characteristic curve of the detected PTAT voltage. This process also allows for the adjustment of the error corresponding to the slope of the PTAT voltage's temperature characteristic curve using the preset adjustment value Nfix. In other words, by determining the preset adjustment value Nfix, the errors corresponding to the slopes of the temperature characteristic curves of both the reference voltage and the PTAT voltage can be adjusted together, reducing calibration costs.

[0078] See Figure 5 The voltage detected at node A includes the offset voltage of the first operational amplifier AMP1, and the voltage detected at node B includes the offset voltage of the second operational amplifier AMP2. When the sum of the offset voltages of the first operational amplifier AMP1 and the second operational amplifier AMP2 is set to VOS, the first measured value N1 obtained after passing through the first and second stages includes the error introduced by the offset voltages of the first and second operational amplifiers AMP1. Therefore, the first measured value N1 corresponds to (V... REF1 -V REF2 ) / 3+VOS, and furthermore, based on the above process of determining the preset adjustment value Nfix, the adjustment value Nfix corresponds to (V REF1 -V REF2 From -VOS, we can obtain the relation: N1 / Nfix = [(V REF1 -V REF2 ) / 3+VOS〕 / 〔(V REF1 -V REF2 Based on this relationship, the sum of the offset voltages of the first operational amplifier AMP1 and the second operational amplifier AMP2 can be calculated as (3N1-Nfix) / 4. For example, when the first measured value N1 is 120 and Nfix is ​​100, substituting into the relationship (3N1-Nfix) / 4, the sum of the offset voltages of the first operational amplifier AMP1 and the second operational amplifier AMP2 is 65, that is, 65 of 120 is the error caused by VOS.

[0079] The second measured value N2 includes the error introduced by the offset voltage of the first operational amplifier AMP1 and the second operational amplifier AMP2, as well as the detected PTAT voltage V. PTAT The existing error is determined by subtracting the error caused by VOS from the offset voltage of the first operational amplifier AMP1 and the second operational amplifier AMP2 using the first measurement value N1. This yields the PTAT voltage V after the first calibration. PTAT At this time, the PTAT voltage V PTAT Only the PTAT voltage V was detected PTAT The existing error requires a second calibration. Specifically, based on the first measurement value N1, the second measurement value N2, and the preset adjustment value Nfix, the first calibration value N3 is calculated using the formula N3 = N2 - (3N1 - Nfix) / 4. Here, (3N1 - Nfix) / 4 represents the error caused by VOS.

[0080] As can be seen from the above embodiments, V is set in this application. REF_DIV -V REF2 = (V REF1 -V REF2 The relationship obtained is (3N1-Nfix) / 4. In the digital operation circuit 200, the logical relationship of multiplying by 3 or dividing by 4 is easy to implement. Therefore, setting the relationship between each resistor in the voltage divider circuit of this application can reduce the difficulty of the digital operation circuit 200.

[0081] See Figure 5 Since the charge / discharge switching circuit 11 includes a first operational amplifier AMP1 and a second operational amplifier AMP2, it will introduce an offset voltage (VOS), which will affect the PTAT voltage V. PTAT The measurement accuracy is affected by the fact that the offset voltage (VOS) can be either positive or negative. Directly measured offset voltage (VOS) cannot guarantee polarity. In this application, the first measured value N1 corresponds to (V... REF1 -V REF2 The polarity of VOS is positive, ensuring that the charging / discharging switching circuit 11 is charging during the first stage when the counting control circuit 12 counts to the preset adjustment value Nfix. Therefore, the error caused by VOS can be obtained through the first measured value N1.

[0082] After subtracting the error caused by VOS from the second measured value N2, a second calibration is required. By performing single-point temperature calibration at room temperature, no additional equipment is needed for high-temperature and low-temperature testing, thus reducing testing costs. The measured PTAT voltage V... PTATPerforming the first and second calibrations improved the accuracy of temperature detection.

[0083] See Figure 5 If the voltage at node A is set to V2 and the voltage at node B to V1, then V2 is equal to the voltage applied to the non-inverting input of the first operational amplifier AMP1 and its offset voltage. Similarly, V1 is equal to the voltage applied to the non-inverting input of the second operational amplifier AMP2 and its offset voltage. When the charge / discharge switching circuit begins charging, the corresponding charging voltage is V1-V2. Since the voltages applied in the first and third stages are different, the charging voltages V1-V2 corresponding to the first and third stages are also different.

[0084] See Figure 5 The process of detecting the first measured value N1 or the second measured value N2 is as follows: First, the integrating capacitor C1 is reset by controlling the reset switch K8. The charging voltage during the charging process is V1-V2, where V1 is greater than V2. The charging and discharging control switch K7 is controlled to be in the conducting state, and the first switch K1, the second switch K2 or the fifth switch K5 and the sixth switch K6 are controlled to be in the conducting state to charge the integrating capacitor C1. When the second comparator COMP starts to flip, counting begins. When the counter counts to the preset adjustment value Nfix, charging stops, and the charging and discharging control switch K7 is controlled to be in the off state to realize the charging process.

[0085] Then, the third switch K3 and the fourth switch K4 are controlled to be in the conducting state to discharge the integrating capacitor C1, and the discharge voltage is V. REF2 -V REF1 The counter is reset, and the charge / discharge control switch K7 is turned on again. The counting control circuit 12 starts counting from zero until the second comparator COMP flips again, at which point the counting stops. The count value of the counter at this time is either the first measured value N1 or the second measured value N2.

[0086] In this application, the calibration process for the temperature readout circuit is as follows: First, a preset adjustment value Nfix is ​​determined and written into a register. Second, a first measurement value N1 is measured through the first and second stages, and a second measurement value N2 is measured through the third and fourth stages. Based on the first measurement value N1, the second measurement value N2, and the preset adjustment value Nfix, a first calibration value N3 is obtained, in which the offset voltage of the operational amplifier has been eliminated. Then, single-point temperature calibration is performed. The temperature offset value Noffset is calculated, and the temperature offset value Noffset is subtracted from the first calibration value N3. The resulting target temperature value eliminates the offset voltage of the operational amplifier and also eliminates the interference in the temperature readout circuit when detecting the PTAT voltage V.PTAT The error that exists at the time is addressed by analyzing the detected PTAT voltage V. PTAT Performing the first and second calibrations improved the accuracy of temperature detection.

[0087] See Figure 6 , Figure 6 A timing diagram of a temperature readout circuit provided in an embodiment of this application is shown below. Figure 6 As shown, firstly, the operating state of the temperature readout circuit is controlled by the enable signal. When the enable signal is high, the temperature readout circuit starts working; when the enable signal switches from high to low, the temperature readout circuit stops enabling and returns to its initial state. The charge / discharge gate signal is used to control the switching state of the charge / discharge control switch K7. During the charging and discharging phases, the charge / discharge gate signal is high; at the end of the charging or discharging phase, the charge / discharge gate signal is low.

[0088] See Figure 6 The capacitor voltage reset signal is used to control the switching state of the reset switch K8 to reset the integrating capacitor C1. When the enable signal switches to a high level, the capacitor voltage reset signal needs to be set to a high level first to control the reset switch K8 to the on state, thereby resetting the integrating capacitor C1. After the reset is completed, the capacitor voltage reset signal switches to a low level to control the reset switch K8 to the off state, allowing for subsequent charging or discharging.

[0089] See Figure 6 The charge / discharge direction control signal controls whether the integrating capacitor C1 is in the charging or discharging stage. When the charge / discharge direction control signal is high, the integrating capacitor C1 is in the charging stage; when the charge / discharge direction control signal is low, the integrating capacitor C1 is in the discharging stage. The measurement object control signal controls the temperature readout circuit to measure the PTAT voltage V. PTAT Whether to perform a measurement or to measure a reference voltage, for example, when the control signal of the object being measured is low, the measurement is of the reference voltage; when the control signal of the object being measured is high, the measurement is of the PTAT voltage V. PTAT Measurements are performed. The charging / discharging direction control signal is related to the measurement object control signal. When the charging / discharging direction control signal is high, the integrating capacitor C1 is in the charging stage. Based on the above embodiment, both the first and third stages are charging stages. When the measurement object control signal is low, the reference voltage is measured, which requires controlling the fifth switch K5 and the sixth switch K6 to be in the conducting state; the corresponding charging stage is the first stage. When the measurement object control signal is high, the PTAT voltage V is measured. PTATMeasurement requires controlling the first switch K1 and the second switch K2 to be in the conducting state, corresponding to the third charging stage. Specifically, the switching states of the first switch K1, second switch K2, third switch K3, fourth switch K4, fifth switch K5, and sixth switch K6 can be controlled via charging / discharging direction control signals and measurement object control signals, thereby controlling the input signals for the first, second, third, and fourth stages. This enables the charging or discharging of the integrating capacitor C1.

[0090] See Figure 6 The comparator output signal is the output signal from the comparator's output terminal. When the voltage at the output terminal of the second operational amplifier AMP2 is higher than the toggle threshold, the comparator output signal is high; when the voltage at the output terminal of the second operational amplifier AMP2 is lower than the toggle threshold, the comparator output signal is low. The comparator output signal switching between high and low levels indicates that the comparator has toggled. The counter starts counting from zero, counting to the preset adjustment value Nfix in the first stage, counting to the first measured value N1 in the second stage, counting to the preset adjustment value Nfix in the third stage, and counting to the second measured value N2 in the fourth stage. The counter needs to be reset before counting.

[0091] See Figure 6 In the first stage, both the fifth switch K5 and the sixth switch K6 are turned on, while the first switch K1, the second switch K2, the third switch K3, and the fourth switch K4 are turned off. The integrating capacitor C1 is charged, and the voltage waveform across the integrating capacitor C1 shows an upward trend. Then, the fifth switch K5, the sixth switch K6, the first switch K1, the second switch K2, the third switch K3, and the fourth switch K4 are all turned off, and the voltage waveform across the integrating capacitor C1 shows a linear trend. In the second stage, both the third switch K3 and the fourth switch K4 are turned on, while the fifth switch K5, the sixth switch K6, the first switch K1, and the second switch K2 are turned off. The integrating capacitor C1 is discharged, and the voltage waveform across the integrating capacitor C1 shows a downward trend.

[0092] In the third stage, both the first switch K1 and the second switch K2 are turned on, while the third switch K3, the fourth switch K4, the fifth switch K5, and the sixth switch K6 are turned off. The integrating capacitor C1 is charged, and the voltage waveform across C1 shows an upward trend. Then, the fifth switch K5, the sixth switch K6, the first switch K1, the second switch K2, the third switch K3, and the fourth switch K4 are all turned off, and the voltage waveform across C1 shows a linear trend. In the fourth stage, both the third switch K3 and the fourth switch K4 are turned on, while the fifth switch K5, the sixth switch K6, the first switch K1, and the second switch K2 are all turned off. The integrating capacitor C1 is discharged, and the voltage waveform across C1 shows a downward trend. The flip-flop threshold provides the comparator's flip-flop voltage. The flip-flop threshold can be set to a voltage value slightly higher than 0V; for example, it can be set to 100mV.

[0093] See Figure 6 The temperature readout circuit operates as follows: When the enable signal is high, the temperature readout circuit starts working. First, the capacitor voltage reset signal is set to high to reset the integrating capacitor C1. After the reset is complete, it enters the first stage, waiting for the comparator's output signal to flip. When the voltage across the integrating capacitor C1 is higher than the flip threshold, the comparator flips and starts a fixed timer. After a fixed delay of Nfix × Tclk (the counter counts to the preset adjustment value Nfix, and the time for each count is Tclk, so the fixed delay is Nfix × Tclk), the fixed timer ends. First, the charging / discharging direction control signal is switched to low to open the charging / discharging control switch K7. Then, the charging / discharging direction control signal is switched to low again, and the charging stage ends.

[0094] In the second stage, the counter is reset to zero and the timing restarts, waiting for the comparator to flip. The counter counts until the comparator flips; after the comparator's output signal flips, the counting stops, the charging / discharging direction control signal is switched to low level, and the charging / discharging control switch K7 is opened, ending the discharging stage. Through the first and second stages, the first measurement is completed, obtaining the first measurement value N1. The first measurement value N1 is saved, the counter is reset to zero, and the system switches to measurement mode. Through the third and fourth stages, the second measurement is completed, obtaining the second measurement value N2, where the first temperature detection voltage V is measured. BE1 Second temperature detection voltage V BE2 To achieve control over PTAT voltage V PTAT The measurement (i.e., the measurement of V) PTAT The purpose of measuring the first measurement value N1 is to measure the offset voltage (i.e., VOS) of the first operational amplifier AMP1 and the second operational amplifier AMP2, and to eliminate the influence of operational amplifier offset through the first measurement value N1.

[0095] The timing sequence of each control signal is the same in the first and second measurements, so it will not be repeated here.

[0096] This application also provides a temperature readout circuit calibration method, which is applied to the temperature readout circuit as described in the above embodiments. See [link to relevant documentation]. Figure 7 , Figure 7 A flowchart of a temperature readout circuit calibration method provided in this application embodiment is shown below. Figure 7 As shown, the temperature readout circuit calibration method includes: S1, divide the bandgap reference voltage to obtain a first reference voltage, a second reference voltage and a third reference voltage. The difference between the third reference voltage and the second reference voltage is equal to one-third of the difference between the first reference voltage and the second reference voltage, and the first reference voltage is greater than the second reference voltage.

[0097] S2, determine the preset adjustment value.

[0098] S3, in the first stage, the third reference voltage and the second reference voltage are connected to enable the charge-discharge switching circuit to start charging. When the counting control circuit counts to the preset adjustment value, charging is stopped. In the second stage, the second reference voltage and the first reference voltage are connected to enable the charge-discharge switching circuit to start discharging. The counting control circuit starts counting from zero. When its own output voltage is lower than the flip threshold, the counting control circuit stops counting and obtains the first measurement value.

[0099] S4, in the third stage, the first temperature detection voltage and the second temperature detection voltage are connected to enable the charge-discharge switching circuit to start charging. When the counting control circuit counts to the preset adjustment value, charging is stopped. In the fourth stage, the second reference voltage and the first reference voltage are connected to enable the charge-discharge switching circuit to start discharging. The counting control circuit starts counting from zero. When its own output voltage is lower than the flip threshold, the counting control circuit stops counting and obtains the second measurement value.

[0100] S5. Calculate the first calibration value based on the first measurement value, the second measurement value, and the preset adjustment value.

[0101] S6: Obtain the current temperature value detected by the temperature reading circuit at room temperature, calculate the difference between the current temperature value and the room temperature value, and obtain the temperature offset value.

[0102] S7, calculate the difference between the first calibration value and the temperature offset value to obtain the target temperature value, where the room temperature value is the digital value corresponding to room temperature.

[0103] In this embodiment, the bandgap reference voltage is divided to obtain a first reference voltage, a second reference voltage, and a third reference voltage. The difference between the third reference voltage and the second reference voltage is equal to one-third of the difference between the first and second reference voltages, and the first reference voltage is greater than the second reference voltage. First, a preset adjustment value is determined. In the first stage, the third and second reference voltages are connected to start the charge / discharge switching circuit charging. Charging stops when the counting control circuit reaches the preset adjustment value. In the second stage, the second and first reference voltages are connected to start the charge / discharge switching circuit discharging, and the counting control circuit starts counting from zero. Counting stops when the output voltage of the charge / discharge switching circuit is lower than the flip threshold, obtaining a first measurement value. In the third stage, the first and second temperature detection voltages are connected to start the charge / discharge switching circuit charging. Charging stops when the counting control circuit reaches the preset adjustment value. In the fourth stage, the second and first reference voltages are connected to start the charge / discharge switching circuit discharging, and the counting control circuit starts counting from zero. Counting stops when the output voltage of the charge / discharge switching circuit is lower than the flip threshold, obtaining a second measurement value. Based on the first measured value, the second measured value, and the preset adjustment value, the first calibration value is calculated to achieve the adjustment of the PTAT voltage V. PTAT The first calibration is performed; the current temperature value detected by the temperature readout circuit at room temperature is obtained, and the difference between the current temperature value and the room temperature value is calculated to obtain the temperature offset value; the difference between the first calibration value and the temperature offset value is calculated to obtain the target temperature value, thereby realizing the adjustment of the PTAT voltage V. PTAT The second calibration; by measuring the detected PTAT voltage V PTAT Performing the first and second calibrations improves the accuracy of temperature detection; and the use of single-point temperature calibration eliminates the need for additional equipment for high and low temperature testing, thus reducing testing costs.

[0104] In one possible embodiment, the difference between the first temperature detection voltage and the second temperature detection voltage is the PTAT voltage; step S2 above includes: S21 controls the third and fourth switches to be in the on state, detects the absolute value of the difference between the voltage at the inverting input terminal of the first operational amplifier and the voltage at the inverting input terminal of the second operational amplifier, and obtains the error voltage.

[0105] S22, acquire the temperature difference change voltage, where the temperature difference change voltage is the change in PTAT voltage corresponding to a 1 degree Celsius change in temperature.

[0106] S23, calculate the ratio between the error voltage and the temperature difference change voltage, and determine the preset adjustment value.

[0107] In this embodiment, determining the preset adjustment value requires first calculating the error voltage. During this calculation, the non-inverting input of the first operational amplifier is connected to a first reference voltage, and the non-inverting input of the second operational amplifier is connected to a second reference voltage. This process allows the errors corresponding to the first and second reference voltages to be adjusted using the preset adjustment value. Additionally, the temperature difference voltage, which is the slope of the temperature characteristic curve of the detected PTAT voltage, also needs to be obtained. This process allows the error corresponding to the slope of the PTAT voltage's temperature characteristic curve to be adjusted using the preset adjustment value. In other words, by determining the preset adjustment value, the errors corresponding to the slopes of the temperature characteristic curves of both the reference voltage and the PTAT voltage can be adjusted together, reducing calibration costs.

[0108] This application also provides a chip, which includes the temperature readout circuit as described above.

[0109] This chip can be an LED (Light-Emitting Diode) backlight driver chip, or other chips with temperature detection capabilities.

[0110] This application also provides an electronic device, including: the chip as described above.

[0111] Electronic devices may include, but are not limited to: displays, smartphones, tablets, smart home devices, vehicles, and wearable devices.

[0112] Finally, it should be noted that the above embodiments are merely specific implementations of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A temperature readout circuit, characterized in that, The temperature readout circuit includes: a dual-slope integral analog-to-digital converter circuit and a digital arithmetic circuit; the dual-slope integral analog-to-digital converter circuit includes: a voltage divider circuit, a charge / discharge switching circuit, and a counting control circuit; the charge / discharge switching circuit is electrically connected to the voltage divider circuit and the counting control circuit, respectively. The voltage divider circuit is used to divide the bandgap reference voltage to obtain a first reference voltage, a second reference voltage, and a third reference voltage. The difference between the third reference voltage and the second reference voltage is equal to one-third of the difference between the first reference voltage and the second reference voltage, and the first reference voltage is greater than the second reference voltage. The charge / discharge switching circuit is used to determine a preset adjustment value; it is also used to connect the third reference voltage and the second reference voltage in the first stage to start charging, and stop charging when the counting control circuit counts to the preset adjustment value; in the second stage, connect the second reference voltage and the first reference voltage to start discharging, and the counting control circuit starts counting from zero, and stops counting when its output voltage is lower than the flip threshold, obtaining a first measurement value; in the third stage, connect the first temperature detection voltage and the second temperature detection voltage to start charging, and stop charging when the counting control circuit counts to the preset adjustment value; in the fourth stage, connect the second reference voltage and the first reference voltage to start discharging, and the counting control circuit starts counting from zero, and stops counting when its output voltage is lower than the flip threshold, obtaining a second measurement value; The digital processing circuit is used to calculate a first calibration value based on the first measured value, the second measured value, and the preset adjustment value; it is also used to obtain the current temperature value detected by the temperature reading circuit at room temperature, calculate the difference between the current temperature value and the room temperature value to obtain a temperature offset value; and calculate the difference between the first calibration value and the temperature offset value to obtain a target temperature value, wherein the room temperature value is a digital quantity corresponding to room temperature.

2. The temperature readout circuit according to claim 1, characterized in that, The voltage divider circuit includes: a first resistor, a second resistor, a third resistor, and a fourth resistor; the resistance values ​​of the first resistor, the third resistor, and the fourth resistor are all equal, and the resistance value of the second resistor is twice the resistance value of the third resistor; The first end of the first resistor is connected to the bandgap reference voltage, and the second end of the first resistor is electrically connected to the first end of the second resistor, and serves as the first output terminal of the voltage divider circuit for outputting the first reference voltage. The second end of the second resistor is electrically connected to the first end of the third resistor and serves as the third output terminal of the voltage divider circuit for outputting the third reference voltage. The second end of the third resistor is electrically connected to the first end of the fourth resistor and serves as the second output terminal of the voltage divider circuit for outputting the second reference voltage. The second terminal of the fourth resistor is grounded.

3. The temperature readout circuit according to claim 1, characterized in that, The charge / discharge switching circuit includes: a first switch, a second switch, a third switch, a fourth switch, a fifth switch, a sixth switch, a charge / discharge control switch, a reset switch, a fifth resistor, an integrating capacitor, a first operational amplifier, and a second operational amplifier; The first terminal of the first switch is used to connect to the first temperature detection voltage, the first terminal of the third switch is used to connect to the first reference voltage, the first terminal of the fifth switch is used to connect to the second reference voltage, and the second terminal of the first switch is electrically connected to the second terminal of the third switch, the second terminal of the fifth switch, and the non-inverting input terminal of the first operational amplifier, respectively. The first terminal of the second switch is used to connect to the second temperature detection voltage, the first terminal of the fourth switch is used to connect to the second reference voltage, the first terminal of the sixth switch is used to connect to the third reference voltage, and the second terminal of the second switch is electrically connected to the second terminal of the fourth switch, the second terminal of the sixth switch, and the non-inverting input terminal of the second operational amplifier, respectively. The inverting input terminal of the first operational amplifier is electrically connected to the output terminal of the first operational amplifier and the first terminal of the charge / discharge control switch, respectively, and the second terminal of the charge / discharge control switch is electrically connected to the first terminal of the fifth resistor; The second end of the fifth resistor is electrically connected to the inverting input of the second operational amplifier, the first end of the integrating capacitor, the first end of the reset switch, and the counting control circuit, respectively. The second terminal of the integrating capacitor is electrically connected to the second terminal of the reset switch, the output terminal of the second operational amplifier, and the counting control circuit.

4. The temperature readout circuit according to claim 3, characterized in that, The counting control circuit includes: a second comparator, a latch logic circuit, an oscillator, and a counter; The non-inverting input of the second comparator is electrically connected to the output of the second operational amplifier, the inverting input of the second comparator is electrically connected to the second terminal of the fifth resistor, and the output of the second comparator is electrically connected to the latch logic circuit; the latch logic circuit is electrically connected to the counter and the charge / discharge switching circuit, respectively, and the oscillator is electrically connected to the counter; The oscillator is used to provide a clock signal; The comparator is used to compare the output voltage of the charge-discharge switching circuit with the flip threshold and output a comparison result logic signal. The latch logic circuit is used to latch the comparison result logic signal to obtain a latch signal, so that the charge-discharge switching circuit controls the switching states of the first switch, the second switch, the third switch, the fourth switch, the fifth switch and the sixth switch according to the latch signal; The counter is used to count based on the clock signal and the latch signal.

5. The temperature readout circuit according to claim 4, characterized in that, The difference between the first temperature detection voltage and the second temperature detection voltage is the PTAT voltage.

6. The temperature readout circuit according to claim 5, characterized in that, The charge / discharge switching circuit is specifically used to control the third switch and the fourth switch to be in the on state, detect the absolute value of the difference between the voltage at the inverting input terminal of the first operational amplifier and the voltage at the inverting input terminal of the second operational amplifier, and obtain the error voltage. The temperature difference change voltage is obtained, wherein the temperature difference change voltage is the change in the PTAT voltage corresponding to a 1 degree Celsius change in temperature; Calculate the ratio between the error voltage and the temperature difference change voltage to determine the preset adjustment value.

7. The temperature readout circuit according to claim 4, characterized in that, The digital processing circuit is used to calculate the first calibration value based on the first measurement value, the second measurement value, and the preset adjustment value, using the formula N3=N2-(3N1-Nfix) / 4, where N3 is the first calibration value, N1 is the first measurement value, N2 is the second measurement value, and Nfix is ​​the preset adjustment value.

8. A method for calibrating a temperature readout circuit, characterized in that, The temperature readout circuit calibration method is applied to the temperature readout circuit as described in claim 1, and the temperature readout circuit calibration method includes: The bandgap reference voltage is divided to obtain a first reference voltage, a second reference voltage, and a third reference voltage. The difference between the third reference voltage and the second reference voltage is equal to one-third of the difference between the first reference voltage and the second reference voltage, and the first reference voltage is greater than the second reference voltage. Determine the preset adjustment value; In the first stage, the third reference voltage and the second reference voltage are connected to enable the charge-discharge switching circuit to start charging. When the counting control circuit counts to a preset adjustment value, charging stops. In the second stage, the second reference voltage and the first reference voltage are connected to enable the charge-discharge switching circuit to start discharging. The counting control circuit starts counting from zero. When its output voltage is lower than the flip threshold, the counting control circuit stops counting and obtains the first measurement value. In the third stage, the first temperature detection voltage and the second temperature detection voltage are connected to start the charging and discharging switching circuit to start charging. When the counting control circuit counts to the preset adjustment value, charging stops. In the fourth stage, the second reference voltage and the first reference voltage are connected to start the charging and discharging switching circuit to start discharging. The counting control circuit starts counting from zero. When its output voltage is lower than the flip threshold, the counting control circuit stops counting and obtains the second measurement value. Calculate the first calibration value based on the first measurement value, the second measurement value, and the preset adjustment value; The temperature reading circuit obtains the current temperature value detected at room temperature, calculates the difference between the current temperature value and the room temperature value, and obtains the temperature offset value. The difference between the first calibration value and the temperature offset value is calculated to obtain the target temperature value, wherein the room temperature value is the digital quantity corresponding to room temperature.

9. A chip, characterized in that, include: The temperature readout circuit as described in any one of claims 1-7.

10. An electronic device, characterized in that, include: The chip as described in claim 9.