A key encoder interface circuit

By monitoring the voltage status of the key encoder in real time and using simple voltage status comparison logic to determine whether the key encoder is pressed, the problem of complicated connection lines in the existing encoder interface circuit is solved, and the number of components and wiring complexity are reduced, thereby reducing costs.

CN224503354UActive Publication Date: 2026-07-14ZHONGSHAN CHUNQIAO ELECTRONIC TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
ZHONGSHAN CHUNQIAO ELECTRONIC TECH CO LTD
Filing Date
2025-07-31
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing encoder interface circuits use multiple signal lines to achieve signal encoding conversion, resulting in complex connection lines, a large number of wires used, high costs, and are not conducive to the miniaturization and aesthetic design of home appliances.

Method used

A sampling module is used to monitor the voltage status of the key encoder in real time. The main control module compares the voltage status with the preset voltage status to determine whether the key encoder is pressed. This simplifies the signal encoding and conversion process and reduces the number of encoding and decoding components and connection lines.

Benefits of technology

It effectively reduces the number of components and connection lines in the interface circuit, reduces the amount of wire used and the complexity of wiring, and lowers costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN224503354U_ABST
    Figure CN224503354U_ABST
Patent Text Reader

Abstract

The application discloses a key encoder interface circuit, comprising a key encoder, a sampling module, a main control module and a driving module, the sampling module is electrically connected with the key encoder, and is used for sampling a key voltage state of the key encoder; a control signal input end of the main control module is connected with a sampling end of the sampling module; a voltage state setting end of the main control module is connected with a sampling state feedback end of the sampling module; the voltage state setting end of the main control module is set with a preset voltage state; the main control module compares the received key voltage state with the preset voltage state; if the key voltage state is the same as the preset voltage state, the key encoder is determined to be in a pressed state. The application can determine whether the key encoder is pressed or not through a simple voltage state comparison logic, without using a complex coding protocol or a plurality of signal lines for signal coding conversion, so that the number of wire materials is greatly reduced, and the complexity and cost of wiring are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0002] This utility model relates to the field of electronic circuit technology, and in particular to a key encoder interface circuit. [Background Technology]

[0004] In electronic devices, key encoders are widely used in home appliances as a key component for user interaction. However, existing encoder interface circuits often use multiple signal lines to achieve signal encoding and conversion, resulting in numerous encoding and decoding components and complex wiring. This not only increases the number of cables used but also significantly increases wiring complexity, thereby driving up the overall cost. At the same time, complex wiring is not conducive to the miniaturization and aesthetic design of home appliances and also reduces their operational reliability.

[0005] Therefore, there is an urgent need for a technical solution that can simplify the interface circuit of the key encoder, reduce the number of components and wiring complexity, and effectively control costs while ensuring performance. [Utility Model Content]

[0007] To address the technical problems of complex wiring, numerous wires, and high costs associated with current encoder interface circuits that use multiple signal lines for signal encoding conversion, this invention provides a button encoder interface circuit.

[0008] To achieve the above objectives, this utility model is implemented by the following technical solution:

[0009] A key encoder interface circuit includes:

[0010] A button encoder, which is used to output control commands;

[0011] A sampling module is electrically connected to the key encoder, and the sampling module is used to sample the key voltage state of the key encoder;

[0012] The main control module has its control signal input terminal connected to the sampling terminal of the sampling module, and its voltage state setting terminal connected to the sampling state feedback terminal of the sampling module. The voltage state setting terminal of the main control module is set with a preset voltage state. The main control module compares the received button voltage state with the preset voltage state. If the button voltage state and the preset voltage state are the same, the main control module determines that the button encoder is in the pressed state and outputs a drive control signal.

[0013] The drive module has its input terminal connected to the control signal output terminal of the main control module and its output terminal connected to the load. The drive module is used to drive the load to work when it receives the drive control signal.

[0014] By adopting the above technical solution, the sampling module monitors the key voltage status output by the key encoder in real time. The main control module matches the received key voltage status with the preset voltage status to determine whether the key encoder is pressed. Through a simple voltage status comparison logic, compared with the traditional encoder interface circuit, there is no need to use complex encoding protocols or multiple signal lines for signal encoding conversion. This effectively reduces the number of components used for encoding and decoding in the interface circuit and the corresponding connection lines, greatly reducing the number of wires used and reducing the complexity and cost of wiring.

