Circuit for connecting key and key indicating lamp through single wire

By designing a circuit that connects the keys and key indicators, using the MCU processor and GPIO pins, single-wire control of the keys and indicators is realized, solving the problem of too many connection lines and reducing wiring difficulty and cost.

CN222216000UActive Publication Date: 2024-12-20REMO WIRELESS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202420316836.1
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-02-20
Publication Date
2024-12-20
Estimated Expiration
2034-02-20

AI Technical Summary

Technical Problem

The number of connecting lines for key and key indicator lights in existing equipment is too high, resulting in increased wiring difficulty and space occupation, so it is necessary to design a circuit that reduces the number of connecting lines.

Method used

A single-wire circuit is designed to connect the keys and key indicator lights, and a single-wire control is realized through the first connection line, the key recognition module and the MCU processor, and the circuit of the keys and indicator lights of the MCU processor is controlled by the GPIO pin of the MCU processor.

Benefits of technology

It effectively reduces the number of connecting lines, reduces wiring difficulty, reduces cost and weight, and simplifies equipment layout.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN222216000U_ABST
    Figure CN222216000U_ABST
Patent Text Reader

Abstract

A circuit for connecting a key and a key indicating lamp through a single wire relates to the technical field of circuit structures, solves the problems that the number of connecting wires is large, and wiring is difficult, and comprises a first connecting wire, a key identification module, a key indicating lamp starting module and an MCU processor, and one end of the first connecting wire is connected with the key and the key indicating lamp; the key identification module is connected with a first pin of the MCU processor, and the key indicator lamp starting module is connected with a second pin of the MCU processor; the key identification module is used for outputting voltage to the first pin according to the key pressing condition; the first pin is used for receiving voltage of the key, the voltage is equal to ground signal voltage when the key is closed, and the voltage is equal to first power supply voltage connected with the key identification module when the key is disconnected; and the key indicator lamp starting module is used for outputting voltage capable of or incapable of conducting the key indicator lamp according to the output voltage of the second pin. The number of connecting wires is effectively reduced, and the wiring difficulty is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model relates to the technical field of circuit structures, in particular to a circuit for connecting a button and a button indicator light with a single line. Background Art

[0002] As the functions of electronic equipment such as industrial and automotive equipment become more and more abundant, there are higher requirements for equipment experience. The buttons and button indicators of some devices are far away from the operating table, which requires very long wires to connect them. One long wire connects the buttons and the operating table, and another long wire connects the button indicator and the operating table. If there are a large number of buttons and button indicator lights, there will be many long connecting wires, which take up equipment space.

[0003] Therefore, in order to reduce the number of connection lines and reduce the difficulty of wiring, it is necessary to design a circuit that uses a single line to control the button indicator light. Summary of the invention

[0004] In order to solve the problem that the number of control circuit connection lines of a button and a button indicator light is large, the utility model provides a circuit for connecting a button and a button indicator light with a single line.

[0005] The technical solutions adopted by the utility model to solve the technical problems are as follows:

[0006] A circuit for connecting a button and a button indicator light with a single line, comprising a first connecting line, a button recognition module, a button indicator light start module and an MCU processor, wherein one end of the first connecting line is used to connect a button J1 and a button indicator light, and the other end of the first connecting line is connected to one end of the button recognition module and one end of the button indicator light start module, the other end of the button recognition module is connected to a first pin GPIO1 of the MCU processor, the other end of the button indicator light start module is connected to a second pin GPIO2 of the MCU processor, and the button recognition module is connected to a first power supply;

[0007] The button recognition module is used to detect the pressing status of the button J1 and output voltage to the first pin GPIO1; the first pin GPIO1 is used to receive the voltage of the button J1. When the button J1 is closed, the voltage received by the first pin GPIO1 is equal to the voltage of the ground signal. When the button J1 is disconnected, the voltage received by the first pin GPIO1 is equal to the voltage of the first power supply; the second pin GPIO2 is used to output voltage to the button indicator light start module; the button indicator light start module is used to output a voltage that can turn on the button indicator light or a voltage that cannot turn on the button indicator light according to the output voltage of the second pin GPIO2.

[0008] In a preferred embodiment, the key indicator light is a light emitting diode D1, and the voltage capable of turning on the key indicator light is the forward conduction voltage of the light emitting diode D1.

[0009] In a preferred embodiment, the positive electrode of the button indicator light is connected to the first connection line and the negative electrode is grounded; one end of the button J1 is connected to the first connection line and the other end is grounded.

