Key control circuit, home appliance, and control method of key control circuit

CN116165945BActive Publication Date: 2026-10-20HISENSE (GUANGDONG) AIR CONDITIONER
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310129650.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-16
Publication Date
2026-10-20
Estimated Expiration
2043-02-16

AI Technical Summary

Technical Problem

[0002]目前家电设备要适应世界各地环境,按键作为家电设备最常用控制方式,当按键故障是容易造成家电设备无法使用而退货,另外当按键故障时出口海外的家电设备进行上门维修的成本高昂,因此需改善按键的故障率

Benefits of technology

[0008]根据本发明实施例的按键控制电路,基于上述译码电路与按键电路、控制器之间的连接方式,通过控制器根据每个开关对应的预设地址码控制译码电路的输出信号状态,而每个开关对应的预设地址码分别对应不同的输出信号状态,在无开关动作时,检测端口处的电平信号保持不变,而当任一开关按下时,则会触发检测端口处的电平信号发生改变,由此控制器根据检测端口的电平信号的变化来识别是否有开关被按下,同时可根据此时的输出信号状态来识别出当前被按下的开关,从而实现对不同开关闭合情况的识别,且由于不同的开关对应不同的输出信号状态即每个开关有对应的预设地址码,从而在译码电路输出与某一开关对应的输出信号状态时,此时检测端口的电平信号是否变化仅会与该某一开关是否按下有关,并不会因其他开关按下而触发电平信号改变,由此达到开关之间互不干扰的效果,避免开关误判的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116165945B_ABST
    Figure CN116165945B_ABST
Patent Text Reader

Abstract

The application discloses a kind of key control circuit, household appliance and the control method of key control circuit, the key control circuit includes: key circuit, key circuit includes X switch, wherein, X≥1;Decoding circuit, decoding circuit includes signal input port and X output port, each output port is connected with the first end of each switch one-to-one correspondence;Controller, controller includes signal output port and detection port, detection port is connected with the second end of each switch, controller is configured as: obtaining the level signal at the detection port and the preset address code corresponding to each switch;According to preset address code control decoding circuit output signal state;According to output signal state and level signal, determine the closing condition of each switch.The key control circuit is used to realize the recognition of switch closing condition by the different output signal state of decoding circuit, and the effect that switches do not interfere with each other can be achieved, to avoid the problem of switch misjudgment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of home appliance technology, and in particular to a button control circuit, a home appliance, and a control method for the button control circuit. Background Technology

[0002] Currently, home appliances need to adapt to environments around the world. Buttons are the most common control method for home appliances. When buttons malfunction, it can easily render the home appliances unusable and lead to returns. In addition, when buttons malfunction, the cost of on-site repair for home appliances exported overseas is high. Therefore, it is necessary to improve the failure rate of buttons.

[0003] In related technologies, existing button control circuits have voltage divider resistors connected to switches in each button control circuit, and the resistance values ​​of the voltage divider resistors in each button control circuit are different. When a button in a certain circuit is pressed, the switch closes, and the button control circuit in that circuit is turned on, and the MCU (Microcontroller Unit)... The MCU (Microcontroller Unit) acquires the voltage values ​​corresponding to the voltage divider resistors at its ports. Based on the acquired voltage values, the MCU determines which switch has been pressed. However, existing button control circuits require voltage divider resistors with different resistance values ​​and large resistance differences to ensure that the voltage values ​​corresponding to the voltage divider resistors are easily distinguishable. This limits the number of switches that can be expanded. In addition, the button control circuit has a combination function, which requires consideration of the distinguishability of the combination key resistance values ​​when two or three switches are pressed simultaneously. This results in a small range of selectable resistance values ​​for the voltage divider resistors, increasing the design difficulty and the difficulty of distinguishing the switches. This leads to poor expandability of the button control circuit. Furthermore, common switches are often used in environments with moisture and condensation, such as dehumidifiers, or where dust is present. This can cause short circuits in the switch pins or internal contacts, resulting in long-term current flow through the switch. This can burn out the internal silver layer of the switch and damage it, leading to poor reliability of the button control circuit. Additionally, the existing button control circuits have strong coupling between the switches. When any switch fails, the button control circuit will fail. Summary of the Invention

[0004] The present invention aims to at least solve one of the technical problems existing in the prior art. Therefore, one objective of the present invention is to provide a button control circuit that uses different output signal states of a decoding circuit to identify the closed state of a switch, achieving the effect of non-interference between switches and avoiding the problem of switch misjudgment.

[0005] The second objective of this invention is to provide a household appliance.

[0006] The third objective of this invention is to provide a control method for a key control circuit.

[0007] To address the aforementioned problems, a first aspect of the present invention provides a button control circuit, comprising: a button circuit including X switches, wherein X ≥ 1; a decoding circuit including a signal input port and X output ports, each output port being connected to a first terminal of each switch; and a controller including a signal output port and a detection port, the signal output port being connected to the signal input port, and the detection port being connected to a second terminal of each switch. The controller is configured to: acquire a preset address code corresponding to each switch and a level signal at the detection port; control the output signal state of the decoding circuit according to the preset address code; and determine the closed state of each switch according to the output signal state and the level signal.

