Temperature detection method, device and system
By setting the proximal temperature sensing package to obtain the sampling voltage difference and perform temperature correction, the problem of large temperature acquisition errors caused by wires in the external remote temperature sensing package is solved, and the temperature control accuracy and user experience of the air conditioning system are improved.
Patent Information
- Application Number
- CN202410762799.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-09-10
AI Technical Summary
In the existing technology, the temperature acquisition error of the external remote temperature sensing package is relatively large, especially in large public places. Due to the long connection line between the temperature sensing package and the control chip, the wire impedance is large or there is a connection, resulting in temperature Inaccurate detection affects the accuracy of air conditioning control and user experience.
By setting the near-end temperature sensing package, obtain the sampling voltage difference between it and the remote temperature sensing package, determine the temperature correction value based on the voltage difference, and make real-time corrections when using the remote temperature sensing package to detect the temperature to compensate for wires, etc. temperature deviation caused by factors to ensure the accuracy of temperature detection.
It effectively improves the temperature detection accuracy of long-distance temperature sensing packages, improves the temperature control accuracy and user experience of the air conditioning system, and solves the problem of temperature collection errors caused by wires.
Smart Images

Figure CN118624043A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of temperature detection technology, and in particular to a temperature detection method, device and system. Background Art
[0002] Equipment or systems that need to detect temperature will use a temperature sensor package, which is connected to the AD port of the control chip through a circuit. The control chip collects the sampling voltage of the temperature sensor package circuit through the AD port, converts the sampling voltage to obtain the temperature, and realizes temperature detection. When the connection line from the temperature sensor package to the control chip is short, the impedance is relatively small, which has little effect on the temperature detection accuracy. However, if the installation position of the temperature sensor package is far away from the control chip, there will be a situation where the connection line from the temperature sensor package to the control chip is long, the impedance of the wire itself is large, or there is a connection. The impedance of the wire will be superimposed on the thermistor, and the impedance of the wire itself will divide part of the voltage, resulting in inaccurate temperature detection.
[0003] Taking the air conditioning system as an example, the air conditioning temperature sensor is used to sense and adjust the air temperature. It is usually placed at the air outlet of the air conditioner or in a place where indoor air circulates so that it can accurately sense changes in air temperature. The temperature sensor is an external temperature sensor relative to the controller (including the control chip). However, in actual use, since the actual application environment of commercial units is generally large public places such as large shopping malls, such places are usually large in area, and the distance from the air outlet temperature sensor to the controller will be very far. This distance needs to be connected by wires. There are large differences in the impedance of different wires, and some may even be connected. The impedance caused by the connection will be even more uncontrollable. The impedance of the wire will be superimposed on the thermistor, resulting in inaccurate temperature acquisition, which in turn leads to inaccurate air conditioning control, affecting the user experience.
[0004] With regard to the problem of large temperature acquisition error of the external remote temperature sensing package in the prior art, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide a temperature detection method, device and system to at least solve the problem of large temperature acquisition error of an external remote temperature sensing package in the prior art.
[0006] To solve the above technical problems, an embodiment of the present invention provides a temperature detection method, comprising:
[0007] Obtaining a first sampled voltage of a first temperature sensing package and a second sampled voltage of a second temperature sensing package, wherein the first temperature sensing package and the second temperature sensing package are both connected to a control chip, a distance from the first temperature sensing package to the control chip is smaller than a distance from the second temperature sensing package to the control chip, and the first temperature sensing package is arranged within a preset distance around the control chip;
[0008] determining a temperature correction value according to the first sampling voltage and the second sampling voltage;
[0009] Thereafter, when the second temperature sensing bulb is used to detect the temperature, the temperature correction is performed according to the temperature correction value.
[0010] Optionally, obtaining a first sampled voltage of the first temperature sensing package and a second sampled voltage of the second temperature sensing package includes:
[0011] The first temperature sensing package and the second temperature sensing package are two temperature sensing packages, the first temperature sensing package is installed at a first position, and the second temperature sensing package is installed at a second position. During power-on debugging, the first sampling voltage and the second sampling voltage are obtained through the first temperature sensing package and the second temperature sensing package respectively; or,
[0012] The first temperature sensing package and the second temperature sensing package are the same temperature sensing package and the temperature sensing package is a pluggable structure. During power-on debugging, the temperature sensing package is first installed in the first position to obtain the first sampling voltage, and then the temperature sensing package is installed in the second position to obtain the second sampling voltage.
[0013] Optionally, determining a temperature correction value according to the first sampled voltage and the second sampled voltage includes:
[0014] Determine the voltage across the thermistor in the first temperature-sensing package according to the first sampling voltage, recorded as the first voltage; determine the voltage across the thermistor and its connecting wire in the second temperature-sensing package according to the second sampling voltage, recorded as the second voltage; calculate the absolute value of the difference between the first voltage and the second voltage; and determine the temperature corresponding to the absolute value of the difference as the temperature correction value according to a preset corresponding relationship between the voltage difference and the temperature; or,
[0015] The first temperature collected by the first temperature sensing package is determined according to the first sampling voltage, the second temperature collected by the second temperature sensing package is determined according to the second sampling voltage, and the absolute value of the difference between the first temperature and the second temperature is calculated as the temperature correction value.
[0016] Optionally, when the second temperature sensing package is used to detect the temperature, temperature correction is performed according to the temperature correction value, including:
[0017] When the second temperature sensing package is used to detect the temperature, an actual sampling voltage of the second temperature sensing package is obtained;
[0018] Determine the temperature value collected by the second temperature sensing package according to the actual sampled voltage;
[0019] The temperature value is corrected according to the thermistor characteristic of the second temperature sensing package and the temperature correction value to obtain a corrected final temperature.
[0020] Optionally, the temperature value is corrected according to the thermistor characteristic of the second temperature sensing package and the temperature correction value to obtain a corrected final temperature, including:
[0021] If the second temperature sensing package is a positive temperature coefficient thermistor, the temperature value is calculated minus the temperature correction value to obtain a corrected final temperature;
[0022] If the second temperature sensing package is a negative temperature coefficient thermistor, the temperature value is added to the temperature correction value to obtain the corrected final temperature.
[0023] Optionally, when the second temperature sensing package is used to detect the temperature, the method further includes:
[0024] Obtaining an actual sampled voltage of the second temperature sensing package;
[0025] Determining whether the fluctuation amplitude of the actual sampled voltage exceeds a preset threshold at least once within a continuous preset time;
[0026] If so, it is determined that an abnormal fluctuation occurs, and the corrected temperature before the preset time is taken as the latest temperature.
[0027] The embodiment of the present invention further provides a temperature detection device, comprising:
[0028] an acquisition module, configured to acquire a first sampled voltage of a first temperature sensing package and a second sampled voltage of a second temperature sensing package, wherein the first temperature sensing package and the second temperature sensing package are both connected to a control chip, a distance from the first temperature sensing package to the control chip is smaller than a distance from the second temperature sensing package to the control chip, and the first temperature sensing package is arranged within a preset distance around the control chip;
[0029] A determination module, configured to determine a temperature correction value according to the first sampled voltage and the second sampled voltage;
[0030] The correction module is used to perform temperature correction according to the temperature correction value when the second temperature sensing package is used to detect the temperature.
[0031] The embodiment of the present invention further provides a temperature detection system, comprising: a control chip and the temperature detection device described in the embodiment of the present invention.
[0032] Optionally, the temperature detection system is an air conditioning system.
[0033] An embodiment of the present invention further provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the embodiment of the present invention when executing the computer program.
[0034] The embodiment of the present invention further provides a non-volatile computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the embodiment of the present invention are implemented.
[0035] By applying the technical solution of the present invention, in order to solve the problem of large temperature acquisition error of an external remote temperature sensing package, a proximal temperature sensing package is set, and a temperature correction value is determined according to the sampling voltages of the two temperature sensing packages. Afterwards, when the temperature is detected by using the external remote temperature sensing package, temperature correction is performed according to the temperature correction value. In this way, the temperature detected by the external remote temperature sensing package can be corrected in real time, and temperature deviations caused by factors such as wires can be compensated. The accuracy of temperature detection by the long-distance temperature sensing package is effectively guaranteed, and the temperature detection accuracy of the long-distance temperature sensing package is improved, thereby improving the temperature control accuracy of the system to which the temperature sensing package belongs (such as air conditioning), achieving precise temperature control, improving user comfort and user experience, and solving the problem of large temperature acquisition error of the external remote temperature sensing package due to wires in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 The temperature sensing package circuit provided by the embodiment of the present invention is shown in FIG. Figure 1 ;
[0037] Figure 2 The temperature sensing package circuit provided by the embodiment of the present invention is shown in FIG. Figure 2 ;
[0038] Figure 3 is a flow chart of a temperature detection method provided in Embodiment 1 of the present invention;
[0039] Figure 4 is a schematic diagram of an air conditioning system provided by Embodiment 2 of the present invention;
[0040] Figure 5 This is a schematic diagram of an external temperature sensing package circuit provided by Embodiment 2 of the present invention;
[0041] Figure 6 is a temperature detection flow chart provided in Embodiment 2 of the present invention;
[0042] Figure 7 is a structural block diagram of a temperature detection device provided in Embodiment 3 of the present invention;
[0043] Figure 8 It is a schematic diagram of the hardware structure of the electronic device provided in the fifth embodiment of the present invention. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0045] It should be noted that the terms "first", "second", etc. in the specification, claims and drawings of the present invention are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0046] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0047] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0048] The optional embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0049] First combine Figure 1 and Figure 2 The temperature sensing circuit is explained as follows: the temperature sensing circuit is a voltage divider circuit in which a thermistor and a fixed resistor are connected in series. Figure 1 and Figure 2As shown, the AD port of the control chip 10 (i.e., MCU) is connected between the voltage divider resistor R1 and the temperature sensing package terminal, and the temperature sensing package terminal is used to connect the temperature sensing package. The temperature sensing package includes a thermistor R2, which is connected to the circuit through terminals 1 and 2. The length of the connection line between the thermistor R2 and the terminal is determined by the installation position of the temperature sensing package. If the temperature sensing package is far away from the control chip 10, the connection line between the thermistor R2 and the terminal is longer; if the temperature sensing package is close to the control chip 10, the connection line between the thermistor R2 and the terminal is shorter; the temperature sensing package can also be directly installed at the control chip 10, that is, the thermistor R2 is directly plugged into the terminal.
[0050] The resistance value of thermistors changes with temperature. According to thermistor characteristics (i.e., temperature coefficient), thermistors include PTC (Positive Temperature Coefficient) thermistors and NTC (Negative Temperature Coefficient) thermistors. The resistance value of PTC thermistors increases with increasing temperature, while the resistance value of NTC thermistors decreases with increasing temperature. Thermistors have different resistance values, and the corresponding relationship (or curve) between their resistance value and temperature is also different. The temperature sensing package will set the relevant corresponding relationship when it leaves the factory.
[0051] exist Figure 1 In the temperature sensing package circuit shown in the figure, the voltage divider resistor R1 is connected to the power supply VCC, and the thermistor R2 is grounded. Figure 2 In the temperature sensing circuit shown, the voltage divider resistor R1 is grounded, and the thermistor R2 is connected to the power supply VCC. These are two ways to connect the temperature sensing package circuit. The resistance values of the voltage divider resistor R1 and the thermistor R2 can be the same or different.
[0052] The AD port of the control chip 10 is connected between the voltage divider resistor R1 and the terminal, which is used to obtain the sampling voltage U of the temperature sensing package. According to the sampling voltage U, the voltage between the terminal 1 and the terminal 2 and the resistance value connected thereto can be obtained. Generally, the voltage between the terminal 1 and the terminal 2 is directly used as the voltage across the thermistor R2, and the resistance value connected between the terminal 1 and the terminal 2 is used as the resistance value of the thermistor R2. The corresponding temperature is obtained by looking up the table and converting, thus completing the temperature detection. Figure 1 In the temperature sensing circuit shown in the figure, the voltage across the thermistor R2 is equal to the sampling voltage U. Figure 2 In the temperature sensing package circuit shown, the voltage across the thermistor R2 is equal to VCC-U.
[0053] However, if the connection line between the thermistor R2 and the terminal is long, the impedance of this part of the connection line will also be calculated in the resistance value of the thermistor, causing the detected resistance value to be too large, and thus causing inaccurate detected temperature.
[0054] Embodiment 1
[0055] This embodiment provides a temperature detection method that can be executed by a control chip. Through the dual-channel temperature sensing package setting, the temperature detected by the external remote temperature sensing package is corrected, the temperature detection deviation caused by factors such as wires is corrected, the voltage loss of the wires is compensated, and the temperature detection accuracy of the external remote temperature sensing package is improved.
[0056] Figure 3 is a flow chart of a temperature detection method provided in Embodiment 1 of the present invention. Figure 3 As shown, the method comprises the following steps:
[0057] S301, obtaining a first sampling voltage of a first temperature sensing package and a second sampling voltage of a second temperature sensing package, wherein the first temperature sensing package and the second temperature sensing package are both connected to a control chip, a distance from the first temperature sensing package to the control chip is smaller than a distance from the second temperature sensing package to the control chip, and the first temperature sensing package is arranged within a preset distance around the control chip.
[0058] S302, determining a temperature correction value according to the first sampling voltage and the second sampling voltage.
[0059] S303: Afterwards, when the second temperature sensing package is used to detect the temperature, the temperature correction is performed according to the temperature correction value.
[0060] The preset distance can be set according to actual conditions. The preset distance ensures that the first temperature sensing package is set near the control chip and the resistance of the connecting line between the first temperature sensing package and the wiring terminal can be ignored.
[0061] The first temperature sensing package is installed at the proximal end of the control chip (can be called the proximal temperature sensing package), and the connection line between the first temperature sensing package and the wiring terminal is relatively short. The second temperature sensing package is installed at the distal end of the control chip (can be called the external distal temperature sensing package), and the length of the connection line between the second temperature sensing package and the wiring terminal is greater than the length of the connection line between the first temperature sensing package and the wiring terminal. The second temperature sensing package is a device that needs to be used during the normal operation of the system to which it belongs. For example, relevant control is performed based on the temperature detected by the second temperature sensing package. When the system is installed and debugged, the wiring, wire length, thickness, and material of the second temperature sensing package have been determined, and the resistance of the wire is not sensitive to temperature changes. Compared with the prior art, this embodiment adds a temperature sensing package circuit (i.e., the circuit corresponding to the first temperature sensing package). The first temperature sensing package and the second temperature sensing package are respectively connected to different AD ports of the control chip. The circuit structure and principle of the first temperature sensing package and the second temperature sensing package are the same, except that the length of the connection line of the thermistor is different. During power-on debugging (without air temperature processing), the first temperature sensing package and the second temperature sensing package are in the same environment. In theory, the temperatures detected by the two should be equal. Therefore, the first temperature sensing package at the proximal end is set as the basis for correcting the temperature value of the second temperature sensing package.
[0062] The sampling voltage refers to the voltage received by the AD port connected to the temperature sensing package in the control chip. During power-on debugging, the detection deviation of the second temperature sensing package caused by factors such as wires can be determined through the first sampling voltage and the second sampling voltage. After that, during the normal operation of the system, the temperature detected by the second temperature sensing package can be corrected in real time.
[0063] In order to solve the problem of large temperature acquisition error of an external remote temperature sensing package, this embodiment sets a proximal temperature sensing package, determines a temperature correction value based on the sampled voltages of the two temperature sensing packages, and then, when the temperature is detected using the external remote temperature sensing package, performs temperature correction based on the temperature correction value. This allows real-time correction of the temperature detected by the external remote temperature sensing package, compensates for temperature deviations caused by factors such as wires, effectively ensures the accuracy of temperature detection by the long-distance temperature sensing package, improves the temperature detection accuracy of the long-distance temperature sensing package, and further improves the temperature control accuracy of the system to which the temperature sensing package belongs (such as air conditioning), achieves precise temperature control, improves user comfort and user experience, and solves the problem of large temperature acquisition error of the external remote temperature sensing package due to wires in the prior art.
[0064] Preferably, the first temperature sensing package is installed on the circuit board where the control chip is located. For example, a temperature sensing package terminal is added to the circuit board where the control chip is located, and the first temperature sensing package is directly plugged into the temperature sensing package terminal. At this time, the length of the connection can be ignored, and it is used as a built-in temperature sensing package. In this way, the first temperature sensing package is very close to the control chip, which can avoid the influence of the wire on the temperature detected by the first temperature sensing package to the greatest extent, thereby ensuring the accuracy and reliability of temperature correction based on the first temperature sensing package as a reference.
[0065] In one embodiment, the first sampled voltage of the first temperature sensing package and the second sampled voltage of the second temperature sensing package may be obtained by any of the following methods:
[0066] (1) The first temperature sensing package and the second temperature sensing package are two temperature sensing packages, the first temperature sensing package is installed at the first position, and the second temperature sensing package is installed at the second position. During power-on debugging, the first sampling voltage and the second sampling voltage are obtained through the first temperature sensing package and the second temperature sensing package respectively.
[0067] The distance from the first position to the control chip is smaller than the distance from the second position to the control chip.
[0068] After the temperature correction value is determined, the first temperature sensing package is idle, and can also be used to detect the temperature according to demand. The second temperature sensing package is used as an external remote temperature sensing package to detect the temperature during the normal operation of the system to which it belongs.
[0069] The resistance value, thermistor characteristics, and thermistor connection position (such as grounding or VCC) of the thermistors involved in the first temperature sensing package and the second temperature sensing package can be set according to actual conditions, and this embodiment does not limit this. For example, the resistance value of the thermistors of the first temperature sensing package and the second temperature sensing package can be the same or different; the temperature coefficient characteristics of the thermistors of the first temperature sensing package and the second temperature sensing package can be the same or different; the thermistor connection positions of the first temperature sensing package and the second temperature sensing package can be both grounded, both connected to VCC, or one grounded and the other connected to VCC.
[0070] This method (1) adds a temperature sensing package circuit as a power-on detection reference, and uses two temperature sensing packages installed in different positions to simultaneously obtain the sampling voltage during power-on debugging, which can improve the efficiency of determining the temperature correction value.
[0071] (2) The first temperature sensing package and the second temperature sensing package are the same temperature sensing package and the temperature sensing package is a pluggable structure. During power-on debugging, the temperature sensing package is first installed in the first position to obtain the first sampling voltage, and then the temperature sensing package is installed in the second position to obtain the second sampling voltage.
[0072] After the temperature correction value is determined, the temperature sensing package is always installed in the second position and used as an external remote temperature sensing package.
[0073] This method (2) adds a temperature sensing package circuit as a power-on detection reference. During power-on debugging, a temperature sensing package is installed at different positions to obtain the sampling voltage, which can save a temperature sensing package and save costs.
[0074] In one embodiment, the temperature correction value may be determined according to the first sampling voltage and the second sampling voltage in any of the following ways:
[0075] (1) Determine the voltage across the thermistor in the first temperature sensing package according to the first sampling voltage, recorded as the first voltage; determine the voltage across the thermistor and its connecting wire in the second temperature sensing package according to the second sampling voltage, recorded as the second voltage; calculate the absolute value of the difference between the first voltage and the second voltage, and determine the temperature corresponding to the absolute value of the difference as the temperature correction value according to the preset corresponding relationship between the voltage difference and the temperature.
[0076] The corresponding relationship between the voltage difference and the temperature can be obtained in advance through experiments according to the actual situation of the temperature sensing package. For example, the voltage difference is 0.1V, the corresponding temperature is 1.5°C, and the voltage difference is 0.2V, and the corresponding temperature is 3.0°C.
[0077] In this method, after the control chip obtains the sampled voltage, the temperature correction value is determined according to the voltage difference. The method is simple and reliable, ensuring the accuracy and reliability of the temperature correction value, thereby ensuring the reliability of the temperature correction of the external remote temperature sensing package.
[0078] (2) Determine a first temperature collected by the first temperature sensing package according to the first sampling voltage, determine a second temperature collected by the second temperature sensing package according to the second sampling voltage, and calculate an absolute value of a difference between the first temperature and the second temperature as a temperature correction value.
[0079] In this method, after the control chip obtains the sampled voltage, it first converts the sampled voltage to obtain the temperature, and then calculates the temperature correction value based on the temperature. There is no need to additionally store the corresponding relationship between the voltage difference and the temperature, thus saving the manpower and time costs of conducting experiments.
[0080] After determining the temperature correction value, during the normal operation of the system to which the second temperature sensing package belongs, the second temperature sensing package can detect the temperature in real time or periodically. Specifically, when the second temperature sensing package is used to detect the temperature, temperature correction is performed according to the temperature correction value, including: when the second temperature sensing package is used to detect the temperature, the actual sampling voltage of the second temperature sensing package is obtained; the temperature value collected by the second temperature sensing package is determined according to the actual sampling voltage; the temperature value is corrected according to the thermistor characteristics of the second temperature sensing package and the temperature correction value to obtain a corrected final temperature.
[0081] Thermistor characteristics refer to the temperature coefficient of thermistor, which can be positive temperature coefficient thermistor or negative temperature coefficient thermistor. Thermistors have different temperature coefficients, and their resistance changes with temperature in different trends.
[0082] This embodiment corrects the temperature value based on the thermistor characteristics of the second temperature sensing package, thereby ensuring the accuracy of the temperature correction.
[0083] In one embodiment, the temperature value is corrected according to the thermistor characteristics of the second temperature sensing package and the temperature correction value to obtain a corrected final temperature, including: if the second temperature sensing package is a positive temperature coefficient thermistor, the temperature value is calculated minus the temperature correction value to obtain the corrected final temperature; if the second temperature sensing package is a negative temperature coefficient thermistor, the temperature value is calculated plus the temperature correction value to obtain the corrected final temperature.
[0084] For positive temperature coefficient thermistors, the wire material causes the resistance value to increase, and the detected temperature will be too high, so the temperature correction value needs to be subtracted from the current temperature value. For negative temperature coefficient thermistors, the wire material causes the resistance value to increase, and the detected temperature will be too low, so the temperature correction value needs to be added to the current temperature value.
[0085] This embodiment performs specific temperature correction based on thermistor characteristics, which can ensure the accuracy of temperature correction.
[0086] Considering that there are many electrical equipment in general commercial occasions and the electrical wiring is relatively complicated, the normal operation of each device may occasionally cause electromagnetic interference to each other. If the temperature sensor connection line is affected by the electromagnetic interference of other equipment to generate induced electromotive force, it will also affect the accuracy of temperature collection.
[0087] In order to solve this problem, when using a second temperature sensing package to detect temperature, it also includes: obtaining the actual sampling voltage of the second temperature sensing package; determining whether the fluctuation amplitude of the actual sampling voltage exceeds the preset threshold at least once within a continuous preset time; if so, determining that an abnormal fluctuation has occurred, and taking the corrected temperature before the preset time as the latest temperature.
[0088] Among them, the preset time and the preset threshold can be set according to actual conditions. For example, the preset time is set to 1 second, and the preset threshold is set to 1V. If the actual sampling voltage of the second temperature sensing package fluctuates by more than ±1V at least once within 1 second, it is determined that an abnormal fluctuation has occurred, and the current actual sampling voltage is an abnormal value. The abnormal value is discarded, and the corrected data before 1 second needs to be used for display or as a control basis until the fluctuation of the sampling voltage stabilizes within the normal range.
[0089] This embodiment can automatically identify and filter out abnormal fluctuations by detecting and processing abnormal fluctuations in the sampling voltage of the second temperature sensing package, thereby reducing temperature detection fluctuations caused by external electromagnetic interference and ensuring accurate temperature detection and control.
[0090] When the second temperature sensing package is used to detect the temperature, the actual sampling voltage of the second temperature sensing package can also be obtained; if the actual sampling voltage is equal to the pull-up power supply voltage of the temperature sensing package circuit, the temperature sensing package open circuit fault prompt information is output; if the actual sampling voltage is equal to 0, the temperature sensing package short circuit fault prompt information is output. This embodiment can output a fault prompt in time according to the condition of the temperature sensing package to remind the user to perform fault troubleshooting.
[0091] Embodiment 2
[0092] This embodiment provides a specific implementation of the temperature detection scheme based on the above embodiment 1. The explanation of terms that are the same or corresponding to the above embodiment will not be repeated in this embodiment. This specific embodiment is only for better illustrating the present application and does not constitute an improper limitation on the present application.
[0093] Taking the air conditioning system as an example, the external temperature sensing package of the air conditioning system is generally installed at the air outlet. The external temperature sensing package can sense the temperature in real time and transmit it to the MCU through the connecting line for data collection and processing. The MCU detects the voltage division between the voltage divider resistor (such as 15kΩ) and the thermistor (such as 15kΩ), converts the detected sampled voltage into the temperature value, and realizes temperature detection. When the temperature sensing package connection line is short, the impedance is relatively small, which has little effect on temperature detection. However, if the temperature sensing package line is long, the wire itself has a large impedance, or there is a connection, the impedance of the line itself will divide part of the voltage, causing the temperature sensing package to detect inaccurately. In addition, if the temperature sensing package connection line is subject to electromagnetic interference from other equipment and generates an induced electromotive force, it will also affect the temperature detection accuracy.
[0094] like Figure 4 As shown, it is a schematic diagram of an air-conditioning system, and the controller includes a control chip 10 (i.e., MCU), a power module 20, a display module 30 and other functional modules 40. The first temperature sensing package 50 (i.e., a built-in temperature sensing package or a proximal temperature sensing package) is installed on the circuit board of the controller. The second temperature sensing package 60 (i.e., an external temperature sensing package or a distal temperature sensing package) is connected to the controller through a long connecting line. The first temperature sensing package 50 and the second temperature sensing package 60 are respectively connected to different AD ports of the control chip 10. In other words, an additional built-in temperature sensing package circuit is added to the controller mainboard of the air-conditioning system. The structure and principle of the built-in temperature sensing package circuit and the external temperature sensing package circuit are the same, except that the line length of the thermistor is different. The thermistor of the built-in temperature sensing package can be directly placed on the circuit board, and the connection length can be ignored. Preferably, the resistance value of the thermistor of the first temperature sensing package is consistent with that of the second temperature sensing package to further ensure the correction accuracy.
[0095] Before the air conditioning system is started, the indoor temperature is not adjusted and there is no air flow. At this time, the temperatures detected by the two temperature sensing packages are the same as the indoor temperature. The temperature detected by the built-in temperature sensing package can be considered to be the current accurate temperature.
[0096] like Figure 5 As shown in the figure, it is a schematic diagram of an external temperature sensing package circuit, which includes: a voltage divider resistor R1 and a thermistor R2 connected in series, one end of R1 is connected to the power supply VCC, which is pulled up by VCC, the other end of R1 is connected to R2, one end of R2 is connected to R1, and the other end of R2 is grounded (i.e. connected to GND). The voltage sampling position is between R1 and R2, and is sampled by the AD port of MCU 10. The resistance values of R1 and R2 can be the same or different.
[0097] like Figure 6 As shown, it is a temperature detection flow chart, which includes the following steps:
[0098] S601, start.
[0099] S602, the air conditioning system is powered on for debugging, the two AD ports of the control chip are powered on, the sample voltage U1 of the built-in temperature sensing package is collected, and the sample voltage U2 of the external temperature sensing package is collected.
[0100] S603, calculate △U.
[0101] If both temperature sensing packages have thermistors connected to ground or both have thermistors connected to VCC, then △U=|U1-U2|.
[0102] If the thermistor of the first temperature-sensing package is grounded and the thermistor of the second temperature-sensing package is connected to VCC, then △U=|U1-VCC+U2|. If the thermistor of the first temperature-sensing package is connected to VCC and the thermistor of the second temperature-sensing package is grounded, then △U=|VCC-U1-U2|. These two situations can be uniformly recorded as △U=|U1+U2-VCC|.
[0103] S604, the program looks up the table to obtain ΔT corresponding to ΔU. ΔT represents the temperature correction value.
[0104] S605, the air conditioning system operates normally, and the AD port of the control chip collects the sample voltage U2 of the external temperature sensing package.
[0105] S606, determine whether U2 fluctuates or changes suddenly, if so, proceed to S607, if not, proceed to S608.
[0106] S607, discard the abnormal value, assign U2 to the last normal value, and continue to detect until the fluctuation is within a reasonable range.
[0107] S608, determine the temperature value T2 detected by the external temperature sensing package according to U2, and correct T2 according to the thermistor characteristics of the external temperature sensing package. Specifically, if the external temperature sensing package is a positive temperature coefficient thermistor, calculate T=T2-△T, if the external temperature sensing package is a negative temperature coefficient thermistor, calculate T=T2+△T. T represents the corrected temperature.
[0108] S609, end.
[0109] During the normal operation of the air conditioning system, if U2 is detected to have abnormal jump fluctuations at a certain moment, for example, U2 has fluctuations of more than ±1V or sudden voltage mutations multiple times within 1 second, it is judged as an abnormal value, and data conversion and display are not performed. The normal value before 1 second is used until the fluctuation of voltage U2 stabilizes at the normal value before temperature detection and display. This can reduce the temperature detection disturbance caused by external electromagnetic interference.
[0110] During the normal operation of the air conditioning system, if U2≈VCC (VCC is the pull-up power supply voltage of the temperature sensing package circuit) is detected, it means that the temperature sensing package is open-circuited, and an open-circuit fault prompt can be output; if U2≈0V, it means that the temperature sensing package is short-circuited, and a short-circuit fault prompt can be output. The corresponding fault code is displayed in time to remind the user to troubleshoot the fault.
[0111] In addition, the external temperature sensing package can also be designed as a pluggable structure. The temperature sensing package is first installed at the local controller end to sample the voltage to obtain U1, and then the temperature sensing package is plugged into the end of the external long connection line to sample the voltage to obtain U2, so that the temperature correction value △T can be determined based on U1 and U2. This can save a local built-in temperature sensing package and save costs.
[0112] In this embodiment, a local temperature sensing package circuit is added to the control board as a power-on detection reference. During power-on debugging, the AD sampling voltage of the built-in temperature sensing package and the external temperature sensing package is obtained, and the temperature correction value is determined based on the sampling voltage; afterwards, when the air-conditioning system is operating normally, the temperature correction value is used to correct the temperature collected in real time by the external temperature sensing package. The temperature detected by the external remote temperature sensing package is corrected in real time by combining software and hardware, and the temperature deviation caused by factors such as wires is compensated, which effectively ensures the accuracy of the temperature detected by the external remote temperature sensing package, improves the temperature detection accuracy of the long-distance temperature sensing package, realizes precise temperature control of the air-conditioning system, and improves the temperature control accuracy and user comfort of the air-conditioning system. In addition, during the normal operation of the air-conditioning system, it can automatically identify and filter large fluctuations based on the sampling voltage of the external remote temperature sensing package, reduce temperature detection disturbances caused by external electromagnetic interference, reduce unstable air-conditioning operation caused by temperature fluctuations, and improve user experience.
[0113] Embodiment 3
[0114] Based on the same inventive concept, this embodiment provides a temperature detection device, which can be used to implement the temperature detection method described in the above embodiment. The temperature detection device can be implemented by software and / or hardware, and the temperature detection device can generally be integrated into a controller.
[0115] Figure 7 is a structural block diagram of a temperature detection device provided in Embodiment 3 of the present invention, such as Figure 7 As shown, the temperature detection device comprises:
[0116] An acquisition module 710 is used to acquire a first sampled voltage of a first temperature sensing package and a second sampled voltage of a second temperature sensing package, wherein the first temperature sensing package and the second temperature sensing package are both connected to a control chip, a distance from the first temperature sensing package to the control chip is smaller than a distance from the second temperature sensing package to the control chip, and the first temperature sensing package is arranged within a preset distance around the control chip;
[0117] A determination module 720, configured to determine a temperature correction value according to the first sampled voltage and the second sampled voltage;
[0118] The correction module 730 is used to perform temperature correction according to the temperature correction value when the second temperature sensing package is used to detect the temperature.
[0119] Optionally, the acquisition module 710 is specifically used for:
[0120] The first temperature sensing package and the second temperature sensing package are two temperature sensing packages, the first temperature sensing package is installed at a first position, and the second temperature sensing package is installed at a second position. During power-on debugging, the first sampling voltage and the second sampling voltage are obtained through the first temperature sensing package and the second temperature sensing package respectively; or,
[0121] The first temperature sensing package and the second temperature sensing package are the same temperature sensing package and the temperature sensing package is a pluggable structure. During power-on debugging, the temperature sensing package is first installed in the first position to obtain the first sampling voltage, and then the temperature sensing package is installed in the second position to obtain the second sampling voltage.
[0122] Optionally, the determination module 720 is specifically configured to:
[0123] Determine the voltage across the thermistor in the first temperature-sensing package according to the first sampling voltage, recorded as the first voltage; determine the voltage across the thermistor and its connecting wire in the second temperature-sensing package according to the second sampling voltage, recorded as the second voltage; calculate the absolute value of the difference between the first voltage and the second voltage; and determine the temperature corresponding to the absolute value of the difference as the temperature correction value according to a preset corresponding relationship between the voltage difference and the temperature; or,
[0124] The first temperature collected by the first temperature sensing package is determined according to the first sampling voltage, the second temperature collected by the second temperature sensing package is determined according to the second sampling voltage, and the absolute value of the difference between the first temperature and the second temperature is calculated as the temperature correction value.
[0125] Optionally, the correction module 730 includes:
[0126] an acquisition unit, used to acquire an actual sampled voltage of the second temperature sensing package when the second temperature sensing package is used to detect the temperature;
[0127] A determination unit, used to determine the temperature value collected by the second temperature sensing package according to the actual sampled voltage;
[0128] The correction unit is used to correct the temperature value according to the thermistor characteristics of the second temperature sensing package and the temperature correction value to obtain a corrected final temperature.
[0129] Optionally, the correction unit is specifically used for:
[0130] If the second temperature sensing package is a positive temperature coefficient thermistor, the temperature value is calculated minus the temperature correction value to obtain a corrected final temperature;
[0131] If the second temperature sensing package is a negative temperature coefficient thermistor, the temperature value is added to the temperature correction value to obtain the corrected final temperature.
[0132] Optionally, the temperature detection device further includes:
[0133] A voltage acquisition module, used to acquire an actual sampled voltage of the second temperature sensing package when the second temperature sensing package is used to detect the temperature;
[0134] A judgment module, used to judge whether the fluctuation amplitude of the actual sampled voltage exceeds a preset threshold at least once within a continuous preset time;
[0135] The processing module is used to determine that an abnormal fluctuation occurs when the fluctuation amplitude of the actual sampled voltage exceeds a preset threshold at least once within a continuous preset time, and to take the corrected temperature before the preset time as the latest temperature.
[0136] The temperature detection device can execute the temperature detection method provided in the embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not described in detail in this embodiment, please refer to the temperature detection method provided in the embodiment of the present invention.
[0137] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0138] Embodiment 4
[0139] This embodiment provides a temperature detection system, including: a control chip and the temperature detection device described in the above embodiment.
[0140] The temperature detection system refers to a system that requires temperature detection, such as an air conditioning system, a high temperature warning system, or a fire warning system.
[0141] Embodiment 5
[0142] This embodiment provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the above embodiment when executing the computer program.
[0143] Figure 8 is a schematic diagram of the hardware structure of an electronic device provided in Embodiment 5 of the present invention, such as Figure 8 As shown, the electronic device includes:
[0144] One or more processors 810 and memory 820, Figure 8 A processor 810 is taken as an example.
[0145] The electronic device may further include: an input device 830 and an output device 840 .
[0146] The processor 810, the memory 820, the input device 830 and the output device 840 may be connected via a bus or other means. Figure 8 The example of connecting through bus is taken in the following.
[0147] The memory 820 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the temperature detection method in the embodiment of the present invention. The processor 810 executes various functional applications and data processing by running the non-volatile software programs, instructions and modules stored in the memory 820, that is, implementing the above-mentioned temperature detection method.
[0148] The memory 820 may include a program storage area and a data storage area, wherein the program storage area may store an application required for operating the device and at least one function; the data storage area may store a corresponding relationship between a voltage difference and a temperature, etc. In addition, the memory 820 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
[0149] The input device 830 can receive input digital or character information and generate key signal input related to user settings and function control of the electronic device. The output device 840 can include a display device such as a display screen.
[0150] The one or more modules are stored in the memory 820, and when executed by the one or more processors 810, the temperature detection method in any of the above method embodiments is executed.
[0151] Embodiment 6
[0152] This embodiment provides a non-volatile computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the above embodiment are implemented.
[0153] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0154] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A temperature detection method, It is characterized in that include: Obtaining a first sampled voltage of a first temperature sensing package and a second sampled voltage of a second temperature sensing package, wherein the first temperature sensing package and the second temperature sensing package are both connected to a control chip, a distance from the first temperature sensing package to the control chip is smaller than a distance from the second temperature sensing package to the control chip, and the first temperature sensing package is arranged within a preset distance around the control chip; determining a temperature correction value according to the first sampling voltage and the second sampling voltage; Thereafter, when the second temperature sensing bulb is used to detect the temperature, the temperature correction is performed according to the temperature correction value.
2. The method according to claim 1, It is characterized in that Obtaining a first sampled voltage of a first temperature sensing package and a second sampled voltage of a second temperature sensing package includes: The first temperature sensing package and the second temperature sensing package are two temperature sensing packages, the first temperature sensing package is installed at a first position, and the second temperature sensing package is installed at a second position, and during power-on debugging, the first sampling voltage and the second sampling voltage are obtained through the first temperature sensing package and the second temperature sensing package respectively; or, The first temperature sensing package and the second temperature sensing package are the same temperature sensing package and the temperature sensing package is a pluggable structure. During power-on debugging, the temperature sensing package is first installed in the first position to obtain the first sampling voltage, and then the temperature sensing package is installed in the second position to obtain the second sampling voltage.
3. The method according to claim 1, It is characterized in that Determining a temperature correction value according to the first sampling voltage and the second sampling voltage includes: Determine the voltage across the thermistor in the first temperature-sensing package according to the first sampling voltage, recorded as the first voltage; determine the voltage across the thermistor and its connecting wire in the second temperature-sensing package according to the second sampling voltage, recorded as the second voltage; calculate the absolute value of the difference between the first voltage and the second voltage; and determine the temperature corresponding to the absolute value of the difference as the temperature correction value according to a preset corresponding relationship between the voltage difference and the temperature; or, The first temperature collected by the first temperature sensing package is determined according to the first sampling voltage, the second temperature collected by the second temperature sensing package is determined according to the second sampling voltage, and the absolute value of the difference between the first temperature and the second temperature is calculated as the temperature correction value.
4. The method according to claim 1, It is characterized in that When the second temperature sensing package is used to detect the temperature, temperature correction is performed according to the temperature correction value, including: When the second temperature sensing package is used to detect the temperature, an actual sampling voltage of the second temperature sensing package is obtained; Determine the temperature value collected by the second temperature sensing package according to the actual sampled voltage; The temperature value is corrected according to the thermistor characteristic of the second temperature sensing package and the temperature correction value to obtain a corrected final temperature.
5. The method according to claim 4, It is characterized in that The temperature value is corrected according to the thermistor characteristic of the second temperature sensing package and the temperature correction value to obtain a corrected final temperature, including: If the second temperature sensing package is a positive temperature coefficient thermistor, the temperature value is calculated minus the temperature correction value to obtain a corrected final temperature; If the second temperature sensing package is a negative temperature coefficient thermistor, the temperature value is added to the temperature correction value to obtain the corrected final temperature.
6. The method according to any one of claims 1 to 5, It is characterized in that When the second temperature sensing package is used to detect the temperature, the method further includes: Obtaining an actual sampled voltage of the second temperature sensing package; Determining whether the fluctuation amplitude of the actual sampled voltage exceeds a preset threshold at least once within a continuous preset time; If so, it is determined that an abnormal fluctuation occurs, and the corrected temperature before the preset time is taken as the latest temperature.
7. A temperature detection device, It is characterized in that include: an acquisition module, configured to acquire a first sampled voltage of a first temperature sensing package and a second sampled voltage of a second temperature sensing package, wherein the first temperature sensing package and the second temperature sensing package are both connected to a control chip, a distance from the first temperature sensing package to the control chip is smaller than a distance from the second temperature sensing package to the control chip, and the first temperature sensing package is arranged within a preset distance around the control chip; A determination module, configured to determine a temperature correction value according to the first sampled voltage and the second sampled voltage; The correction module is used to perform temperature correction according to the temperature correction value when the second temperature sensing package is used to detect the temperature.
8. A temperature detection system, It is characterized in that include: A control chip and the temperature detection device as claimed in claim 7.
9. The system according to claim 8, It is characterized in that The temperature detection system is an air conditioning system.
10. An electronic device, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 6 when executing the computer program.
11. A non-volatile computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