[0015] As described above, a key encoder interface circuit includes a sampling module comprising a connector interface, resistors R13, R15, R17, pull-up resistors R11 and R12. A first terminal of the key encoder is connected to one end of resistor R17, and the other end of resistor R17 is connected to a first input terminal of the connector interface. A second terminal of the key encoder is connected to a second input terminal of the connector interface. A third terminal of the key encoder is connected to one end of resistor R15, and the other end of resistor R15 is connected to a first input terminal of the connector interface. A fourth terminal of the key encoder is connected to a third input terminal of the connector interface, which is also grounded. A fifth terminal of the key encoder is connected to one end of resistor R13, and the other end of resistor R13 is connected to a second input terminal of the connector interface.

[0016] The sampling terminal of the connector interface is connected to the control signal input terminal of the main control module. The sampling terminal of the connector interface is also connected to the pull-up resistor R11. The sampling status feedback terminal of the connector interface is connected to the voltage status setting terminal of the main control module. The sampling status feedback terminal of the connector interface is also connected to the pull-up resistor R12. The third output terminal of the connector interface is grounded.

[0017] As described above, in a key encoder interface circuit, the driving module includes a transistor Q1, a relay REL1, a load resistor R10, a diode D5, a polarized capacitor EC7, a resistor R14, and a resistor R16. The control signal output terminal of the main control module is connected to one end of the resistor R14. The other end of the resistor R14 is connected to the base of the transistor Q1. The other end of the resistor R14 is also connected to the positive terminal of the polarized capacitor EC7. The negative terminal of the polarized capacitor EC7 is grounded. The other end of the resistor R14 is connected to ground via the resistor R16. The emitter of the transistor Q1 is grounded. The collector of the transistor Q1 is connected to the first coil terminal of the relay REL1. The collector of the transistor Q1 is also connected to the positive terminal of the diode D5. The negative terminal of the diode D5 is connected to the second coil terminal of the relay REL1. The common terminal of the relay REL1 is connected to the neutral wire. The normally open terminal of the relay REL1 is connected to the live wire via the load resistor R10.

[0018] The button encoder interface circuit described above further includes a switching power supply module. The output terminal of the switching power supply module is connected to the power input terminal of the main control module and the power input terminal of the drive module, respectively. The switching power supply module is used to provide a stable operating voltage.

[0019] As described above, in a key encoder interface circuit, the switching power supply module includes:

[0020] A rectifier unit, the input terminal of which is connected to the mains power, is used to rectify the mains power into direct current;

[0021] The protection unit has its input terminal connected to the output terminal of the rectifier unit. The protection unit is used to cut off the circuit output when the DC current experiences overcurrent / overvoltage.

[0022] A voltage conversion unit is provided, which converts the DC power into a first DC voltage and a second DC voltage. The input terminal of the voltage conversion unit is connected to the output terminal of the protection unit. The first output terminal of the voltage conversion unit is connected to the power input terminal of the drive module and is used to output the first DC voltage to provide a stable operating voltage for the drive module. The second output terminal of the voltage conversion unit is used to output the second DC voltage.

[0023] As described above, in a key encoder interface circuit, the rectifier unit includes a rectifier bridge BD1, a fuse FULE, a thermistor FR1, an inductor L1, a resistor R5, and a resistor R6. The live wire is connected to one end of the fuse FULE, and the other end of the fuse FULE is connected to one end of the thermistor FR1. The other end of the thermistor FR1 is connected to the first AC input terminal of the rectifier bridge BD1. The neutral wire is connected to the second AC input terminal of the rectifier bridge BD1. The negative output terminal of the rectifier bridge BD1 is grounded, and the positive output terminal of the rectifier bridge BD1 is connected to one end of the inductor L1. The other end of the inductor L1 is connected to the input terminal of the protection unit via resistors R5 and R6 connected in series.

[0024] As described above, in a key encoder interface circuit, the protection unit includes a protection chip U1, a diode D1, a capacitor C2, and a resistor R8. The output terminal of the rectifier unit is connected to the input terminal of the protection chip U1. The output terminal of the protection chip U1 is connected to the positive terminal of the diode D1. The negative terminal of the diode D1 is connected to one end of the resistor R8. The other end of the resistor R8 is connected to the input terminal of the voltage conversion unit. The negative terminal of the diode D1 is also connected to one end of the capacitor C2. The other end of the capacitor C2 is also connected to the input terminal of the voltage conversion unit.

[0025] As described above, in a key encoder interface circuit, the voltage conversion unit includes a transformer T1, diodes D2, D3, and D4, a polarized capacitor EC4 and EC6, resistors R10 and R11. The output terminal of the protection unit is connected to the first input terminal of the primary winding of the transformer T1, and the output terminal of the protection unit is also connected to the second input terminal of the primary winding of the transformer T1. The fourth input terminal of the primary winding of the transformer T1 is grounded, the fifth input terminal of the primary winding of the transformer T1 is connected to the positive terminal of diode D2, the negative terminal of diode D2 is connected to the positive terminal of polarized capacitor EC4, and the negative terminal of polarized capacitor EC4 is grounded.