[0010] In a preferred embodiment, the key recognition module includes a first transistor Q1, a first resistor R1, a second resistor R2 and a third resistor R3, and the key indicator light start module includes a second transistor Q2, a third transistor Q3, a fourth resistor R4, a fifth resistor R5 and a sixth resistor R6, the first transistor Q1 adopts a first N-channel field effect transistor or a first NPN transistor, the second transistor Q2 adopts a second P-channel field effect transistor or a second PNP transistor, and the third transistor Q3 adopts a third NPN transistor or a third N-channel field effect transistor;

[0011] The output electrode of the first transistor Q1 is connected to one end of the first resistor R1 and the first pin GPIO1, the control electrode of the first transistor Q1 is connected to one end of the second resistor R2 and one end of the third resistor R3, the input electrode of the first transistor Q1 is connected to one end of the sixth resistor R6 and the other end of the first connecting line, the other end of the first resistor R1 is connected to the first power supply, the other end of the second resistor R2 is connected to the second power supply, and the other end of the third resistor R3 is grounded; one end of the fourth resistor R4 is connected to the second pin GPIO2, and the other end is connected to the control electrode of the third transistor Q3, the input stage of the third transistor Q3 is grounded, the output electrode of the third transistor Q3 is connected to one end of the fifth resistor R5 and the control electrode of the second transistor Q2, the other end of the fifth resistor R5 and the input stage of the second transistor Q2 are both connected to the third power supply, and the output electrode of the second transistor Q2 is connected to the other end of the sixth resistor R6.

[0012] In a preferred embodiment, the level of the first power supply is consistent with the level of the first pin GPIO1.

[0013] In a preferred embodiment, the voltage of the second power source after being divided by the second resistor R2 and the third resistor R3 is lower than the forward conduction voltage of the light emitting diode D1 and higher than the maximum value of the turn-on voltage of the first transistor Q1.

[0014] In a preferred embodiment, the voltage of the third power source is higher than the forward conduction voltage of the light emitting diode D1.

[0015] In a preferred embodiment, the power of the sixth resistor R6 is greater than the square of the third power supply voltage divided by the resistance value of the sixth resistor R6.

[0016] In a preferred embodiment, the output voltage capable of turning on the button indicator light is specifically: the second transistor Q2 outputs the turn-on voltage of the button indicator light to the first connecting line, and the output voltage of the second pin GPIO2 is higher than the turn-on voltage of the third transistor Q3.

[0017] In a preferred embodiment, the voltage that cannot turn on the key indicator light is lower than the forward conduction voltage.

[0018] The beneficial effects of the utility model are:

[0019] The utility model discloses a circuit for connecting a button and a button indicator light with a single line. Through circuit design, a first connecting line can be used to connect a button and a button indicator light, thereby realizing control over the button indicator light, and can effectively reduce the number of connecting lines, reduce wiring difficulty, and effectively reduce costs and line weight. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 The utility model is a structural diagram of a circuit for connecting a button and a button indicator light with a single line. DETAILED DESCRIPTION

[0021] The utility model is further described in detail below with reference to the accompanying drawings and embodiments.

[0022] A circuit for connecting a button and a button indicator light in a single line, comprising a first connecting line, a button identification module, a button indicator light start module and an MCU processor. One end of the first connecting line is used to connect a button J1 and a button indicator light, and the other end is connected to one end of the button identification module and one end of the button indicator light start module, and the first connecting line is used as the single line. The MCU processor (hereinafter referred to as MCU) has a first pin GPIO1 and a second pin GPIO2, the first pin GPIO1 of the MCU processor is connected to the other end of the button identification module, and the second pin GPIO2 of the MCU processor is connected to the other end of the button indicator light start module.

[0023] The button recognition module is used to detect the pressing status of the button J1 and output a voltage to the first pin GPIO1; the first pin GPIO1 of the MCU processor is used to receive the voltage of the button J1. When the button J1 is closed, the voltage received by the first pin GPIO1 is equal to the voltage of the ground signal. When the button J1 is disconnected, the voltage received by the first pin GPIO1 is equal to the voltage of the first power supply; the second pin GPIO2 of the MCU processor is used to output a voltage to the button indicator light start module; the button indicator light start module is used to output a voltage that can turn on the button indicator light or a voltage that cannot turn on the button indicator light according to the output voltage of the second pin GPIO2.

[0024] Specifically, the MCU processor can output the first voltage or the second voltage from the second pin GPIO2. It is not limited how the MCU processor determines the output voltage of the second pin GPIO2. In this embodiment, the output voltage of the second pin GPIO2 is independent of the input voltage of the first pin GPIO1. The button indicator light start module is used to output the turn-on voltage of the button indicator light according to the first voltage. When the output voltage of the second pin GPIO2 is the second voltage, the voltage output to the first connecting line is lower than the turn-on voltage of the button indicator light.