[0008] According to the button control circuit of the present invention, based on the connection method between the decoding circuit, the button circuit, and the controller, the controller controls the output signal state of the decoding circuit according to the preset address code corresponding to each switch. The preset address code corresponding to each switch corresponds to a different output signal state. When there is no switch action, the level signal at the detection port remains unchanged. When any switch is pressed, the level signal at the detection port will change. Thus, the controller can identify whether a switch has been pressed based on the change in the level signal at the detection port. At the same time, it can identify the currently pressed switch based on the output signal state at this time, thereby realizing the identification of different switch closing states. Since different switches correspond to different output signal states, that is, each switch has a corresponding preset address code, when the decoding circuit outputs the output signal state corresponding to a certain switch, whether the level signal at the detection port changes is only related to whether that particular switch is pressed, and will not be triggered by other switches being pressed. This achieves the effect of no interference between switches and avoids the problem of switch misjudgment.

[0009] In some embodiments, the button circuit further includes a backup switch, the first end of which is connected to the detection port; the decoding circuit further includes a backup output port, which is connected to the second end of the backup switch; the controller is further configured to: acquire the fault status of each switch; after determining that any switch has failed based on the fault status of each switch, acquire the backup address code corresponding to the backup switch; control the output signal status of the decoding circuit and enable the backup switch based on the preset address code and the backup address code, so as to switch the function corresponding to any switch to the backup switch; and determine the closing status of the backup switch based on the output signal status and the level signal.

[0010] In some embodiments, the controller includes: a switch function switching unit for receiving a user-defined switch function switching command; and a main control unit connected to the switch function switching unit for activating the backup switch according to the switch function switching command.

[0011] In some embodiments, the controller is further configured to send a backup switch activation signal when the backup switch is activated; the button control circuit further includes a prompting circuit connected to the controller, configured to provide a prompt based on the backup switch activation signal.

[0012] In some embodiments, the decoding circuit further includes an extension port adapted to connect to an extension decoding circuit.

[0013] In some embodiments, the decoding circuit is a decoder 74HC138, and the signal input port includes a first signal input port, a second signal input port, and a third signal input port; the signal output port includes a first signal output port, a second signal output port, and a third signal output port, the first signal output port being connected to the first signal input port, the second signal output port being connected to the second signal input port, and the third signal output port being connected to the third signal input port.

[0014] In some embodiments, the controller further includes a control signal output port; the decoding circuit further includes a first enable input port, a second enable input port and a third enable input port, wherein the first enable input port and the second enable input port are both grounded, and the third enable input port is connected to the control signal output port.

[0015] A second aspect of the present invention provides a home appliance including the button control circuit described in the above embodiments.

[0016] According to the embodiments of the present invention, the home appliances can solve the problem of home appliances not working properly due to button control circuit failure by using the button control circuit described above, thereby reducing the failure rate of home appliances.

[0017] A third aspect of the present invention provides a control method for a button control circuit, used in the button control circuit described in the above embodiments. The control method includes: acquiring a preset address code corresponding to each switch and a level signal at the detection port; controlling the output signal state of the decoding circuit according to the preset address code; and determining the closed state of each switch according to the output signal state and the level signal.

[0018] According to the control method of the key control circuit of the present invention, based on the key control circuit, the output signal state of the decoding circuit is controlled by the preset address code corresponding to each switch. The preset address code corresponding to each switch corresponds to a different output signal state. When there is no switch action, the level signal at the detection port remains unchanged. When any switch is pressed, the level signal at the detection port will be triggered to change. Thus, the change in the level signal at the detection port is used to identify whether a switch has been pressed. At the same time, the currently pressed switch can be identified based on the output signal state at this time, thereby realizing the identification of different switch closing states. Since different switches correspond to different output signal states, that is, each switch has a corresponding preset address code, when the decoding circuit outputs the output signal state corresponding to a certain switch, whether the level signal at the detection port changes is only related to whether that particular switch is pressed, and will not be triggered by other switches being pressed. This achieves the effect of no interference between switches and avoids the problem of switch misjudgment.

[0019] In some embodiments, the control method further includes: acquiring the fault status of each switch; determining, after any switch has failed based on the fault status of each switch, acquiring the backup address code corresponding to the backup switch; controlling the output signal status of the decoding circuit and enabling the backup switch based on the preset address code and the backup address code, so as to switch the function corresponding to any switch to the backup switch; and determining the closing status of the backup switch based on the output signal status and the level signal.

[0020] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0021] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:

[0022] Figure 1 This is a schematic diagram of a key control circuit according to an embodiment of the present invention;

[0023] Figure 2 This is a schematic diagram of an existing button control circuit;

[0024] Figure 3 This is a flowchart of controller control according to an embodiment of the present invention;

[0025] Figure 4 This is a structural block diagram of a controller according to an embodiment of the present invention;

[0026] Figure 5This is a structural block diagram of a key control circuit according to an embodiment of the present invention;

[0027] Figure 6 This is a structural block diagram of a decoding circuit according to an embodiment of the present invention;

[0028] Figure 7 This is a schematic diagram of a key control circuit according to another embodiment of the present invention;

[0029] Figure 8 This is a schematic diagram of the input-output timing of a decoding circuit according to an embodiment of the present invention;

[0030] Figure 9 This is a structural block diagram of a household appliance according to an embodiment of the present invention;

[0031] Figure 10 This is a flowchart of a control method for a button control circuit according to an embodiment of the present invention.

[0032] Figure label:

[0033] Home appliances 100; Button control circuit 90;

[0034] Key circuit 1; Decoding circuit 2; Controller 3; Prompt circuit 4;