[0026] The first output terminal of the secondary winding of transformer T1 is connected to the positive terminal of diode D3, the negative terminal of diode D3 is connected to the first output terminal of voltage conversion unit, the second output terminal of the secondary winding of transformer T1 is connected to the positive terminal of diode D4, the negative terminal of diode D4 is connected to the second output terminal of voltage conversion unit, resistors R10 and R11 are connected in parallel between the first and second output terminals of voltage conversion unit, polarized capacitor EC6 is connected between the second output terminal of voltage conversion unit and ground, and the third output terminal of the secondary winding of transformer is grounded.

[0027] As described above, in a button encoder interface circuit, the switching power supply module further includes a step-down unit. The input terminal of the step-down unit is connected to the second output terminal of the voltage conversion unit, and the output terminal of the step-down unit is connected to the power input terminal of the main control module. The step-down unit is used to step down the second DC voltage to a stable third DC voltage, thereby providing a stable operating voltage for the main control module.

[0028] As described above, in a key encoder interface circuit, the step-down unit includes a linear regulator U2 and a resistor R20. The second output terminal of the voltage conversion unit is connected to the input terminal of the linear regulator U2, the output terminal of the linear regulator U2 is connected to one end of the resistor R20, and the other end of the resistor R20 is connected to the power input terminal of the main control module.

[0029] Compared with the prior art, the key encoder interface circuit proposed in this utility model has the following advantages:

[0030] 1. The button encoder interface circuit proposed in this utility model monitors the button voltage status output by the button encoder in real time through a sampling module. The main control module matches the received button voltage status with a preset voltage status to determine whether the button encoder is pressed. By using a simple voltage status comparison logic, compared with traditional encoder interface circuits, there is no need to use complex encoding protocols or multiple signal lines for signal encoding conversion. This effectively reduces the number of components used for encoding and decoding in the interface circuit as well as the corresponding connection lines, greatly reducing the number of wires used and reducing the complexity and cost of wiring.

[0031] 2. The sampling module proposed in this utility model is equipped with a connector interface, which provides multiple input ports and output ports. It can aggregate the signals from multiple ports of the key encoder to the input port of the connector interface and transmit them to the main control module through the output port of the connector interface. This eliminates the need for excessive signal lines for signal transmission, thereby achieving effective signal distribution and transmission, reducing the number of required connection lines, and lowering the cost of wiring and the complexity of cabling. [Attached Image Description]

[0033] To more clearly illustrate the technical solutions in the embodiments of this utility model, the accompanying drawings used in the description of the embodiments will be briefly introduced below.

[0034] Figure 1 This is a block diagram illustrating the circuit principle structure of this utility model;

[0035] Figure 2 This is a circuit diagram of the key encoder interface section of this utility model;

[0036] Figure 3 This is a circuit schematic diagram of the switching power supply module of this utility model;

[0037] Figure 4 This is a circuit diagram of the step-down unit of this utility model.

Detailed Implementation Methods

[0039] To make the technical problems solved, technical solutions, and beneficial effects of this utility model clearer, the present utility model 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 merely illustrative of the present utility model and are not intended to limit the present utility model.

[0040] The button encoder interface circuit described in this manual is mainly used in home appliances that use button encoders to adjust values. These home appliances include, but are not limited to, electric ceramic cooktops and audio equipment.

[0041] Specific embodiments, combined with Figures 1 to 4 As shown, further illustrating the technical solution of this utility model, a key encoder interface circuit includes a key encoder ENC, a sampling module 100, a main control module 200, and a drive module 300. The key encoder ENC is used to output control commands. The sampling module 100 is electrically connected to the key encoder ENC and is used to sample the key voltage state of the key encoder ENC. The control signal input terminal of the main control module 200 is connected to the sampling terminal of the sampling module 100. The voltage state setting terminal of the main control module 200 is connected to the sampling terminal of the sampling module 100. The sampling status feedback terminal is connected, and the voltage status setting terminal of the main control module 200 is set with a preset voltage status. The main control module 200 compares the received button voltage status with the preset voltage status. If the button voltage status and the preset voltage status are the same, it is determined that the button encoder ENC is in the pressed state. The main control module 200 outputs a drive control signal. The input terminal of the drive module 300 is connected to the control signal output terminal of the main control module 200. The drive module 300 is used to drive the load to work when it receives the drive control signal.