[0025] The first voltage and the second voltage mentioned above may not be limited to a certain voltage value, but may be within a certain voltage range.

[0026] In this embodiment, the button indicator light is a light emitting diode D1, and the conduction voltage is a forward conduction voltage. The positive electrode of the light emitting diode D1 is connected to the first connection line, and the negative electrode is grounded; one end of the button J1 is connected to the first connection line, and the other end is grounded. When the output voltage of the second pin GPIO2 is the second voltage, the voltage output to the first connection line is lower than the forward conduction voltage, which is usually 0V.

[0027] In this embodiment, the key recognition module includes a first transistor Q1, a first resistor R1, a second resistor R2 and a third resistor R3, and the key indicator light start module includes a second transistor Q2, a third transistor Q3, a fourth resistor R4, a fifth resistor R5 and a sixth resistor R6. The first transistor Q1 adopts a first N-channel field effect transistor or a first NPN transistor, the second transistor Q2 adopts a second P-channel field effect transistor or a second PNP transistor, and the third transistor Q3 adopts a third NPN transistor or a third N-channel field effect transistor. The first transistor Q1, the second transistor Q2 and the third transistor Q3 all have a control electrode, an input stage and an output electrode. When the transistor is a field effect transistor, the control electrode, input stage and output electrode of the transistor correspond to the G terminal, S terminal and D terminal of the field effect transistor one by one; when the transistor is a transistor, the control electrode, input stage and output electrode of the transistor correspond to the B terminal, E terminal and C terminal of the transistor.

[0028] Specifically, the output electrode of the first transistor Q1 is connected to the first pin GPIO1 and one end of the first resistor R1, the control electrode of the first transistor Q1 is connected to one end of the second resistor R2 and one end of the third resistor R3, the input electrode of the first transistor Q1 is connected to one end of the sixth resistor R6, the input electrode of the first transistor Q1 is connected to one end of the button J1 through the first connecting line, the input electrode of the first transistor Q1 is connected to the positive electrode of the light-emitting diode D1 through the first connecting line, the other end of the first resistor R1 is connected to the first power supply, the voltage of the first power supply is called VDD1, the other end of the second resistor R2 is connected to the second power supply, the voltage of the second power supply is called VDD2, and the other end of the third resistor R3 is grounded; one end of the fourth resistor R4 is connected to the second pin GPIO2, and the other end is connected to the control electrode of the third transistor Q3, the input stage of the third transistor Q3 is grounded, the output electrode of the third transistor Q3 is connected to one end of the fifth resistor R5 and the control electrode of the second transistor Q2, the other end of the fifth resistor R5 and the input stage of the second transistor Q2 are both connected to the third power supply, the voltage of the third power supply is called VDD3, and the output electrode of the second transistor Q2 is connected to the other end of the sixth resistor R6.

[0029] In this embodiment, the level of the VDD1 is consistent with the level of the first pin GPIO1.

[0030] In this embodiment, the voltage of VDD2 after being divided by the second resistor R2 and the third resistor R3 needs to be lower than the forward conduction voltage of the light-emitting diode D1, and at the same time higher than the turn-on voltage of the first N-channel field effect transistor. If the first NPN transistor is used, it must be higher than the turn-on voltage of the first NPN transistor.

[0031] In this embodiment, the VDD3 needs to be higher than the forward conduction voltage of the light emitting diode D1.

[0032] In this embodiment, the sixth resistor R6 is a current limiting resistor, and the power of the sixth resistor R6 is greater than the square of the third power supply voltage divided by the resistance value of the sixth resistor R6.

[0033] In this embodiment, the output of the second pin GPIO2 is a first voltage higher than the turn-on voltage of the third transistor Q3 , and a second voltage lower than the turn-on voltage of the third transistor Q3 .

[0034] In a preferred embodiment, the MCU can control multiple single-line control buttons J1 and button J1 light circuits, that is, one MCU is connected to several button recognition modules and button indicator light start modules.

[0035] The following is a detailed description of the first transistor Q1 using a first N-channel field effect transistor, the second transistor Q2 using a second P-channel field effect transistor, and the third transistor Q3 using a third NPN transistor. Figure 1 .

