Temperature measurement circuit, temperature measurement method, device and storage medium
By introducing series resistor and switch control circuits into the temperature measurement circuit, combining the voltage follow-up circuit and the ADC measurement module, the inaccurate temperature measurement problems caused by aging of the power supply circuit and errors in the voltage measurement module are solved, and accurate temperature information is obtained and reduced Hardware costs.
Patent Information
- Application Number
- CN202411231021.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-09-04
AI Technical Summary
The existing thermometer-based temperature measurement circuit based on thermistors leads to voltage deviation due to aging or failure of the power supply circuit, and measurement errors lead to aging of the voltage measurement module, resulting in inaccurate temperature information and increasing hardware costs for calibration equipment.
A temperature measurement circuit is designed. Through a series resistor and switch control circuit, the voltage follower circuit and the ADC voltage measurement module are used to measure the errors of the power supply potential and voltage measurement module, and calculate the current resistance value of the thermistor to obtain accurate temperature information.
It effectively reduces the impact of voltage deviation and measurement error on temperature measurement, provides accurate temperature information, and avoids the increase in hardware costs.
Smart Images

Figure CN118730325B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of temperature measurement technology, and in particular to a temperature measurement circuit and a temperature measurement method, device and storage medium. Background Art
[0002] The resistance of a thermistor changes with temperature. Therefore, the temperature information of the environment in which the thermistor is located can be determined by detecting the resistance of the thermistor.
[0003] The following problems may exist in the current mainstream thermistor-based temperature measurement circuit:
[0004] 1. The actual voltage output by the power supply circuit that provides the thermistor with working voltage deviates from the ideal value due to aging or failure.
[0005] 2. The voltage measurement module used to detect the voltage value may deviate from the actual voltage due to aging or failure.
[0006] Therefore, if the voltage deviation and measurement error are not considered when measuring temperature information using such a temperature measurement circuit, the determined temperature information may seriously deviate from the actual temperature. Using additional calibration equipment to calibrate the output value of the power supply circuit and the measurement value of the voltage measurement module will increase the hardware cost. Summary of the invention
[0007] In view of this, the present application proposes a temperature measurement circuit and method, device and storage medium.
[0008] In a first aspect, a temperature measurement circuit is proposed, characterized in that it includes:
[0009] A first resistor, connected between a power supply potential and a first node, wherein the power supply potential is provided by a power supply circuit;
[0010] a second resistor connected in series with the first resistor between the first node and the second node;
[0011] a third resistor connected between the second node and the ground potential in series with the first resistor and the second resistor;
[0012] a thermistor and a first switch connected in series with each other between the first node and a ground potential;
[0013] A voltage follower circuit, comprising an input terminal and a follower terminal, wherein a voltage of the follower terminal changes by following a change in a voltage of the input terminal in a manner that is kept equal to a voltage of the input terminal, wherein the input terminal is connected to the power supply potential via a second switch, to the first node via a third switch, and to the second node via a fourth switch;
[0014] The ADC voltage measurement module is connected to the follower terminal and is used to measure the voltage of the follower terminal.
[0015] In some possible implementations, the voltage follower circuit includes:
[0016] The operational amplifier has a non-inverting input terminal, an inverting input terminal and an output terminal, wherein the inverting input terminal is connected to the output terminal, the non-inverting input terminal constitutes the input terminal of the voltage follower circuit, and the output terminal constitutes the follower terminal of the ADC voltage measurement module.
[0017] In some possible implementations, the second switch, the third switch, and the fourth switch are all transistors, and the temperature measurement circuit further includes a switch control circuit connected to the gate of the second switch, the gate of the third switch, and the gate of the fourth switch, and the switch control circuit is configured to control the second switch, the third switch, and the fourth switch to be selectively turned on.
[0018] In some possible implementations, the second switch, the third switch, and the fourth switch are all N-type transistors, and the switch control circuit includes:
[0019] A first N-type transistor and a second N-type transistor are connected in series with each other between the power supply potential and the gate of the second switch;
[0020] A first P-type transistor and a second P-type transistor are connected in series with each other between the power supply potential and the gate of the third switch;
[0021] a third N-type transistor and a third P-type transistor connected in series with each other between the power supply potential and the gate of the fourth switch;
[0022] a first input node, connected to the gates of the first N-type transistor, the first P-type transistor and the third N-type transistor, respectively, and configured to receive a high level signal and a low level signal;
[0023] The second input node is respectively connected to the gates of the second N-type transistor, the second P-type transistor and the third P-type transistor, and is configured to receive a high level signal and a low level signal.
[0024] In a second aspect, a temperature measurement method is proposed, which is applied to the temperature measurement circuit as described in the first aspect, comprising:
[0025] The first switch, the second switch and the third switch are turned off, and the fourth switch is turned on, and a first voltage of the follower terminal measured by the ADC voltage measurement module is obtained;
[0026] The first switch, the second switch and the fourth switch are turned off, and the third switch is turned on, and a second voltage of the follower terminal measured by the ADC voltage measurement module is obtained;
[0027] The first switch, the third switch and the fourth switch are turned off, and the second switch is turned on, and a third voltage of the follower terminal measured by the ADC voltage measurement module is obtained;
[0028] Determine a voltage deviation of the power supply potential and an offset error value and a gain error value measured by the ADC voltage measurement module based on the first voltage, the second voltage, and the third voltage;
[0029] The second switch and the third switch are disconnected, the first switch and the fourth switch are turned on, and the fourth voltage of the following terminal measured by the ADC voltage measurement module is obtained; or the second switch and the fourth switch are disconnected, the first switch and the third switch are turned on, and the fourth voltage of the following terminal measured by the ADC voltage measurement module is obtained;
[0030] determining a current resistance value of the thermistor based on the fourth voltage, the voltage deviation, the offset error value, and the gain error value;
[0031] A current temperature of the thermistor is determined based on the current resistance value.
[0032] In some possible implementations, determining the voltage deviation of the power supply potential and the offset error and gain error measured by the ADC voltage measurement module based on the first voltage, the second voltage, and the third voltage includes:
[0033] The voltage deviation of the power supply potential and the offset error and gain error measured by the ADC voltage measurement module are determined according to the following equations (1), (2) and (3):
[0034] ,
[0035] ,
[0036] ,
[0037] Wherein, V0 is the ideal voltage of the supply potential, V e is the voltage deviation, V f is the offset error, g is the gain error, V1 is the first voltage, V2 is the second voltage, V3 is the third voltage, R1 is the resistance value of the first resistor, R2 is the resistance value of the second resistor, and R3 is the resistance value of the third resistor.
[0038] In some possible implementations, when the second switch and the third switch are turned off and the first switch and the fourth switch are turned on,
[0039] The determining the current resistance value of the thermistor based on the fourth voltage, the voltage deviation, the offset error value and the gain error value comprises:
[0040] The current resistance value of the thermistor is determined according to the following formula (4):
[0041] ,
[0042] Wherein, R0 is the current resistance value of the thermistor.
[0043] In some possible implementations, when the second switch and the fourth switch are turned off and the first switch and the third switch are turned on,
[0044] The determining the current resistance value of the thermistor based on the fourth voltage, the voltage deviation, the offset error value and the gain error value comprises:
[0045] The current resistance value of the thermistor is determined according to the following formula (5):
[0046] ,
[0047] Wherein, R0 is the current resistance value of the thermistor.
[0048] In a third aspect, a temperature measuring device is proposed, comprising:
[0049] The temperature measuring circuit as described in the first aspect,
[0050] a memory storing a computer program, and
[0051] a processor connected to the memory;
[0052] When the processor executes the computer program, the temperature measurement method as described in the second aspect is implemented.
[0053] In a fourth aspect, a computer-readable storage medium is proposed, which stores a computer program. When the computer program is executed by a computer, the temperature measurement method described in the second aspect is implemented.
[0054] According to the temperature measurement circuit and temperature measurement method proposed in the present application, the voltage error of the power supply potential and the measurement error of the ADC voltage measurement module are fully considered. Therefore, the current resistance value of the thermistor can be accurately determined based on the power supply of the power supply potential and the voltage measurement of the ADC voltage measurement module, thereby accurately obtaining relevant temperature information. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings of the embodiments will be briefly introduced below. Obviously, the drawings in the following description only relate to some embodiments of the present application, rather than limiting the present application.
[0056] Figure 1 is a schematic diagram of the structure of the temperature measurement circuit provided in the embodiment of the present application;
[0057] Figure 2 is a schematic diagram of the structure of a switch control circuit provided in an embodiment of the present application;
[0058] Figure 3 is a schematic flow chart of a temperature measurement method provided in an embodiment of the present application;
[0059] Figure 4 It is a schematic flow chart of the temperature measurement method provided in an embodiment of the present application.
[0060] Description of reference numerals:
[0061] R0-thermistor, R1-first resistor, R2-second resistor, R3-third resistor, R4-fourth resistor, R5-fifth resistor;
[0062] 11-first node, 12-second node, 21-first input node, 22-second input node;
[0063] Vsys-power supply potential, GND-ground potential;
[0064] OP-operational amplifier;
[0065] K1-first switch, K2-second switch, K3-third switch, K4-fourth switch;
[0066] T1 is a first N-type transistor, T2 is a second N-type transistor, T3 is a first P-type transistor, T4 is a second P-type transistor, T5 is a third N-type transistor, and T6 is a third P-type transistor. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme of the embodiment of the present application will be clearly and completely described below in conjunction with the drawings of the embodiment of the present application. Obviously, the described embodiment is a part of the embodiment of the present application, rather than all the embodiments. Based on the described embodiment of the present application, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of this application. It can be understood that, in the absence of conflict, some technical means of the various embodiments described herein can be replaced or combined with each other.
[0068] In the description of this application, if there are terms such as "first", "second", etc., they are only used to distinguish the objects described and do not have any order or technical meaning. Therefore, an object defined as "first", "second", etc. may explicitly or implicitly include one or more of the objects, and, for example, the term "first element" itself does not mean the existence of the "second element", and the term "second element" itself does not mean the existence of the "first element". In addition, "one" or "a" and similar words do not indicate a quantity limitation, but rather indicate the existence of at least one, and "multiple" means not less than two.
[0069] In the description of this application, if there is a term "based on" or "according to", it is used to describe one or more factors that affect the determination. The term does not exclude additional factors that affect the determination. That is, the determination may be based only on these factors or at least partially on these factors. For example, the phrase "based on A, B is determined". In this case, A is a factor that affects the determination of B. This phrase does not exclude that the determination of B may also be based on C.
[0070] In the description of the present application, if the term “configured to” is present, it can generally be interchanged with “having the ability to…”, “designed to”, “for” or “able to” depending on the context.
[0071] Figure 1 The temperature measurement circuit provided in an embodiment of the present application is shown, and the temperature measurement circuit mainly includes a thermistor R0, a first resistor R1, a second resistor R2, a third resistor R3, a voltage follower circuit and an ADC voltage measurement module.
[0072] The first resistor R1, the second resistor R2 and the third resistor R3 are connected in series between the power supply potential Vsys and the ground potential GND in sequence. The power supply potential Vsys is provided by the corresponding power supply circuit, which is generally a standard fixed value. However, as the power supply circuit ages, the actual voltage of the power supply potential Vsys is likely to deviate from the ideal value (ideal voltage) of the original design. More specifically, the first resistor R1 is connected between the power supply potential Vsys and the first node 11, the second resistor R2 is connected in series with the first resistor R1 between the first node 11 and the second node 12, and the third resistor R3 is connected in series with the first resistor R1 and the second resistor R2 between the second node 12 and the ground potential GND. Therefore, the potential of the first node 11 is higher than the voltage of the second node 12.
[0073] The thermistor R0 and the first switch K1 are connected in series with each other between the first node 11 and the ground potential GND.
[0074] The voltage follower circuit has an input terminal and a follower terminal, and the voltage of the follower terminal changes in a manner that is equal to the voltage of the input terminal, following the change of the voltage of the input terminal, that is, when the voltage introduced into the input terminal of the voltage follower circuit is changed, the voltage of the follower terminal of the voltage follower circuit also changes accordingly, and the two always remain equal. In addition, the input terminal of the voltage follower circuit is connected to the power supply potential Vsys via the second switch K2, to the first node 11 via the third switch K3, and to the second node 12 via the fourth switch K4. Therefore, when only one of the second switch K2, the third switch K3 and the fourth switch K4 is turned on, the input terminal voltage and the follower terminal voltage of the voltage follower circuit are respectively equal to the voltage of the power supply potential Vsys, the first node 11 or the second node 12.
[0075] The ADC voltage measurement module is connected to the following end of the voltage follower circuit and is used to measure the voltage of the following end.
[0076] Specifically, the voltage follower circuit includes an operational amplifier OP, which has a non-inverting input terminal P1, an inverting input terminal P2 and an output terminal P3, wherein the inverting input terminal P2 is connected to the output terminal P3 via a fourth resistor R4 (protection resistor), the non-inverting input terminal P1 constitutes the aforementioned input terminal of the voltage follower circuit, and the output terminal P3 constitutes the aforementioned follower terminal of the ADC voltage measurement module. In addition, the output terminal P3 of the operational amplifier OP is connected to the ADC voltage measurement module via a fifth resistor R5 (protection resistor).
[0077] The voltage follower circuit has the characteristics of high input impedance and low output impedance, and the output voltage is close to the input voltage amplitude. It presents a high-impedance state to the upper circuit and a low-impedance state to the lower circuit, which can isolate the interference of the previous and next circuits.
[0078] In this embodiment, the first switch K1, the second switch K2, the third switch K3 and the fourth switch K4 are all transistors, and the second switch K2, the third switch K3 and the fourth switch K4 are all N-type transistors. In addition, the temperature measurement circuit further includes a switch control circuit connected to the gate of the second switch K2, the gate of the third switch K3 and the gate of the fourth switch K4, and the switch control circuit is configured to control the second switch K2, the third switch K3 and the fourth switch K4 to be turned on selectively.
[0079] like Figure 2As shown, the switch control circuit includes a first N-type transistor T1, a second N-type transistor T2, a third N-type transistor T5, a first P-type transistor T3, a second P-type transistor T4, a third P-type transistor T6, a first input node 21 and a second input node 22. The first N-type transistor T1 and the second N-type transistor T2 are connected in series between the power supply potential Vsys and the gate of the second switch K2, the first P-type transistor T3 and the second P-type transistor T4 are connected in series between the power supply potential Vsys and the gate of the third switch K3, and the third N-type transistor T5 and the third P-type transistor T6 are connected in series between the power supply potential Vsys and the gate of the fourth switch K4. The first input node 21 is connected to the gates of the first N-type transistor T1, the first P-type transistor T3 and the third N-type transistor T5, respectively, and is configured to receive a high level signal and a low level signal. The second input node 22 is connected to the gates of the second N-type transistor T2, the second P-type transistor T4 and the third P-type transistor T6, respectively, and is also configured to receive a high level signal and a low level signal.
[0080] When both the first input node 21 and the second input node 22 receive a high level signal, the first N-type transistor T1, the second N-type transistor T2 and the third N-type transistor T5 are all turned on, while the first P-type transistor T3, the second P-type transistor T4 and the third P-type transistor T6 are all turned off. Therefore, only the gate of the second switch K2 receives the voltage of the power supply potential Vsys and thus works in the on state, while the third switch K3 and the fourth switch K4 work in the off state because the gate cannot receive the voltage of the power supply potential Vsys. Therefore, the input terminal P1 of the voltage follower circuit is connected to the power supply potential Vsys, and the voltage measured by the ADC voltage measurement module is the voltage of the power supply potential Vsys.
[0081] When both the first input node 21 and the second input node 22 receive a low level signal, the first N-type transistor T1, the second N-type transistor T2 and the third N-type transistor T5 are all turned off, while the first P-type transistor T3, the second P-type transistor T4 and the third P-type transistor T6 are all turned on. Therefore, only the gate of the third switch K3 receives the voltage of the power supply potential Vsys and thus works in the on state, while the second switch K2 and the fourth switch K4 work in the off state because the gate cannot receive the voltage of the power supply potential Vsys. Therefore, the input terminal P1 of the voltage follower circuit is connected to the first node 11, and the voltage measured by the ADC voltage measurement module is the voltage of the first node 11.
[0082] When the first input node 21 receives a high level signal and the second input node 22 receives a low level signal, the first N-type transistor T1, the third N-type transistor T5, the second P-type transistor T4 and the third P-type transistor T6 are all turned on, while the second N-type transistor T2, the first P-type transistor T3 and the second P-type transistor T4 are all turned off. Therefore, only the gate of the fourth switch K4 receives the voltage of the power supply potential Vsys and thus works in the on state, while the second switch K2 and the third switch K3 work in the off state because the gate cannot receive the voltage of the power supply potential Vsys. Therefore, the input terminal P1 of the voltage follower circuit is connected to the second node 12, and the voltage measured by the ADC voltage measurement module is the voltage of the second node 12.
[0083] When the first input node 21 receives a low level signal and the second input node 22 receives a high level signal, the first N-type transistor T1, the third N-type transistor T5, the second P-type transistor T4 and the third P-type transistor T6 are all turned off, and the second N-type transistor T2, the third and the first P-type transistors T3 are all turned off. Therefore, each of the second switch K2, the third switch K3 and the fourth switch K4 all work in the disconnected state because the gate cannot receive the voltage of the power supply potential Vsys. Therefore, the input terminal P1 of the voltage follower circuit is not connected to the voltage divider circuit formed by the first to fourth resistors, and the voltage follower circuit and the ADC voltage measurement module are disconnected from the temperature measurement circuit.
[0084] It can be seen that no matter whether each of the first input node 21 and the second input node 22 receives a high level signal or a low level signal, in the second switch K2, the third switch K3 and the fourth switch K4, there will not be more than two switches turned on at the same time, so the first resistor R1 or the second resistor R2 will not be short-circuited. It can be understood that the occurrence of the short-circuit phenomenon may cause excessive current in the circuit and severe heating. In addition, if the system does not take into account the change in the circuit state caused by the short circuit of the relevant device (such as the first resistor R1), it will cause the resistance value of the thermistor R0 determined by the system to have a large deviation. In addition, the switch control circuit can also realize the complete disconnection of the second switch K2, the third switch K3 and the fourth switch K4, thereby disconnecting the voltage follower circuit and the ADC voltage measurement module from the temperature measurement circuit, thereby making the working mode of the temperature measurement circuit more diversified.
[0085] In addition, the switch control circuit uses the voltage of the power supply potential Vsys as the turn-on voltage of the second switch K2, the third switch K3 and the fourth switch K4, and has the following advantages: if the power supply circuit is seriously aged or fails, resulting in excessive reduction of the voltage of the power supply potential Vsys, then no matter how the level state of the first input node 21 and the second input node 22 is controlled, each of the second switch K2, the third switch K3 and the fourth switch K4 cannot be turned on, and therefore, effective voltage measurement information cannot be obtained from the ADC voltage measurement module, and further, the resistance value of the thermistor R0 and the corresponding temperature information cannot be effectively obtained. Therefore, when the above situation occurs, it can reflect that the power supply circuit is likely to have a fault, thereby helping to improve the efficiency of the operator's troubleshooting of the power supply circuit.
[0086] Next, see Figure 3 The embodiment of the present application also proposes a temperature measurement method applied to the above-mentioned temperature measurement circuit, and the temperature measurement method includes:
[0087] S301 , the first switch K1 , the second switch K2 , and the third switch K3 are turned off, and the fourth switch K4 is turned on, to obtain a first voltage of the follower terminal measured by an ADC voltage measurement module.
[0088] For example, you can control Figure 2 The first input node 21 of the switch control circuit receives a high level signal, and the second input node 22 receives a low level signal, so that the fourth switch K4 is turned on, the second switch K2 and the third switch K3 are turned off, and the first switch K1 is turned off by applying a high level signal or a low level signal to the gate of the first switch K1. At this time, the thermistor R0 is disconnected from the circuit, the first resistor R1, the second resistor R2 and the third resistor R3 form a typical series voltage divider circuit, and the first voltage measured by the ADC voltage measurement module is the voltage of the second node 12.
[0089] S302 , the first switch K1 , the second switch K2 , and the fourth switch K4 are turned off, and the third switch K3 is turned on, to obtain a second voltage of the follower terminal measured by the ADC voltage measurement module.
[0090] For example, you can control Figure 2 The first input node 21 and the second input node 22 of the switch control circuit shown receive low-level signals at the same time, so that the third switch K3 is turned on, the second switch K2 and the fourth switch K4 are turned off, and the first switch K1 is turned off by applying a high-level signal or a low-level signal to the gate of the first switch K1. At this time, the thermistor R0 is disconnected from the circuit, the first resistor R1, the second resistor R2 and the third resistor R3 form a typical series voltage divider circuit, and the first voltage measured by the ADC voltage measurement module is the voltage of the first node 11.
[0091] S303 , the first switch K1 , the third switch K3 , and the fourth switch K4 are turned off, and the second switch K2 is turned on, to obtain a third voltage of the follower terminal measured by the ADC voltage measurement module.
[0092] For example, you can control Figure 2 The first input node 21 and the second input node 22 of the switch control circuit shown receive high-level signals at the same time, so that the second switch K2 is turned on, the third switch K3 and the fourth switch K4 are turned off, and the first switch K1 is turned off by applying a high-level signal or a low-level signal to the gate of the first switch K1. At this time, the thermistor R0 is disconnected from the circuit, the first resistor R1, the second resistor R2 and the third resistor R3 form a typical series voltage divider circuit, and the third voltage measured by the ADC voltage measurement module is the voltage of the power supply potential Vsys.
[0093] S304 , determining a voltage deviation of the power supply potential Vsys and an offset error value and a gain error value measured by an ADC voltage measurement module based on the first voltage, the second voltage, and the third voltage.
[0094] As mentioned above, the voltage of the power supply potential Vsys is a standard fixed value under ideal conditions. However, as the power supply circuit ages, the actual voltage of the power supply potential Vsys will deviate from the ideal value of the original design, that is, the ideal voltage, wherein the ideal voltage is known to the system (e.g., 3.3V), but the voltage deviation between the actual voltage and the ideal voltage is unknown.
[0095] In addition, the important component in the ADC voltage measurement module is the ADC (Analog-to-Digital Converter). After long-term use, it will produce measurement errors due to factors such as hardware aging. Among them, offset error and gain error are the two most common and main errors in ADC.
[0096] Therefore, if it is desired to accurately determine the current resistance value of the thermistor R0 based on the power supply of the power supply potential Vsys and the voltage measurement of the ADC voltage measurement module, and thereby accurately obtain the current temperature of the thermistor R0, the voltage error of the aforementioned power supply potential Vsys and the measurement error of the ADC voltage measurement module (mainly offset error and gain error) should be considered.
[0097] Assume that the actual voltage of the power supply potential Vsys is V a , the ideal voltage of the power supply potential Vsys is V0, and the voltage deviation between the actual voltage of the power supply potential Vsys and the ideal voltage is V e , then there exists V a =V0+V e Among them, V e Can be negative.
[0098] Assume that the actual measured voltage of the input ADC voltage measurement module is V b , and the measured voltage given by the ADC voltage measurement module when measuring the actual measured voltage is V c , the offset error of the ADC voltage measurement module is V f , the gain error is g, then there is a relationship V b =(V c -V f ) / g. Among them, V f Can be a negative value. For an ideal ADC voltage measurement module, its offset error V f is 0, and the gain error g is 1.
[0099] The aforementioned first voltage, second voltage and third voltage are all measurement voltages provided by the ADC voltage measurement module, and the measurement voltage may have the aforementioned measurement error with the voltage input to the ADC voltage measurement module, ie, the follower terminal voltage of the voltage follower circuit.
[0100] Based on the above discussion and Ohm quantification, the following relationships (1), (2) and (3) can be obtained:
[0101] ,
[0102] ,
[0103] ,
[0104] In the equations (1), (2), (3), and (4) and (5) described later, V0 is the ideal value of the power supply potential Vsys, V e is the voltage deviation, V f is the offset error, g is the gain error, V1 is the first voltage, V2 is the second voltage, V3 is the third voltage, R1 is the resistance of the first resistor R1 (here, in order to facilitate readers to distinguish the reference numerals of resistors and the resistance algebra of resistors, the two are intentionally distinguished: the resistance algebra of resistors uses subscripts, while the reference numerals of resistors do not use subscripts), R2 is the resistance of the second resistor R2, and R3 is the resistance of the third resistor R3. Among them, V0, V1, V2, V3, R1, R2 and R3 are all known values, only V e 、V f and g are unknown quantities. Based on the equations (1), (2) and (3), V can be obtained. e 、V f And g, that is, the voltage deviation of the power supply potential Vsys and the offset error and gain error measured by the ADC voltage measurement module can be determined based on equations (1), (2) and (3).
[0105] S305 , disconnect the second switch K2 and the third switch K3 , and turn on the first switch K1 and the fourth switch K4 , to obtain a fourth voltage of the follower terminal measured by the ADC voltage measurement module.
[0106] For example, you can use Figure 2 The first input node 21 of the switch control circuit receives a high level signal, and the second input node 22 receives a low level signal, so that the fourth switch K4 is turned on, the second switch K2 and the third switch K3 are turned off, and the first switch K1 is turned on by applying a low level signal or a high level signal to the gate of the first switch K1. At this time, the thermistor R0 is connected to the voltage divider circuit, which is connected in parallel with the series branch formed by the second resistor R2 and the third resistor R3, and the fourth voltage measured by the ADC voltage measurement module is the voltage of the second node 12.
[0107] S306 , determining a current resistance value of thermistor R0 based on the fourth voltage, the voltage deviation, the offset error, and the gain error.
[0108] Specifically, based on Ohm's law, the following equation (4) can be obtained, and the current resistance value of thermistor R0 can be determined according to equation (4):
[0109] ,
[0110] Wherein, R0 is the current resistance value of the thermistor R0, and V4 is the fourth voltage.
[0111] S307, determining the current temperature of thermistor R0 based on the current resistance value.
[0112] In some embodiments, a temperature determination module coupled to the aforementioned ADC voltage measurement module may be configured, or the temperature determination module may be directly integrated inside the ADC voltage measurement module, and the aforementioned steps S306 and S307 may be completed based on the temperature determination module.
[0113] It is important to point out that see Figure 4 , the aforementioned step S305 can also be replaced by the following step S305a.
[0114] S305a, disconnect the second switch K2 and the fourth switch K4, and turn on the first switch K1 and the third switch K3, to obtain a fourth voltage of the follower terminal measured by the ADC voltage measurement module.
[0115] For example, you can use Figure 2The first input node 21 and the second input node 22 of the switch control circuit shown receive low-level signals at the same time, so that the third switch K3 is turned on, the second switch K2 and the fourth switch K4 are turned off, and the first switch K1 is turned on by applying a low-level signal or a high-level signal to the gate of the first switch K1. At this time, the thermistor R0 is connected to the voltage divider circuit, which is connected in parallel with the series branch formed by the second resistor R2 and the third resistor R3, and the fourth voltage measured by the ADC voltage measurement module is the voltage of the first node 11.
[0116] When step S305 is replaced by S305a, step S306 of the temperature measurement method may specifically include:
[0117] The current resistance of thermistor R0 is determined according to the following formula (5):
[0118] .
[0119] It should be understood that both the method corresponding to step S305 and the method corresponding to step S305a may be performed. For example, the first current temperature of the thermistor R0 may be determined based on step S305, and then the second current temperature of the thermistor R0 may be determined based on step S305a, and finally the average of the first current temperature and the second current temperature may be used as the current temperature of the thermistor R0.
[0120] An embodiment of the present application also provides a temperature measurement device, including the above-mentioned temperature measurement circuit, a memory storing a computer program, and a processor connected to the memory. When the processor executes the computer program, the temperature measurement method described above is implemented.
[0121] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a computer, the temperature measurement method as described above is implemented.
[0122] In addition, an embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a computer, implements the temperature measurement method as described above.
Claims
1. A temperature measurement method, applied to a temperature measurement circuit, characterized in that: The temperature measurement circuit comprises: A first resistor, connected between a power supply potential and a first node, wherein the power supply potential is provided by a power supply circuit; a second resistor connected in series with the first resistor between the first node and the second node; a third resistor connected between the second node and the ground potential in series with the first resistor and the second resistor; a thermistor and a first switch connected in series with each other between the first node and a ground potential; A voltage follower circuit, comprising an input terminal and a follower terminal, wherein a voltage of the follower terminal changes by following a change in a voltage of the input terminal in a manner that is kept equal to a voltage of the input terminal, wherein the input terminal is connected to the power supply potential via a second switch, to the first node via a third switch, and to the second node via a fourth switch; An ADC voltage measurement module, connected to the follower terminal, for measuring the voltage of the follower terminal; The temperature measurement method comprises: Disconnect the first switch, the second switch, and the third switch, and turn on the fourth switch to obtain a first voltage of the follower terminal measured by the ADC voltage measurement module; The first switch, the second switch and the fourth switch are turned off, and the third switch is turned on, and a second voltage of the follower terminal measured by the ADC voltage measurement module is obtained; The first switch, the third switch and the fourth switch are turned off, and the second switch is turned on, and a third voltage of the follower terminal measured by the ADC voltage measurement module is obtained; Determine a voltage deviation of the power supply potential and an offset error value and a gain error value measured by the ADC voltage measurement module based on the first voltage, the second voltage, and the third voltage; The second switch and the third switch are disconnected, the first switch and the fourth switch are turned on, and the fourth voltage of the following terminal measured by the ADC voltage measurement module is obtained; or the second switch and the fourth switch are disconnected, the first switch and the third switch are turned on, and the fourth voltage of the following terminal measured by the ADC voltage measurement module is obtained; determining a current resistance value of the thermistor based on the fourth voltage, the voltage deviation, the offset error value, and the gain error value; A current temperature of the thermistor is determined based on the current resistance value.
2. The temperature measurement method according to claim 1, characterized in that: The determining, based on the first voltage, the second voltage, and the third voltage, the voltage deviation of the power supply potential and the offset error and the gain error measured by the ADC voltage measurement module comprises: The voltage deviation of the power supply potential and the offset error and gain error measured by the ADC voltage measurement module are determined according to the following equations (1), (2) and (3): Wherein, V0 is the ideal voltage of the supply potential, V e is the voltage deviation, V f is the offset error, g is the gain error, V1 is the first voltage, V2 is the second voltage, V3 is the third voltage, R1 is the resistance value of the first resistor, R2 is the resistance value of the second resistor, and R3 is the resistance value of the third resistor.
3. The temperature measurement method according to claim 2, characterized in that: When the second switch and the third switch are turned off and the first switch and the fourth switch are turned on, The determining the current resistance value of the thermistor based on the fourth voltage, the voltage deviation, the offset error value and the gain error value comprises: The current resistance value of the thermistor is determined according to the following formula (4): Wherein, R0 is the current resistance value of the thermistor, and V4 is the fourth voltage.
4. The temperature measurement method according to claim 2, characterized in that: When the second switch and the fourth switch are turned off and the first switch and the third switch are turned on, The determining the current resistance value of the thermistor based on the fourth voltage, the voltage deviation, the offset error value and the gain error value comprises: The current resistance value of the thermistor is determined according to the following formula (5): Wherein, R0 is the current resistance value of the thermistor, and V4 is the fourth voltage.
5. A temperature measuring device, characterized in that: include: Temperature measurement circuit, a memory storing a computer program, and a processor connected to the memory; When the processor executes the computer program, the temperature measurement method according to any one of claims 1 to 4 is implemented.
6. A computer-readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a computer, the temperature measurement method according to any one of claims 1 to 4 is implemented.