[0035] Switch 11; Backup switch 12; Signal input port 21; Output port 22; Backup output port 23; First enable input port 24; Second enable input port 25; Third enable input port 26; Expansion port 27; Signal output port 31; Detection port 32; Switch function switching unit 33; Main control unit 34; Control signal output port 35; Pull-up resistor R1; First signal input port A0; Second signal input port A1; Third signal input port A2; First signal output port Port_A; Second signal output port Port_B; Third signal output port Port_C. Detailed Implementation

[0036] The embodiments of the present invention are described in detail below. The embodiments described with reference to the accompanying drawings are exemplary. The embodiments of the present invention are described in detail below.

[0037] The following is for reference. Figure 1 The button control circuit 90 according to an embodiment of the present invention is described as follows: Figure 1 As shown, the button control circuit 90 includes: a button circuit 1, a decoding circuit 2, and a controller 3.

[0038] The circuit includes a button circuit 1 with X switches 11, where X ≥ 1; a decoding circuit 2 with a signal input port 21 and X output ports 22, each output port 22 being connected to the first terminal of each switch 11; and a controller 3 with a signal output port 31 and a detection port 32, the signal output port 31 being connected to the signal input port 21 and the detection port 32 being connected to the second terminal of each switch 11. The controller 3 is configured to: acquire the preset address code corresponding to each switch and the level signal at the detection port; control the output signal state of the decoding circuit according to the preset address code; and determine the closed state of each switch according to the output signal state and the level signal.

[0039] In some embodiments, detection port 32 is the interrupt port of controller 3.

[0040] like Figure 2 The diagram shows an existing button control circuit comprising multiple switches S, multiple voltage divider resistors R, and an MCU. The MCU's Port_KEY is connected to one end of each voltage divider resistor R, and the other end of each voltage divider resistor R is connected to a switch S. The MCU determines which switch is pressed based on the different voltage values ​​corresponding to each voltage divider resistor. However, the existing button control circuit requires voltage divider resistors with different resistance values ​​and large resistance differences to ensure easy differentiation of the corresponding voltage values. This limits the number of switches that can be expanded. Furthermore, the button control circuit has combination functions, which also need to be considered. The difficulty in differentiating the resistance values ​​of combination keys when two or three switches are pressed simultaneously results in a small range of selectable resistance values ​​for the voltage divider resistors, increasing the design complexity and the difficulty in distinguishing the switches. This leads to poor scalability of the button control circuit. Furthermore, common switches are prone to short circuits in environments with moisture and condensation, such as dehumidifiers, or dust, causing short circuits in the switch pins or internal contacts. This results in current flowing through the switch for extended periods, burning out the internal silver layer and damaging the switch. Consequently, the button control circuit suffers from poor reliability. Additionally, the existing button control circuits have strong coupling between the switches, meaning that a failure in any switch can cause the entire button control circuit to malfunction.

[0041] To address this issue, this application proposes a key control circuit 90. The controller 3 controls the output signal state of the decoding circuit 2. Specifically, the decoding circuit 2 receives preset address codes corresponding to different switches 11 output by the controller 3 and changes its output signal state accordingly. Different preset address codes for different switches 11 correspond to different output signal states. In other words, the controller 3 automatically acquires the preset address codes stored within it for each switch 11, as well as the level signal at the detection port 32. The controller 3 sends different preset address codes to the decoding circuit 2, with each preset address code corresponding to a switch 11. Therefore, in practical applications, the controller 3 controls the decoding circuit 2 to cyclically output the output signal state corresponding to each switch in a certain order based on the preset address code for each switch 11. When no switch 11 in the key circuit 1 is not pressed, the detection port of the controller 3... There is no conduction between the detection port 32 and the output port 22 of the decoding circuit 2. The level signal at the detection port 32 remains unchanged, that is, the controller 3 determines that all switches 11 are open. When any of the X switches 11 is pressed, the detection port 32 of the controller 3 is connected to the output port 22 of that switch 11. The detection port 32 can detect the output signal state of the decoding circuit 2 at this time. That is, the level signal at the detection port 32 will change with the level signal at the output port 22 of that switch 11. Thus, when the controller 3 detects the change in the level signal of the detection port 32, it can determine that the switch 11 is closed. In this way, the controller 3 can identify whether a switch has been pressed based on the change in the level signal of the detection port 32. At the same time, it can identify the currently pressed switch 11 based on the output signal state at this time, thereby realizing the identification of the closing status of different switches 11.

[0042] Furthermore, since different switches 11 correspond to different output signal states, i.e., each switch 11 has a corresponding address code, when the decoding circuit 2 outputs the output signal state corresponding to a certain switch 11, the level signal output by the output port 22 of the decoding circuit 2 corresponding to a certain switch 11 at the same time is different from the level signals output by the other output ports 22. In other words, whether the level signal of the detection port 32 changes at this time is only related to whether that particular switch 11 is pressed, and will not be triggered by other switches 11 being pressed to change the level signal. This achieves the effect of no interference between switches 11 and avoids the problem of misjudgment by switches 11. Compared to the existing button control circuit 90, which uses the voltage value collected by the MCU to determine the closed state of each switch 11, the button control circuit 90 of this application uses different output signal states of the decoding circuit 2 to identify the closed state of the switch 11. It can also achieve the effect of no interference between switches 11, avoiding the problem of misjudgment of switches. Furthermore, since each switch 11 in the button control circuit 90 is no longer connected to each other, the coupling between each switch 11 in the button control circuit 90 is reduced, so that the button control circuit 90 will not fail when a switch 11 malfunctions.