[0036] The D terminal of the first N-channel field effect transistor is connected to the first programmable pin GPIO1 of the MCU (U1), and is also connected to one end of the first resistor R1, and the other end of the first resistor R1 is connected to VDD1. The G terminal of the first N-channel field effect transistor is connected to one end of the second resistor R2, and is also connected to one end of the third resistor R3, and the other end of the second resistor R2 is connected to VDD2. The other end of the third resistor R3 is grounded. The S terminal of the first N-channel field effect transistor is connected to one end of the sixth resistor R6, and is also connected to one end of the button J1 and one end of the light-emitting diode D1. The other end of the sixth resistor R6 The D terminal of the second P-channel field effect transistor is connected, the other end of the button J1 is grounded, the other end of the light-emitting diode D1 is grounded, the second programmable pin GPIO2 of the MCU is connected to one end of the fourth resistor R4, the other end of the fourth resistor R4 is connected to the base B of the third NPN transistor, the emitter E of the third NPN transistor is grounded, the collector C of the third NPN transistor is connected to one end of the fifth resistor R5, and is also connected to the G terminal of the second P-channel field effect transistor, the other end of the fifth resistor R5 is connected to the third power supply VDD3, and the S terminal of the second P-channel field effect transistor is connected to VDD3.

[0037] In some embodiments, the pressing condition of the button J1 described above corresponds to whether the button J1 circuit is open or closed. In the parallel circuit of the button J1 and the light-emitting diode D1, for example, the button J1 itself can be used as a switch, and the pressing condition of the button J1 can be pressed or not pressed. For example, the branch where the button J1 is located can also represent the number of times. The branch where the button J1 is located can determine the closure or disconnection of the branch according to the odd or even number of key presses, and the pressing condition of the button J1 can be an odd or even number of times pressed. For another example, not only based on odd and even numbers, but also based on the original state of the relevant function corresponding to the button J1 before the current key operation. At the same time, this embodiment is not limited to being used only for pressing the button J1 while the button indicator light is on or off, but can also be used to control the button indicator light on or off for a long time after the button is pressed, and can also be on or off for a long time while and after the button is pressed.

[0038] As an example, the first method is that when button J1 is pressed, the branch where button J1 is located (i.e., button J1 circuit) is closed, and when button J1 is not pressed, the branch where button J1 is located is disconnected; the second method is that when button J1 is pressed, the branch where button J1 is located is disconnected, and when button J1 is not pressed, the branch where button J1 is located is closed. Specifically, one of the two methods is set according to actual needs. For example, if the light-emitting diode D1 needs to emit light when button J1 is pressed, the second method is used. Conversely, if the light-emitting diode D1 does not need to emit light when button J1 is pressed, the first method is used. The following is based on Figure 1 Let's take the first method as an example to explain the working principle in detail:

[0039] When the button J1 is not pressed, the second pin GPIO2 of the MCU outputs a low level, the third NPN transistor is turned off, the voltage at the G end of the second P-channel field effect transistor is pulled to VDD3 by the fifth resistor R5, the second P-channel field effect transistor is turned off, and the light-emitting diode D1 does not emit light;

[0040] When the button J1 is not pressed, the second pin GPIO2 of the MCU outputs a high level, the third NPN transistor is turned on, the collector C of the third NPN transistor is at a low level, the G end of the second P-channel field effect transistor is also at a low level, the second P-channel field effect transistor is turned on, the voltage of the D end of the second P-channel field effect transistor is equal to VDD3, and the current flowing through the sixth resistor R6 and the light-emitting diode D1 is equal to the difference between VDD3 and the forward conduction voltage of the light-emitting diode D1 divided by the value of the sixth resistor R6, and the light-emitting diode D1 will emit light of the corresponding color;

[0041] When the button J1 is not pressed, the voltage at the S terminal of the first N-channel field effect transistor is equal to the forward conduction voltage of the light-emitting diode D1, the first N-channel field effect transistor is cut off, and the input of the first pin GPIO1 of the MCU is pulled to the voltage value of VDD1 by the first resistor R1;

[0042] When the button J1 is pressed, the two ends of the button J1 and the light-emitting diode D1 (such as Figure 1 ) are grounded at a low level. At this time, the S terminal of the first N-channel field effect transistor is also at a low level. Since the voltage of VDD2 after being divided by the second resistor R2 and the third resistor R3 is higher than the turn-on voltage of the first N-channel field effect transistor, the first N-channel field effect transistor is turned on, and the D terminal of the first N-channel field effect transistor is at a low level. The input of the first pin GPIO1 of the MCU is at a low level, indicating that the button J1 is pressed.

[0043] In summary, the utility model provides a circuit for connecting a button and a button indicator light with a single line. Through circuit design, the first connecting line can be used to connect a button and a button indicator light, thereby realizing control over the button indicator light. This can effectively reduce the number of connecting lines, reduce wiring difficulty, effectively reduce costs and reduce line weight, and is very valuable for practical use.

