Anti-static false-triggering three-color strip lamp switch interface circuit and switch state detection method
By using an interface power supply and input protection module, a switch status isolation and shaping module, and an RGB indicator light driver module, the problem of false triggering caused by static electricity was solved, the stable transmission of switch status signals and the normal operation of indicator lights were achieved, and the anti-interference capability of the system was improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI LINGZE INFORMATION TECH CO LTD
- Filing Date
- 2026-02-24
- Publication Date
- 2026-05-12
AI Technical Summary
In industrial equipment, air detection terminals, and panel controllers, electrostatic discharge from the human body can cause narrow pulses and glitches in the switch state input, triggering MCU external interrupts and causing accidental touches; electrostatic coupling on indicator control lines can cause false lighting or flashing; electrostatic energy can couple through the ground loop to cause system reset or peripheral malfunctions. Traditional RC filtering or pure software debouncing solutions are prone to accidental triggering under strong ESD or high dv/dt conditions.
The system employs an interface power supply and input protection module, a switch state isolation and shaping module, and an RGB indicator light driver module, including a DC power supply unit, a transient suppression unit, a filter network, opto-isolation devices, an MCU-side pull-up network, an RC low-pass network, a low-capacitance ESD clamping device, and a Schmitt trigger buffer to achieve electrical isolation, signal shaping, and anti-static processing. Combined with software delay debouncing and level secondary sampling, and a trigger interval window is set to ensure stable signal transmission and normal operation of the indicator lights.
It effectively suppresses electrostatic discharge triggering, ensures stable transmission of switch status signals to the MCU, avoids accidental lighting and flickering, protects the system and peripherals, and improves the stability and accuracy of operation in strong interference environments.
Smart Images