[0042] In this embodiment, the sampling module monitors the key voltage status output by the key encoder in real time. The main control module matches the received key voltage status with the preset voltage status to determine whether the key encoder is pressed. By using a simple voltage status comparison logic, compared with traditional encoder interface circuits, there is no need to use complex encoding protocols or multiple signal lines for signal encoding conversion. This effectively reduces the number of components used for encoding and decoding in the interface circuit as well as the corresponding connection lines, greatly reducing the number of wires used and reducing the complexity and cost of wiring.

[0043] It should be noted that since the key encoder ENC is a mechanical key structure, its initial key voltage state may be either high or low. That is, the key encoder ENC may be high when not pressed and switch to low when pressed, or it may be low when not pressed and switch to high when pressed. Therefore, when setting the preset voltage state of the voltage setting terminal of the main control module 200, the sampling module 100 first samples the initial key voltage state of the key encoder ENC. If the initial key voltage state of the key encoder ENC sampled by the sampling module 100 is high, then the preset voltage state is set to low, meaning the voltage setting terminal of the main control module 200 outputs a low level. If the initial key voltage state of the key encoder ENC sampled by the sampling module 100 is low, then the preset voltage state is set to high, meaning the voltage setting terminal of the main control module 200 outputs a high level.

[0044] It is important to note that the aforementioned preset voltage setting is only performed when the key encoder ENC is first put into use. Once set, the preset voltage setting will not be changed subsequently. Of course, if the key encoder ENC is replaced, it will need to be reset.

[0045] Furthermore, as a preferred embodiment of this solution and not a limitation thereof, the sampling module 100 includes a connector interface 110, resistors R13, R15, R17, pull-up resistors R11 and R12. The first terminal of the button encoder ENC is connected to one end of resistor R17, and the other end of resistor R17 is connected to the first input terminal of the connector interface 110. The second terminal of the button encoder ENC is connected to the second input terminal of the connector interface 110. The third terminal of the button encoder ENC is connected to one end of resistor R15, and the other end of resistor R15 is connected to the first input terminal of the connector interface 110. The fourth terminal of the button encoder ENC is connected to the third input terminal of the connector interface 110, and the third input terminal of the connector interface 110 is also grounded. The fifth terminal of the button encoder ENC is connected to one end of resistor R13, and the other end of resistor R13 is connected to the second input terminal of the connector interface 110.

[0046] The sampling terminal (i.e., the first output terminal) of the connector interface 110 is connected to the control signal input terminal (i.e., the SW3 terminal) of the main control module 200. The sampling terminal of the connector interface 110 is also connected to the pull-up resistor R11. The sampling status feedback terminal (i.e., the second output terminal) of the connector interface 110 is connected to the voltage status setting terminal (i.e., the SW4 terminal) of the main control module 200. The sampling status feedback terminal of the connector interface 110 is also connected to the pull-up resistor R12. The third output terminal of the connector interface 110 is grounded.

[0047] Specifically, if the initial key voltage state of the key encoder ENC is low, that is, the key encoder ENC is low when it is not pressed, and the key voltage state switches to high when it is pressed, then when the key is not pressed, the actual level signal sampled by the sampling end (first output end) of the connector interface 110 is low because the key encoder ENC itself is low. When the key is not pressed, the control signal input end (SW3 end) of the main control module 200 receives the low level signal and sets the preset voltage state of the voltage state setting end (SW4 end) of the main control module 200 to high. In actual operation, when the key encoder ENC is pressed, the key voltage state will switch from a low level to a high level. The high-level signal output will be received by the sampling state feedback terminal (second output terminal) of the connector interface 110. Due to the pull-up effect of the pull-up resistor R11, the sampling terminal (first output terminal) of the connector interface 110 will output a high-level signal. After the control signal input terminal (SW3 terminal) of the main control module 200 receives the high-level signal, it can determine that the key encoder ENC is pressed at this time.

[0048] If the initial key voltage state of the key encoder ENC is high, that is, the key encoder ENC is high when it is not pressed and switches to low when it is pressed, then when the key is not pressed, the sampling terminal (first output terminal) of the connector interface 110 will also sample a high level signal because the key encoder ENC itself is high and the pull-up resistor R11 is also high. When the key is not pressed, the control signal input terminal (SW3 terminal) of the main control module 200 will receive the high level signal and set the preset voltage state of the voltage state setting terminal (SW4 terminal) of the main control module 200 to a low level. In actual operation, when the key encoder ENC is pressed, the key voltage state will switch from a high level to a low level. The low-level signal it outputs will be received by the sampling state feedback terminal (second output terminal) of the connector interface 110. Even with the pull-up effect of the pull-up resistor R11, the sampling terminal (first output terminal) of the connector interface 110 will still output a low-level signal. After the control signal input terminal (SW3 terminal) of the main control module 200 receives this low-level signal, it can determine that the key encoder ENC is pressed at this time.

