GPIO (General Purpose Input / Output) port protection circuit and alarm equipment
By setting up a protection circuit between the input and output ends of the GPIO port and the main control chip, and using components such as protection diodes and pull-up resistors, the problems of vulnerability to damage and false signal reception in the prior art are solved, and more effective circuit protection and signal stability are achieved.
Patent Information
- Application Number
- CN202420368204.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-27
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2034-02-27
AI Technical Summary
When protecting the GPIO port and the main control chip, there are still problems with damage and false signal reception caused by factors such as static electricity and external high voltage.
A protection circuit including a first protection diode and a second protection diode is adopted, and the components such as these diodes and pull-up resistors are arranged between the GPIO port and the input and output terminals of the main control chip and the control terminals to protect the circuit.
It effectively avoids damage to the GPIO port and the master control chip, ensures that the received signal logic is consistent, and prevents the influence of external interference signals.
Smart Images

Figure CN222638161U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the field of circuit protection, in particular to a GPIO port protection circuit and an alarm device. Background Art
[0002] GPIO port (Genera l Purpose Input / Output Port) is a port responsible for collecting information from external devices or controlling the operation of external devices. GPIO port is widely used. For example, GPIO port can connect the input and output of various sensors. Take the common smoke sensor as an example. The output end of the signal line of the smoke sensor is connected to the GPIO port. When the smoke sensor detects a lot of smoke, the signal line of the smoke sensor outputs an alarm signal to the GPIO port. The GPIO port reports this signal to the main control chip, and the main control chip issues the corresponding operation after processing.
[0003] Because the chip's own GPIO interface has limited security protection capabilities, static electricity and external high voltage can easily damage the GPIO interface and even the main control chip. Even if the chip is not damaged, the external high voltage will cause the main control chip to receive an error signal, causing the main control chip to issue an erroneous control command. In order to avoid damage to the GPIO interface and the main control chip, the current common protection measures are to connect a resistor in series and an ESD protection device in parallel with the GPIO port. Although these measures can play a certain protective role, the main control chip may still receive an error signal or the GPIO port may be damaged. Utility Model Content
[0004] In order to solve the above technical problems, a technical solution adopted by the utility model is to provide a GPIO port protection circuit, including a GPIO port, the GPIO port having at least one input and output terminal; a main control chip, the main control chip having at least one control terminal, the control terminal being electrically connected to the input and output terminals; a first protection circuit, arranged between the input and output terminals and the control terminal, including a first protection diode, the cathode of the first protection diode being electrically connected to the electrical connection between the input and output terminals and the control terminal, and the anode of the first protection diode being grounded; a second protection circuit, arranged between the input and output terminals and the control terminal, including a second protection diode and a pull-up resistor, the cathode of the second protection diode being electrically connected to the input and output terminals, the anode of the second protection diode being electrically connected to the control terminal, the anode of the second protection diode being also electrically connected to one end of the pull-up resistor, and the other end of the pull-up resistor being electrically connected to a first DC power supply.
[0005] In some embodiments, it also includes a third protection circuit arranged between the input and output ends and the control end, the third protection circuit includes a first magnetic bead and a first capacitor, one end of the first magnetic bead is electrically connected to the positive electrode of the second protection diode, the other end of the first magnetic bead is connected to the control end, and the control end is electrically connected to the first capacitor and then grounded.
[0006] In some embodiments, the GPIO port also has a power supply end, which is electrically connected to a fuse and then connected to a second DC power supply. The power supply end is also electrically connected to a third protection diode and then grounded. The power supply end is also electrically connected to a first power supply filter capacitor and a second power supply filter capacitor and then grounded.
[0007] In some embodiments, the GPIO port has a plurality of input and output terminals, the main control chip has a plurality of control terminals, and each input and output terminal is respectively connected to a control terminal.
[0008] In some embodiments, the first protection diode is a bidirectional transient suppression diode.
[0009] In some embodiments, the pull-up resistor has a relatively large resistance, mainly serving the purpose of pulling up the voltage and synchronously limiting the current, and is therefore typically greater than or equal to 1k ohm, such as 5k ohm, 10k ohm, 20k ohm, or 100k ohm.
[0010] The utility model also provides an alarm device, and the alarm device has the GPIO port protection circuit as described above.
[0011] The beneficial effects of the utility model are as follows: the utility model provides a GPIO port protection circuit, including a GPIO port and a main control chip, the GPIO port has at least one input and output terminal; the main control chip has at least one control terminal, the control terminal is electrically connected to the input and output terminal; and also includes a first protection circuit and a second protection circuit, the first protection circuit includes a first protection diode, the cathode of the first protection diode is electrically connected to the electrical connection between the input and output terminal and the control terminal, and the anode of the first protection diode is grounded; the second protection circuit includes a second protection diode and a pull-up resistor, the cathode of the second protection diode is electrically connected to the input and output terminal, the anode of the second protection diode is electrically connected to the control terminal, the anode of the second protection diode is also electrically connected to one end of the pull-up resistor, and the other end of the pull-up resistor is electrically connected to the first DC power supply. The utility model can avoid damage to the GPIO port and the main control chip through the first protection circuit and the second protection circuit, ensure that the received signal logic is the same, and block external interference signals. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 It is a schematic diagram of an embodiment of a GPIO port protection circuit according to the utility model;
[0013] Figure 2 It is a schematic diagram of a GPIO port and a plurality of first to third protection circuits in another embodiment of the GPIO port protection circuit of the utility model;
[0014] Figure 3 It is a schematic diagram of a main control chip in another embodiment of the GPIO port protection circuit of the utility model;
[0015] Figure 4 It is a schematic diagram of a GPIO port power supply end in another embodiment of the GPIO port protection circuit of the utility model. DETAILED DESCRIPTION
[0016] In order to facilitate the understanding of the present invention, the present invention is described in more detail below in conjunction with the accompanying drawings and specific embodiments. The accompanying drawings provide preferred embodiments of the present invention. However, the present invention can be implemented in many different forms and is not limited to the embodiments described in this specification. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive.
[0017] It should be noted that, unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those commonly understood by those skilled in the art in the technical field of the present invention. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used in this specification includes any and all combinations of one or more related listed items.
[0018] The utility model provides a GPIO port protection circuit, which includes a GPIO port and a main control chip, wherein the GPIO port has at least one input and output terminal, and the main control chip has at least one control terminal, and the control terminal is electrically connected to the input and output terminals. A first protection circuit and a second protection circuit are also provided between the input and output terminals and the control terminal, and the first protection circuit and the second protection circuit are used to protect the GPIO port and the main control chip, so as to prevent the GPIO port and the main control chip from being damaged or receiving an erroneous signal, thereby causing the main control chip to issue an erroneous control instruction.
[0019] like Figure 1As shown, the first protection circuit includes a first protection diode TVS1, the cathode of the first protection diode TVS1 is electrically connected to the electrical connection between the input and output terminals and the control terminal, and the anode of the first protection diode TVS1 is grounded. In this embodiment, the first protection diode TVS1 is a bidirectional transient suppression diode. The avalanche effect of the bidirectional transient suppression diode can immediately reduce its working impedance to a very low conduction value when a high-energy transient overvoltage pulse occurs, allowing the maximum current to pass through and clamping the voltage to a predetermined level, thereby avoiding damage to the GPIO port and the main control chip. The specification of the bidirectional transient suppression diode is SMF6.5A.
[0020] exist Figure 1 In the figure, the second protection circuit includes a second protection diode D1 and a pull-up resistor R1, the cathode of the second protection diode D1 is electrically connected to the input and output ends, the anode of the second protection diode D1 is electrically connected to the control end, the anode of the second protection diode D1 is also electrically connected to one end of the pull-up resistor R1, and the other end of the pull-up resistor R1 is electrically connected to the first DC power supply VCC3.3.
[0021] The second protection circuit conducts the forward signal and does not conduct the reverse signal through the unidirectional conductivity of the second protection diode D1. When the input and output ends of the GPIO port receive a high level, the second protection diode D1 does not conduct, and the signal received by the control end of the main control chip is a high level after being pulled up by the pull-up resistor R1; when the input and output ends of the GPIO port receive a low level, the second protection diode D1 conducts, and the signal received by the control end of the main control chip is pulled down to a low level as the second protection diode D1 is turned on. In this embodiment, the second protection circuit blocks external interference signals, while ensuring that the signal received by the control end of the main control chip is logically the same as the signal received by the GPIO port. Here, the resistance value of the pull-up resistor R1 is 10K ohms, and the specification of the second protection diode D1 is 1N4148W.
[0022] Further, such as Figure 1As shown, in some embodiments, the GPIO port protection circuit also includes a third protection circuit arranged between the input and output terminals and the control terminal, and the third protection circuit includes a first magnetic bead FB1 and a first capacitor C1, which constitute a filtering protection circuit to eliminate clutter jitter signals. One end of the first magnetic bead FB1 is electrically connected to the positive electrode of the second protection diode D1, and the other end of the first magnetic bead FB1 is connected to the control terminal, and the control terminal is electrically connected to the first capacitor C1 and then grounded. In this embodiment, the first magnetic bead FB1 consumes noise signals through eddy current loss and hysteresis loss to facilitate the smooth passage of the input and output signals in the GPIO port. The specification of the first magnetic bead FB1 is 100MHz 220R; the value of the first capacitor C1 is 100nF, and the high frequency band has a lower impedance for filtering high-frequency interference signals, ensuring that the signal received by the control terminal of the main control chip is consistent with the signal at the GPIO port.
[0023] Combination Figure 2 and Figure 3 In some embodiments, the GPIO port (interface J1) has multiple input and output terminals ( Figure 2 The 3rd to 10th pins of the middle interface J1, a total of 8 input and output terminals), the main control chip (U1 F) has multiple control terminals ( Figure 3 Each input / output terminal is connected to a control terminal. A first protection circuit to a third protection circuit are arranged between each input / output terminal and the control terminal. This method can improve the reliability of the circuit and reduce false triggering.
[0024] Further, such as Figure 4 As shown, the GPIO port (interface) also has a power supply end (pin 1 of the interface), which is electrically connected to the fuse FUSE1 and then connected to the second DC power supply VCC12V, and the power supply end can supply power to the outside. The power supply end is also electrically connected to the third protection diode D10 and then grounded, and the power supply end is also electrically connected to the first power supply filter capacitor C10 and the second power supply filter capacitor C11 and then grounded.
[0025] The utility model also provides an alarm device, which has the above-mentioned GPIO port protection circuit. In some embodiments, the alarm device can be a smoke alarm, and the smoke alarm is connected to a smoke sensor via a GPIO port.
[0026] It can be seen that the utility model provides a GPIO port protection circuit, including a GPIO port and a main control chip, the GPIO port has at least one input and output terminal; the main control chip has at least one control terminal, and the control terminal is electrically connected to the input and output terminal; it also includes a first protection circuit and a second protection circuit, the first protection circuit includes a first protection diode, the cathode of the first protection diode is electrically connected to the electrical connection between the input and output terminal and the control terminal, and the anode of the first protection diode is grounded; the second protection circuit includes a second protection diode and a pull-up resistor, the cathode of the second protection diode is electrically connected to the input and output terminal, the anode of the second protection diode is electrically connected to the control terminal, the anode of the second protection diode is also electrically connected to one end of the pull-up resistor, and the other end of the pull-up resistor is electrically connected to the first DC power supply. The utility model can avoid damage to the GPIO port and the main control chip through the first protection circuit and the second protection circuit, ensure that the received signal logic is the same, and block external interference signals.
[0027] The above description is only an embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structural transformation made using the contents of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, is also included in the patent protection scope of the present invention.
Claims
1. A GPIO port protection circuit, characterized in that: include: A GPIO port, wherein the GPIO port has at least one input and output terminal; A main control chip, wherein the main control chip has at least one control terminal, and the control terminal is electrically connected to the input and output terminals; A first protection circuit is provided between the input / output terminal and the control terminal, and comprises a first protection diode, wherein a cathode of the first protection diode is electrically connected to an electrical connection point between the input / output terminal and the control terminal, and an anode of the first protection diode is grounded; The second protection circuit is arranged between the input and output ends and the control end, and includes a second protection diode and a pull-up resistor. The cathode of the second protection diode is electrically connected to the input and output ends, the anode of the second protection diode is electrically connected to the control end, the anode of the second protection diode is also electrically connected to one end of the pull-up resistor, and the other end of the pull-up resistor is electrically connected to the first DC power supply.
2. The GPIO port protection circuit according to claim 1, characterized in that: It also includes a third protection circuit arranged between the input and output ends and the control end, the third protection circuit includes a first magnetic bead and a first capacitor, one end of the first magnetic bead is electrically connected to the positive electrode of the second protection diode, the other end of the first magnetic bead is connected to the control end, and the control end is electrically connected to the first capacitor and then grounded.
3. The GPIO port protection circuit according to claim 2, characterized in that: The GPIO port also has a power supply end, which is electrically connected to a fuse and then connected to a second DC power supply. The power supply end is also electrically connected to a third protection diode and then grounded. The power supply end is also electrically connected to a first power supply filter capacitor and a second power supply filter capacitor and then grounded.
4. The GPIO port protection circuit according to any one of claims 1 to 3, characterized in that: The GPIO port has a plurality of input and output terminals, the main control chip has a plurality of control terminals, and each input and output terminal is respectively connected to a control terminal.
5. The GPIO port protection circuit according to claim 1, characterized in that: The first protection diode is a bidirectional transient voltage suppressor diode.
6. The GPIO port protection circuit according to claim 1, characterized in that: The resistance of the pull-up resistor is greater than or equal to 1K ohm.
7. An alarm device, characterized in that: The alarm device comprises the GPIO port protection circuit as claimed in any one of claims 1 to 6.