Single-port control circuit with multiple external keys
By using a single-port multi-external-button control circuit and employing voltage divider and button circuit design, the problem of insufficient controller resources was solved, stable detection of multiple buttons was achieved, the occupation of input/output interfaces was reduced, and the reliability and stability of the circuit were improved.
Patent Information
- Application Number
- CN202520065535.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2035-01-10
AI Technical Summary
In existing technologies, when a controller is faced with multiple control buttons, it needs to occupy multiple input/output port I/O, resulting in insufficient resources.
A single-port multi-external-button control circuit is adopted. Through the design of voltage divider circuit and button circuit, multiple control buttons are connected using one input/output interface, and the total voltage of the voltage divider is provided through the digital-to-analog signal conversion output terminal to ensure the stability of the voltage divider and avoid false detection.
This technology enables the detection of multiple control buttons connected through a single interface, reducing the use of I/O interfaces on the controller, improving the stability and reliability of the circuit, and preventing false detections.
Smart Images

Figure CN223885177U_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The utility model relates to control button circuit technical field especially relates to a single port many outer keys control circuit. BACKGROUND
[0002] In industrial control, usually need to send corresponding control signal to the controller through the control button. So that the controller makes corresponding action, to realize the purpose of manual control.
[0003] The existing button control circuit usually adopts the mode that one control button is connected to one input output port IO. In this way, the controller can obtain corresponding control signal and make corresponding action by detecting the state of the button of different port. However, when the control button is relatively more, multiple input output ports IO are needed, which leads to the problem that the input output port IO of the controller is not enough. SUMMARY
[0004] The utility model at least one of the purposes in the related technical field is to solve the technical problem. Therefore, one purpose of the utility model is to provide a single port many outer keys control circuit.
[0005] In order to realize the above-mentioned purpose, the single port many outer keys control circuit according to the utility model embodiment, including:
[0006] Controller;
[0007] Voltage dividing circuit, the voltage dividing circuit includes the first resistance R4, one end of the first resistance R4 and the digital analog signal conversion output end DAC of the controller are connected, the other end of the first resistance R4 and the analog-digital signal conversion end ADC of the controller are connected;
[0008] Button circuit, the button circuit includes the first control button SW1 and the second control button SW2, one end of the first control button SW1, one end of the second control button SW2 is connected with the analog-digital signal conversion end ADC of the controller respectively, the other end of the first control button SW1 is connected with reference ground through the second resistance R1, the other end of the second control button SW2 is connected with reference ground through the third resistance R2;Wherein, the second resistance R1, the third resistance R2 are different resistance values respectively.
[0009] Further, according to one embodiment of the utility model, the button circuit further includes:
[0010] A third control button SW3, one end of the third control button SW3 is connected with an analog-digital signal conversion end ADC of the controller, the other end of the third control button SW3 is connected with a reference ground through a fourth resistor R3; wherein the second resistor R1, the third resistor R2 and the fourth resistor R3 are different resistance values respectively.
[0011] Further, according to one embodiment of the utility model, the key circuit further comprises:
[0012] A transient diode TVS1, one end of the transient diode TVS1 is connected with an analog-digital signal conversion end ADC of the controller, the other end of the transient diode TVS1 is connected with a reference ground.
[0013] Further, according to one embodiment of the utility model, the key circuit further comprises:
[0014] A first capacitor C1, one end of the first capacitor C1 is connected with an analog-digital signal conversion end ADC of the controller, the other end of the first capacitor C1 is connected with a reference ground.
[0015] Further, according to one embodiment of the utility model, the key circuit further comprises:
[0016] A second capacitor C2, one end of the second capacitor C2 is connected with the other end of the first control button SW1, the other end of the second capacitor C2 is connected with a reference ground;
[0017] A third capacitor C3, one end of the third capacitor C3 is connected with the other end of the second control button SW2, the other end of the third capacitor C3 is connected with a reference ground;
[0018] A fourth capacitor C4, one end of the fourth capacitor C4 is connected with the other end of the third control button SW3, the other end of the fourth capacitor C4 is connected with a reference ground.
[0019] Further, according to one embodiment of the utility model, the voltage dividing circuit further comprises:
[0020] A fifth capacitor C5, one end of the fifth capacitor C5 is connected with a digital-analog signal conversion output end DAC of the controller, the other end of the fifth capacitor C5 is connected with a reference ground.
[0021] Further, according to one embodiment of the utility model, the single-port multi-external key control circuit further comprises a power supply circuit, the power supply circuit is connected with a power supply end of the controller to provide stable direct current power supply for the controller.
[0022] Further, according to one embodiment of the utility model, the power supply circuit comprises:
[0023] a triode Q1, a cathode of the triode Q1 is connected with an input power supply, the cathode of the triode Q1 is also connected with a base through a resistor R5, an anode of the triode Q1 is connected with an anode of a diode D2, a cathode of the diode D2 is connected with a power supply of the controller;
[0024] a voltage stabilizing diode D3, a cathode of the voltage stabilizing diode D3 is connected with the base of the triode Q1, an anode of the voltage stabilizing diode D3 is connected with a reference ground.
[0025] Further, according to an embodiment of the utility model, the power supply circuit further comprises:
[0026] a sixth capacitor C6, one end of the sixth capacitor C6 is connected with the power supply of the controller, the other end of the sixth capacitor C6 is connected with the reference ground;
[0027] a seventh capacitor C7, one end of the seventh capacitor C7 is connected with the cathode of the triode Q1, the other end of the seventh capacitor C7 is connected with the reference ground.
[0028] The single-port multi-external-key control circuit provided by the embodiment of the utility model, through the voltage dividing circuit comprising the first resistor R4, one end of the first resistor R4 is connected with the digital-analog signal conversion output end DAC of the controller, the other end of the first resistor R4 is connected with the analog-digital signal conversion end ADC of the controller, the key circuit comprises the first control key SW1 and the second control key SW2, one end of the first control key SW1, one end of the second control key SW2 are connected with the analog-digital signal conversion end ADC of the controller respectively, the other end of the first control key SW1 is connected with the reference ground through the second resistor R1, the other end of the second control key SW2 is connected with the reference ground through the third resistor R2, wherein, the second resistor R1, the third resistor R2 are different resistance values respectively, in this way, a plurality of control keys are connected through an input-output interface, and the digital-analog signal conversion output end DAC is used to provide the voltage dividing total voltage, so that the voltage dividing voltage is more stable, and the false detection problem is not prone to occur. BRIEF DESCRIPTION OF DRAWINGS
[0029] Figure 1 The structural block diagram of the single-port multi-external-key control circuit provided by the utility model is provided;
[0030] Figure 2 The structural schematic diagram of the port multi-external-key control circuit provided by the utility model is provided.
[0031] The implementation, functional features and advantages of the utility model will be further explained by combining with the embodiments and referring to the drawings. DETAILED DESCRIPTION
[0032] For those skilled in the technical field, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present application belongs. The terms used in the specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application.
[0033] In this paper, the "embodiment" means that the specific features, structures or characteristics described in conjunction with the embodiment can be included in at least one embodiment of the present application. The phrase appears in the specification is not necessarily referring to the same embodiment, nor is it an independent or alternative embodiment that is not mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0034] Referring to Figure 1 and Figure 2 The embodiment of the present application provides a single-port multi-external key control circuit, which comprises a controller, a voltage dividing circuit and a key circuit. The voltage dividing circuit comprises a first resistor R4, one end of the first resistor R4 is connected with a digital-to-analog signal conversion output end DAC of the controller, and the other end of the first resistor R4 is connected with an analog-to-digital signal conversion end ADC of the controller. The key circuit comprises a first control key SW1 and a second control key SW2, one end of the first control key SW1 and one end of the second control key SW2 are respectively connected with the analog-to-digital signal conversion end ADC of the controller, the other end of the first control key SW1 is connected with a reference ground through a second resistor R1, and the other end of the second control key SW2 is connected with the reference ground through a third resistor R2. Wherein, the second resistor R1 and the third resistor R2 are different resistance values.
[0035] Specifically, as Figure 1 and Figure 2As shown in the figure, in use, the controller outputs a voltage value through an analog-digital signal conversion end ADC. For example, the voltage value can be 5V or 3.3V. In this way, one end of the first resistor R4 is supplied with power. In order to send a control signal to the controller, the first control button SW1 or the second control button SW2 is pressed by external force; when the two ends of the first control button SW1 are connected, the second resistor R1 and the fourth resistor R4 form a series voltage dividing circuit, the voltage output by a digital-analog signal conversion output end DAC of the controller is divided, and then the divided voltage is output to the analog-digital signal conversion end ADC of the controller; in this way, the controller can obtain that the first control button SW1 is pressed and connected. Similarly, when the two ends of the second control button SW2 are connected, the third resistor R2 and the fourth resistor R4 form a series voltage dividing circuit, the voltage output by the digital-analog signal conversion output end DAC of the controller is divided, and then the divided voltage is output to the analog-digital signal conversion end ADC of the controller; since the second resistor R1 and the third resistor R2 have different resistance values, the divided voltages are also different; in this way, the controller can obtain that the second control button SW2 is pressed and connected. The controller can make corresponding reactions according to the states of the first control button SW1 or the second control button SW2, so as to realize the purpose of inputting a control signal to the controller through the control buttons. Since in the embodiment of the utility model, only one interface can realize the access of multiple control buttons and the detection of corresponding control buttons, the use of an input-output interface IO of the controller can be reduced. In addition, the digital-analog signal conversion output end DAC of the controller is used as a power supply voltage dividing total voltage, so that the divided voltage is more stable, and the situation that a false button signal is detected due to power supply voltage fluctuation is avoided.
[0036] Referring to Figure 2 , the key circuit further comprises a third control button SW3, one end of the third control button SW3 is connected with an analog-digital signal conversion end ADC of the controller, and the other end of the third control button SW3 is connected with a reference ground through a fourth resistor R3; wherein the second resistor R1, the third resistor R2 and the fourth resistor R3 have different resistance values. Figure 2As shown in the middle, the controller signal detection process of the third control button SW3 is the same as the first control button SW1 or the second control button SW2; because the second resistor R1, the third resistor R2 and the fourth resistor R3 are different resistance values. Therefore, different third control button SW3 press will produce different voltage value. That is, the controller detects different voltage value through the analog signal conversion end ADC, and then the different control button is pressed. It should be noted that although the utility model embodiment only uses three control buttons to illustrate the utility model. However, it can be understood that more control buttons can be added according to application requirements, and different resistors can be set to realize different voltage values.
[0037] Referring to Figure 2 , the key circuit further comprises: a transient diode TVS1, one end of the transient diode TVS1 is connected with the analog signal conversion end ADC of the controller, and the other end of the transient diode TVS1 is connected with the reference ground. Because the control button may introduce static electricity of human body into the circuit during pressing, in order to avoid high-voltage pulse static electricity from damaging the controller, the transient diode TVS1 is arranged at the analog signal conversion end ADC of the controller, so that the high-voltage pulse static electricity can be absorbed, thereby protecting the controller.
[0038] Referring to Figure 2 , the key circuit further comprises: a first capacitor C1, one end of the first capacitor C1 is connected with the analog signal conversion end ADC of the controller, and the other end of the first capacitor C1 is connected with the reference ground. The first capacitor C1 can filter out the interference signal of the analog signal conversion end ADC of the controller. When the control button generates an interference signal due to jitter or other reasons, the first capacitor C1 can filter out such interference signal, avoid the occurrence of false detection of the controller, and thereby ensure the reliability of the circuit.
[0039] Referring to Figure 2 , the key circuit further comprises: a second capacitor C2, a third capacitor C3 and a fourth capacitor C4, one end of the second capacitor C2 is connected with the other end of the first control button SW1, and the other end of the second capacitor C2 is connected with the reference ground; one end of the third capacitor C3 is connected with the other end of the second control button SW2, and the other end of the third capacitor C3 is connected with the reference ground; one end of the fourth capacitor C4 is connected with the other end of the third control button SW3, and the other end of the fourth capacitor C4 is connected with the reference ground. The second capacitor C2, the third capacitor C3 and the fourth capacitor C4 can filter out the interference signal of the remote controller end of each control switch, avoid the interference signal affecting the voltage value, and thereby ensure the reliability of the circuit.
[0040] Referring to Figure 2 , the voltage dividing circuit further comprises a fifth capacitor C5, one end of the fifth capacitor C5 is connected with the digital-analog signal conversion output end DAC of the controller, and the other end of the fifth capacitor C5 is connected with the reference ground. The interference signal of the digital-analog signal conversion end DAC of the controller can be filtered out through the fifth capacitor C5, the influence of the interference signal on the output voltage of the digital-analog signal conversion end DAC is avoided, the stability of the output voltage of the digital-analog signal conversion end DAC is ensured, and the reliability of the circuit is further ensured.
[0041] Referring to Figure 1 and Figure 2 , the single-port multi-external-key control circuit further comprises a power supply circuit, the power supply circuit is connected with the power supply end of the controller to provide a stable direct current power supply for the controller. The power supply circuit can provide a stable power supply voltage for the controller. The stability of the power supply of the power supply end of the controller is ensured, and the influence of the floating voltage on the controller is avoided.
[0042] As shown in Figure 2 , the power supply circuit comprises a triode Q1 and a voltage stabilizing diode D3, the collector of the triode Q1 is connected with an input power supply, the collector of the triode Q1 is further connected with the base through a resistor R5, the emitter of the triode Q1 is connected with the anode of a diode D2, and the cathode of the diode D2 is connected with the power supply end of the controller; the cathode of the voltage stabilizing diode D3 is connected with the base of the triode Q1, and the anode of the voltage stabilizing diode D3 is connected with the reference ground.
[0043] Specifically, the working process of the power supply circuit is that an external power supply is introduced through the Vin signal end, the introduction of the power supply can make the triode Q1 conduct, and then the power supply is output to the power supply end VCC of the controller, and at the same time, the voltage output to the power supply end VCC of the controller can be stabilized through the voltage stabilizing diode D3, so as to ensure the stability of the power supply output to the controller.
[0044] Referring to Figure 2 , the power supply circuit further comprises a sixth capacitor C6 and a seventh capacitor C7, one end of the sixth capacitor C6 is connected with the power supply end of the controller, and the other end of the sixth capacitor C6 is connected with the reference ground; one end of the seventh capacitor C7 is connected with the collector of the triode Q1, and the other end of the seventh capacitor C7 is connected with the reference ground. The introduced power supply can be stabilized and filtered through the seventh capacitor C7, and the stability of the voltage of the Vin signal end of the introduced power supply is ensured. The power supply output to the controller can be stabilized and filtered through the sixth capacitor C6, and the stability of the voltage of the power supply end of the controller is ensured.
[0045] The above are only embodiments of the present application, but do not limit the patent range of the present application, although the present application has been described in detail with reference to the foregoing embodiments, for those skilled in the art, it can still modify the technical solutions recorded in the foregoing specific embodiments, or equivalently replace part of the technical features. Any equivalent structure made by using the content of the present application specification and drawings, directly or indirectly used in other related technical fields, are also within the protection scope of the present application.
[0046] In the description of the present application, the description of the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In the present application, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0047] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application, and those skilled in the art can make changes, modifications, replacements and modifications to the above embodiments without departing from the principles and purposes of the present application within the scope of the present application.
Claims
1. A single port multi-external key control circuit, characterized by, Comprising: a controller; a voltage dividing circuit, comprising a first resistor (R4), one end of which is connected with a digital-analog signal conversion output end DAC of the controller, and the other end of which is connected with an analog-digital signal conversion end ADC of the controller; a key circuit, comprising a first control key (SW1) and a second control key (SW2), one end of the first control key (SW1) and one end of the second control key (SW2) are respectively connected with the analog-digital signal conversion end ADC of the controller, the other end of the first control key (SW1) is connected with a reference ground through a second resistor (R1), and the other end of the second control key (SW2) is connected with the reference ground through a third resistor (R2); wherein the second resistor (R1) and the third resistor (R2) are respectively different resistor values.
2. The single ported multi-external key control circuit of claim 1, wherein, The key circuit further comprises: a third control key (SW3), one end of which is connected with the analog-digital signal conversion end ADC of the controller, and the other end of which is connected with the reference ground through a fourth resistor (R3); wherein the second resistor (R1), the third resistor (R2) and the fourth resistor (R3) are respectively different resistor values.
3. The single ported multi-external key control circuit of claim 2, wherein, The key circuit further comprises: a transient voltage suppression diode (TVS1), one end of which is connected with the analog-digital signal conversion end ADC of the controller, and the other end of which is connected with the reference ground.
4. The single ported multi-external key control circuit of claim 3, wherein, The key circuit further comprises: a first capacitor (C1), one end of which is connected with the analog-digital signal conversion end ADC of the controller, and the other end of which is connected with the reference ground.
5. The single ported multi-external key control circuit of claim 3, wherein, The key circuit further comprises: a second capacitor (C2), one end of which is connected with the other end of the first control key (SW1), and the other end of which is connected with the reference ground; a third capacitor (C3), one end of which is connected with the other end of the second control key (SW2), and the other end of which is connected with the reference ground; a fourth capacitor (C4), one end of which is connected with the other end of the third control key (SW3), and the other end of which is connected with the reference ground.
6. The single ported multi-external key control circuit of claim 1, wherein, The voltage dividing circuit further comprises: a fifth capacitor (C5), one end of which is connected with the digital-analog signal conversion output end DAC of the controller, and the other end of which is connected with the reference ground.
7. The single ported multi-external key control circuit of claim 1, wherein, Further comprising a power supply circuit, which is connected with a power supply end of the controller, to provide a stable direct current power supply for the controller.
8. The single ported multi-external key control circuit of claim 7, wherein, The power supply circuit comprises: A triode (Q1), the collector of the triode (Q1) is connected with input power supply, the collector of the triode (Q1) is also connected with the base through resistance R5, the emitter of the triode (Q1) is connected with the anode of diode D2, the cathode of the diode D2 is connected with the power supply of the controller; A voltage stabilizing diode (D3), the cathode of the voltage stabilizing diode (D3) is connected with the base of the triode (Q1), the anode of the voltage stabilizing diode (D3) is connected with reference ground.
9. The single ported multi-external key control circuit of claim 8, wherein, The power supply circuit further comprises: A sixth capacitor (C6), one end of the sixth capacitor (C6) is connected with the power supply of the controller, the other end of the sixth capacitor (C6) is connected with reference ground; A seventh capacitor (C7), one end of the seventh capacitor (C7) is connected with the collector of the triode (Q1), the other end of the seventh capacitor (C7) is connected with reference ground.