[0049] In this embodiment, the connector interface provides multiple input ports and output ports, which can aggregate the signals from multiple ports of the key encoder to the input port of the connector interface and transmit them to the main control module through the output port of the connector interface. This achieves effective signal distribution and transmission without the need for excessive signal lines, reducing the number of required connection lines, lowering cable costs and wiring complexity.

[0050] Furthermore, as a preferred embodiment of this solution and not a limitation, the driving module 300 includes a transistor Q1, a relay REL1, a load resistor R10, a diode D5, a polarized capacitor EC7, a resistor R14, and a resistor R16. The control signal output terminal (i.e., the CTL terminal) of the main control module 200 is connected to one end of the resistor R14, the other end of the resistor R14 is connected to the base of the transistor Q1, and the other end of the resistor R14 is also connected to the positive terminal of the polarized capacitor EC7. The negative terminal of the polarized capacitor EC7 is grounded, and the resistor R14... The other end is connected to the resistor R16 between the resistor and the ground. The emitter of the transistor Q1 is grounded. The collector of the transistor Q1 is connected to the first coil terminal (i.e., pin 1) of the relay REL1. The collector of the transistor Q1 is also connected to the positive terminal of the diode D5. The negative terminal of the diode D5 is connected to the second coil terminal (i.e., pin 2) of the relay REL1. The common terminal (i.e., pin 3) of the relay REL1 is connected to the neutral wire. The normally open terminal (i.e., pin 4) of the relay REL1 is connected to the live wire between the load resistor R10 and the live wire.

[0051] Specifically, after the base of transistor Q1 receives the drive control signal output from the control signal output terminal (CTL terminal) of the main control module 200, it becomes conductive. At this time, the first coil terminal (pin 1) of relay REY1 receives the current transmitted from the collector of transistor Q1, and the second coil terminal (pin 2) of relay REY1 generates a magnetic field due to the 12V power input terminal, which attracts the contacts of relay REY1. As a result, the normally open terminal (pin 4) of relay REY1 closes and is energized, thereby driving the load to work.

[0052] In this embodiment, by cooperating with transistor Q1 and relay REY1, the main control module can control the on and off of relay REY1 by controlling the conduction and cutoff of transistor Q1, thereby controlling the operation of the load. This electrically isolated control method can protect the main control module from interference and impact of load current in the load circuit, and improve the stability and safety of the entire circuit control.

[0053] Secondly, the diode D5 is connected in reverse parallel across the relay coil, which can effectively suppress the reverse electromotive force (i.e., self-induced electromotive force) generated when the relay coil is de-energized, thereby protecting the transistor Q1 from being broken down by high voltage.

[0054] Furthermore, as a preferred embodiment of this solution and not a limitation, the main control module 200 includes a main control chip MCU, and the model of the main control chip MCU in this embodiment is preferably FT60F123.

[0055] Furthermore, as a preferred embodiment of this solution and not a limitation, it also includes a switching power supply module 400, the output terminal of which is connected to the power input terminal of the main control module 200 and the power input terminal of the drive module 300, respectively, and the switching power supply module 400 is used to provide a stable operating voltage.

[0056] In a preferred embodiment, the switching power supply module 400 includes a rectifier unit 410, a protection unit 420, and a voltage conversion unit 430. The input terminal of the rectifier unit 410 is connected to the mains power supply, and the rectifier unit 410 is used to rectify the mains power supply into direct current (DC). The input terminal of the protection unit 420 is connected to the output terminal of the rectifier unit 410, and the protection unit is used to cut off the circuit output when the DC power supply experiences overcurrent / overvoltage. The voltage conversion unit 430 is used to convert the DC power supply into a first DC voltage and a second DC voltage. The input terminal of the voltage conversion unit 430 is connected to the output terminal of the protection unit 420. The first output terminal of the voltage conversion unit 430 is connected to the power input terminal of the drive module 300, and is used to output the first DC voltage to provide a stable operating voltage for the drive module 300. The second output terminal of the voltage conversion unit 430 is used to output the second DC voltage.

[0057] In this embodiment, the first DC voltage is preferably 12V DC voltage, and the second DC voltage is preferably 8V DC voltage.