[0043] According to the button control circuit 90 of the present invention, based on the connection method between the decoding circuit 2, the button circuit 1, and the controller 3, the controller 3 controls the output signal state of the decoding circuit 2 according to the preset address code corresponding to each switch 11. Each preset address code corresponds to a different output signal state. When no switch 11 is activated, the level signal at the detection port 32 remains unchanged. When any switch 11 is pressed, the level signal at the detection port 32 changes. Therefore, the controller 3 identifies whether a switch 11 has been activated based on the change in the level signal at the detection port 32. When pressed, the currently pressed switch 11 can be identified based on the output signal state at this time, thereby realizing the identification of the closed state of different switches 11. Since different switches 11 correspond to different output signal states, that is, each switch 11 has a corresponding preset address code, when the decoding circuit 2 outputs the output signal state corresponding to a certain switch 11, whether the level signal of the detection port 32 changes will only be related to whether that particular switch 11 is pressed, and will not be triggered by other switches 11 being pressed. This achieves the effect of no interference between switches 11 and avoids the problem of misjudgment of switches 11.

[0044] In some embodiments, such as Figure 1As shown, the button circuit 1 also includes a pull-up resistor R1. The first end of the pull-up resistor R1 is connected to a preset power supply VCC, and the second end of the pull-up resistor R1 is connected to the detection port 32 and the second end of each switch 11. With this design, when no switch 11 in the button circuit 1 is not pressed, there is no conduction between the detection port 32 of the controller 3 and the output port 22 of the decoding circuit 2. Under the action of the pull-up resistor R1, the level signal at the detection port 32 remains a high level signal. When any switch 11 in the button circuit 1 is pressed, the detection port 32 and the output port 22 connected to that switch 11 conduct, and the level signal at the detection port 32 is pulled low to trigger, that is, the level signal at the detection port 32 changes from a high level signal to a low level signal. Thus, the controller 3 can determine the closed state of each switch 11 based on the output signal state and the level signal at the detection port 32.

[0045] In some embodiments, the button circuit 1 further includes a backup switch 12, the first end of which is connected to the detection port 32; the decoding circuit 2 further includes a backup output port 23, which is connected to the second end of the backup switch. Figure 3 As shown, controller 3 is also configured to perform the following steps.

[0046] Step S1: Obtain the fault status of each switch.

[0047] Step S2: After determining that any switch has failed based on the fault status of each switch, obtain the backup address code corresponding to the backup switch.

[0048] Step S3: Control the output signal state of the decoding circuit and enable the backup switch according to the preset address code and the backup address code, so as to switch the function corresponding to any switch to the backup switch.

[0049] Step S4: Determine the closing status of the standby switch based on the output signal status and level signal.

[0050] Specifically, the controller 3 acquires the fault status of each switch 11. When the controller 3 detects that any switch 11 is continuously pressed for a period of time, it determines that the fault status of the switch 11 is a short circuit fault. Therefore, it can determine whether any switch 11 has a fault based on the fault status of each switch 11. If any switch 11 is detected to have a fault, the controller 3 automatically acquires the backup address code corresponding to the backup switch 11 stored in the controller 3, and outputs the preset address code corresponding to the other switches 11 except the faulty switch 11 and the backup address code corresponding to the backup switch 11. The decoding circuit 2 controls the output signal status of the decoding circuit 2 according to the received preset address code and backup address code. Since the decoding circuit 2 can output the output signal status corresponding to the backup switch 11 according to the backup address code, the backup switch 11 is enabled, and the function corresponding to any faulty switch 11 is switched to the backup switch 11.

[0051] Based on this, when the backup switch 11 is closed, the detection port 32 of the controller 3 is connected to the output port connected to the backup switch 11. When the backup output port 23 of the decoding circuit 2 outputs the corresponding output signal state of the backup switch 11, the detection port 32 of the controller 3 can detect the output signal state of the decoding circuit 2 at this time. This triggers a change in the level signal collected by the detection port 32, i.e., the detection port 32 of the controller 3 changes to a low level signal, and the controller 3 determines that the backup switch 11 is closed. When the backup switch 11 is not closed, the detection port 32 of the controller 3 is not connected to the output port connected to the backup switch 11, and the level signal of the detection port 32 of the controller 3 does not change. Alternatively, when the backup output port 23 of the decoding circuit 2 outputs the corresponding output signal state of the backup switch 11, the detection port 32 of the controller 3 is closed. When the output signal state corresponding to the non-output standby switch 11 is not displayed, the detection port 32 of the controller 3 cannot detect the output signal state corresponding to the standby switch 11. Therefore, the controller 3 determines that the standby switch 11 is open. Thus, it identifies whether the standby switch 11 is pressed based on the output signal state and the change in the level signal of the detection port 32. If the standby switch 11 is pressed, the function corresponding to the faulty switch 11 is executed. If the standby switch 11 is not pressed, the function corresponding to the faulty switch 11 is not executed. Thus, by activating the standby switch 11, the function corresponding to any faulty switch 11 is transferred to the standby switch 11, thereby preventing the switch 11 from being damaged due to the long-term flow of current due to the fault. This solves the problem of home appliances not being able to be used normally due to the fault of the switch 11.