[0044] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the protection scope of the present invention.

Claims

1. A circuit for connecting a button and a button indicator light with a single line, characterized in that: It includes a first connecting line, a key recognition module, a key indicator light start module and an MCU processor, one end of the first connecting line is used to connect the key J1 and the key indicator light, and the other end is connected to one end of the key recognition module and one end of the key indicator light start module, the other end of the key recognition module is connected to the first pin GPIO1 of the MCU processor, the other end of the key indicator light start module is connected to the second pin GPIO2 of the MCU processor, and the key recognition module is connected to a first power supply; The button recognition module is used to detect the pressing status of the button J1 and output voltage to the first pin GPIO1; the first pin GPIO1 is used to receive the voltage of the button J1. When the button J1 is closed, the voltage received by the first pin GPIO1 is equal to the voltage of the ground signal. When the button J1 is disconnected, the voltage received by the first pin GPIO1 is equal to the voltage of the first power supply; the second pin GPIO2 is used to output voltage to the button indicator light start module; the button indicator light start module is used to output a voltage that can turn on the button indicator light or a voltage that cannot turn on the button indicator light according to the output voltage of the second pin GPIO2.

2. A circuit for connecting a button and a button indicator light with a single line as claimed in claim 1, characterized in that: The key indicator light is a light emitting diode D1 , and the voltage capable of turning on the key indicator light is the forward conduction voltage of the light emitting diode D1 .

3. A circuit for connecting a button and a button indicator light with a single line as claimed in claim 2, characterized in that: The positive electrode of the button indicator light is connected to the first connection line, and the negative electrode is grounded. One end of the button J1 is connected to the first connection line and the other end is grounded.

4. A circuit for connecting a button and a button indicator light with a single line as claimed in claim 3, characterized in that: The key recognition module includes a first transistor Q1, a first resistor R1, a second resistor R2 and a third resistor R3, the key indicator light start module includes a second transistor Q2, a third transistor Q3, a fourth resistor R4, a fifth resistor R5 and a sixth resistor R6, the first transistor Q1 adopts a first N-channel field effect transistor or a first NPN transistor, the second transistor Q2 adopts a second P-channel field effect transistor or a second PNP transistor, and the third transistor Q3 adopts a third NPN transistor or a third N-channel field effect transistor; The output electrode of the first transistor Q1 is connected to one end of the first resistor R1 and the first pin GPIO1, the control electrode of the first transistor Q1 is connected to one end of the second resistor R2 and one end of the third resistor R3, the input electrode of the first transistor Q1 is connected to one end of the sixth resistor R6 and the other end of the first connecting line, the other end of the first resistor R1 is connected to the first power supply, the other end of the second resistor R2 is connected to the second power supply, and the other end of the third resistor R3 is grounded; one end of the fourth resistor R4 is connected to the second pin GPIO2, and the other end is connected to the control electrode of the third transistor Q3, the input stage of the third transistor Q3 is grounded, the output electrode of the third transistor Q3 is connected to one end of the fifth resistor R5 and the control electrode of the second transistor Q2, the other end of the fifth resistor R5 and the input stage of the second transistor Q2 are both connected to the third power supply, and the output electrode of the second transistor Q2 is connected to the other end of the sixth resistor R6.

5. A circuit for connecting a button and a button indicator light with a single line as claimed in claim 4, characterized in that: The level of the first power supply is consistent with the level of the first pin GPIO1.

6. A circuit for connecting a button and a button indicator light with a single line as claimed in claim 4, characterized in that: The voltage of the second power source after being divided by the second resistor R2 and the third resistor R3 is lower than the forward conduction voltage of the light emitting diode D1 and higher than the maximum value of the turn-on voltage of the first transistor Q1.

7. A circuit for connecting a button and a button indicator light with a single line as claimed in claim 4, characterized in that: The voltage of the third power source is higher than the forward conduction voltage of the light emitting diode D1 .

8. A circuit for connecting a button and a button indicator light with a single line as claimed in claim 4, characterized in that: The power of the sixth resistor R6 is greater than the square of the third power supply voltage divided by the resistance value of the sixth resistor R6.

9. A circuit for connecting a button and a button indicator light with a single line as claimed in claim 4, characterized in that: The output voltage capable of turning on the button indicator light is specifically: the second transistor Q2 outputs the turn-on voltage of the button indicator light to the first connecting line, and the output voltage of the second pin GPIO2 is higher than the turn-on voltage of the third transistor Q3.

10. A circuit for connecting a button and a button indicator light with a single line as claimed in claim 9, characterized in that: The voltage that cannot turn on the key indicator light is lower than the forward conduction voltage.