[0058] Alternatively, the rectifier unit 410 includes a rectifier bridge BD1, a fuse FULE, a thermistor FR1, an inductor L1, a resistor R5, and a resistor R6. The live wire (i.e., the AC_L terminal) is connected to one end of the fuse FULE, the other end of the fuse FULE is connected to one end of the thermistor FR1, the other end of the thermistor FR1 is connected to the first AC input terminal (i.e., pin 1) of the rectifier bridge BD1, the neutral wire (i.e., the AC_N terminal) is connected to the second AC input terminal (i.e., pin 2) of the rectifier bridge BD1, the negative output terminal of the rectifier bridge BD1 is grounded, the positive output terminal of the rectifier bridge BD1 is connected to one end of the inductor L1, and the other end of the inductor L1 is connected to the input terminal of the protection unit 420 via resistors R5 and R6 connected in series.

[0059] The preferred model of the rectifier bridge BD1 is ABS10.

[0060] In this embodiment, the fuse FULE and the thermistor FR1 protect the circuit, enabling the circuit to be cut off in time when an overload or short circuit occurs. The thermistor FR1 also suppresses the surge current generated at the moment of power-on, avoiding the risk of electric shock when the equipment is powered on.

[0061] Secondly, the rectifier bridge BD1 rectifies the AC power (i.e., mains power) into DC power, providing a stable DC power supply for other subsequent circuits. The inductor L1 filters the rectified DC power supply, reducing ripple and making it closer to the ideal DC power, thus improving power quality.

[0062] Alternatively, the protection unit 420 includes a protection chip U1, a diode D1, a capacitor C2, and a resistor R8. The output terminal of the rectifier unit 420 is connected to the input terminal (VIN terminal) of the protection chip U1, the output terminal (HV terminal) of the protection chip U1 is connected to the positive terminal of the diode D1, the negative terminal of the diode D1 is connected to one end of the resistor R8, the other end of the resistor R8 is connected to the input terminal of the voltage conversion unit 430, the negative terminal of the diode D1 is also connected to one end of the capacitor C2, and the other end of the capacitor C2 is also connected to the input terminal of the voltage conversion unit 430.

[0063] The protection chip U1 is model number LN5R04DA.

[0064] In this embodiment, the protection chip LN5R04DA has overcurrent, overvoltage, and undervoltage protection functions. It can monitor the rectified DC current in real time and cut off the circuit or limit the current in time when abnormalities such as overcurrent / overvoltage occur to prevent damage to other subsequent circuits. Secondly, the setting of diode D1 prevents current backflow and avoids the protection chip LN5R04DA from being damaged by reverse current, thereby enhancing the safety of the circuit.

[0065] Alternatively, the voltage conversion unit 430 includes a transformer T1, diodes D2, D3, and D4, polarized capacitors EC4 and EC6, resistors R10 and R11. The output terminal of the protection unit 420 is connected to the first input terminal (pin 1) of the primary winding of the transformer T1. The output terminal of the protection unit 420 is also connected to the second input terminal (pin 2) of the primary winding of the transformer T1. The fourth input terminal (pin 4) of the primary winding of the transformer T1 is grounded. The fifth input terminal (pin 5) of the primary winding of the transformer T1 is connected to the positive terminal of the diode D2. The negative terminal of the diode D2 is connected to the positive terminal of the polarized capacitor EC4. The negative terminal of the polarized capacitor EC4 is grounded.

[0066] The first output terminal (pin 6) of the secondary winding of transformer T1 is connected to the positive terminal of diode D3, and the negative terminal of diode D3 is connected to the first output terminal (+12V terminal) of voltage conversion unit 430. The second output terminal (pin 8) of the secondary winding of transformer T1 is connected to the positive terminal of diode D4, and the negative terminal of diode D4 is connected to the second output terminal (+8V terminal) of voltage conversion unit 430. Resistors R10 and R11 are connected in parallel between the first output terminal (+12V terminal) and the second output terminal (+8V terminal) of voltage conversion unit 430. The polarized capacitor EC6 is connected between the second output terminal (+8V terminal) of voltage conversion unit 430 and ground. The third output terminal (pin 9) of the secondary winding of transformer is grounded.

[0067] The transformer T1 is preferably of model EE13.

[0068] In this embodiment, a diode D2 and a polarized capacitor EC4 are connected to the fifth input terminal (i.e., pin 5) of the primary winding of transformer T1. During the operation of transformer T1, diode D2 and polarized capacitor EC4 form a clamping circuit. When the voltage of the primary winding of transformer T1 rises to a certain level, diode D2 conducts and polarized capacitor EC4 charges, stabilizing the voltage within a relatively safe range and preventing excessive voltage from damaging transformer T1. Secondly, resistors R10 and R11 are connected in parallel between the first output terminal (i.e., +12V terminal) and the second output terminal (i.e., +8V terminal) of voltage conversion unit 430 to divide the +12V voltage to obtain the +8V voltage.

