Temperature sampling circuit design method
By dynamically calculating and adjusting the voltage divider resistance according to the temperature sampling range, the flexibility and accuracy problems caused by the fixed voltage divider resistance value in traditional temperature sampling circuits are solved, and high-precision temperature detection in different temperature ranges is achieved.
Patent Information
- Application Number
- CN202411046300.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-11-22
AI Technical Summary
The traditional temperature sampling circuit fixes the resistance value of the voltage divider resistor, resulting in a fixed voltage divider resistor value for any temperature range, which limits the flexibility and accuracy of temperature sampling, especially when the temperature changes by 1°C in low and high temperature zones. Accurate and fast detection.
According to the temperature sampling range, query the RT table to obtain the thermistor resistance value at three consecutive temperatures, calculate the resistance value of the voltage divider, and dynamically adjust the voltage divider through the judgment of key temperature values and the parallel connection and switching control of multiple voltage divider resistances. Resistors to meet accuracy requirements.
It improves the flexibility and accuracy of temperature sampling, solves the problem of inaccurate temperature changes in traditional methods, and realizes high-precision temperature detection in different temperature ranges.
Smart Images

Figure CN118999822A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of temperature sampling, and in particular to a temperature sampling circuit design method. Background Art
[0002] As a temperature-sensitive resistor device, thermistor can significantly change its resistance value as the ambient temperature changes, thereby achieving accurate temperature perception.
[0003] In the prior art, temperature sampling accuracy is a key parameter, especially in applications that require precise temperature control. Traditional temperature sampling circuits fix the resistance of the voltage divider resistor, and use a fixed voltage divider resistor value for any temperature range, thereby limiting the flexibility and accuracy of temperature sampling. For example, the voltage divider resistor value is selected as the resistance value of the thermistor at 25°C, and the curve of the voltage divider voltage sampling value changing with temperature is obtained as follows: Figure 1 When located in the low temperature zone (before T1) and the high temperature zone (after T2), the thermistor changes little for every 1°C change in temperature, resulting in a small change in the divided voltage sampling value. The temperature change cannot be detected accurately and quickly, and the calculated temperature error is large. Summary of the invention
[0004] The embodiments of this specification provide a temperature sampling circuit design method, aiming to solve one or more of the above problems and other potential problems.
[0005] In order to achieve the above objectives, the following technical solutions are provided:
[0006] According to a first aspect of the specification, a temperature sampling circuit design method is provided, the method comprising:
[0007] Determine the resistance value of the thermistor based on the temperature sampling range;
[0008] Based on the thermistor and the temperature sampling range, calculating the voltage divider resistor required by the temperature sampling circuit;
[0009] The temperature sampling circuit is formed according to the thermistor and the voltage-dividing resistor with determined resistance values; the temperature sampling circuit comprises: a power supply voltage VCC is connected to one end of the thermistor; the other end of the thermistor is connected to one end of the voltage-dividing resistor, and the other end of the voltage-dividing resistor is grounded; the connection line between the thermistor and the voltage-dividing resistor is connected to a controller, and the controller outputs a voltage signal at both ends of the voltage-dividing resistor;
[0010] Wherein, based on the thermistor and the temperature sampling range, calculating the voltage divider resistor required by the temperature sampling circuit includes:
[0011] According to the temperature sampling range, query the RT table to obtain the resistance values of the thermistor at three consecutive temperatures in the temperature interval corresponding to the temperature sampling range in the RT table, and calculate the voltage signals at both ends of the voltage divider resistor at three consecutive temperatures in sequence. When calculating the voltage signal V at both ends of the voltage divider resistor at a temperature within the temperature sampling range s When the resistance R of the thermistor is the resistance R of the thermistor at the temperature in the RT table, the resistance R' of the voltage divider resistor takes a constant value in any temperature sampling range; the resistance R' of the thermistor and its corresponding temperature are recorded in the RT table; if the value of the voltage signal across the voltage divider resistor at the current temperature minus the voltage signal across the voltage divider resistor at the previous temperature is less than the accuracy setting value, and the value of the voltage signal across the voltage divider resistor at the next temperature minus the voltage signal across the voltage divider resistor at the current temperature is greater than the accuracy setting value, then the current temperature is the critical temperature value; otherwise, the resistance R of the thermistor at three consecutive temperatures is obtained from the RT table again, and the voltage signal calculation across the voltage divider resistor at three consecutive temperatures and the critical temperature value judgment process are repeated;
[0012] The resistance value of the voltage divider resistor is calculated according to the critical temperature value.
[0013] According to a second aspect of the specification, a temperature sampling circuit design method is provided, the method comprising:
[0014] Determine the resistance value of the thermistor based on the temperature sampling range;
[0015] Based on the thermistor and the temperature sampling range, calculating the voltage divider resistor required by the temperature sampling circuit;
[0016] The temperature sampling circuit is formed according to the thermistor and the voltage-dividing resistor with determined resistance values; the temperature sampling circuit comprises: a power supply voltage VCC is connected to one end of the thermistor; the other end of the thermistor is respectively connected to one end of a plurality of parallel voltage-dividing resistors, the other ends of the plurality of voltage-dividing resistors are respectively connected to one end of a plurality of switches corresponding thereto and a controller, the other ends of the plurality of switches are grounded, and the controller controls the on and off of the plurality of switches based on the actual temperature sampling range; the plurality of voltage-dividing resistors include a first voltage-dividing resistor and a second voltage-dividing resistor;
[0017] The temperature sampling range includes a first temperature sampling interval and a second temperature sampling interval, the minimum temperature value of the first temperature sampling interval is the lower limit value of the temperature sampling range, and the maximum temperature value of the second temperature sampling interval is the upper limit value of the temperature sampling range; based on the thermistor and the temperature sampling range, calculating the voltage divider resistor required by the temperature sampling circuit includes:
[0018] According to the first temperature sampling interval of the temperature sampling range, query the RT table to obtain the resistance values of the thermistor at three consecutive temperatures in the first temperature interval corresponding to the first temperature sampling interval in the RT table, and calculate the voltage signals at both ends of the voltage divider resistor at the three consecutive temperatures in sequence. When calculating the voltage signal V at both ends of the voltage divider resistor at a temperature within the first temperature sampling interval s When the temperature of the first temperature interval and the corresponding resistance value of the thermistor and the temperature of the second temperature interval and the corresponding resistance value of the thermistor are recorded in the RT table; the minimum temperature value of the first temperature interval is the minimum temperature in the RT table, and the maximum temperature value of the second temperature interval is the maximum temperature in the RT table;
[0019] If the value of the voltage signal across the voltage-dividing resistor at the current temperature minus the voltage signal across the voltage-dividing resistor at the previous temperature is less than the first precision setting value, and the value of the voltage signal across the voltage-dividing resistor at the next temperature minus the voltage signal across the voltage-dividing resistor at the current temperature is greater than the first precision setting value, then the current temperature is the first critical temperature value of the first temperature sampling interval; otherwise, the resistance values of the thermistor at three consecutive temperatures are obtained from the RT table again, and the calculation of the voltage signal across the voltage-dividing resistor at three consecutive temperatures and the first critical temperature value judgment process are repeated;
[0020] According to the second temperature sampling interval of the temperature sampling range, query the RT table to obtain the resistance values of the thermistor at three consecutive temperatures in the second temperature interval corresponding to the second temperature sampling interval in the RT table, and calculate the voltage signals at both ends of the voltage divider resistor at the three consecutive temperatures in sequence. When calculating the voltage signal V at both ends of the voltage divider resistor at a temperature within the second temperature sampling interval sWhen the resistance R of the thermistor is the resistance R of the thermistor at the temperature in the RT table, the resistance R' of the voltage divider resistor takes a constant value in any of the temperature sampling ranges; if the value of the voltage signal across the voltage divider resistor at the current temperature minus the voltage signal across the voltage divider resistor at the previous temperature is less than the second precision setting value, and the value of the voltage signal across the voltage divider resistor at the next temperature minus the voltage signal across the voltage divider resistor at the current temperature is greater than the second precision setting value, then the current temperature is the second key temperature value of the second temperature sampling interval; otherwise, the resistance values of the thermistor at three consecutive temperatures are obtained from the RT table again, and the voltage signal calculation across the voltage divider resistor at three consecutive temperatures and the second key temperature value judgment process are repeated;
[0021] Obtain the resistance values of all thermistors between the minimum temperature value and the first key temperature value in the first temperature interval in the RT table, and average the resistance values of all thermistors to obtain the resistance value of the first voltage divider resistor in the first temperature sampling interval; obtain the resistance values of all thermistors between the second key temperature value and the maximum temperature value in the second temperature interval in the RT table, and average the resistance values of all thermistors to obtain the resistance value of the second voltage divider resistor in the second temperature sampling interval.
[0022] In some embodiments, the multiple switches include a first control switch and a second control switch respectively connected to the first voltage dividing resistor and the second voltage dividing resistor; when the actual temperature sampling range is in the first temperature sampling interval, the controller closes the first control switch; when the actual temperature sampling range is in the second temperature sampling interval, the controller closes the second control switch.
[0023] According to a third aspect of the specification, a temperature sampling circuit design method is provided, the method comprising:
[0024] Determine the resistance value of the thermistor based on the temperature sampling range;
[0025] Based on the thermistor and the temperature sampling range, calculating the voltage divider resistor required by the temperature sampling circuit;
[0026] The temperature sampling circuit is formed according to the thermistor and the voltage-dividing resistor with determined resistance values; the temperature sampling circuit comprises: a power supply voltage VCC is connected to one end of the thermistor; the other end of the thermistor is respectively connected to one end of a plurality of parallel voltage-dividing resistors, the other ends of the plurality of voltage-dividing resistors are respectively connected to one end of a plurality of switches corresponding thereto and a controller, the other ends of the plurality of switches are grounded, and the controller controls the on and off of the plurality of switches based on the actual temperature sampling range; the plurality of voltage-dividing resistors include a first voltage-dividing resistor, a second voltage-dividing resistor and a third voltage-dividing resistor;
[0027] The temperature sampling range includes a first temperature sampling interval, a second temperature sampling interval and a third temperature sampling interval, the minimum temperature value of the first temperature sampling interval is the lower limit value of the temperature sampling range, the maximum temperature value of the second temperature sampling interval is the upper limit value of the temperature sampling range, and the third temperature sampling interval is located between the first temperature sampling interval and the second temperature sampling interval; based on the thermistor and the temperature sampling range, calculating the voltage divider resistor required by the temperature sampling circuit includes:
[0028] According to the first temperature sampling interval of the temperature sampling range, query the RT table to obtain the resistance values of the thermistor at three consecutive temperatures in the first temperature interval corresponding to the first temperature sampling interval in the RT table, and calculate the voltage signals at both ends of the voltage divider resistor at the three consecutive temperatures in sequence. When calculating the voltage signal V at both ends of the voltage divider resistor at a temperature within the first temperature sampling interval s When the temperature is set to 0, the resistance R of the thermistor is the resistance of the thermistor at the temperature in the RT table, and the resistance R' of the voltage divider resistor takes a constant value in any temperature sampling range; the temperature of the first temperature interval and its corresponding resistance of the thermistor, the temperature of the second temperature interval and its corresponding resistance of the thermistor, and the temperature of the third temperature interval and its corresponding resistance of the thermistor are recorded in the RT table; the minimum temperature value of the first temperature interval is the minimum temperature in the RT table, the maximum temperature value of the second temperature interval is the maximum temperature in the RT table, and the third temperature interval is located between the first temperature interval and the second temperature interval;
[0029] If the value of the voltage signal across the voltage-dividing resistor at the current temperature minus the voltage signal across the voltage-dividing resistor at the previous temperature is less than the first precision setting value, and the value of the voltage signal across the voltage-dividing resistor at the next temperature minus the voltage signal across the voltage-dividing resistor at the current temperature is greater than the first precision setting value, then the current temperature is the first critical temperature value of the first temperature sampling interval; otherwise, the resistance values of the thermistor at three consecutive temperatures are obtained from the RT table again, and the calculation of the voltage signal across the voltage-dividing resistor at three consecutive temperatures and the first critical temperature value judgment process are repeated;
[0030] According to the second temperature sampling interval of the temperature sampling range, query the RT table to obtain the resistance values of the thermistor at three consecutive temperatures in the second temperature interval corresponding to the second temperature sampling interval in the RT table, and calculate the voltage signals at both ends of the voltage divider resistor at the three consecutive temperatures in sequence. When calculating the voltage signal V at both ends of the voltage divider resistor at a temperature within the second temperature sampling interval s When the resistance R of the thermistor is the resistance R of the thermistor at the temperature in the RT table, the resistance R' of the voltage divider resistor takes a constant value in any of the temperature sampling ranges; if the value of the voltage signal across the voltage divider resistor at the current temperature minus the voltage signal across the voltage divider resistor at the previous temperature is less than the second precision setting value, and the value of the voltage signal across the voltage divider resistor R' at the next temperature minus the voltage signal across the voltage divider resistor at the current temperature is greater than the second precision setting value, then the current temperature is the second key temperature value of the second temperature sampling interval; otherwise, the resistance values of the thermistor at three consecutive temperatures are obtained from the RT table again, and the voltage signal calculation across the voltage divider resistor at three consecutive temperatures and the second key temperature value judgment process are repeated;
[0031] Obtain the resistance values of all thermistors between the minimum temperature value in the first temperature interval and the first key temperature value in the RT table, and average the resistance values of all the thermistors to obtain the resistance value of the first voltage-dividing resistor in the first temperature sampling interval; obtain the resistance values of all thermistors between the maximum temperature value in the second temperature interval and the second key temperature value in the RT table, and average the resistance values of all thermistors to obtain the resistance value of the second voltage-dividing resistor in the second temperature sampling interval; the resistance value of the third voltage-dividing resistor in the third temperature sampling interval is the resistance value of the thermistor corresponding to the temperature of 25° C. in the RT table.
[0032] In some embodiments, re-obtaining the resistance value of the thermistor at three consecutive temperatures from the RT table, repeating the voltage signal calculation across the voltage divider resistor at three consecutive temperatures and the critical temperature value determination process, includes:
[0033] The next temperature after the current temperature in the previous calculation is used as the current temperature in this calculation, and the resistance values of the thermistor at three consecutive temperatures with the current temperature in this calculation as the intermediate temperature are obtained;
[0034] The voltage signal calculation across the voltage divider resistor and the critical temperature value determination process are repeated at three consecutive temperatures.
[0035] In some embodiments, the multiple switches include a first control switch, a second control switch, and a third control switch respectively connected to the first voltage-dividing resistor, the second voltage-dividing resistor, and the third voltage-dividing resistor; when the temperature sampling range is in the first temperature sampling interval, the controller closes the first control switch; when the temperature sampling range is in the second temperature sampling interval, the controller closes the second control switch; when the temperature sampling range is in the third temperature sampling interval, the controller closes the third control switch.
[0036] In some embodiments, the thermistor is a PTC thermistor or an NTC thermistor.
[0037] Beneficial effect: A temperature sampling circuit design method of this embodiment queries the RT table according to the temperature sampling range, obtains the resistance values of the thermistor at three consecutive temperatures in the temperature interval corresponding to the temperature sampling range in the RT table, determines the key temperature value that meets the accuracy requirement based on the resistance values of the thermistor at three consecutive temperatures, and calculates the resistance value of the voltage divider resistor in the temperature sampling range according to the key temperature value. This solves the problem that the resistance value of the voltage divider resistor is fixed in the traditional temperature sampling circuit, and a fixed voltage divider resistor value is used for any temperature range, thereby limiting the flexibility and accuracy of temperature sampling. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The above and other objects, features and advantages of the embodiments of the present specification will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present specification are shown by way of example and not limitation.
[0039] Figure 1 A diagram showing the relationship between temperature and a voltage signal across a fixed voltage-dividing resistor provided in an embodiment of this specification;
[0040] Figure 2 A flow chart of a temperature sampling circuit design method provided in an embodiment of this specification;
[0041] Figure 3 A first temperature sampling circuit diagram provided in the embodiment of this specification;
[0042] Figure 4 A schematic diagram of a flow chart of voltage divider resistance calculation provided in an embodiment of this specification;
[0043] Figure 5 This is a second temperature sampling circuit diagram provided in the embodiments of this specification.
[0044] In the various drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0045] The preferred embodiments of the present specification will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present specification are shown in the accompanying drawings, it should be understood that the present specification can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to make the present specification more thorough and complete, and to fully convey the scope of the present specification to those skilled in the art.
[0046] The term "including" and its variations used in this document represent open inclusion, that is, "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one other embodiment". Terms such as "upper", "lower", "front", and "rear" indicating placement or positional relationships are based on the orientation or positional relationships shown in the drawings, and are only for the convenience of describing the principles of this specification, and do not indicate or imply that the referred elements must have a specific orientation, be constructed or operate in a specific orientation, and therefore should not be understood as limitations on this specification.
[0047] In the sampling circuit using a fixed voltage divider resistor in the prior art, taking a certain NTC thermistor as an example, the resistance value of the voltage divider resistor is the resistance value of the NTC thermistor at a temperature of 25°C. The resistance value of the NTC thermistor is obtained by comparing the temperature with the specification sheet. The power supply voltage VCC is 3.3V, and the result is Figure 1 The embodiment of the present specification provides a temperature T and a voltage signal V across a fixed voltage divider resistor. s Relationship diagram. Figure 1 It can be seen that when the temperature is lower than T1 or higher than T2, the voltage signal V across the voltage divider resistor changes with each 1°C change in temperature. s The change is small, so the specific temperature cannot be accurately obtained, and high sampling accuracy of the controller is required. If this problem is solved by improving the accuracy of the controller, the cost will increase.
[0048] Embodiment 1:
[0049] Figure 2 A flow chart of a temperature sampling circuit design method provided in an embodiment of this specification is shown. A temperature sampling circuit design method in this embodiment includes:
[0050] S01. Determine the resistance value of the thermistor based on the temperature sampling range;
[0051] S02. Calculating a voltage divider resistor required for a temperature sampling circuit based on the thermistor and the temperature sampling range;
[0052] S03. Forming the temperature sampling circuit according to the thermistor and the voltage-dividing resistor having determined resistance values; the temperature sampling circuit comprising: a power supply voltage VCC connected to one end of the thermistor; the other end of the thermistor connected to one end of the voltage-dividing resistor, and the other end of the voltage-dividing resistor is grounded; a line between the thermistor and the voltage-dividing resistor is connected to a controller, and the controller outputs a voltage signal across the voltage-dividing resistor.
[0053] The method of the embodiment of this specification can be performed by a computer device, which can be a laptop computer, a desktop computer, a tablet computer, etc.
[0054] In order to solve the problem in the prior art that a fixed resistance value of a voltage divider resistor is used regardless of any temperature sampling range, resulting in low temperature sampling accuracy, this embodiment proposes calculating the resistance value of the voltage divider resistor corresponding to the temperature sampling range based on the temperature sampling range.
[0055] In step S01, since the resistance of the thermistor will change with the sampling temperature, before forming the temperature sampling circuit, the resistance of the thermistor needs to be determined according to the temperature sampling range. For example, a specification comparison table is pre-configured, and the specification comparison table stores thermistors of the specifications required for different temperature sampling ranges. When the required temperature sampling range is collected, the specification comparison table is matched to obtain the thermistor of the required specifications, including the model of the thermistor, the RT table of the thermistor, etc. Alternatively, the designer selects the thermistor of the corresponding specifications according to the required temperature sampling range and experience. After selection, relevant information of the thermistor can be obtained, including the model of the thermistor, the RT table of the thermistor, etc.
[0056] In step S02, this embodiment calculates a voltage divider resistor corresponding to the temperature sampling range according to the thermistor and the temperature sampling range.
[0057] Figure 4A schematic diagram of a flow chart of voltage divider resistor calculation provided in an embodiment of the present specification is shown, wherein the voltage divider resistor required by the temperature sampling circuit is calculated based on the thermistor and the temperature sampling range, including:
[0058] S1. According to the temperature sampling range, query the RT table to obtain the resistance values of the thermistor at three consecutive temperatures in the temperature interval corresponding to the temperature sampling range in the RT table, and calculate the voltage signals at both ends of the voltage divider resistor at three consecutive temperatures in sequence. When calculating the voltage signal V at both ends of the voltage divider resistor at a temperature within the temperature sampling range s When the resistance R of the thermistor is the resistance R of the thermistor at the temperature in the RT table, the resistance R' of the voltage divider resistor takes a constant value in any temperature sampling range; the resistance R' of the thermistor and its corresponding temperature are recorded in the RT table; if the value of the voltage signal across the voltage divider resistor at the current temperature minus the voltage signal across the voltage divider resistor at the previous temperature is less than the accuracy setting value, and the value of the voltage signal across the voltage divider resistor at the next temperature minus the voltage signal across the voltage divider resistor at the current temperature is greater than the accuracy setting value, then the current temperature is the critical temperature value; otherwise, the resistance R of the thermistor at three consecutive temperatures is obtained from the RT table again, and the voltage signal calculation across the voltage divider resistor at three consecutive temperatures and the critical temperature value judgment process are repeated;
[0059] S2. Calculate the resistance of the voltage divider resistor according to the critical temperature value.
[0060] In this embodiment, according to the temperature sampling range, the RT table is queried to obtain the resistance values of the thermistor at three consecutive temperatures in the temperature interval corresponding to the temperature sampling range in the RT table, and the key temperature value that meets the accuracy requirement is determined based on the resistance values of the thermistor at three consecutive temperatures, and the resistance value of the voltage divider resistor in the temperature sampling range is calculated according to the key temperature value.
[0061] The re-obtaining the resistance values of the thermistor at three consecutive temperatures from the RT table, repeating the voltage signal calculation across the voltage divider resistor at the three consecutive temperatures and the critical temperature value judgment process, includes: taking the subsequent temperature of the current temperature in the previous calculation as the current temperature in this calculation, obtaining the resistance values of the thermistor at three consecutive temperatures with the current temperature in this calculation as the intermediate temperature; repeating the voltage signal calculation across the voltage divider resistor at the three consecutive temperatures and the critical temperature value judgment process.
[0062] In step S1, according to the temperature sampling range, query the RT table to obtain the resistance values R1, R2, and R3 of the thermistor at three consecutive temperatures T1, T2, and T3 within the temperature range corresponding to the temperature sampling range in the RT table. Determine the key temperature value that meets the accuracy requirement based on the resistance values of the thermistor at three consecutive temperatures, and calculate the resistance value of the voltage-dividing resistor for this temperature sampling range. Among them, T1 < T2 < T3. When the sampling temperature is T1, the voltage signal across the voltage-dividing resistor When the sampling temperature is T2, the voltage signal across the voltage-dividing resistor When the sampling temperature is T3, the voltage signal across the voltage-dividing resistor Assume that the accuracy setting value is K. If V s 2 - V s 1 < K, and V s 3 - V s 2 > K, then the temperature corresponding to T2 is the key temperature value. If the condition V s 2 - V s 1 < K, and V s 3 - V s 2 > K is not satisfied, then re-obtain the resistance values of the thermistor at three consecutive temperatures from the RT table, such as obtaining the resistance values of the thermistor at three consecutive temperatures T2, T3, and T4, and repeat the above calculation process of the voltage signal across the voltage-dividing resistor and the judgment process of the key temperature value.
[0063] The accuracy setting value is set according to requirements. The accuracy setting value can be accurate to one decimal place, two decimal places, three decimal places, four decimal places, etc., such as 0.1, 0.01, 0.001, 0.0001, etc. This embodiment does not make specific limitations on the accuracy setting value.
[0064] In one example, for the voltage signals across the voltage-dividing resistor at temperatures T2, T3, and T4, calculate them respectively according to the above formula. Then make the following judgments on the calculated voltage signals:
[0065] When V s 3 - V s 2 < K, and V s 4 - V s 3 > K, determine that the temperature corresponding to T3 is the key temperature value; when not satisfied, re-obtain the resistance values of the thermistor at three consecutive temperatures from the RT table in the above manner.
[0066] In another example, obtain the voltage signals across the voltage-dividing resistor at temperatures T2 and T3 calculated in the previous calculation process. For the voltage signal across the voltage-dividing resistor at temperature T4 in the current calculation process.
[0067] Then the calculated voltage signal is judged as follows:
[0068] When V s 3-V s 2<K, and V s 4-V s 3>K, determine the temperature corresponding to T3 as the critical temperature value; when it is not satisfied, re-acquire the resistance values of the thermistor at three consecutive temperatures from the RT table in the above manner.
[0069] In step S03, based on the thermistor and the voltage divider resistor whose resistance values have been obtained, a Figure 3 The first temperature sampling circuit diagram provided by the embodiment of this specification is shown. The temperature sampling circuit includes: a power supply voltage VCC is connected to one end of a thermistor R, the other end of the thermistor R is connected to one end of a voltage divider resistor R', and the other end of the voltage divider resistor R' is grounded; the connection between the thermistor R and the voltage divider resistor R' is connected to a controller, and the controller outputs a voltage signal V at both ends of the voltage divider resistor. s .
[0070] Embodiment 2:
[0071] Further improvements are made on the basis of the first embodiment. Specifically, a temperature sampling circuit design method of this embodiment includes:
[0072] Determine the resistance value of the thermistor based on the temperature sampling range;
[0073] Based on the thermistor and the temperature sampling range, calculating the voltage divider resistor required by the temperature sampling circuit;
[0074] The temperature sampling circuit is formed according to the thermistor and the voltage-dividing resistor with determined resistance values; the temperature sampling circuit comprises: a power supply voltage VCC is connected to one end of the thermistor; the other end of the thermistor is respectively connected to one end of a plurality of parallel voltage-dividing resistors, the other ends of the plurality of voltage-dividing resistors are respectively connected to one end of a plurality of switches corresponding thereto and a controller, the other ends of the plurality of switches are grounded, and the controller controls the on and off of the plurality of switches based on the actual temperature sampling range; the plurality of voltage-dividing resistors include a first voltage-dividing resistor and a second voltage-dividing resistor;
[0075] The temperature sampling range includes a first temperature sampling interval and a second temperature sampling interval, the minimum temperature value of the first temperature sampling interval is the lower limit value of the temperature sampling range, and the maximum temperature value of the second temperature sampling interval is the upper limit value of the temperature sampling range; based on the thermistor and the temperature sampling range, calculating the voltage divider resistor required by the temperature sampling circuit includes:
[0076] According to the first temperature sampling interval of the temperature sampling range, query the RT table to obtain the resistance values of the thermistor at three consecutive temperatures in the first temperature interval corresponding to the first temperature sampling interval in the RT table, and calculate the voltage signals at both ends of the voltage divider resistor at the three consecutive temperatures in sequence. When calculating the voltage signal V at both ends of the voltage divider resistor at a temperature within the first temperature sampling interval s When the temperature of the first temperature interval and the corresponding resistance value of the thermistor and the temperature of the second temperature interval and the corresponding resistance value of the thermistor are recorded in the RT table; the minimum temperature value of the first temperature interval is the minimum temperature in the RT table, and the maximum temperature value of the second temperature interval is the maximum temperature in the RT table;
[0077] If the value of the voltage signal across the voltage-dividing resistor at the current temperature minus the voltage signal across the voltage-dividing resistor at the previous temperature is less than the first precision setting value, and the value of the voltage signal across the voltage-dividing resistor at the next temperature minus the voltage signal across the voltage-dividing resistor at the current temperature is greater than the first precision setting value, then the current temperature is the first critical temperature value of the first temperature sampling interval; otherwise, the resistance values of the thermistor at three consecutive temperatures are obtained from the RT table again, and the calculation of the voltage signal across the voltage-dividing resistor at three consecutive temperatures and the first critical temperature value judgment process are repeated;
[0078] According to the second temperature sampling interval of the temperature sampling range, query the RT table to obtain the resistance values of the thermistor at three consecutive temperatures in the second temperature interval corresponding to the second temperature sampling interval in the RT table, and calculate the voltage signals at both ends of the voltage divider resistor at the three consecutive temperatures in sequence. When calculating the voltage signal V at both ends of the voltage divider resistor at a temperature within the second temperature sampling interval sWhen the resistance R of the thermistor is the resistance R of the thermistor at the temperature in the RT table, the resistance R' of the voltage divider resistor takes a constant value in any of the temperature sampling ranges; if the value of the voltage signal across the voltage divider resistor at the current temperature minus the voltage signal across the voltage divider resistor at the previous temperature is less than the second precision setting value, and the value of the voltage signal across the voltage divider resistor at the next temperature minus the voltage signal across the voltage divider resistor at the current temperature is greater than the second precision setting value, then the current temperature is the second key temperature value of the second temperature sampling interval; otherwise, the resistance values of the thermistor at three consecutive temperatures are obtained from the RT table again, and the voltage signal calculation across the voltage divider resistor at three consecutive temperatures and the second key temperature value judgment process are repeated;
[0079] Obtain the resistance values of all thermistors between the minimum temperature value and the first key temperature value in the first temperature interval in the RT table, and average the resistance values of all thermistors to obtain the resistance value of the first voltage divider resistor in the first temperature sampling interval; obtain the resistance values of all thermistors between the second key temperature value and the maximum temperature value in the second temperature interval in the RT table, and average the resistance values of all thermistors to obtain the resistance value of the second voltage divider resistor in the second temperature sampling interval.
[0080] The re-obtaining the resistance values of the thermistor at three consecutive temperatures from the RT table, repeating the voltage signal calculation across the voltage divider resistor at the three consecutive temperatures and the critical temperature value judgment process, includes: taking the subsequent temperature of the current temperature in the previous calculation as the current temperature in this calculation, obtaining the resistance values of the thermistor at three consecutive temperatures with the current temperature in this calculation as the intermediate temperature; repeating the voltage signal calculation across the voltage divider resistor at the three consecutive temperatures and the critical temperature value judgment process.
[0081] According to the first temperature sampling interval of the temperature sampling range, query the RT table to obtain three consecutive temperatures T in the temperature interval corresponding to the first temperature sampling interval in the RT table. n-1 、T n and T n+1 The resistance values of the thermistor R(n-1), R(n) and R(n+1) under the temperature sampling range are determined, and the first key temperature value that meets the accuracy requirement is determined based on the resistance values of the thermistor under three consecutive temperatures, and the resistance value of the voltage divider resistor under the temperature sampling range is calculated according to the first key temperature value. n-1 <T n <T n+1 , at the sampling temperature T n-1 When the voltage signal across the voltage divider resistor is At the sampling temperature Tn When the voltage signal across the voltage divider resistor is At the sampling temperature T n+1 When the voltage signal across the voltage divider resistor is Assume that the first precision setting value is K1, if V s (n)-V s (n-1)<K1, and V s (n+1)-V s (n)>K1, then T n The corresponding temperature is the first critical temperature value. The resistance values of all thermistors between the minimum temperature value in the first temperature interval in the RT table and the first critical temperature value are averaged to obtain the resistance value of the first voltage divider resistor in the first temperature sampling interval.
[0082] According to the second temperature sampling interval of the temperature sampling range, query the RT table to obtain three consecutive temperatures T in the temperature interval corresponding to the second temperature sampling interval in the RT table. m-1 、T m and T m+1 The resistance values of the thermistor R(m-1), R(m) and R(m+1) under the temperature range of 10000 ℃ and 10000 ℃ are determined, and the second key temperature value that meets the accuracy requirement is determined based on the resistance values of the thermistor under three consecutive temperatures, and the resistance value of the voltage divider resistor under the temperature sampling range is calculated according to the second key temperature value. Wherein, T m-1 <T m <T m+1 , at the sampling temperature T m-1 When the voltage signal across the voltage divider resistor is At the sampling temperature T m When the voltage signal across the voltage divider resistor is At the sampling temperature T m+1 When the voltage signal across the voltage divider resistor is Assuming the second precision setting value is K2, if V s (m)-V s (m-1)<K2, and V s (m+1)-V s (m)>K2, then T m The corresponding temperature is the second critical temperature value. The resistance values of all thermistors between the second critical temperature value and the maximum temperature value in the second temperature interval in the RT table are averaged to obtain the resistance value of the second voltage divider resistor in the second temperature sampling interval.
[0083] The first precision setting value and the second precision setting value are set according to requirements. The first precision setting value and the second precision setting value can be accurate to one decimal place, two decimal places, three decimal places, four decimal places, etc., such as 0.1, 0.01, 0.001, 0.0001, etc. This embodiment does not impose specific restrictions on the first precision setting value and the second precision setting value.
[0084] Among them, the resistance value R' of the voltage-dividing resistor that is not calculated and is substituted into the formula is a set factory resistance value, and the setting of this resistance value is a fixed value in any sampling temperature range, resulting in low temperature sampling accuracy. In order to further improve the accuracy of the temperature sampling circuit, this embodiment, on the basis of the first embodiment, divides the temperature sampling range into a first temperature sampling interval and a second temperature sampling interval, and the lower limit value of the temperature sampling range and the upper limit value of the temperature sampling range are the minimum temperature value of the first temperature sampling interval and the maximum temperature value of the second temperature sampling interval, respectively. The RT table records the temperatures and resistance values of thermistors corresponding to the first temperature sampling interval and the second temperature sampling interval. When the voltage signals at both ends of the voltage divider resistor at three consecutive temperatures in the first temperature interval corresponding to the first temperature sampling interval in the RT table satisfy that if the value of the voltage signal at both ends of the voltage divider resistor at the current temperature minus the voltage signal at both ends of the voltage divider resistor at the previous temperature is less than the first precision setting value, and the value of the voltage signal at both ends of the voltage divider resistor at the next temperature minus the voltage signal at both ends of the voltage divider resistor at the current temperature is greater than the first precision setting value, then the current temperature is the first critical temperature value of the first temperature sampling interval, and the first critical temperature value is the upper limit value of the first temperature sampling interval. When the voltage signals at both ends of the voltage divider resistor at three consecutive temperatures in the second temperature interval corresponding to the second temperature sampling interval in the RT table meet the condition that if the value of the voltage signal at both ends of the voltage divider resistor at the current temperature minus the voltage signal at both ends of the voltage divider resistor at the previous temperature is less than the second precision setting value, and the value of the voltage signal at both ends of the voltage divider resistor at the next temperature minus the voltage signal at both ends of the voltage divider resistor at the current temperature is greater than the second precision setting value, then the current temperature is the second key temperature value of the second temperature sampling interval, and the second key temperature value is the lower limit value of the second temperature sampling interval. In the temperature sampling range, the first temperature sampling interval is located before the second temperature sampling interval.
[0085] The plurality of switches include a first control switch and a second control switch connected to the first voltage-dividing resistor and the second voltage-dividing resistor, respectively. When the actual temperature sampling range is within the first temperature sampling interval, the controller closes the first control switch, and when the actual temperature sampling range is within the second temperature sampling interval, the controller closes the second control switch.
[0086] Embodiment three:
[0087] Further improvements are made on the basis of the second embodiment. Specifically, a temperature sampling circuit design method of this embodiment includes:
[0088] Determine the resistance value of the thermistor based on the temperature sampling range;
[0089] Based on the thermistor and the temperature sampling range, calculating the voltage divider resistor required by the temperature sampling circuit;
[0090] The temperature sampling circuit is formed according to the thermistor and the voltage-dividing resistor with determined resistance values; the temperature sampling circuit comprises: a power supply voltage VCC is connected to one end of the thermistor; the other end of the thermistor is respectively connected to one end of a plurality of parallel voltage-dividing resistors, the other ends of the plurality of voltage-dividing resistors are respectively connected to one end of a plurality of switches corresponding thereto and a controller, the other ends of the plurality of switches are grounded, and the controller controls the on and off of the plurality of switches based on the actual temperature sampling range; the plurality of voltage-dividing resistors include a first voltage-dividing resistor, a second voltage-dividing resistor and a third voltage-dividing resistor;
[0091] The temperature sampling range includes a first temperature sampling interval, a second temperature sampling interval and a third temperature sampling interval, the minimum temperature value of the first temperature sampling interval is the lower limit value of the temperature sampling range, the maximum temperature value of the second temperature sampling interval is the upper limit value of the temperature sampling range, and the third temperature sampling interval is located between the first temperature sampling interval and the second temperature sampling interval; based on the thermistor and the temperature sampling range, calculating the voltage divider resistor required by the temperature sampling circuit includes:
[0092] According to the first temperature sampling interval of the temperature sampling range, query the RT table to obtain the resistance values of the thermistor at three consecutive temperatures in the first temperature interval corresponding to the first temperature sampling interval in the RT table, and calculate the voltage signals at both ends of the voltage divider resistor at the three consecutive temperatures in sequence. When calculating the voltage signal V at both ends of the voltage divider resistor at a temperature within the first temperature sampling interval s When the temperature is set to 0, the resistance R of the thermistor is the resistance of the thermistor at the temperature in the RT table, and the resistance R' of the voltage divider resistor takes a constant value in any temperature sampling range; the temperature of the first temperature interval and its corresponding resistance of the thermistor, the temperature of the second temperature interval and its corresponding resistance of the thermistor, and the temperature of the third temperature interval and its corresponding resistance of the thermistor are recorded in the RT table; the minimum temperature value of the first temperature interval is the minimum temperature in the RT table, the maximum temperature value of the second temperature interval is the maximum temperature in the RT table, and the third temperature interval is located between the first temperature interval and the second temperature interval;
[0093] If the value of the voltage signal across the voltage-dividing resistor at the current temperature minus the voltage signal across the voltage-dividing resistor at the previous temperature is less than the first precision setting value, and the value of the voltage signal across the voltage-dividing resistor at the next temperature minus the voltage signal across the voltage-dividing resistor at the current temperature is greater than the first precision setting value, then the current temperature is the first critical temperature value of the first temperature sampling interval; otherwise, the resistance values of the thermistor at three consecutive temperatures are obtained from the RT table again, and the calculation of the voltage signal across the voltage-dividing resistor at three consecutive temperatures and the first critical temperature value judgment process are repeated;
[0094] According to the second temperature sampling interval of the temperature sampling range, query the RT table to obtain the resistance values of the thermistor at three consecutive temperatures in the second temperature interval corresponding to the second temperature sampling interval in the RT table, and calculate the voltage signals at both ends of the voltage divider resistor at the three consecutive temperatures in sequence. When calculating the voltage signal V at both ends of the voltage divider resistor at a temperature within the second temperature sampling interval s When the resistance R of the thermistor is the resistance R of the thermistor at the temperature in the RT table, the resistance R' of the voltage divider resistor takes a constant value in any of the temperature sampling ranges; if the value of the voltage signal across the voltage divider resistor at the current temperature minus the voltage signal across the voltage divider resistor at the previous temperature is less than the second precision setting value, and the value of the voltage signal across the voltage divider resistor R' at the next temperature minus the voltage signal across the voltage divider resistor at the current temperature is greater than the second precision setting value, then the current temperature is the second key temperature value of the second temperature sampling interval; otherwise, the resistance values of the thermistor at three consecutive temperatures are obtained from the RT table again, and the voltage signal calculation across the voltage divider resistor at three consecutive temperatures and the second key temperature value judgment process are repeated;
[0095] Obtain the resistance values of all thermistors between the minimum temperature value in the first temperature interval and the first key temperature value in the RT table, and average the resistance values of all the thermistors to obtain the resistance value of the first voltage-dividing resistor in the first temperature sampling interval; obtain the resistance values of all thermistors between the maximum temperature value in the second temperature interval and the second key temperature value in the RT table, and average the resistance values of all thermistors to obtain the resistance value of the second voltage-dividing resistor in the second temperature sampling interval; the resistance value of the third voltage-dividing resistor in the third temperature sampling interval is the resistance value of the thermistor corresponding to the temperature of 25° C. in the RT table.
[0096] Figure 5The second temperature sampling circuit diagram provided by the embodiment of this specification is shown, and the plurality of switches include a first control switch, a second control switch and a third control switch connected to the first voltage-dividing resistor, the second voltage-dividing resistor and the third voltage-dividing resistor respectively. When the temperature sampling range is in the first temperature sampling interval, the controller closes the first control switch; when the temperature sampling range is in the second temperature sampling interval, the controller closes the second control switch; when the temperature sampling range is in the third temperature sampling interval, the controller closes the third control switch.
[0097] Among them, the first key temperature value, the second key temperature value, the first voltage-dividing resistor and the second voltage-dividing resistor in this embodiment are calculated in the same way as in Example 2. In order to further improve the accuracy of the temperature sampling circuit, this embodiment divides the temperature sampling range into a first temperature sampling interval, a second temperature sampling interval and a third temperature sampling interval on the basis of Example 2. In the temperature sampling range, the temperature sampling ranges are sorted from low to high, namely, the first temperature sampling interval, the third temperature sampling interval and the second temperature sampling interval. The first temperature sampling interval can be used as a low temperature sampling interval of the temperature sampling range, the third temperature sampling interval can be used as a medium temperature sampling interval of the temperature sampling range, and the second temperature sampling interval can be used as a high temperature sampling interval of the temperature sampling range. The lower limit value of the third temperature sampling interval is the upper limit value of the first temperature sampling interval, and the upper limit value of the third temperature sampling interval is the lower limit value of the second temperature sampling interval. If the obtained third temperature sampling interval includes multiple temperature values, the resistance value of the third voltage-dividing resistor is the resistance value of the thermistor corresponding to the temperature of 25°C in the RT table. Selecting the resistance value of the thermistor corresponding to the temperature of 25°C in the RT table as the resistance value of the third voltage-dividing resistor in the third temperature sampling interval can ensure that the temperature sampling circuit stably outputs the voltage signal across the voltage-dividing resistor in the third temperature sampling interval. If the obtained third temperature sampling interval includes a temperature sampling value, the temperature corresponding to the temperature sampling value is 25°C, the resistance value of the third voltage-dividing resistor is the resistance value of the thermistor corresponding to the temperature of 25°C in the RT table, the first critical temperature value is 24°C, the resistance value of the first voltage-dividing resistor is the average of the resistance values of all thermistors between the minimum temperature value and the first critical temperature value in the first temperature interval in the RT table, the second critical temperature value is 26°C, and the resistance value of the second voltage-dividing resistor is the average of the resistance values of all thermistors between the second critical temperature value and the maximum temperature value in the second temperature interval in the RT table.
[0098] It is worth noting that the present embodiment does not limit the number of intervals of the temperature sampling range. The temperature sampling range can be divided into more intervals to improve the accuracy of temperature sampling. First, multiple key temperature values are calculated according to the above method, and then the upper limit and lower limit of each temperature sampling interval are determined according to the multiple key temperature values. Finally, the resistance of the voltage divider resistor corresponding to each temperature sampling interval is calculated according to the above method according to each temperature sampling interval. Although this method can greatly improve the accuracy of temperature sampling, considering that each temperature sampling interval in the temperature sampling circuit is corresponding to a voltage divider resistor, the increase in temperature sampling intervals also increases the number of voltage divider resistors. Setting too many voltage divider resistors will greatly increase the cost and increase the workload of the controller simultaneously. Therefore, the temperature sampling range is divided into a first temperature sampling interval, a third temperature sampling interval, and a second temperature sampling interval, which can ensure the detection of the full temperature range and reasonably control the cost. In addition, the present embodiment does not limit the type of thermistor. The thermistor can be a PTC thermistor, an NTC thermistor, or other thermistor. However, when obtaining the RT table, it is necessary to obtain the RT table corresponding to the thermistor type. For example, if the selected thermistor is an NTC thermistor, the RT table obtained is the RT table of the NTC thermistor; if the selected thermistor is a PTC thermistor, the RT table obtained is the RT table of the NTC thermistor.
[0099] Although several specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of this specification. Certain features described in the context of separate embodiments may also be implemented in a single implementation in combination. Conversely, various features described in the context of a single implementation may also be implemented in multiple implementations individually or in any suitable sub-combination.
[0100] Although the subject matter has been described in language specific to structural features and / or method logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. The various embodiments of this specification have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Without departing from the scope and spirit of the described embodiments, many modifications and changes are obvious to those of ordinary skill in the art. The choice of terms used in this article is intended to best explain the principles of the embodiments, practical applications or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A temperature sampling circuit design method, It is characterized in that Methods include: Determine the resistance value of the thermistor based on the temperature sampling range; Based on the thermistor and the temperature sampling range, calculating the voltage divider resistor required by the temperature sampling circuit; According to the thermistor and the voltage-dividing resistor with determined resistance values, the temperature sampling circuit is formed; The temperature sampling circuit comprises: a power supply voltage VCC is connected to one end of the thermistor; the other end of the thermistor is connected to one end of a voltage divider resistor, and the other end of the voltage divider resistor is grounded; the connection line between the thermistor and the voltage divider resistor is connected to a controller, and the controller outputs a voltage signal at both ends of the voltage divider resistor; Wherein, based on the thermistor and the temperature sampling range, calculating the voltage divider resistor required by the temperature sampling circuit includes: According to the temperature sampling range, query the RT table to obtain the resistance values of the thermistor at three consecutive temperatures in the temperature interval corresponding to the temperature sampling range in the RT table, and calculate the voltage signals at both ends of the voltage divider resistor at three consecutive temperatures in sequence. When calculating the voltage signal V at both ends of the voltage divider resistor at a temperature within the temperature sampling range s When the resistance R of the thermistor is the resistance R of the thermistor at the temperature in the RT table, the resistance R' of the voltage divider resistor takes a constant value in any temperature sampling range; the resistance R' of the thermistor and its corresponding temperature are recorded in the RT table; if the value of the voltage signal across the voltage divider resistor at the current temperature minus the voltage signal across the voltage divider resistor at the previous temperature is less than the accuracy setting value, and the value of the voltage signal across the voltage divider resistor at the next temperature minus the voltage signal across the voltage divider resistor at the current temperature is greater than the accuracy setting value, then the current temperature is the critical temperature value; otherwise, the resistance R of the thermistor at three consecutive temperatures is obtained from the RT table again, and the voltage signal calculation across the voltage divider resistor at three consecutive temperatures and the critical temperature value judgment process are repeated; The resistance value of the voltage divider resistor is calculated according to the critical temperature value.
2. A temperature sampling circuit design method, It is characterized in that Methods include: Determine the resistance value of the thermistor based on the temperature sampling range; Based on the thermistor and the temperature sampling range, calculating the voltage divider resistor required by the temperature sampling circuit; According to the thermistor and the voltage-dividing resistor with determined resistance values, the temperature sampling circuit is formed; The temperature sampling circuit comprises: a power supply voltage VCC is connected to one end of the thermistor; the other end of the thermistor is respectively connected to one end of a plurality of parallel voltage-dividing resistors, the other ends of the plurality of voltage-dividing resistors are respectively connected to one end of a plurality of switches corresponding thereto and a controller, the other ends of the plurality of switches are grounded, and the controller controls the on and off of the plurality of switches based on the actual temperature sampling range; the plurality of voltage-dividing resistors include a first voltage-dividing resistor and a second voltage-dividing resistor; The temperature sampling range includes a first temperature sampling interval and a second temperature sampling interval, the minimum temperature value of the first temperature sampling interval is the lower limit value of the temperature sampling range, and the maximum temperature value of the second temperature sampling interval is the upper limit value of the temperature sampling range; based on the thermistor and the temperature sampling range, calculating the voltage divider resistor required by the temperature sampling circuit includes: According to the first temperature sampling interval of the temperature sampling range, query the RT table to obtain the resistance values of the thermistor at three consecutive temperatures in the first temperature interval corresponding to the first temperature sampling interval in the RT table, and calculate the voltage signals at both ends of the voltage divider resistor at the three consecutive temperatures in sequence. When calculating the voltage signal V at both ends of the voltage divider resistor at a temperature within the first temperature sampling interval s When the temperature of the first temperature interval and the corresponding resistance value of the thermistor and the temperature of the second temperature interval and the corresponding resistance value of the thermistor are recorded in the RT table; the minimum temperature value of the first temperature interval is the minimum temperature in the RT table, and the maximum temperature value of the second temperature interval is the maximum temperature in the RT table; If the value of the voltage signal across the voltage-dividing resistor at the current temperature minus the voltage signal across the voltage-dividing resistor at the previous temperature is less than the first precision setting value, and the value of the voltage signal across the voltage-dividing resistor at the next temperature minus the voltage signal across the voltage-dividing resistor at the current temperature is greater than the first precision setting value, then the current temperature is the first critical temperature value of the first temperature sampling interval; otherwise, the resistance values of the thermistor at three consecutive temperatures are obtained from the RT table again, and the calculation of the voltage signal across the voltage-dividing resistor at three consecutive temperatures and the first critical temperature value judgment process are repeated; According to the second temperature sampling interval of the temperature sampling range, the RT table is queried to obtain the resistance values of the thermistor at three consecutive temperatures in the second temperature interval corresponding to the second temperature sampling interval in the RT table, and the voltage signals at both ends of the voltage divider resistor at the three consecutive temperatures are calculated in sequence. When calculating the voltage signal V at both ends of the voltage divider resistor at a temperature within the second temperature sampling interval s When the resistance R of the thermistor is the resistance R of the thermistor at the temperature in the RT table, the resistance R' of the voltage-dividing resistor takes a constant value in any of the temperature sampling ranges; if the value of the voltage signal across the voltage-dividing resistor at the current temperature minus the voltage signal across the voltage-dividing resistor at the previous temperature is less than the second precision setting value, and the value of the voltage signal across the voltage-dividing resistor at the next temperature minus the voltage signal across the voltage-dividing resistor at the current temperature is greater than the second precision setting value, then the current temperature is the second critical temperature value of the second temperature sampling interval; otherwise, the resistance values of the thermistor at three consecutive temperatures are obtained from the RT table again, and the voltage signal calculation across the voltage-dividing resistor at three consecutive temperatures and the second critical temperature value judgment process are repeated; Obtain the resistance values of all thermistors between the minimum temperature value and the first key temperature value in the first temperature interval in the RT table, and average the resistance values of all thermistors to obtain the resistance value of the first voltage divider resistor in the first temperature sampling interval; obtain the resistance values of all thermistors between the second key temperature value and the maximum temperature value in the second temperature interval in the RT table, and average the resistance values of all thermistors to obtain the resistance value of the second voltage divider resistor in the second temperature sampling interval.
3. The method according to claim 2, It is characterized in that The multiple switches include a first control switch and a second control switch respectively connected to the first voltage-dividing resistor and the second voltage-dividing resistor; when the actual temperature sampling range is within the first temperature sampling interval, the controller closes the first control switch; when the actual temperature sampling range is within the second temperature sampling interval, the controller closes the second control switch.
4. A temperature sampling circuit design method, It is characterized in that Methods include: Determine the resistance value of the thermistor based on the temperature sampling range; Based on the thermistor and the temperature sampling range, calculating the voltage divider resistor required by the temperature sampling circuit; According to the thermistor and the voltage-dividing resistor with determined resistance values, the temperature sampling circuit is formed; The temperature sampling circuit comprises: a power supply voltage VCC is connected to one end of the thermistor; the other end of the thermistor is respectively connected to one end of a plurality of parallel voltage-dividing resistors, the other ends of the plurality of voltage-dividing resistors are respectively connected to one end of a plurality of switches corresponding thereto and a controller, the other ends of the plurality of switches are grounded, and the controller controls the on and off of the plurality of switches based on the actual temperature sampling range; the plurality of voltage-dividing resistors include a first voltage-dividing resistor, a second voltage-dividing resistor and a third voltage-dividing resistor; The temperature sampling range includes a first temperature sampling interval, a second temperature sampling interval and a third temperature sampling interval, the minimum temperature value of the first temperature sampling interval is the lower limit value of the temperature sampling range, the maximum temperature value of the second temperature sampling interval is the upper limit value of the temperature sampling range, and the third temperature sampling interval is located between the first temperature sampling interval and the second temperature sampling interval; based on the thermistor and the temperature sampling range, calculating the voltage divider resistor required by the temperature sampling circuit includes: According to the first temperature sampling interval of the temperature sampling range, query the RT table to obtain the resistance values of the thermistor at three consecutive temperatures in the first temperature interval corresponding to the first temperature sampling interval in the RT table, and calculate the voltage signals at both ends of the voltage divider resistor at the three consecutive temperatures in sequence. When calculating the voltage signal V at both ends of the voltage divider resistor at a temperature within the first temperature sampling interval s When the temperature is set to 0, the resistance R of the thermistor is the resistance of the thermistor at the temperature in the RT table, and the resistance R' of the voltage divider resistor takes a constant value in any temperature sampling range; the temperature of the first temperature interval and its corresponding resistance of the thermistor, the temperature of the second temperature interval and its corresponding resistance of the thermistor, and the temperature of the third temperature interval and its corresponding resistance of the thermistor are recorded in the RT table; the minimum temperature value of the first temperature interval is the minimum temperature in the RT table, the maximum temperature value of the second temperature interval is the maximum temperature in the RT table, and the third temperature interval is located between the first temperature interval and the second temperature interval; If the value of the voltage signal across the voltage-dividing resistor at the current temperature minus the voltage signal across the voltage-dividing resistor at the previous temperature is less than the first precision setting value, and the value of the voltage signal across the voltage-dividing resistor at the next temperature minus the voltage signal across the voltage-dividing resistor at the current temperature is greater than the first precision setting value, then the current temperature is the first critical temperature value of the first temperature sampling interval; otherwise, the resistance values of the thermistor at three consecutive temperatures are obtained from the RT table again, and the calculation of the voltage signal across the voltage-dividing resistor at three consecutive temperatures and the first critical temperature value judgment process are repeated; According to the second temperature sampling interval of the temperature sampling range, the RT table is queried to obtain the resistance values of the thermistor at three consecutive temperatures in the second temperature interval corresponding to the second temperature sampling interval in the RT table, and the voltage signals at both ends of the voltage divider resistor at the three consecutive temperatures are calculated in sequence. When calculating the voltage signal V at both ends of the voltage divider resistor at a temperature within the second temperature sampling interval s When the resistance R of the thermistor is the resistance of the thermistor at the temperature in the RT table, the resistance R' of the voltage divider resistor takes a constant value in any of the temperature sampling ranges; if the value of the voltage signal across the voltage divider resistor at the current temperature minus the voltage signal across the voltage divider resistor at the previous temperature is less than the second precision setting value, and the value of the voltage signal across the voltage divider resistor R' at the next temperature minus the voltage signal across the voltage divider resistor at the current temperature is greater than the second precision setting value, then the current temperature is the second key temperature value of the second temperature sampling interval; otherwise, the resistance values of the thermistor at three consecutive temperatures are obtained from the RT table again, and the voltage signal calculation across the voltage divider resistor at three consecutive temperatures and the second key temperature value judgment process are repeated; Obtain the resistance values of all thermistors between the minimum temperature value in the first temperature interval and the first key temperature value in the RT table, and average the resistance values of all the thermistors to obtain the resistance value of the first voltage-dividing resistor in the first temperature sampling interval; obtain the resistance values of all thermistors between the maximum temperature value in the second temperature interval and the second key temperature value in the RT table, and average the resistance values of all thermistors to obtain the resistance value of the second voltage-dividing resistor in the second temperature sampling interval; the resistance value of the third voltage-dividing resistor in the third temperature sampling interval is the resistance value of the thermistor corresponding to the temperature of 25° C. in the RT table.
5. The method according to claim 1, 2 or 4, It is characterized in that The method of reacquiring the resistance value of the thermistor at three consecutive temperatures from the RT table, repeating the voltage signal calculation at both ends of the voltage divider resistor at the three consecutive temperatures and the critical temperature value determination process includes: The next temperature after the current temperature in the previous calculation is used as the current temperature in this calculation, and the resistance values of the thermistor at three consecutive temperatures with the current temperature in this calculation as the intermediate temperature are obtained; The voltage signal calculation across the voltage divider resistor and the critical temperature value determination process are repeated at three consecutive temperatures.
6. The method according to claim 4, It is characterized in that The multiple switches include a first control switch, a second control switch and a third control switch respectively connected to the first voltage-dividing resistor, the second voltage-dividing resistor and the third voltage-dividing resistor; when the temperature sampling range is in the first temperature sampling interval, the controller closes the first control switch; when the temperature sampling range is in the second temperature sampling interval, the controller closes the second control switch; when the temperature sampling range is in the third temperature sampling interval, the controller closes the third control switch.
7. The method according to claim 1, 2 or 4, It is characterized in that The thermistor is a PTC thermistor or an NTC thermistor.