[0052] In this embodiment, the button control circuit 90 re-detects whether any switch 11 is normal after each power-on. If any switch 11 is normal, the backup switch 12 is not activated and the original faulty switch 11 is used instead, thereby avoiding the switch 11 from occupying the backup switch 12 for a long time due to a temporary short circuit fault.

[0053] In some embodiments, such as Figure 4 As shown, the controller 3 includes a switch function switching unit 33 and a main control unit 34. The switch function switching unit 33 is used to receive user-defined switch function switching commands; the main control unit 34 is connected to the switch function switching unit 33 and is used to activate the backup switch 12 according to the switch function switching commands.

[0054] Specifically, if any switch 11 malfunctions, such as an open circuit fault, and if the user presses the same switch multiple times without response or requires multiple presses to achieve a response, the user can determine that switch 11 is faulty and activate the backup switch 12 through the switch function switching unit 33 to replace the faulty switch 11 in performing the corresponding function. The switch function switching unit 33 of the controller 3 receives the switch function switching command set by the user, and the main control unit 34 of the controller 3 activates the backup switch 12 through the control decoding circuit 2 to switch the function corresponding to any switch 11 to the backup switch 12. This avoids damage to the switch 11 due to long-term current flow caused by the fault, solves the problem of home appliances not working properly due to the fault of the button control circuit 90, and reduces the failure rate of home appliances.

[0055] In some embodiments, such as Figure 5 As shown, the button control circuit 90 also includes a prompting circuit 4. The controller 3 is further configured to send a backup switch activation signal when the backup switch 12 is activated. The prompting circuit 4 is connected to the controller 3 and is used to provide a prompt based on the backup switch activation signal.

[0056] Specifically, when the controller 3 activates the backup switch 12, it sends a backup switch activation signal. The prompting circuit 4 is connected to the controller 3. After receiving the backup switch activation signal, the prompting circuit 4 provides a prompt based on the backup switch activation signal, such as by voice or by controlling the flashing of the indicator light corresponding to the backup switch 12 to prompt the user that the backup switch 12 has been activated.

[0057] In some embodiments, such as Figure 6 As shown, the decoding circuit 2 also includes an expansion port 27, which is suitable for connecting an expansion decoding circuit. That is, when the number of switches is insufficient, multiple expansion decoding circuits, i.e., other decoding circuits, can be connected through the expansion port 27, and more switches can be connected through the expansion decoding circuits. Thus, the number of switches 11 can be expanded by adding decoding circuits 2 through the expansion port 27. Compared with the method of expanding the number of switches 11 by selecting voltage divider resistors with different resistance values, this method can effectively reduce the design difficulty and the difficulty of distinguishing switches.

[0058] For example, such as Figure 7As shown, the decoding circuit 2 can be a decoder 74HC138. The E2 port of the decoder 74HC138 can be used as an expansion port 27 to add multiple decoders to expand the number of switches 11, thereby making the key control circuit 90 more expandable.

[0059] In some embodiments, such as Figure 7 As shown, the decoding circuit 2 is a decoder 74HC138. The signal input port 21 includes a first signal input port A0, a second signal input port A1, and a third signal input port A2. The signal output ports include a first signal output port Port_A, a second signal output port Port_B, and a third signal output port Port_C. The first signal output port Port_A is connected to the first signal input port A0, the second signal output port Port_B is connected to the second signal input port A1, and the third signal output port Port_C is connected to the third signal input port A2.

[0060] Specifically, controller 3 outputs an output signal through signal output port 31. Decoder 74HC138 receives the output signal (level signal) from signal output port 31 through its signal input port. Specifically, controller 3 outputs a low-level or high-level signal through its first signal output port Port_A, and decoder 74HC138 receives the low-level or high-level signal from its first signal input port A0. Furthermore, controller 3 outputs a low-level or high-level signal through its second signal output port Port_B, and decoder 74HC138 receives the low-level or high-level signal from its second signal input port A1. Additionally, controller 3 outputs a low-level or high-level signal through its third signal output port Port_C, and decoder 74HC138 receives the low-level or high-level signal from its third signal input port A2. Thus, controller 3 controls the output signal state of decoding circuit 2 through the output signals received from its signal output ports.

[0061] For example, such as Figure 7 and Figure 8As shown, the X output ports of the 74HC138 are Y0-Y6, and the X switches 11 of the key circuit 1 are S1-S6. Table 1 shows the true function of the decoder 74HC138. If the output signal of the controller 3 through signal output port 31 is (L, L, L), and the signal input port 21 of the decoder 74HC138 receives the output signal of the controller 3 as (L, L, L), then the Y0 output of the decoder 74HC138 is low. As shown in Table 1, only one output port outputs a low-level signal at any given time. Therefore, Y1-Y6 of the 74HC138 output high-level signals. If S1 is closed at this time, it triggers the detection port 32 to collect the level signal. If the signal level at detection port 32 changes to a low level, controller 3 determines that switch S1 is closed. If controller 3 outputs a signal (H, L, L) through signal output port 31, and decoder 74HC138 receives the same signal at signal input port 21, decoder 74HC138 outputs a low-level signal at Y1 and high-level signals at Y0 and Y2-Y6. If switch S2 is closed at this time, the signal level at detection port 32 will change, i.e., the signal level at detection port 32 will change to a low level, and controller 3 will determine that switch S2 is closed. Similarly, the closure status of the remaining switches 11 can be determined. Furthermore, since only one decoder 74HC138 outputs a low-level signal at any given time, while the other output ports output high-level signals, pressing all switches simultaneously will not trigger a change in the signal level at detection port 32 of controller 3, ensuring that all switches 11 do not interfere with each other and avoiding misjudgment.