[0069] Furthermore, as a preferred embodiment of this solution and not a limitation, the switching power supply module 400 further includes a step-down unit 440. The input terminal of the step-down unit 440 is connected to the second output terminal of the voltage conversion unit 430, and the output terminal of the step-down unit 440 is connected to the power input terminal of the main control module 200. The step-down unit 440 is used to step down the second DC voltage to a stable third DC voltage, thereby providing a stable operating voltage for the main control module 200.

[0070] In this embodiment, the third DC voltage is preferably a 5V DC voltage.

[0071] In a preferred embodiment, the step-down unit 440 includes a linear regulator U2 and a resistor R20. The second output terminal (i.e., +8V terminal) of the voltage conversion unit 430 is connected to the input terminal (i.e., I terminal) of the linear regulator U2. The output terminal (i.e., O terminal) of the linear regulator U2 is connected to one end of the resistor R20, and the other end of the resistor R20 is connected to the power input terminal (i.e., VDD terminal) of the main control module 200.

[0072] Alternatively, the linear regulator U2 is preferably model 78L05.

[0073] In this embodiment, the linear regulator 78L05 stably reduces the input +8V voltage to +5V, providing a stable +5V power supply to the main control module, ensuring that the main control module can obtain a stable power supply and improving the stability of the system. Secondly, the linear regulator 78L05 can filter the output voltage, reducing the impact of power supply noise on the main control module and improving the working performance and stability of the main control module.

[0074] Those skilled in the art should understand that the above description is one embodiment provided in conjunction with specific content, and does not imply that the specific implementation of this utility model is limited to these descriptions. Furthermore, due to differences in industry naming conventions, it is not limited to the above names or English names. Any methods or structures similar to or identical to those of this utility model, or any technical deductions or substitutions made based on the concept of this utility model, should be considered within the scope of protection of this utility model.

Claims

1. A key encoder interface circuit, characterized in that, include: A button encoder, which is used to output control commands; A sampling module is electrically connected to the key encoder, and the sampling module is used to sample the key voltage state of the key encoder; The main control module has its control signal input terminal connected to the sampling terminal of the sampling module, and its voltage state setting terminal connected to the sampling state feedback terminal of the sampling module. The voltage state setting terminal of the main control module is set with a preset voltage state. The main control module compares the received button voltage state with the preset voltage state. If the button voltage state and the preset voltage state are the same, the main control module determines that the button encoder is in the pressed state and outputs a drive control signal. The drive module has its input terminal connected to the control signal output terminal of the main control module and its output terminal connected to the load. The drive module is used to drive the load to work when it receives the drive control signal.

2. The key encoder interface circuit according to claim 1, characterized in that, The sampling module includes a connector interface, resistors R13, R15, R17, pull-up resistors R11 and R12. The first end of the button encoder is connected to one end of resistor R17, and the other end of resistor R17 is connected to the first input terminal of the connector interface. The second end of the button encoder is connected to the second input terminal of the connector interface. The third end of the button encoder is connected to one end of resistor R15, and the other end of resistor R15 is connected to the first input terminal of the connector interface. The fourth end of the button encoder is connected to the third input terminal of the connector interface, which is also grounded. The fifth end of the button encoder is connected to one end of resistor R13, and the other end of resistor R13 is connected to the second input terminal of the connector interface. The sampling terminal of the connector interface is connected to the control signal input terminal of the main control module. The sampling terminal of the connector interface is also connected to the pull-up resistor R11. The sampling status feedback terminal of the connector interface is connected to the voltage status setting terminal of the main control module. The sampling status feedback terminal of the connector interface is also connected to the pull-up resistor R12. The third output terminal of the connector interface is grounded.

3. The key encoder interface circuit according to claim 1, characterized in that, The driving module includes a transistor Q1, a relay REL1, a load resistor R10, a diode D5, a polarized capacitor EC7, resistors R14 and R16. The control signal output terminal of the main control module is connected to one end of resistor R14. The other end of resistor R14 is connected to the base of transistor Q1 and the positive terminal of polarized capacitor EC7. The negative terminal of polarized capacitor EC7 is grounded. Resistor R16 is connected between the other end of resistor R14 and ground. The emitter of transistor Q1 is grounded. The collector of transistor Q1 is connected to the first coil terminal of relay REL1 and the positive terminal of diode D5. The negative terminal of diode D5 is connected to the second coil terminal of relay REL1. The common terminal of relay REL1 is connected to the neutral wire. The load resistor R10 is connected between the normally open terminal of relay REL1 and the live wire.