Figure CN122028281A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of embedded control and electromagnetic compatibility technology, specifically to a tri-color LED switch interface circuit and a switch status detection method that is resistant to electrostatic discharge (ESD) triggering. Background Technology
[0002] Industrial equipment, air quality monitoring terminals, and panel controllers often use push-button / toggle switches with indicator lights as human-machine interface components. These switches are typically connected to the main control board via wiring harnesses, which are generally 10cm to 50cm long, and the switch panels may be made of metal or come into frequent contact with the human body.
[0003] In the above scenario, electrostatic discharge (ESD) from the human body can be injected into the motherboard along the wiring harness, causing the following problems:
[0004] Narrow pulses and glitches generated by switch state inputs can trigger MCU external interrupts (EXTI) and cause false touches; indicator light control lines can be electrostatically coupled, resulting in false lighting or flashing; electrostatic energy can be coupled through the ground loop to cause system reset or peripheral malfunctions; traditional solutions that rely solely on RC filtering or pure software debouncing are still prone to false triggering under strong ESD or high dv / dt conditions.
[0005] To address these issues, a three-color LED switch interface circuit and a switch status detection method designed to prevent electrostatic discharge (ESD) from triggering are proposed. Summary of the Invention
[0006] The purpose of this invention is to provide an anti-static tri-color LED switch interface circuit and a switch status detection method to solve the problems mentioned in the background art.
[0007] To achieve the above objectives, the present invention provides the following technical solution: a tri-color LED switch interface circuit with anti-static triggering, comprising an interface power supply and input protection module, a switch state isolation and shaping module, and an RGB indicator light driving module;
[0008] The interface power supply and input protection module provides a stable DC power supply for the external switch board and resists transient overvoltage and electrostatic shock on the power supply line, ensuring the basic working stability of the circuit.
[0009] The switch state isolation and shaping module achieves electrical isolation between the wiring harness side and the MCU side, suppresses common-mode interference, shapes, de-glitches, and performs anti-static processing on the switch state input signal to avoid false triggering of the MCU external interrupt (EXTI) and ensure stable signal transmission to the MCU.
[0010] The RGB indicator driver module drives the red, green, and blue indicator lights to work independently, enabling the switching and control of the three colors of light, while ensuring the stability of the indicator lights and avoiding false lighting or flickering caused by static electricity or interference.
[0011] Preferably, the interface power supply and input protection module includes a DC power supply unit, a transient voltage suppression unit (TVS), and a filter network; the DC power supply unit outputs a preset DC voltage to power the entire external switch board and related components of the interface circuit; the transient voltage suppression unit (TVS) clamps transient overvoltages on the power supply line to prevent overvoltage damage to downstream components; the filter network filters out noise in the power supply line, optimizes the power supply waveform, and improves power supply stability.
[0012] Preferably, the switch state isolation and shaping module includes an input current limiting and shaping network, an opto-isolation device (optical coupler), an MCU-side pull-up network, a front-end RC low-pass network, a rear-end RC low-pass network, a low-capacitance ESD clamping device, and a Schmitt trigger buffer;
[0013] The input current limiting and shaping network limits the inrush current on the harness side to prevent large current from damaging subsequent devices, while also performing preliminary shaping of the input signal waveform and filtering out some irregular interference signals.
[0014] The optocoupler electrically isolates the wiring harness side from the MCU side, cutting off the coupling path of common-mode interference and reducing the impact of interference on MCU signal recognition.
[0015] The pull-up network on the MCU side forms a stable default level through pull-up resistors, avoiding misidentification caused by level drift when there is no signal input;
[0016] The front-end RC low-pass network is located near the optocoupler output node and is mainly used to suppress high-frequency glitches from the wiring harness side, thus initially purifying the signal.
[0017] The subsequent RC low-pass network is located near the Schmitt trigger buffer input / MCU side, further passivating narrow pulse interference and limiting the current injected into the MCU, thus protecting the MCU pins.
[0018] The low-capacitance ESD clamping device discharges residual electrostatic energy to ground, preventing electrostatic discharge from entering the MCU through the signal path and causing system abnormalities.
[0019] The Schmitt trigger buffer performs hysteresis adjustment and edge shaping on the signal after multi-stage processing, and outputs a regular digital signal to the external interrupt input terminal of the MCU to ensure that the MCU accurately identifies the switch state.
[0020] Preferably, the RGB indicator light driver module includes a driver topology, a basic driver component, and a base discharge resistor; the driver topology independently controls the on / off state of each light; the basic driver component includes a base limiting current resistor, a switching device, and a base filter capacitor; the base discharge resistor is used to ensure that the switching device is off by default when powered on, to prevent the indicator light from turning on accidentally at the moment of power-on.
[0021] A method for detecting the status of a three-color LED switch to prevent electrostatic discharge (ESD) accidental triggering, comprising the following steps:
[0022] Step 1: External Interrupt Initialization Configuration: Configure the MCU's external interrupt (EXTI) to rising edge trigger mode to adapt to the level change logic when the switch is closed, laying the foundation for subsequent switch state trigger detection. During the configuration process, interrupt response basic protection is enabled simultaneously to avoid invalid interrupts caused by level drift during the initialization phase.
[0023] Step 2, Preliminary Interrupt Trigger Processing: When the MCU detects the rising edge of an external interrupt trigger signal, it immediately enters the interrupt service routine;
[0024] Step 3: Delay Debouncing and Level Resampling Verification: After exiting the interrupt service routine, relying on the MCU's periodic task or timer callback function, a preset delay debouncing time is set. After the delay ends, the switch input level is sampled a second time. Only when the second sampling detects that the input level is stable at a high level is it determined to be a valid switch trigger. If the sampled level is low or unstable, it is determined to be an interference signal, and the subsequent switch action response logic is not executed. At the same time, preparations are made for re-enabling the interrupt.
[0025] Step 4, Waiting for Release and Interrupt Re-enabling: After a valid trigger is determined, the system enters the switch waiting for release state, continuously detecting the switch input level until the input level is detected to be stable at a low level and maintained at a stable low level for a period of time. After the level stabilizes at a low level, the corresponding EXTI interrupt line is re-enabling, the interrupt triggering function is restored, and the system waits for the next switch trigger signal, forming a complete trigger-verification-release-reset closed loop.
[0026] Step 5: Set a trigger interval window to suppress continuous false triggers: Preset a minimum time window between two valid triggers in the system. After each valid trigger is determined, record the current trigger timestamp. Subsequent detected trigger signals must have a time interval between the previous valid trigger and the current trigger greater than or equal to the preset interval window before proceeding to the secondary sampling verification stage in Step 3. If the interval between two triggers is less than the preset value, it is directly determined to be a continuous false trigger caused by static electricity, and the trigger signal is ignored without any response operation.
[0027] Preferably, in step two, the program performs only two core operations: first, it records the trigger time of the current interrupt and retains the timestamp for subsequent interval judgment; second, it quickly blocks the corresponding EXTI interrupt line to prevent the interrupt line from triggering the interrupt again.
[0028] Compared with the prior art, the beneficial effects of the present invention are:
[0029] This application achieves signal purification through a two-stage RC low-pass filter and Schmitt trigger shaping of the switch state isolation and shaping module, combined with pull-up resistors to stabilize the level and prevent false triggering; relying on the ESD protection of the interface power supply and input protection module, and the filtering and discharge design of the RGB driver module, it suppresses electrostatic coupling interference and ensures that the indicator lights are properly controlled; electrical isolation is achieved through optocouplers to cut off the ground loop coupling path, and electrostatic discharge is discharged with low-capacitance ESD clamping devices to protect the system and peripherals; through the combined architecture of isolation, multi-stage anti-interference and hardware shaping, it makes up for the shortcomings of traditional single filtering and software debouncing, and improves the working stability in strong interference environments. Attached Figure Description
[0030] Figure 1 This is a block diagram of a three-color LED switch interface circuit.
[0031] Figure 2 This is a schematic diagram of the switch state isolation and shaping module;
[0032] Figure 3 This is a schematic diagram of the lower-side driver module for the RGB indicator light.
[0033] Figure 4 Flowchart of software detection method for preventing electrostatic discharge (ESD) accidental triggering. Detailed Implementation
[0034] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0035] Please see Figure 1-4 The present invention provides a technical solution:
[0036] An anti-static triggering tri-color LED switch interface circuit includes an interface power supply and input protection module, a switch state isolation and shaping module, and an RGB indicator light driver module.
[0037] The interface power supply and input protection module provides a stable DC power supply for the external switch board and resists transient overvoltage and electrostatic shock on the power supply line, ensuring the basic working stability of the circuit.
[0038] The switch state isolation and shaping module achieves electrical isolation between the wiring harness side and the MCU side, suppresses common-mode interference, shapes, de-glitches, and performs anti-static processing on the switch state input signal to avoid false triggering of the MCU external interrupt (EXTI) and ensure stable signal transmission to the MCU.
[0039] The RGB indicator driver module drives the red, green, and blue indicator lights to work independently, enabling the switching and control of the three colors of light, while ensuring the stability of the indicator lights and avoiding false lighting or flickering caused by static electricity or interference.
[0040] The interface power supply and input protection module includes a DC power supply unit, a transient voltage suppression unit (TVS), and a filter network. The DC power supply unit outputs a preset DC voltage (12V in the example) to power the entire external switch board and related components of the interface circuit. The transient voltage suppression unit (TVS) clamps transient overvoltages on the power supply line to prevent overvoltage damage to downstream components. The filter network filters out noise in the power supply line, optimizes the power supply waveform, and improves power supply stability.
[0041] The switch state isolation and shaping module includes an input current limiting and shaping network, an opto-isolation device (optical coupler), an MCU-side pull-up network, a front-end RC low-pass network, a rear-end RC low-pass network, a low-capacitance ESD clamping device, and a Schmitt trigger buffer.
[0042] The input current limiting and shaping network limits the inrush current on the harness side to prevent large current from damaging subsequent devices, while also performing preliminary shaping of the input signal waveform and filtering out some irregular interference signals.
[0043] The optocoupler electrically isolates the wiring harness side from the MCU side, cutting off the coupling path of common-mode interference and reducing the impact of interference on MCU signal recognition.
[0044] The pull-up network on the MCU side forms a stable default level through pull-up resistors, avoiding misidentification caused by level drift when there is no signal input;
[0045] The front-end RC low-pass network is located near the optocoupler output node and is mainly used to suppress high-frequency glitches from the wiring harness side, thus initially purifying the signal.
[0046] The subsequent RC low-pass network is located near the Schmitt trigger buffer input / MCU side, further passivating narrow pulse interference and limiting the current injected into the MCU, thus protecting the MCU pins.
[0047] The low-capacitance ESD clamping device discharges residual electrostatic energy to ground, preventing electrostatic discharge from entering the MCU through the signal path and causing system abnormalities.
[0048] The Schmitt trigger buffer performs hysteresis adjustment and edge shaping on the signal after multi-stage processing, and outputs a regular digital signal to the external interrupt input terminal of the MCU to ensure that the MCU accurately identifies the switch state.
[0049] The RGB indicator light driver module includes a driver topology, a basic driver component, and a base discharge resistor; the driver topology independently controls the on / off state of each light; the basic driver component includes a base limiting current resistor, a switching device, and a base filter capacitor; the base discharge resistor is used to ensure that the switching device is off by default when powered on, to prevent the indicator light from turning on accidentally at the moment of power-on.
[0050] A method for detecting the status of a three-color LED switch to prevent electrostatic discharge (ESD) accidental triggering, comprising the following steps:
[0051] Step 1: External Interrupt Initialization Configuration: Configure the MCU's external interrupt (EXTI) to rise edge trigger mode to adapt to the logic of level change when the switch is closed. By default, the level is low when the switch is not closed and high when it is closed, which lays the foundation for subsequent switch state trigger detection. During the configuration process, interrupt response basic protection is enabled simultaneously to avoid invalid interrupts caused by level drift during the initialization phase.
[0052] Step 2, Preliminary Interrupt Trigger Processing: When the MCU detects an external interrupt rising edge trigger signal, it immediately enters the interrupt service routine; to avoid direct triggering of button action judgment by narrow pulses, glitches, or instantaneous signals generated by electrostatic coupling from switch state inputs, it reduces the possibility of single false triggers from the source. At the same time, by shielding the interrupt line, it prevents multiple interrupts from being triggered in a short period of time, thus avoiding the occupation of MCU resources.
[0053] Step 3: Delay Debouncing and Level Resampling Verification: After exiting the interrupt service routine, relying on the MCU's periodic task or timer callback function, a preset delay debouncing time is set, typically 5ms-20ms, which can be adjusted according to the actual interference environment. After the delay, the switch input level is sampled again. Only when the secondary sampling detects that the input level is stable at a high level is it determined to be a valid switch trigger; if the sampled level is low or unstable, it is determined to be an interference signal, a narrow pulse, glitch, or static electricity momentary trigger, and the subsequent switch action response logic is not executed, while preparing for re-enabling the interrupt. Through the dual verification of hardware delay and secondary sampling, momentary interference signals are filtered out, solving the problem of poor performance of traditional pure software debouncing under strong interference, and ensuring the accuracy of trigger determination.
[0054] Step 4, Waiting for Release and Interrupt Re-enabling: After a valid trigger is determined, the system enters the switch waiting for release state, continuously detecting the switch input level until the input level is stable at a low level (i.e., the switch is open), and maintaining a stable low level for a period of time to match the debouncing time, ensuring that the switch is completely open and avoiding secondary false triggering caused by contact bounce. After the level stabilizes at a low level, the corresponding EXTI interrupt line is re-enabling to restore the interrupt triggering function, and waits for the next switch trigger signal, forming a complete trigger-verification-release-reset closed loop;
[0055] Step 5: Set a trigger interval window to suppress continuous false triggers: Preset a minimum interval window between two valid triggers in the system, typically between 100ms and 500ms. After each valid trigger is determined, record the current trigger timestamp. Subsequent detected trigger signals must have a time interval greater than or equal to the preset interval window before proceeding to the secondary sampling verification stage in Step 3. If the interval between two triggers is less than the preset value, it is directly determined as a continuous false trigger caused by electrostatic discharge (ESD), and the trigger signal is ignored without any response. This specifically suppresses continuous false triggers caused by ESD coupling through ground loops or signal lines, preventing frequent system responses, resets, or peripheral malfunctions due to continuous interference.
[0056] In step two, the program performs only two core operations: first, it records the trigger time of the current interrupt and saves the timestamp for subsequent interval judgment; second, it quickly blocks the corresponding EXTI interrupt line to prevent the interrupt line from triggering the interrupt again.
[0057] By using step two to block interrupts, step three to delay and debouncing, and secondary sampling, instantaneous interference is filtered out in two ways to avoid narrow pulses and glitches directly triggering action judgment.
[0058] By verifying the level in step three and limiting the interval in step five, we can prevent false trigger signals caused by electrostatic coupling from triggering the indicator light drive logic and ensure that the indicator light only responds when there is a valid switching action.
[0059] By quickly disabling interrupts in step two and limiting continuous triggering in step five, the continuous impact of electrostatic interference on the MCU interrupt system is reduced, and interference spread is avoided, which may lead to system reset or peripheral malfunction.
[0060] By employing a combination of hardware interrupt shielding and software delay debouncing and interval limiting logic, the shortcomings of a single protection scheme are overcome, making it adaptable to strong interference environments and improving detection stability.
[0061] Example 1: Switch State Isolation and Shaping Circuit
[0062] The external switch status signal enters the optocoupler input terminal through a current limiting and shaping network. The optocoupler output terminal is formed into a default high level or default low level through a pull-up resistor. The optocoupler output node is configured with a front-stage RC low-pass network. Subsequently, a rear-stage RC low-pass network and a low-capacitance ESD clamping device are configured near the Schmitt trigger buffer input side. The Schmitt trigger buffer outputs the shaped signal to the external interrupt input pin of the MCU.
[0063] The parameter ranges for the two-stage RC circuit can be selected as follows: front stage capacitor: 1nF~10nF; rear stage series resistor: 100Ω~1kΩ; rear stage capacitor: 1nF~4.7nF.
[0064] The ESD clamping device can be selected as a 3.3V low-capacitance single-channel ESD protection device.
[0065] Example 2: RGB indicator light driver circuit:
[0066] The red, green, and blue indicator light control lines are output from the MCU and drive low-side switching devices (NPN or MOSFET) via base limiting current resistors. The collector and drain of the switching devices are connected to the corresponding color return lines on the external LED board, while the emitter and source are connected to system ground. Each channel can be connected in parallel with a base filter capacitor to suppress glitches, and a base discharge resistor can be set to ensure that the system is off by default upon power-up.
[0067] Example 3: Software detection method for anti-static false triggering:
[0068] The MCU configures the switch state input to trigger an external interrupt on the rising edge. When the interrupt occurs, it only records the timestamp and blocks the EXTI line. In the periodic task, after a delay and debouncing time, it reads the current level. If the level is still high, it is determined to be a valid trigger and executes a service action. Then it enters the release wait. After detecting that the input is stable at a low level, it re-enables the EXTI. At the same time, it sets a minimum interval time window to avoid continuous false triggers.
[0069] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or basic characteristics. Therefore, the embodiments should be considered exemplary and non-limiting in all respects. The scope of the invention is defined by the appended claims rather than the foregoing description. Therefore, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention, and no reference numerals in the claims should be construed as limiting the scope of the claims.
[0070] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A tri-color LED switch interface circuit with anti-static triggering, characterized in that, This includes an interface power supply and input protection module, a switch status isolation and shaping module, and an RGB indicator light driver module; The interface power supply and input protection module provides a stable DC power supply for the external switch board and resists transient overvoltage and electrostatic shock on the power supply line, ensuring the basic working stability of the circuit. The switch state isolation and shaping module achieves electrical isolation between the wiring harness side and the MCU side, suppresses common-mode interference, shapes, de-glitches, and performs anti-static processing on the switch state input signal to avoid false triggering of the MCU external interrupt (EXTI) and ensure stable signal transmission to the MCU. The RGB indicator driver module drives the red, green, and blue indicator lights to work independently, enabling the switching and control of the three colors of light, while ensuring the stability of the indicator lights and avoiding false lighting or flickering caused by static electricity or interference.
2. The anti-static triggering tri-color LED switch interface circuit according to claim 1, characterized in that: The interface power supply and input protection module includes a DC power supply unit, a transient voltage suppression unit (TVS), and a filter network. The DC power supply unit outputs a preset DC voltage to power the entire external switch board and related components of the interface circuit. The transient voltage suppression unit (TVS) clamps transient overvoltages on the power supply line to prevent overvoltage damage to downstream components. The filter network filters out noise in the power supply line, optimizes the power supply waveform, and improves power supply stability.
3. The anti-static triggering tri-color LED switch interface circuit according to claim 1, characterized in that: The switch state isolation and shaping module includes an input current limiting and shaping network, an opto-isolation device (optical coupler), an MCU-side pull-up network, a front-end RC low-pass network, a rear-end RC low-pass network, a low-capacitance ESD clamping device, and a Schmitt trigger buffer. The input current limiting and shaping network limits the inrush current on the harness side to prevent large current from damaging subsequent devices, while also performing preliminary shaping of the input signal waveform and filtering out some irregular interference signals. The optocoupler electrically isolates the wiring harness side from the MCU side, cutting off the coupling path of common-mode interference and reducing the impact of interference on MCU signal recognition. The pull-up network on the MCU side forms a stable default level through pull-up resistors, avoiding misidentification caused by level drift when there is no signal input; The front-end RC low-pass network is located near the optocoupler output node and is mainly used to suppress high-frequency glitches from the wiring harness side, thus initially purifying the signal. The subsequent RC low-pass network is located near the Schmitt trigger buffer input / MCU side, further passivating narrow pulse interference and limiting the current injected into the MCU, thus protecting the MCU pins. The low-capacitance ESD clamping device discharges residual electrostatic energy to ground, preventing electrostatic discharge from entering the MCU through the signal path and causing system abnormalities. The Schmitt trigger buffer performs hysteresis adjustment and edge shaping on the signal after multi-stage processing, and outputs a regular digital signal to the external interrupt input terminal of the MCU to ensure that the MCU accurately identifies the switch state.
4. The anti-static triggering tri-color LED switch interface circuit according to claim 1, characterized in that: The RGB indicator light driver module includes a driver topology, a basic driver component, and a base discharge resistor; the driver topology independently controls the on / off state of each light; the basic driver component includes a base limiting current resistor, a switching device, and a base filter capacitor; the base discharge resistor is used to ensure that the switching device is off by default when powered on, to prevent the indicator light from turning on accidentally at the moment of power-on.
5. A method for detecting the state of a three-color LED switch against electrostatic discharge (ESD) triggering according to any one of claims 1-4, characterized in that: The specific steps are as follows: Step 1: External Interrupt Initialization Configuration: Configure the MCU's external interrupt (EXTI) to rising edge trigger mode to adapt to the level change logic when the switch is closed, laying the foundation for subsequent switch state trigger detection. During the configuration process, interrupt response basic protection is enabled simultaneously to avoid invalid interrupts caused by level drift during the initialization phase. Step 2, Preliminary Interrupt Trigger Processing: When the MCU detects the rising edge of an external interrupt trigger signal, it immediately enters the interrupt service routine; Step 3: Delay Debouncing and Level Resampling Verification: After exiting the interrupt service routine, relying on the MCU's periodic task or timer callback function, a preset delay debouncing time is set. After the delay ends, the switch input level is sampled a second time. Only when the second sampling detects that the input level is stable at a high level is it determined to be a valid switch trigger. If the sampled level is low or unstable, it is determined to be an interference signal, and the subsequent switch action response logic is not executed. At the same time, preparations are made for re-enabling the interrupt. Step 4, Waiting for Release and Interrupt Re-enabling: After a valid trigger is determined, the system enters the switch waiting for release state, continuously detecting the switch input level until the input level is detected to be stable at a low level and maintained at a stable low level for a period of time. After the level stabilizes at a low level, the corresponding EXTI interrupt line is re-enabling, the interrupt triggering function is restored, and the system waits for the next switch trigger signal, forming a complete trigger-verification-release-reset closed loop. Step 5: Set a trigger interval window to suppress continuous false triggers: Preset a minimum time window between two valid triggers in the system. After each valid trigger is determined, record the current trigger timestamp. Subsequent detected trigger signals must have a time interval between the previous valid trigger and the current trigger greater than or equal to the preset interval window before proceeding to the secondary sampling verification stage in Step 3. If the interval between two triggers is less than the preset value, it is directly determined to be a continuous false trigger caused by static electricity, and the trigger signal is ignored without any response operation.
6. The method for detecting the status of a three-color LED switch against electrostatic discharge (ESD) false triggering according to claim 5, characterized in that: In step two, the program performs only two core operations: first, it records the trigger time of the current interrupt and saves the timestamp for subsequent interval judgment; second, it quickly blocks the corresponding EXTI interrupt line to prevent the interrupt line from triggering the interrupt again.