[0062] Table 1

[0063]

[0064] For example, if the decoding circuit 2 is a decoder 74HC138, the backup switch 12 is S6, and the backup output port is Y5, when the controller 3 detects a fault in S1 among the five switches 11, the controller 3 control signal output port 31 will no longer output the output signal (L, L, L), that is, the controller 3 will no longer send the preset address code (L, L, L) of S1. At this time, the signal input port 21 of the decoder 74HC138 cannot receive the output signal of the signal input port 21. Since S1 is connected to Y0 of the decoder 74HC138, when the user presses S1, the function corresponding to that switch 11 will not be executed, and the controller 3 will increase the output signal (H, L) through the signal output port 31. The controller 3 sends the preset address code (H, L, H) corresponding to S6 through the signal output port 31. The controller 3 cyclically outputs (L, L, H) to (H, L, H) through the signal output port 31. The decoder's signal input port 21 receives the output signal (H, L, H) and then controls the backup output port Y5 corresponding to the backup switch 12 to output a low-level signal. The controller 3 then transfers the function corresponding to the fault switch 11, i.e. S1, to S6. At this time, when S6 is pressed by the user, the detection port of the controller 3 can collect the low-level signal through the switch 11, i.e. S6. Then the controller 3 determines that S6 is pressed and executes the function corresponding to the fault switch 11, i.e. S1.

[0065] In some embodiments, such as Figure 1 As shown, the controller 3 also includes a control signal output port 35, and the decoding circuit 2 also includes a first enable input port 24, a second enable input port 25, and a third enable input port 26.

[0066] The first enable input port 24 and the second enable input port 25 are both grounded, and the third enable input port 26 is connected to the control signal output port 35.

[0067] Specifically, both the first enable input port 24 and the second enable input port 25 are grounded, causing the first enable input port 24 and the second enable input port 25 to input low-level signals. The third enable input port 26 is connected to the signal output port of the controller 3. The controller 3 controls the signal output port 35 to output a high-level signal. The third enable input port 26 receives the high-level signal, causing only one of the X output ports of the decoding circuit 2 to output a low-level signal at any given time. If the first enable input port 24 and the second enable input port 25 do not output low-level signals, and the controller 3 controls the signal output port 35 to not output a high-level signal, all X output ports of the decoding circuit 2 will output high-level signals. In this case, it is impossible to identify whether the switch is closed or open. Therefore, in this application, by controlling the level signal input of the enable input port, the output port of the decoding circuit 2 will output a low-level signal at any given time, thereby realizing the identification of whether the switch is closed or open.

[0068] In this embodiment, if the button control circuit 90 needs to expand the button circuit 1, multiple decoders are connected through the enable input port of the decoding circuit 2, so that the number of switches 11 in the button circuit 1 can be multiplied, instead of expanding the number of switches 11 by selecting voltage divider resistors with different resistance values, thus making the button control circuit 90 more expandable.

[0069] In some embodiments, the decoding circuit 2 can be a decoder 74LS128, CD74HCT4543, CD74HCT42 or SN54LS145-SP; or the decoding circuit 2 can be a 3-to-8 line decoder such as SN54LVC138A-SP or SN54HC138-SP or SN54LS138-SP, etc.; or the decoding circuit 2 can be a 2-to-4 line decoder such as SN54HC139-SP or SN54LS138A-SP, etc., and there is no limitation thereto.

[0070] A second aspect of the present invention provides a household appliance 100, such as... Figure 9 As shown, the household appliance 100 includes the button control circuit 90 of the above embodiment.

[0071] According to the embodiments of the present invention, the home appliance 100, through the button control circuit 90 of the above embodiments, can solve the problem that the home appliance cannot be used normally due to the failure of the button control circuit 90, and reduce the failure rate of the home appliance.

[0072] In some embodiments, the home appliance is an air conditioner, dehumidifier, or other equipment, and there is no limitation thereto. The air conditioner or dehumidifier can use the button control circuit 90 of the above embodiment, thereby avoiding the problem of short circuit of the switch 11 pin or internal contact due to water vapor and condensation or dust in the environment where the air conditioner or dehumidifier is used. This can solve the problem of the home appliance not being able to be used normally due to the failure of the button control circuit 90, and reduce the failure rate of the air conditioner or dehumidifier.

[0073] A third aspect of the present invention provides a control method for a button control circuit, used in the button control circuit of the above embodiments, such as... Figure 10 As shown, the control method includes steps S5 to S7.

[0074] Step S5: Obtain the preset address code and the level signal at the detection port corresponding to each switch.

[0075] Specifically, the controller automatically obtains the preset address code corresponding to each switch stored in the controller. Each switch corresponds one-to-one with its preset address code. For example, the preset address code for switch S1 can be (L, L, L), the preset address code for switch S2 can be (H, L, L), the preset address code for switch S3 can be (L, H, L), the preset address code for switch S4 can be (H, H, L), the preset address code for switch S5 can be (L, L, H), and the preset address code for switch S6 can be (H, L, H). The controller obtains the level signal at the detection port, where the level signal can be a low-level signal or a high-level signal.

[0076] Step S6: Control the output signal state of the decoding circuit according to the preset address code.