4. The key encoder interface circuit according to claim 1, characterized in that, It also includes a switching power supply module, the output of which is connected to the power input of the main control module and the power input of the drive module, respectively, and the switching power supply module is used to provide a stable operating voltage.

5. The key encoder interface circuit according to claim 4, characterized in that, The switching power supply module includes: A rectifier unit, the input terminal of which is connected to the mains power, is used to rectify the mains power into direct current; The protection unit has its input terminal connected to the output terminal of the rectifier unit. The protection unit is used to cut off the circuit output when the DC current experiences overcurrent / overvoltage. A voltage conversion unit is provided, which converts the DC power into a first DC voltage and a second DC voltage. The input terminal of the voltage conversion unit is connected to the output terminal of the protection unit. The first output terminal of the voltage conversion unit is connected to the power input terminal of the drive module and is used to output the first DC voltage to provide a stable operating voltage for the drive module. The second output terminal of the voltage conversion unit is used to output the second DC voltage.

6. The key encoder interface circuit according to claim 5, characterized in that, The rectifier unit includes a rectifier bridge BD1, a fuse FULE, a thermistor FR1, an inductor L1, a resistor R5, and a resistor R6. The live wire is connected to one end of the fuse FULE, and the other end of the fuse FULE is connected to one end of the thermistor FR1. The other end of the thermistor FR1 is connected to the first AC input terminal of the rectifier bridge BD1. The neutral wire is connected to the second AC input terminal of the rectifier bridge BD1. The negative output terminal of the rectifier bridge BD1 is grounded, and the positive output terminal of the rectifier bridge BD1 is connected to one end of the inductor L1. The other end of the inductor L1 is connected to the input terminal of the protection unit via resistors R5 and R6 connected in series.

7. The key encoder interface circuit according to claim 5, characterized in that, The protection unit includes a protection chip U1, a diode D1, a capacitor C2, and a resistor R8. The output terminal of the rectifier unit is connected to the input terminal of the protection chip U1. The output terminal of the protection chip U1 is connected to the positive terminal of the diode D1. The negative terminal of the diode D1 is connected to one end of the resistor R8. The other end of the resistor R8 is connected to the input terminal of the voltage conversion unit. The negative terminal of the diode D1 is also connected to one end of the capacitor C2. The other end of the capacitor C2 is also connected to the input terminal of the voltage conversion unit.

8. A key encoder interface circuit according to claim 5, characterized in that, The voltage conversion unit includes a transformer T1, diodes D2, D3, and D4, a polarized capacitor EC4 and EC6, a resistor R10, and a resistor R11. The output terminal of the protection unit is connected to the first input terminal of the primary winding of the transformer T1, and the output terminal of the protection unit is also connected to the second input terminal of the primary winding of the transformer T1. The fourth input terminal of the primary winding of the transformer T1 is grounded, the fifth input terminal of the primary winding of the transformer T1 is connected to the positive terminal of the diode D2, the negative terminal of the diode D2 is connected to the positive terminal of the polarized capacitor EC4, and the negative terminal of the polarized capacitor EC4 is grounded. The first output terminal of the secondary winding of transformer T1 is connected to the positive terminal of diode D3, the negative terminal of diode D3 is connected to the first output terminal of voltage conversion unit, the second output terminal of the secondary winding of transformer T1 is connected to the positive terminal of diode D4, the negative terminal of diode D4 is connected to the second output terminal of voltage conversion unit, resistors R10 and R11 are connected in parallel between the first and second output terminals of voltage conversion unit, polarized capacitor EC6 is connected between the second output terminal of voltage conversion unit and ground, and the third output terminal of the secondary winding of transformer is grounded.

9. A key encoder interface circuit according to claim 8, characterized in that, The switching power supply module also includes a step-down unit. The input terminal of the step-down unit is connected to the second output terminal of the voltage conversion unit, and the output terminal of the step-down unit is connected to the power input terminal of the main control module. The step-down unit is used to step down the second DC voltage to a stable third DC voltage, so as to provide a stable operating voltage for the main control module.

10. A key encoder interface circuit according to claim 9, characterized in that, The step-down unit includes a linear regulator U2 and a resistor R20. The second output terminal of the voltage conversion unit is connected to the input terminal of the linear regulator U2. The output terminal of the linear regulator U2 is connected to one end of the resistor R20, and the other end of the resistor R20 is connected to the power input terminal of the main control module.