Sensor detection system, detection method thereof and air conditioner
The sensor detection system in air conditioners uses a switching mechanism to connect to both input and output ends of sensors for precise parameter calculation, improving accuracy and safety by detecting faults and ensuring timely shutdowns.
Patent Information
- Application Number
- CN202510485887.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-07-15
AI Technical Summary
The existing air-conditioning sensor detection system has the problem of inaccurate detection accuracy, especially the output voltage of the high-voltage sensor is different at different input voltages, which leads to a deviation in the pressure value and a safety hazard, such as the inability to automatically shut down due to foreign objects.
The switch device is used to adjust the connection ends between the main control chip and the sensor, and the main control chip is connected to the input or output end of the sensor through a single-pole double-throw switch. Combined with a fixed resistor voltage division, the input voltage and output voltage of the sensor are obtained, and the actual value of the specified parameters is calculated.
It improves the accuracy and safety of sensor detection, can accurately calculate the actual value of the specified parameters, avoid errors caused by unstable output voltage of the voltage-regulating power module, and can promptly determine sensor failure or abnormality of the main control chip.
Smart Images

Figure CN120313804A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of air conditioners, and particularly to a sensor detection system, a detection method thereof, and an air conditioner. Background Art
[0002] With the development of society, air conditioners have become essential household appliances for people. In recent years, with the refinement and intelligence of control, high-voltage sensors are increasingly applied in actual air conditioner products.
[0003] Pressure sensing is used to detect the operating pressure of the system. After a given working voltage is applied, its output voltage has a fixed relationship with the corresponding pressure. In actual use, it is found that there are two problems to be solved. Problem one, under the same pressure, for different input voltages of the high-voltage sensor, the output voltages are different. And the input voltage is generally obtained by using a voltage regulator power supply such as 7805, which has a certain deviation. As a result, when different high-voltage sensors are connected to the same unit, the obtained pressure values have a certain deviation.
[0004] Problem two, pressure is the most critical information in the entire refrigeration system and must be reliable. Especially when the pressure is too high, the machine must be stopped immediately to prevent safety hazards such as explosion. In the original control system, if the pressure detection pin comes into contact with the adjacent sensor detection pin due to foreign objects, insects, etc., it will cause the voltage to be detected continuously even if the high-voltage sensor is unplugged, and the machine cannot stop automatically, resulting in safety hazards.
[0005] Therefore, how to design a sensor detection system, a detection method thereof, and an air conditioner that can improve the detection accuracy of the sensor and report the sensor failure problem in a timely manner is a technical problem urgently to be solved in the industry. Summary of the Invention
[0006] Aiming at the problem that the sensor detection data in the prior art is inaccurate and there is a certain deviation, the present invention proposes a sensor detection system, a detection method thereof, and an air conditioner.
[0007] The technical solution of the present invention is to propose a sensor detection system, which includes a sensor for detecting a specified parameter, and a main control chip connected to the sensor and used to calculate the detection value of the specified parameter, and further includes a switching device connected between the main control chip and the sensor;
[0008] The switching device can adjust the connection end of the main control chip to the sensor, and the sensor detection system calculates the actual value of the specified parameter according to the detection value of the specified parameter at different connection ends of the main control chip.
[0009] Further, the connection end of the sensor includes an input end and an output end. The input end of the sensor is connected to a power supply with a fixed voltage, and the output end of the sensor outputs different voltage parameters according to the magnitude of the specified parameter.
[0010] The detected values of the specified parameter include a first detected value when the main control chip is connected to the output end and a second detected value when the main control chip is connected to the input end.
[0011] Further, the switching device is a single-pole double-throw switch. The single-pole double-throw switch has a first connection end connected to the main control chip, a second connection end connected to the output end of the sensor, and a third connection end connected to the input end of the sensor.
[0012] The single-pole double-throw switch can switch the first connection end to be connected to the second connection end or the third connection end.
[0013] Further, at least two fixed resistors are connected in series at the first connection end, and the main control chip is connected between any two of the fixed resistors.
[0014] Further, two fixed resistors are provided, and the resistance values of the two fixed resistors are the same.
[0015] The magnitudes of the first detected value and the second detected value are twice the voltage value detected at the AD detection port of the main control chip.
[0016] The present invention also proposes a detection method for a sensor detection system, including:
[0017] Adjust the switching device to be in the first state so that the main control chip is connected to the output end of the sensor, and calculate the first detected value.
[0018] When the first detected value is within the first preset range, adjust the switching device to be in the second state so that the main control chip is connected to the input end of the sensor, and calculate the second detected value.
[0019] When the second detected value is within the second preset range, calculate the actual value of the specified parameter according to the first detected value and the second detected value.
[0020] Further, the calculation model for the actual value of the specified parameter is:
[0021] Q1 = (k * p + 0.1) * Q2;
[0022] Wherein, Q1 is the first detected value, Q2 is the second detected value, p is the actual value of the specified parameter, and k is the set coefficient of the sensor.
[0023] Further, when the first detected value exceeds the first preset range, it is determined that the sensor fails;
[0024] When the second detected value exceeds the second preset range, it is determined that the main control chip is abnormal. Further, the sensor is a high-voltage sensor, the set coefficient of the sensor is 0.017382, the first preset range is (0, 4.5V), and the second preset range is (4.75V, 5.2V).
[0025] The present invention also provides an air conditioner having the above-mentioned sensor detection system.
[0026] Compared with the prior art, the present invention has at least the following beneficial effects:
[0027] When obtaining the detected value of the specified parameter, the present invention simultaneously detects the first detected value at the input end of the sensor and the second detected value at the output end, and when calculating the actual value of the specified parameter, calculates according to the above first detected value and second detected value, greatly improving the detection accuracy of the specified parameter. At the same time, during the detection process, the present invention can determine whether the sensor fails according to the size relationship between the first detected value and the second detected value and the first preset range and the second preset range, further improving the safety of the sensor detection system. Description of the Drawings
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to these drawings.
[0029] Figure 1 is the schematic diagram of the sensor detection system in the prior art;
[0030] Figure 2 is Figure 1 the detection flow chart of the sensor detection system in the embodiment;
[0031] Figure 3 is the schematic diagram of the sensor detection system in the present invention;
[0032] Figure 4 is Figure 3 the detection flow chart of the sensor detection system in the embodiment. Detailed Embodiments
[0033] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0034] Therefore, a feature pointed out in this specification will be used to illustrate one feature of one embodiment of the present invention, rather than implying that each embodiment of the present invention must have the illustrated feature. In addition, it should be noted that this specification describes many features. Although some features may be combined to show possible system designs, these features can also be used in other combinations not explicitly described. Therefore, unless otherwise stated, the illustrated combination is not intended to be limiting.
[0035] The principle and structure of the present invention will be described in detail below with reference to the accompanying drawings and embodiments.
[0036] Please refer to Figure 1 , which is a schematic diagram of a sensor detection system in the prior art. Taking a high-voltage sensor as an example, it is used to detect the pressure parameter in an air-conditioning unit, that is, the specified parameter is the pressure parameter. The high-voltage sensor has three leads, which are respectively:
[0037] Power -: It is the negative power supply of the high-voltage sensor;
[0038] Power +: It is the positive power supply of the high-voltage sensor, marked as 5V. Generally, a voltage regulator power supply module such as 7805 is used for power supply, and its voltage range is 4.75 - 5.25V;
[0039] Output: It is the output voltage pin of the high-voltage sensor. The output voltage of this pin is different under different pressures. Its output voltage range is generally 0 - 4.5V. Since its highest output voltage is 4.5V, which exceeds the power supply voltage of the main control chip of 3.3V, two resistors are connected in series at this output voltage pin for voltage division to avoid damaging the main control chip.
[0040] The main control chip is connected to the high-voltage sensor and has the following pins:
[0041] Power -, Power +: They are the power supply pins of the main control chip, and their voltage is generally 3.3V;
[0042] High-voltage sensor AD detection port: It is used to detect the voltage value connected to this pin. Here, it is connected to the high-voltage sensor to detect the output voltage value of the high-voltage sensor;
[0043] Temperature sensor AD detection port: It is used to detect the voltage value connected to this pin. Generally, it can be connected to a temperature sensor to detect the output voltage value of the temperature sensor;
[0044] Please refer to Figure 2 , which is Figure 1 the schematic diagram of the sensor detection system in
[0045] Connect the main control chip between two resistors connected in series at the output voltage pin of the high-voltage sensor. First, detect the voltage between the two resistors through the high-voltage sensor AD detection port of the main control chip. This step is also the same as in Figure 2 : Collect the AD value of the high-voltage sensor AD detection port, calculate the voltage value U1 corresponding to the high-voltage sensor AD detection port according to the AD value. Here, the voltage value U1 is also the voltage between the two resistors;
[0046] Then, calculate the voltage at the output voltage pin of the high-voltage sensor according to the principle of resistor voltage division, that is, calculate the corresponding high-voltage sensor output voltage value U2 in Figure 2 ;
[0047] Then, determine whether the output voltage value U2 is within the range of 0 to 4.5V. As mentioned above, the output voltage range of the high-voltage sensor is 0~4.5V. When it exceeds this range, it can be determined that the air-conditioning unit has a fault;
[0048] When it is within this voltage range, calculate the current corresponding pressure in the air-conditioning unit according to the specific output voltage value U2, that is, calculate the current corresponding pressure according to U2 and the input voltage 5V of the high-voltage sensor in Figure 2 . Since the positive power supply of the high-voltage sensor is labeled as 5V, the input voltage is defaulted to 5V here, and its calculation method is to calculate through the input voltage and output voltage value U2 of this high-voltage sensor;
[0049] However, in the above method, although the positive power supply of the high-voltage sensor is labeled as 5V, its actual power supply voltage is supplied by the voltage stabilizing power supply module, and its voltage range is 4.75~5.25V. There is a certain deviation, which will cause a certain deviation in the finally measured pressure value. In addition, the detection of pressure is the most critical information in the air-conditioning unit and must be reliable. Especially when the pressure is too high, the unit must be shut down immediately to prevent safety hazards such as explosion. Figure 1 In the sensor detection system of
[0050] Based on the above problems, the present invention provides a sensor detection system, which includes a sensor for detecting a specified parameter, and a main control chip connected to the sensor and used for calculating the detection value of the specified parameter. The system further includes a switching device connected between the main control chip and the sensor;
[0051] The switching device can adjust the connection terminal of the main control chip to the sensor. The sensor detection system calculates the actual value of the specified parameter according to the detection values of the specified parameter at different connection terminals of the main control chip.
[0052] In the traditional solution, the main control chip is actually only connected to the output voltage pin of the high-voltage sensor, that is, the output terminal of the high-voltage sensor. The reason for the detection error is that the input voltage of the high-voltage sensor cannot be accurately obtained, that is, the voltage at the input terminal of the high-voltage sensor is not detected. In the present invention, a switching device is provided to adjust the connection terminal of the main control chip to the sensor, mainly for switching the connection of the main control chip to the output terminal or the input terminal of the sensor. When the main control chip is connected to the input terminal of the sensor, the accurate input voltage can be obtained, which can avoid the detection error caused by the unstable output voltage of the voltage stabilization power supply module. Here, the detection values of the specified parameter at different connection terminals are the input voltage value at the input terminal and the output voltage value at the output terminal of the above sensor, and the actual value of the specified parameter is the finally calculated value of the specified parameter. For example, if the specified parameter is pressure, the actual value of the specified parameter is the pressure value calculated from the input voltage and output voltage of the sensor.
[0053] The high-voltage sensor is only an example in the present invention. The present invention is not limited to this example. The above sensor can also be changed to a temperature sensor, a humidity sensor, etc., and the same technical effect can be obtained. For the above specified parameter, when the sensor is a high-voltage sensor, the specified parameter is pressure; when the sensor is a temperature sensor, the specified parameter is temperature; when the sensor is a humidity sensor, the specified parameter is humidity.
[0054] Specifically, the connection terminals of the above sensor include an input terminal and an output terminal. The input terminal of the sensor is connected to a power supply with a fixed voltage, and the output terminal of the sensor outputs different voltage parameters according to the magnitude of the specified parameter;
[0055] The detection values of the specified parameter include a first detection value when the main control chip is connected to the output terminal and a second detection value when the main control chip is connected to the input terminal.
[0056] Please refer to Figure 3 , here the sensor is taken as an example of a high-voltage sensor. The input terminal of the sensor, that is, the Figure 3 "Power +" port in the attachment, is connected to the positive pole of the power supply to receive the input voltage. The output terminal of the sensor, that is, the Figure 3The "output" port in it is connected in series with multiple resistors and connected to the main control chip, and is used to provide an output voltage. The power supply with a fixed voltage mentioned above is also attached Figure 3 The "5V power supply" in it uses a voltage stabilizing power supply module such as 7805;
[0057] The first detection value is also the input voltage of the above-mentioned sensor, and the second detection value is also the output voltage of the above-mentioned sensor. It should be noted that since the main control chip is connected between multiple series resistors, therefore, the above first detection value and second detection value are not the voltages detected by the main control chip, but the input voltage and output voltage obtained after calculating the resistor voltage division;
[0058] After the above setting method in the present invention, the main control chip can be switched to be connected to the input end and the output end of the high-voltage sensor through the switching device, so as to detect the input voltage and output voltage of the high-voltage sensor respectively. When setting the high-voltage sensor, the corresponding specified parameter is pressure, which is only related to the input voltage and output voltage of the high-voltage sensor. Therefore, after the above setting, the actual value of the specified parameter can be accurately calculated, avoiding the error that occurs when using the 5V voltage as the input voltage for calculation due to the unstable output voltage of the voltage stabilizing power supply module.
[0059] Furthermore, in the present invention, the switching device is a single-pole double-throw switch. The single-pole double-throw switch has a first connection end connected to the main control chip, a second connection end connected to the output end of the sensor, and a third connection end connected to the input end of the sensor;
[0060] The single-pole double-throw switch can switch the first connection end to be connected to the second connection end or the third connection end.
[0061] Please refer to Figure 3 , this single-pole double-throw switch has multiple connection ends. The connection end labeled 1 is the first connection end, the connection end labeled 2 is the second connection end, and the connection end labeled 3 is the third connection end. Among them, the connection end labeled 1 is the fixed end of this single-pole double-throw switch;
[0062] From the above attachment Figure 3 It can be clearly seen that the connection end labeled 1 is connected to the high-voltage sensor AD detection port of the main control chip through resistor R1 and resistor R2, that is, the first connection end is connected to the high-voltage sensor AD detection port of the main control chip;
[0063] The connection end labeled 2 is connected to the "output" port of the high-voltage sensor, that is, the second connection end is connected to the output end of the high-voltage sensor;
[0064] The connection end labeled 3 is connected to the "input" port of the high-voltage sensor, that is, the third connection end is connected to the input end of the high-voltage sensor;
[0065] According to the working principle of the single-pole double-throw switch, its fixed terminal can be switched to connect to the other two ports respectively. That is, the connection terminal labeled 1 can be switched to connect to the connection terminal labeled 2 or the connection terminal labeled 3 respectively. That is, the single-pole double-throw switch in the previous text can switch the first connection terminal to connect to the second connection terminal or the third connection terminal.
[0066] Among them, when the first connection terminal is connected to the second connection terminal, the AD detection port of the high-voltage sensor of the main control chip is actually connected to the output terminal of the high-voltage sensor. At this time, the specified parameter detected and calculated by the main control chip is actually the output voltage of the high-voltage sensor.
[0067] When the first connection terminal is connected to the third connection terminal, the AD detection port of the high-voltage sensor of the main control chip is actually connected to the input terminal of the high-voltage sensor. At this time, the specified parameter detected and calculated by the main control chip is actually the input voltage of the high-voltage sensor.
[0068] According to the calculation model provided above, when the input voltage and output voltage of the high-voltage sensor are obtained, the current pressure detected by the high-voltage sensor can be calculated. That is, in the present invention, through the setting of the above single-pole double-throw switch, the switching of the input voltage and output voltage detection of the high-voltage sensor by the main control chip can be realized, so as to realize the calculation of the current pressure detected by the high-voltage sensor.
[0069] It should be noted that here the high-voltage sensor is taken as an example. For this, the specified parameters corresponding to different connection terminals of the main control chip to the sensor are respectively the input voltage and output voltage of the high-voltage sensor, and the actual value of the specified parameter is the current pressure detected by the high-voltage sensor. When other sensors are used, the specified parameters will also be adjusted adaptively.
[0070] Furthermore, at least two fixed resistors are connected in series at the first connection terminal, and the main control chip is connected between any two fixed resistors;
[0071] This setting is because the power supply voltage of the main control chip, that is, the voltage of the detection pin of the main control chip is generally small and lower than the output voltage of the sensor. If the detection pin of the main control chip is directly connected to the output terminal of the sensor, it may cause damage to the sensor due to the too high output voltage of the sensor.
[0072] Here, the high-voltage sensor is taken as an example. Please refer to Figure 3 , at this time, the detection pin of the main control chip is the AD detection port of the high-voltage sensor, and its power supply voltage is 3.3V. For the high-voltage sensor, the voltage output from its "output" port can reach up to 4.5V at most, which far exceeds the power supply voltage of the AD detection port of the high-voltage sensor of the main control chip. At this time, it may cause damage to the main control chip.
[0073] To this end, the design concept of the present invention is that at least two fixed resistors are also connected in series at the first connection end, and the main control chip is connected between any two fixed resistors. Since the series resistors divide the voltage, they can share a part of the voltage output to the detection pin of the main control chip, so that the voltage received by the detection pin of the main control chip is less than its power supply voltage. In this way, the problem of damage to the main control chip caused by too high output voltage of the sensor can be avoided.
[0074] Generally, for multiple fixed resistors connected in series, such as n resistors connected in series, let the resistor connected to the ground be the first resistor, and the resistor connected to the sensor be the nth resistor. Assume that the detection pin of the main control chip is connected between the pth resistor and the p + 1th resistor. According to the principle of series voltage division, the voltage received by the detection pin of the main control chip at this time is U*p / n, where U is the output voltage of the sensor, and the resistance values of the multiple fixed resistors connected in series are the same.
[0075] After the above settings of the present invention, the highest voltage received by the detection pin of the main control chip can be reasonably controlled, and the problem of damage to the detection pin of the main control chip caused by too high output voltage of the sensor can be avoided.
[0076] In a preferred embodiment of the present invention, the number of the series-connected fixed resistors is 2, and the resistance values of the two fixed resistors are the same;
[0077] The magnitudes of the first detection value and the second detection value are twice the voltage value detected at the AD detection port of the main control chip.
[0078] Please refer to Figure 3 , which is an embodiment of setting two fixed resistors in series. The above two fixed resistors are respectively Figure 3 the resistor R1 and the resistor R2 in. It can be seen from this appendix Figure 3 that the resistance values of the resistor R1 and the resistor R2 are both 20 k ohms, that is, the resistance values of the resistor R1 and the resistor R2 are the same;
[0079] According to the calculation formula provided above, the voltage received by the detection pin of the main control chip is U*p / n. Here, substituting n = 2 and p = 1, the voltage received by the detection pin of the main control chip can be calculated as U / 2;
[0080] Since the first detection value and the second detection value are both equivalent to the voltage divided by the above fixed resistors, when the first connection end of the single-pole double-throw switch is connected to the second connection end, the above first detection value is also the output voltage of the high-voltage sensor, and the voltage received by the detection pin of the main control chip is half of the output voltage;
[0081] Similarly, when the first connection terminal of the single-pole double-throw switch is connected to the third connection terminal, the second detection value is also the input voltage of the high-voltage sensor, and the voltage received by the detection pin of the main control chip is half of the input voltage;
[0082] That is, the magnitudes of the first detection value and the second detection value in the previous text are twice the voltage value detected at the AD detection port of the main control chip.
[0083] With the above settings, the present invention can calculate and obtain the first detection value and the second detection value more precisely and concisely.
[0084] Based on the above sensor detection system, the present invention also proposes a detection method for the sensor detection system, which includes the following steps:
[0085] Adjust the switching device to the first state, connect the main control chip to the output end of the sensor, and calculate the first detection value;
[0086] When the first detection value is within the first preset interval, adjust the switching device to the second state, connect the main control chip to the input end of the sensor, and calculate the second detection value;
[0087] When the second detection value is within the second preset interval, calculate the actual value of the specified parameter according to the first detection value and the second detection value.
[0088] The switching device here is also the single-pole double-throw switch in the previous text. Its first state and second state are respectively when the first connection terminal of the single-pole double-throw switch is connected to the second connection terminal, and when the first connection terminal and the third connection terminal are connected;
[0089] Combining it with the detection method of the above sensor detection system, the steps are: adjust the switching device to the first state, connect the main control chip to the output end of the sensor, and calculate the first detection value;
[0090] The actual steps here are to connect the first connection terminal of the single-pole double-throw switch to the second connection terminal. At this time, the main control chip is connected to the output end of the sensor, and the detected voltage is the output voltage of the sensor, that is, the first detection value. It needs to be calculated through the series fixed resistor voltage division formula, that is, calculate the first detection value;
[0091] Then judge whether the first detection value is within the first preset interval. Here, the first preset interval is also the output voltage interval of the sensor. Taking the high-voltage sensor as an example, normally, the output voltage of the high-voltage sensor will not be higher than 4.5V. That is, the corresponding first preset interval set at this time is 0 - 4.5V. When the first detection value exceeds this first preset interval, it can be considered that the high-voltage sensor has a fault. That is, the present invention can judge whether the high-voltage sensor has a fault through this step;
[0092] When the first detection value is within the first preset range, adjust the switching device to the second state, connect the main control chip to the input end of the sensor, and calculate the second detection value;
[0093] It is consistent with the setting of the first state. The actual step is to connect the first connection terminal and the third connection terminal of the single-pole double-throw switch. At this time, the main control chip is connected to the input end of the sensor, and the detected voltage is the input voltage of the sensor, that is, the second detection value, which needs to be calculated through the series fixed resistor voltage division formula, that is, calculate the second detection value;
[0094] After completing the calculation of the above second detection value, it is necessary to determine whether it is within the second preset range. Here, taking Figure 3 an embodiment as an example, the power supply connected to the input end of the high-voltage sensor is a voltage stabilizing power supply module such as 7805, and the output voltage range is generally 4.75V to 5.25V. That is, the input voltage received by the input end of the high-voltage sensor must also be within this voltage range, and this voltage range is the second preset range. When the calculated second detection value exceeds this second preset range at this time, it can be determined that the main control chip is abnormal, that is, the faults described in the previous text may occur: the detection pins of the main control chip and other adjacent detection pins are in contact with each other due to foreign objects, insects, etc., resulting in abnormal detection of the main control chip;
[0095] It should be noted that compared with the judgment of the first detection value here, it is determined that the main control chip is abnormal because for the voltage stabilizing power supply module, its output voltage is generally relatively stable and will not exceed this second preset range. When detecting this second detection value, the detection pin of the main control chip is actually connected to the output end of the voltage stabilizing power supply module. Whether the sensor fails or not will not affect the second detection value detected by the main control chip. Therefore, when the second detection value exceeds the second preset range, it can be determined that the main control chip is abnormal, that is, the present invention can judge whether the main control chip is abnormal through this step;
[0096] Only when both the above first detection value and second detection value are normal, will the calculation of the actual value of the specified parameter be carried out.
[0097] Among them, the calculation model of the actual value of the specified parameter is:
[0098] Q1=(k*p + 0.1)*Q2;
[0099] Among them, Q1 is the first detection value, Q2 is the second detection value, p is the actual value of the specified parameter, and k is the set coefficient of the sensor.
[0100] The calculation model is derived by calculation according to the working principle of the sensor. Taking the high-voltage sensor as an example, there is a corresponding relationship between the current pressure in the environment where the high-voltage sensor is located and its voltage value, that is, the above-mentioned set coefficient, and its value is 0.017392;
[0101] For the traditional scheme, the first detection value Q1 is generally detected and calculated by the main control chip. However, since the second detection value Q2 is connected to the output end of the regulated power supply module, it is generally defaulted to 5V, which causes problems of abnormal detection due to this setting. In the present invention, by detecting the second detection value Q1, the second detection value Q2 is made accurate, thereby avoiding the above-mentioned problem of abnormal detection.
[0102] As described above, in this embodiment, the sensor is a high-voltage sensor, the set coefficient of the sensor is 0.017382, the first preset interval is (0, 4.5V), and the second preset interval is (4.75V, 5.2V).
[0103] Similarly, it should be noted that the above first preset interval is actually set according to the output voltage interval of the sensor. For the high-voltage sensor, its output voltage interval is 0 to 4.5V, and the first preset interval is correspondingly set to (0, 4.5V). When other sensors are used, the above first preset interval needs to be adaptively adjusted according to the actually selected sensor type;
[0104] Similarly, the second preset interval is actually set according to the output voltage interval of the power supply connected to the sensor. In the above embodiment, the power supply used is a regulated power supply module such as 7805, and its output voltage interval is 4.75V to 5.2V. Therefore, its second preset interval is correspondingly set to (4.75V, 5.2V). When other sensors are used, the above second preset interval needs to be adaptively adjusted according to the actually selected sensor type;
[0105] Similarly, the set coefficient of the sensor needs to be adaptively adjusted according to the actually selected sensor type.
[0106] The following combines the attached Figure 4 , and explains the entire working process of the present invention. Please refer to Figure 4 , which includes the following steps:
[0107] The main control chip program runs after reset;
[0108] The switch control pin outputs a high level, making the double-throw switches 1 and 2 conduct; the double-throw switch here is the single-pole double-throw switch in the previous text, and the conduction of the double-throw switches 1 and 2 means that the first connection end and the second connection end of the single-pole double-throw switch are connected. Please refer to Figure 3, the main control chip actually also has a switch control pin, which is connected to a single-pole double-throw switch and is used to control the connection between the first connection end of the single-pole double-throw switch and the second connection end or the third connection end. In the present invention, a high level is output through the switch control pin of the main control chip, so that the first connection end of the single-pole double-throw switch is connected to the second connection end. At this time, the single-pole double-throw switch is in the first state, that is, the adjustment switching device in the previous step is in the first state, and the main control chip is connected to the output end of the sensor;
[0109] Collect the AD value a of the AD detection port of the high-voltage sensor, calculate the corresponding voltage value U1 of the AD detection port of the high-voltage sensor according to the AD value, and calculate the corresponding output voltage value U2 of the high-voltage sensor; where, the output voltage value U2 of the high-voltage sensor here is also the first detection value in the previous text. Since the main control chip generally detects the AD value during detection, it is necessary to first convert it into the corresponding voltage value, that is, calculate the corresponding voltage value U1 of the AD detection port of the high-voltage sensor according to the AD value. The voltage value U1 here is also the voltage after the output voltage of the high-voltage sensor is serially divided by a fixed resistor. At this time, it is still necessary to obtain the output voltage of the high-voltage sensor according to the formula of series voltage division, that is, calculate the first detection value in the previous step;
[0110] Judge whether 0 < U2 < 4.5V? This is also to judge whether the first detection value in the previous step is within the first preset interval. If the determination is no, then it is necessary to execute the steps in Appendix Figure 4 "The unit shuts down and reports a high-voltage sensor fault", otherwise, execute the process of detecting and calculating the second detection value;
[0111] The switch control pin outputs a low level, so that the double-throw switch 1 and 3 are turned on; the double-throw switch here is also the single-pole double-throw switch in the previous text. The conduction of the double-throw switch 1 and 3 means that the first connection end of the single-pole double-throw switch is connected to the third connection end. Please refer to Figure 3 , the switch control pin of the main control chip is connected to the single-pole double-throw switch and is used to control the connection between the first connection end of the single-pole double-throw switch and the second connection end or the third connection end. In the present invention, a low level is output through the switch control pin of the main control chip, so that the first connection end of the single-pole double-throw switch is connected to the third connection end. At this time, the single-pole double-throw switch is in the second state, that is, the adjustment switching device in the previous step is in the second state, and the main control chip is connected to the input end of the sensor;
[0112] Collect the AD value b of the AD detection port of the high-voltage sensor, calculate the corresponding voltage value U3 of the AD detection port of the high-voltage sensor according to the AD value, and calculate the corresponding power supply voltage value U4 of the high-voltage sensor; where the power supply voltage value U4 of the high-voltage sensor here is also the second detection value in the previous text, and the voltage value U3 here is also the voltage after the input voltage of the high-voltage sensor is serially divided by a fixed resistor. At this time, it is still necessary to obtain the input voltage of the high-voltage sensor according to the formula of series voltage division, that is, to calculate the second detection value in the previous step.
[0113] Judge whether 4.75 < U2 < 5.2V? That is, to judge whether the second detection value in the previous step is within the second preset interval. If the judgment is negative, it is necessary to execute the steps in the appendix Figure 4 "The unit shuts down and reports a fault in the AD detection port of the high-voltage sensor", otherwise, execute the process of calculating the actual value of the specified parameter.
[0114] Calculate the current corresponding pressure according to U2 and the input voltage U4 of the high-voltage sensor; that is, to calculate the actual value of the specified parameter according to the first detection value and the second detection value in the previous step.
[0115] Based on the above detection process, it can be found that when the present invention obtains the detection value of the specified parameter, it simultaneously detects the first detection value at the input end of the sensor and the second detection value at the output end, and when calculating the actual value of the specified parameter, it calculates according to the above first detection value and the second detection value, which greatly improves the detection accuracy of the specified parameter. At the same time, in the detection process of the present invention, it is possible to judge whether the sensor is faulty according to the size relationship between the first detection value and the second detection value and the first preset interval and the second preset interval, further improving the safety of the sensor detection system.
[0116] Based on the above sensor detection system, the present invention also proposes an air conditioner, which has the above sensor detection system.
[0117] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A sensor detection system, comprising a sensor for detecting a specified parameter, and a main control chip connected to the sensor and used for calculating a detection value of the specified parameter, characterized in that, It further includes a switching device connected between the main control chip and the sensor; The switching device can adjust the connection end of the main control chip to the sensor, and the sensor detection system calculates the actual value of the specified parameter according to the detection value of the specified parameter at different connection ends of the main control chip.
2. The sensor detection system according to claim 1, wherein The connection end of the sensor includes an input end and an output end. The input end of the sensor is connected to a power supply with a fixed voltage, and the output end of the sensor outputs different voltage parameters according to the magnitude of the specified parameter; The detection value of the specified parameter includes a first detection value when the main control chip is connected to the output end and a second detection value when the main control chip is connected to the input end.
3. The sensor detection system according to claim 2, wherein The switching device is a single-pole double-throw switch. The single-pole double-throw switch has a first connection end connected to the main control chip, a second connection end connected to the output end of the sensor, and a third connection end connected to the input end of the sensor; The single-pole double-throw switch can switch the first connection end to be connected to the second connection end or the third connection end.
4. The sensor detection system according to claim 3, characterized in that At least two fixed resistors are also connected in series at the first connection end, and the main control chip is connected between any two of the fixed resistors.
5. The sensor detection system according to claim 4, characterized in that, There are two fixed resistors, and the resistance values of the two fixed resistors are the same; The magnitudes of the first detection value and the second detection value are twice the voltage value detected at the AD detection port of the main control chip.
6. A detection method using the sensor detection system according to any one of claims 1 to 5, characterized in that, It includes: Adjust the switching device to be in the first state, so that the main control chip is connected to the output end of the sensor, and calculate the first detection value; When the first detection value is within the first preset range, adjust the switching device to be in the second state, so that the main control chip is connected to the input end of the sensor, and calculate the second detection value; When the second detection value is within the second preset range, calculate the actual value of the specified parameter according to the first detection value and the second detection value.
7. The detection method of the sensor detection system according to claim 6, wherein The calculation model of the actual value of the specified parameter is: Q1 = (k * p + 0.1) * Q2; Wherein, Q1 is the first detection value, Q2 is the second detection value, p is the actual value of the specified parameter, and k is the set coefficient of the sensor.
8. The detection method of the sensor detection system according to claim 6, characterized in that, When the first detection value exceeds the first preset range, it is determined that the sensor is faulty; When the second detection value exceeds the second preset range, it is determined that the main control chip is abnormal.
9. The detection method of the sensor detection system according to claim 7, characterized in that The sensor is a high-voltage sensor, the set coefficient of the sensor is 0.017382, the first preset range is (0, 4.5V), and the second preset range is (4.75V, 5.2V).
10. An air conditioner, characterized in that, The air conditioner has the sensor detection system according to any one of claims 1 to 5.