[0077] Specifically, the controller sends different preset address codes to the decoding circuit. Each switch corresponds to a preset address code. The decoding circuit receives the preset address code corresponding to each switch output by the controller and changes its own output signal state according to the preset address code. Different switches correspond to different output signal states according to different preset address codes. In other words, the controller controls the decoding circuit to output the output signal state corresponding to each switch in a certain order according to the preset address code. For example, if the output ports of the decoding circuit are Y0-Y7, as shown in Table 1, if the preset address code corresponding to switch S1 is (L, L, L), then the decoding circuit receives the preset address code corresponding to switch S1 and controls the output signal state of the decoding circuit to be (L, H, H, H, H, H, H, H).

[0078] Step S7: Determine the closing status of each switch based on the output signal status and level signal.

[0079] Specifically, the decoding circuit cyclically outputs the output signal state corresponding to each switch in a certain order. When no switch in the button circuit is not pressed, the detection port of the controller and the output port of the decoding circuit will not be connected, and the level signal at the detection port remains unchanged, meaning the controller determines that all switches are open. When any switch is pressed, the detection port of the controller is connected to the output port connected to that switch, and the detection port can detect the output signal state of the decoding circuit at this time. That is, the level signal at the detection port will change with the level signal at the output port connected to that switch. Thus, when the controller detects the change in the level signal at the detection port, it can determine that any switch is closed. In this way, the controller can identify whether a switch has been pressed based on the change in the level signal at the detection port, and at the same time, it can identify the currently pressed switch based on the current output signal state, thereby realizing the identification of different switch closing states.

[0080] Furthermore, since different switches correspond to different output signal states (i.e., each switch has a corresponding address code), when the decoding circuit outputs the output signal state corresponding to a certain switch, the level signal output by the output port of the decoding circuit corresponding to that switch at the same time is different from the level signals output by the other output ports. In other words, whether the level signal of the detection port changes at this time is only related to whether that particular switch is pressed, and will not be triggered by other switches being pressed. This achieves the effect of no interference between switches, avoiding the problem of switch misjudgment. Compared to the existing technology that uses voltage values ​​collected by the MCU to determine the closed state of each switch, this application uses different output signal states and level signals of the decoding circuit to identify the closed state of the switch, achieving the effect of no interference between switches and avoiding the problem of switch misjudgment. Moreover, since each switch in the button control circuit is no longer connected to each other, the coupling between each switch in the button control circuit is reduced, ensuring that the button control circuit will not fail when a switch malfunctions.

[0081] According to the control method of the key control circuit of the present invention, based on the key control circuit, the output signal state of the decoding circuit is controlled by the preset address code corresponding to each switch. The preset address code corresponding to each switch corresponds to a different output signal state. When there is no switch action, the level signal at the detection port remains unchanged. When any switch is pressed, the level signal at the detection port will be triggered to change. Thus, the change in the level signal at the detection port is used to identify whether a switch has been pressed. At the same time, the currently pressed switch can be identified based on the output signal state at this time, thereby realizing the identification of different switch closing states. Since different switches correspond to different output signal states, that is, each switch has a corresponding preset address code, when the decoding circuit outputs the output signal state corresponding to a certain switch, whether the level signal at the detection port changes is only related to whether that particular switch is pressed, and will not be triggered by other switches being pressed. This achieves the effect of no interference between switches and avoids the problem of switch misjudgment.

[0082] In some embodiments, the control method further includes: acquiring the fault status of each switch; determining, based on the fault status of each switch, that after any switch has failed, acquiring the backup address code corresponding to the backup switch; controlling the output signal status of the decoding circuit and enabling the backup switch based on the preset address code and the backup address code, so as to switch the function corresponding to any switch to the backup switch; and determining the closing status of the backup switch based on the output signal status and the level signal.

[0083] Specifically, the controller acquires the fault status of each switch. When the controller detects that any switch is continuously pressed for a period of time, it determines that the fault status of that switch is a short circuit fault. Therefore, it can determine whether any switch has failed based on the fault status of each switch. If any switch fails, the controller automatically acquires the backup address code corresponding to the backup switch stored in the controller and outputs the preset address codes corresponding to the other switches except the faulty switch, as well as the backup address code corresponding to the backup switch. The decoding circuit controls the output signal status of the decoding circuit according to the received preset address code and backup address code. Since the decoding circuit can output the output signal status corresponding to the backup switch according to the backup address code, the backup switch is activated, and the function corresponding to any faulty switch is switched to the backup switch.

[0084] Based on this, when the backup switch is closed, the controller's detection port and the output port connected to the backup switch are connected. When the backup output port of the decoding circuit outputs the corresponding output signal state of the backup switch, the controller's detection port can detect this state, triggering a change in the level signal acquired by the detection port. Specifically, the controller's detection port changes to a low-level signal, thus confirming that the backup switch is closed. When the backup switch is not closed, the controller's detection port and the output port connected to the backup switch are not connected, and the level signal of the controller's detection port does not change. Alternatively, if the backup output port of the decoding circuit does not output the corresponding output signal state, the controller will determine that the backup switch is closed. When the output signal status corresponding to the backup switch is displayed, if the controller's detection port cannot detect the output signal status corresponding to the backup switch, the controller determines that the backup switch is off. Therefore, the controller identifies whether the backup switch is pressed based on the output signal status and the level signal change of the detection port. If the backup switch is pressed, the function corresponding to the faulty switch is executed; if the backup switch is not pressed, the function corresponding to the faulty switch is not executed. By activating the backup switch, the function corresponding to any faulty switch is transferred to the backup switch, thereby preventing the switch from being damaged due to long-term current flow caused by the fault. This solves the problem of home appliances not being able to be used normally due to switch failure.

[0085] For example, such as Figure 7As shown, if the output ports of the decoding circuit are Y0-Y7, the backup switch is S6, and the backup output port is Y5, when the controller 3 detects a fault in switch S1 among the five switches, the controller control signal output port will no longer output the preset address code (L, L, L) corresponding to switch S1. At this time, the signal input port of the decoder 74HC138 cannot receive the preset address code (L, L, L) corresponding to switch S1 output by the signal output port. Since S1 is connected to Y0 of the decoder 74HC138, the function corresponding to switch S1 will not be executed when the user presses S1. At the same time, the controller obtains the backup address code (H, L, H) corresponding to the backup switch S6, and then outputs the backup address code (H, L, H) corresponding to the backup switch S6 through the signal output port, as well as outputs the other switches except the faulty switch through the signal output port. The controller cyclically outputs the preset address codes (L, L, H) to (H, L, H) for each switch. The signal input port of the decoding circuit receives the preset address codes (L, L, H) to (H, L, H) for each switch. Based on the preset address codes and the backup address codes, the controller controls the output signal state of the decoding circuit, as shown in Table 1. If the backup address code is (H, L, H), then the output signal state is (H, H, H, H, H, L, H, H), that is, the backup output port Y5 corresponding to the backup switch S6 outputs a low-level signal. The controller then transfers the function corresponding to the fault switch S1 to S6. At this time, when S6 is pressed by the user, the controller's detection port can collect the low-level signal through switch S6. The controller then determines that switch S6 is pressed and executes the function corresponding to the fault switch S1.

[0086] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example.

[0087] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims

1. A button control circuit, characterized in that, include: A button circuit, wherein the button circuit includes X switches, where X ≥ 1; A decoding circuit, comprising a signal input port and X output ports, wherein each output port is connected to the first terminal of each switch in a one-to-one correspondence. The controller includes a signal output port and a detection port, the signal output port being connected to the signal input port, and the detection port being connected to the second terminal of each switch. The controller is configured to: Obtain the preset address code corresponding to each switch and the level signal at the detection port; The output signal state of the decoding circuit is controlled according to the preset address code; The closing status of each switch is determined based on the output signal status and the level signal; Determining the closing status of each switch based on the output signal state and the level signal includes: If the level signal changes, the pressed switch is identified based on the output signal state; The button circuit also includes a backup switch, the first end of which is connected to the detection port. The decoding circuit also includes a backup output port, which is connected to the second terminal of the backup switch; The controller is also configured to: Obtain the fault status of each switch; After determining that any switch has failed based on the fault status of each switch, obtain the backup address code corresponding to the backup switch. The output signal state of the decoding circuit is controlled according to the preset address code and the backup address code, and the backup switch is enabled to switch the function corresponding to any one of the switches to the backup switch. The closing status of the backup switch is determined based on the output signal status and the level signal.

2. The button control circuit according to claim 1, characterized in that, The controller includes: A switch function switching unit is used to receive a user-defined switch function switching command. A main control unit, which is connected to the switch function switching unit, is used to activate the backup switch according to the switch function switching command.

3. The button control circuit according to claim 1 or 2, characterized in that, The controller is also configured to send a backup switch activation signal when the backup switch is activated; The button control circuit also includes: A prompting circuit, connected to the controller, is used to provide a prompt based on the backup switch activation signal.

4. The button control circuit according to claim 1, characterized in that, The decoding circuit also includes an extension port adapted to connect to an extension decoding circuit.

5. The button control circuit according to claim 1, characterized in that, The decoding circuit is a decoder 74HC138, and the signal input ports include a first signal input port, a second signal input port, and a third signal input port. The signal output port includes a first signal output port, a second signal output port, and a third signal output port. The first signal output port is connected to the first signal input port, the second signal output port is connected to the second signal input port, and the third signal output port is connected to the third signal input port.

6. The button control circuit according to claim 5, characterized in that, The controller also includes a control signal output port; The decoding circuit further includes a first enable input port, a second enable input port, and a third enable input port. The first enable input port and the second enable input port are both grounded, and the third enable input port is connected to the control signal output port.

7. A household appliance, characterized in that, Includes the key control circuit as described in any one of claims 1-6.

8. A control method for a button control circuit, characterized in that, The control method for the key control circuit according to any one of claims 1-6 includes: Obtain the preset address code corresponding to each switch and the level signal at the detection port; The output signal state of the decoding circuit is controlled according to the preset address code; The closing status of each switch is determined based on the output signal status and the level signal.

9. The control method for the button control circuit according to claim 8, characterized in that, The control method further includes: Obtain the fault status of each switch; After determining that any switch has failed based on the fault status of each switch, obtain the backup address code corresponding to the backup switch. The output signal state of the decoding circuit is controlled according to the preset address code and the backup address code, and the backup switch is enabled to switch the function corresponding to any one of the switches to the backup switch. The closing status of the backup switch is determined based on the output signal status and the level signal.

Citation Information

Patent Citations

  • Control circuit, electronic device and control method therefor

    CN109213040A

  • Computer keyboard with spare keys

    CN2196319Y