A restraint electronic anti-theft tag anti-theft system and its application method
The intelligent control system, which combines inductive switches and microprocessors, solves the problem that conductive loop-type rope-bound anti-theft tags cannot directly detect tension. It enables accurate detection and alarm of wire rope tension, thereby improving the anti-theft capability and reliability of the tags.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU YUQING TECHNOLOGY CO LTD
- Filing Date
- 2026-05-18
- Publication Date
- 2026-07-14
AI Technical Summary
Existing conductive loop-type rope-bound anti-theft tags cannot directly sense changes in the actual constraint tension of the steel wire rope, cannot effectively detect the overall peeling behavior of the tag, and are easily bypassed by criminals, resulting in insufficient anti-theft capabilities.
The system uses an inductive switch to detect changes in the tension of the constraint components, combines a microprocessor for signal processing and intelligent control, uses a moving average filtering algorithm and a dual-threshold anti-shake mechanism to determine changes in the tension of the wire rope, triggers an audible and visual alarm, and uses an EAS frequency element to work with the access control system to achieve channel alarm.
It enables direct detection of wire rope tension, accurately triggers alarms, prevents theft by peeling off tags, enhances anti-theft capabilities, reduces false alarm rates, extends battery life, and has strong anti-bypass capabilities.
Smart Images

Figure CN122392211A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of anti-theft tag system application technology, and in particular to a restrictive electronic anti-theft tag system and its application method, electronic device and computer-readable storage medium. Background Technology
[0002] The mechanical structure of the system involved in this application has been applied for in a prior patent (application number 2026206984958), and the specific structure will not be detailed in this application.
[0003] In existing Electronic Anti-theft Systems (EAS), electronic anti-theft tags generally have built-in alarm functions, capable of emitting audible and visual alarms when the steel wire rope is cut, thereby improving the protection of goods. In practical applications, electronic anti-theft tags for goods that are restrained and protected by steel wire ropes typically adopt a rope-bundled structure. This means that at least one flexible restraint member is wrapped around the outside of the target object, fixing the tag body to the surface or corner of the target object, thus achieving product protection.
[0004] Current rope-bound electronic tags primarily rely on the steel wire rope's involvement in circuit continuity to determine whether an alarm should be triggered. Specifically, the steel wire rope is normally connected to the circuit; when it breaks, detaches, or its continuity changes, the alarm is triggered by the change in circuit state. Some high-end products employ multi-strand conductive steel wire rope structures to improve reliability by detecting the continuity of multiple strands, but the core principle still falls within the scope of conductive circuit detection.
[0005] Although existing conductive loop-type cord-bound anti-theft tags are widely used, the following insurmountable defects still exist in practical applications:
[0006] 1. Triggering judgment relies on conductivity rather than actual stress: Existing technology can only detect the conductivity continuity of the wire rope, and cannot directly sense the actual constraint tension of the wire rope on the product. When the wire rope loses tension due to plastic deformation, loosening of the binding, or partial removal of the product, the system will not alarm as long as the conductive circuit is not broken, resulting in protection failure.
[0007] 2. Inability to detect complete label removal: When criminals forcibly peel the label from the product surface without cutting the steel cable, the cable remains conductive, and the system cannot detect this destructive behavior. According to retail industry statistics, this type of theft accounts for more than 60% of cases involving rope-bound labels, causing significant losses to businesses.
[0008] 3. Single triggering criterion and easy to bypass: Due to its reliance on a conductive circuit, malicious actors can easily bypass the alarm by short-circuiting both ends of the steel wire rope. Furthermore, factors such as humid environments and metal oxidation can cause the conductive circuit to break abnormally, leading to false alarms; while repairing the circuit by applying conductive paste may result in missed alarms.
[0009] Therefore, how to enable the triggering behavior to directly reflect the changes in the tension of the constraint component without relying on changes in the conductive path of the wire rope, especially to effectively detect the forced peeling of the tag, the loosening of the target object, the breakage, or the release of the binding state, is a problem that the existing technology urgently needs to solve. Summary of the Invention
[0010] To address the technical problems existing in the prior art, the present invention provides the following technical solution:
[0011] On the one hand, a control system for a restrictive electronic anti-theft tag system is provided, including a locking system, a microprocessor, an inductive switch, an audible and visual alarm unit, and an EAS frequency element, wherein:
[0012] The inductive switch is used to detect changes in the tension state of the constraint member and transmit the signal to the microprocessor;
[0013] The microprocessor, as the control core, is electrically connected to the induction switch, the power-on switch, and the audible and visual alarm unit, respectively. It is used to collect and process the signals from the induction switch, determine the system status, and control the audible and visual alarm unit to work.
[0014] The audible and visual alarm unit issues a warning under the control of the microprocessor;
[0015] The EAS frequency element is used in conjunction with the EAS access control system to implement channel alarm;
[0016] The microprocessor is electrically connected to the inductive switch and the audible and visual alarm unit, respectively.
[0017] Preferably, the microprocessor has a built-in signal processing unit that uses a moving average filtering algorithm to filter the original voltage signal of the inductive switch; the moving average filtering algorithm is as follows:
[0018] ,
[0019] in For the first Average voltage after filtering from the previous sample. For the first The original voltage value of the second sample. This is the size of the sliding window.
[0020] Preferably, the microprocessor has a built-in state judgment unit that uses a dual-threshold anti-shake mechanism to judge the state of the inductive switch; when the filtered voltage is detected to be less than the first voltage threshold for 200 ms for 200 ms, it is judged that the inductive switch is in a closed state; when the filtered voltage is detected to be greater than the second voltage threshold for 200 ms for 200 ms for 200 ms, it is judged that the inductive switch is in an open state.
[0021] Preferably, the microprocessor has a built-in finite state machine, which defines four core states: power-off state, initialization state, protection state, and alarm state.
[0022] When the system is in protection mode and detects that the sensor switch is open, it automatically switches to alarm mode. When the system is in alarm mode, it will not exit alarm mode even if the sensor switch closes again until the power switch is turned off.
[0023] Preferably, the microprocessor has a built-in alarm locking unit. Once an alarm is triggered, the alarm locking flag in the internal Flash will be set. Even if the system is momentarily powered off and then powered on again, it will immediately enter the alarm state after reading the alarm locking flag. The alarm locking flag will only be cleared when the power-on switch is off for more than or equal to the first time threshold.
[0024] Preferably, the power-on switch is rigidly connected to the slider assembly of the locking system; when the slider assembly is pushed forward to lock, the power-on switch closes and the system is powered on; when the slider assembly is reset backward to unlock, the power-on switch opens and the system is completely powered off.
[0025] Preferably, the audible and visual alarm unit includes a red LED light and a piezoelectric buzzer; the microprocessor controls the flashing frequency of the LED light and the sounding frequency of the buzzer through a PWM signal; in the alarm state, the LED light flashes at a frequency of 2Hz, and the buzzer emits a continuous buzzing sound at a frequency of 2kHz.
[0026] On the other hand, an application method for the system described above is provided, including the following steps:
[0027] Power-on initialization: When the power-on switch is closed, the system is powered on, and the microprocessor performs initialization operations to configure the system clock, I / O ports, ADC, and timers.
[0028] Signal acquisition and processing: The microprocessor acquires the voltage signal of the inductive switch at 10ms intervals and uses a moving average filtering algorithm to filter the original signal.
[0029] Status determination: A dual-threshold anti-shake mechanism is used to determine the status of the inductive switch, and the system working mode is switched according to the status of the inductive switch and the power-on switch.
[0030] Alarm control: When the sensor switch is detected to be open and the power switch is still closed, an audible and visual alarm is triggered and the alarm state is locked.
[0031] The system resets when the power switch is turned off, causing the system to lose power and all functions to stop.
[0032] Preferably, the state judgment in step S3 specifically includes: when the sensor switch is detected to be closed for 200 ms continuously, the system enters the protection state and the microprocessor enters the low-power sleep mode; when the sensor switch is detected to be open for 200 ms continuously and the power-on switch is still closed, the system enters the alarm state.
[0033] Preferably, it also includes an EAS access control alarm step, in which when a product with an unlocked tag passes through the EAS access control antenna system, the EAS frequency element in the tag resonates with the radio frequency signal emitted by the access control system, and the access control system triggers an audible and visual alarm after detecting the resonance signal.
[0034] On the other hand, an electronic device is provided, comprising: a processor; and a memory storing computer-readable instructions, which, when executed by the processor, implement the method described above.
[0035] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored therein, the at least one instruction being loaded and executed by a processor to implement the above method.
[0036] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:
[0037] Through the above technical solution, this invention fundamentally solves the inherent defects of existing conductive loop type rope-bound anti-theft tags, and achieves the following significant technical effects:
[0038] 1. Directly detects the actual stress state, solving the problem of relying on conductivity: This invention abandons the traditional conductive circuit detection method and directly uses the change in the tension of the wire rope as the trigger, which can accurately reflect the actual constraint state of the wire rope on the product. Regardless of whether the wire rope is conductive or not, as long as its tension disappears, the system will trigger an alarm, resulting in high detection accuracy.
[0039] 2. Effectively detects the complete removal of labels, filling a technological gap: When criminals peel the label off the product surface, the steel wire rope immediately loses its tension, and the system triggers an audible and visual alarm within 0.2 seconds, fundamentally eliminating the illegal act of "stealing goods by removing labels" and improving the anti-theft capability of rope-bound labels by an order of magnitude.
[0040] 3. Comprehensive coverage of all abnormal conditions, eliminating detection blind spots: This system can effectively detect all abnormal situations that cause the loss of tension, such as wire rope shearing, label peeling, product loosening, loose binding, and plastic deformation of restraint components, without any detection blind spots.
[0041] 4. Completely independent of conductive circuits, enhancing anti-bypass capabilities: Because the triggering mechanism is unrelated to the conductivity of the wire rope, criminals cannot bypass the alarm by short-circuiting conductive paths or applying conductive paste. Even if the two ends of the wire rope are welded together, the system will still trigger the alarm as long as the tension is lost, making it particularly suitable for retail scenarios with high security requirements.
[0042] 5. Intelligent signal processing reduces false alarm and missed alarm rates: This system adopts a moving average filtering algorithm and a dual threshold anti-jitter mechanism, which can effectively filter out false triggers caused by environmental noise, mechanical vibration and electromagnetic interference, resulting in a low false alarm rate.
[0043] 6. Intelligent power management extends battery life: Adopting a "lock-on power-on, unlock-off power-off" power management mechanism, combined with the MCU's low-power mode, the system's operating current in protection mode is only 5μA. A single CR2032 button cell battery can power the system for over 5 years, significantly reducing maintenance costs.
[0044] 7. The guide structure design improves trigger consistency: the movement path of the slack rope push and twist is limited by the tension trigger component groove, which ensures that the trigger component can move in a fixed direction when the tension changes, accurately contacting and separating from the inductive switch. This reduces false alarms or missed alarms caused by assembly deviations or wear and tear, and facilitates industrial mass production and quality control. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is the control architecture diagram of this system;
[0047] Figure 2 This is a schematic diagram of the system composition structure of the intelligent alarm control system of the present invention;
[0048] Figure 3 This is a schematic diagram of the control logic of the microprocessor (MCU) of this invention;
[0049] Figure 4 This is a schematic diagram of the hardware circuit structure of an intelligent alarm control system provided by the present invention;
[0050] Figure 5 This is a schematic diagram of the control process of a system control software provided by the present invention;
[0051] Figure 6 This is a schematic diagram of the real-time monitoring and anomaly handling mechanism when the label system of this invention is applied. Detailed Implementation
[0052] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0053] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.
[0054] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.
[0055] In this embodiment of the invention, sometimes a subscript such as W1 may be mistakenly written as a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.
[0056] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0057] I. System Introduction
[0058] The binding electronic anti-theft tag anti-theft system of the present invention adopts the architecture of "mechanical sensing-electrical conversion-intelligent control-hierarchical alarm". The core system is an intelligent alarm control system, which works in conjunction with a mechanical execution system to achieve all-dimensional anti-theft function.
[0059] The core innovation of this invention lies in changing the triggering basis from "the on / off state of the conductive circuit" to "the mechanical change in the tension of the constraint component", and combining it with embedded intelligent control technology to achieve direct, accurate and reliable detection of the constraint state of the product.
[0060] like Figure 1As shown, the overall system (the mechanical structure of the system can be found in prior patents; this application mainly introduces and describes the control system and program of the label device) consists of the following:
[0061] (a) Housing components (mechanical and electrical carriers)
[0062] The housing, which serves as the physical support and protective shell for all components, is injection molded from ABS+PC engineering plastic, providing impact resistance and wear resistance. The interior of the housing features independent electrical isolation chambers, component mounting slots, and positioning posts to ensure precise assembly of components with mechanical parts, while preventing electromagnetic interference and short-circuit risks.
[0063] (ii) Locking and power supply linkage system
[0064] The core innovation of this magnetically driven ratchet-ratchet one-way locking mechanism lies in its mechanical-electric linkage power-on switch. This switch is rigidly connected to the slider assembly: when the slider assembly is pushed forward to lock, the power-on switch closes, powering the system on; when the slider assembly is pushed back to unlock, the power-on switch opens, completely de-energizing the system. This design achieves intelligent power management of "power on when locked, power off when unlocked," completely eliminating standby power consumption and significantly extending battery life.
[0065] (III) Tension Sensing and Electrical Conversion System
[0066] As the core interface connecting the mechanical and electrical systems, it enables precise conversion of tension changes into electrical signals. It consists of a slack rope pusher and an elastic reset component: the slack rope pusher is in direct contact with the wire rope. When the wire rope is tensioned, it pushes the slack rope pusher upward, compressing the elastic reset component; when the wire rope loses tension, the elastic reset component pushes the slack rope pusher downward, triggering a change in the state of the inductive switch.
[0067] The system is designed based on Hooke's Law and ensures the accuracy and consistency of tension force detection by precisely matching the stiffness coefficient and working stroke of the elastic reset component.
[0068] Specifically:
[0069] Based on Hooke's Law and the principle of force balance, the interaction between the tension of the wire rope and the elastic force of the elastic reset component drives the slack rope to push and twist, thereby triggering a change in the state of the inductive switch.
[0070] Normal protection state: When the wire rope is wound around the product and tightened, tension force is generated. This force is converted into an upward thrust through the friction between the steel wire rope and the slack rope at the contact wall. .when ( When the elastic force of the elastic reset component is applied, the slack rope pusher moves upward to the highest position, squeezing the inductive switch to close it, and the system enters the protection state.
[0071] Abnormal Triggering State: When abnormal situations such as wire rope breakage, label peeling, or product loosening occur, the wire rope tension will be... Disappearance, upward thrust At this time, the elastic force of the elastic reset component Pushing the slack rope knob downwards causes the sensor switch to disengage when it is no longer pressed, sending a trigger signal to the MCU.
[0072] The elastic force of the elastic restoring element follows Hooke's Law: in:
[0073] : Elastic force of the elastic reset component (unit: N)
[0074] : The stiffness coefficient of the elastic reset component (unit: N / mm), in this embodiment
[0075] Compression of the elastic reset element (unit: mm), under normal protection conditions.
[0076] Through precise design Values and work schedule This ensures that the system can be reliably triggered when the wire rope tension reaches a preset threshold (2N in this embodiment), while avoiding false alarms caused by slight vibrations or collisions.
[0077] (iv) Intelligent alarm control system (core system)
[0078] The "brain" and "execution center" of this system are all integrated on a single PCB board and fixed to the alarm module slot inside the housing by positioning posts.
[0079] like Figure 2 As shown, the core functions of this system are as follows:
[0080] Microprocessor (MCU): An 8-bit ultra-low-power MCU with a built-in 12-bit ADC, timer, interrupt controller, and Flash memory is used to run the control program, acquire sensor switch signals, perform digital filtering and status judgment, and drive the audible and visual alarm unit. Its control logic is shown in the appendix. Figure 3 As shown.
[0081] Inductive switch: Utilizing a surface-mount tactile switch as a mechanical-to-electrical conversion element, it converts the linear displacement of a loosened cord into an electrical signal. The switch has an operating force of 1N, a travel of 0.5mm, and a mechanical life of ≥1 million cycles.
[0082] Audible and visual alarm unit: includes a bright red LED indicator and a piezoelectric buzzer. The LED is used to emit a visual alarm signal, with an operating current of 20mA; the buzzer is used to emit an audible alarm signal, with a resonant frequency of 2kHz and a sound pressure level ≥85dB (at 10cm).
[0083] Power-on switch: A surface-mount micro switch is used, which is linked with the locking system to control the power supply. The switch has an operating force of 0.5N and an electrical life of ≥500,000 cycles.
[0084] EAS frequency components: Employ an 8.2MHz RF resonant coil, which works in conjunction with the shopping mall's EAS access control antenna system to achieve channel alarm functionality. The coil's Q value is ≥50, and the reading distance is ≥1.2m.
[0085] Power module: Powered by a CR2032 button cell battery, nominal voltage 3V, capacity 220mAh. Combined with an intelligent power management mechanism, it achieves over 5 years of continuous operation.
[0086] The system adopts a control architecture of "dual switch input + finite state machine + intelligent signal processing". The power-on switch controls the power supply, the inductive switch provides the tension status signal, and the MCU uses built-in signal processing algorithms and state machine logic to achieve intelligent judgment and precise control of the system state. The logic is as follows:
[0087] Power control: The power switch is closed and the system is powered on only when the locking system is locked; when unlocking, the power switch is opened and the system is completely powered off, with zero static current, thus completely eliminating ineffective battery consumption.
[0088] Signal acquisition and processing: The MCU acquires the analog voltage signal of the inductive switch at a fixed frequency, and after digital filtering and anti-jitter processing, determines whether the tension state has changed.
[0089] Finite state machine: The system defines four core states: "power failure state", "initialization state", "protection state" and "alarm state". The state transition strictly follows the preset conditions to ensure the accuracy and reliability of the alarm.
[0090] Alarm Lockout: Once an alarm is triggered, the system will lock the alarm state. Even if the sensor switch is closed again, the alarm will not stop until the system is powered off and reset by an authorized unlocking operation.
[0091] EAS Interaction: The system's built-in 8.2MHz resonant coil works in conjunction with the EAS access control system. When a product with an unlocked tag passes through the access control, it triggers the access control system's audible and visual alarm.
[0092] Furthermore, it is worth noting that the power-on switch of this application also has the following embodiments:
[0093] The power-on switch here can be a lock (working state) switch. When the lock switch is closed, the product enters the working state. Products that do not use a power-on switch use a lock logic switch. In addition, during implementation, the power-on switch here can also be an integrated mechanical structure of a power-on switch and a lock switch, realizing the linkage between power-on and lock, achieving a better energy-saving and safety solution.
[0094] The specific principles and implementation process of these two implementation methods will be described in detail below:
[0095] Implementation Method 1: Independent Locking Status Switch In this implementation method, the power-on switch is designed as an independent locking status switch. This switch is connected to the mechanical structure of the locking system. When the operator locks the locking system, the locking switch closes, and the product enters the working state. Specifically, when the slider assembly of the locking system is pushed forward to lock, it triggers the closing action of the power-on switch, powering on the system. At this time, the microprocessor (MCU) begins to run the control program, collects the sensor switch signal, performs digital filtering and status judgment, and drives the audible and visual alarm unit into standby mode. The core principle of this design is to directly link the mechanical locking action with the electrical power-on action, realizing intelligent control of "locking equals power-on". Compared with products that do not use a power-on switch, this design avoids unnecessary power consumption in the non-working state and also improves the system's response speed. Products that do not use a power-on switch typically employ a locking logic switch, that is, using software logic to determine the locking state and control the power supply. While this method can achieve similar functionality, it requires additional sensors and complex logic, increasing system cost and complexity, and it cannot save locking status information during power outages. During implementation, it is crucial to ensure the precise mechanical linkage between the power-on switch and the locking system. The switch's actuating force and travel must match the mechanical characteristics of the locking system to guarantee accurate locking response. Furthermore, rigorous testing of the switch's electrical performance is necessary to ensure its reliability and stability during long-term use. For example, the switch's electrical life should be no less than 500,000 cycles to meet the long-term usage requirements of the product.
[0096] Embodiment 2: Integrated Mechanical Structure of Power-on Switch and Locking Switch In this embodiment, the power-on switch is designed as an integrated mechanical structure of a power-on switch and a locking switch. This structure fully integrates the mechanical locking action and the power-on action, achieving the interlocking control of power-on and locking. Specifically, when the staff locks the locking system, the integrated mechanical structure simultaneously completes the locking and power-on actions, enabling the system to immediately enter the working state; when the staff unlocks, the integrated mechanical structure simultaneously completes the unlocking and power-off actions, completely powering off the system. The core principle of this design is to combine two independent actions into one through innovative design of the mechanical structure, achieving a more optimal power-saving solution and safety solution. Compared with the independent locking working state switch, this design further simplifies the system structure, reduces the number of components, and lowers the cost and complexity of the system. At the same time, since the power-on and locking actions are completely synchronized, it avoids the problem of untimely power on and off caused by switch response delay or mechanical failure, improving the safety and reliability of the system.
[0097] In addition, when implementing these two methods, it is necessary to comprehensively consider in combination with the application logic of the context. For example, in the normal protection state, when the steel wire rope winds around the commodity and tightens, a tension force is generated. This force is converted into an upward thrust through the friction between the steel wire rope and the loose rope push-twist contact wall, pushing the loose rope push-twist upward to the highest position, squeezing the induction switch to make it closed, and the system enters the protection state. At this time, the power-on switch should remain closed to ensure that the system remains powered on and in the protection state. When abnormal situations such as the steel wire rope being cut, the label being peeled off, or the commodity being loose occur, the tension force of the steel wire rope disappears, the upward thrust disappears, and the elastic restoring force of the elastic restoring member pushes the loose rope push-twist downward, and the induction switch loses the extrusion and disconnects, sending a trigger signal to the MCU. At this time, the MCU should immediately drive the sound and light alarm unit to send an alarm signal and maintain the alarm state until the staff performs the unlocking operation.
[0098] In summary, by adopting an independent locking working state switch or an integrated mechanical structure of a power-on switch and a locking switch, the interlocking control of power-on and locking can be achieved, improving the power-saving performance and safety performance of the system. In the specific implementation process, it is necessary to select a suitable implementation method according to the actual requirements and application scenarios of the product, and conduct strict testing and verification to ensure the reliability and stability of the system.
[0099] The following provides a specific application configuration schematic diagram of the hardware circuit structure of an intelligent alarm control system.
[0100] As Figure 4 shown in the system composition diagram, using a modular design, mainly includes the following four units:
[0101] 1. The power management unit consists of a CR2032 button cell battery, a power-on switch S1, and a power filter capacitor C1. The power-on switch S1 is connected in series between the positive terminal of the battery and the VCC pin of the MCU. When S1 is closed, the 3V power supply powers the MCU and all peripherals; when S1 is open, the system is completely powered down. A 100nF ceramic capacitor C1 is connected in parallel at the power input terminal to filter out power supply noise and spike interference.
[0102] 2. The signal acquisition unit consists of an inductive switch S2 and a pull-up resistor R1. One end of the inductive switch S2 is connected to the PA0 pin (ADC input) of the MCU, and the other end is grounded; the pull-up resistor R1 (10kΩ) is connected between the PA0 pin and VCC. When S2 is closed, the voltage at the PA0 pin is 0V (low level); when S2 is open, the voltage at the PA0 pin is 3V (high level). The MCU acquires the voltage value at the PA0 pin through a 12-bit ADC to achieve high-precision detection of the inductive switch status.
[0103] 3. Alarm drive unit
[0104] LED driver circuit: The anode of the red LED D1 is connected to the PB0 pin of the MCU through a current-limiting resistor R2 (220Ω), and the cathode is grounded. The MCU controls the LED's on / off state and blinking by controlling the level of the PB0 pin.
[0105] Buzzer driver circuit: An NPN transistor Q1 (S8050) and amplifier circuit drive a piezoelectric buzzer B1. The MCU's PB1 pin is connected to the base of Q1 through a current-limiting resistor R3 (1kΩ). The collector of Q1 is connected to one end of B1, and the other end of B1 is connected to VCC. The emitter of Q1 is grounded. The MCU controls the on / off state of Q1 by outputting a PWM signal, thereby controlling the buzzer's frequency and volume.
[0106] 4. The EAS unit consists of a parallel resonant circuit formed by an 8.2MHz resonant coil L1 and a ceramic capacitor C2. The inductance of L1 is 2.5μH, and the capacitance of C2 is 15pF. The resonant frequency of the two is: When the frequency of the radio frequency signal emitted by the EAS access control system is equal to When the resonant circuit resonates and reflects the signal, it triggers the access control alarm.
[0107] II. System Control Flow
[0108] The following section will describe the tag application control process in conjunction with the system's control software mechanism.
[0109] (i) The system software can be written in C language or other languages, based on an interrupt-driven event triggering mechanism to achieve low-power operation and real-time response.
[0110] like Figure 5As shown, the core program control flow is as follows:
[0111] 1. Initialization: After the system is powered on, the MCU first performs initialization operations, the specific steps of which are as follows:
[0112] Configure the system clock to an internal 1MHz RC oscillator to reduce operating power consumption;
[0113] Configure I / O port direction: Set PA0 to analog input mode, and PB0 and PB1 to push-pull output mode;
[0114] Configure the ADC: Set 12-bit resolution, single conversion mode, and sampling time to 16 clock cycles;
[0115] Configure timer: Set a 10ms timer interrupt for signal sampling and status detection;
[0116] Initialize the state machine: Set the system state to the "initialization state";
[0117] Perform power supply voltage detection: Collect battery voltage through ADC. If the voltage is lower than the warning value, such as 2.4V (the power threshold here can be adjusted according to the circuit system), drive the LED to flash 3 times to indicate low power.
[0118] After initialization, the MCU enters a low-power sleep mode and waits for a timer interrupt to wake it up.
[0119] 2. Signal Acquisition and Processing: In the timer interrupt service routine, the MCU acquires the voltage signal of the PA0 pin every 10ms. To eliminate signal fluctuations caused by environmental noise, mechanical vibration, and electromagnetic interference, a moving average filtering algorithm is used to process the original signal. in:
[0120] : No. Average voltage after filtering from the previous sample (unit: V)
[0121] : No. The original voltage value of the sampled voltage (unit: V).
[0122] : Sliding window size, in this embodiment That is, averaging the most recent 10 sampled values.
[0123] After filtering, a dual-threshold debounce mechanism is used to determine the state of the inductive switch, avoiding false triggering caused by switch bounce.
[0124] When the filtered voltage is less than 0.5V for 20 consecutive samples (200ms), it is determined that the inductive switch is in a closed state.
[0125] When the filtered voltage of 20 consecutive samples (200ms) is greater than 2.5V, it is determined that the inductive switch is in the open state.
[0126] 3. The finite state machine control system uses a finite state machine (FSM) to achieve unified management of different operating modes. The state transition logic is shown in the control flow diagram.
[0127] Power off state: When the power switch is off, the system is completely powered off and all functions stop.
[0128] Initialization state: When the power switch is closed, the system is powered on, the MCU performs initialization operations, and automatically enters "protection state judgment" after completion.
[0129] Protection state: When the inductive switch is closed, the MCU is in low-power sleep mode, retaining only timer interrupt and ADC sampling functions. The system operating current is approximately 5μA. At this time, the MCU continuously monitors the status of the inductive switch. If it detects that the inductive switch is open, it enters the "alarm state"; if it detects that the power-on switch is open, it enters the "power-off state".
[0130] Alarm Status: When the proximity switch is open and the power switch is still closed, the MCU exits sleep mode, drives the LED to flash at a frequency of 2Hz, and the buzzer emits a continuous beeping sound at a frequency of 2kHz. The system operating current is approximately 50mA. Even if the proximity switch closes again at this time, the system will not exit the alarm status until the power switch is opened.
[0131] 4. Alarm Lockout: To prevent unauthorized individuals from bypassing the alarm by momentarily opening and closing the sensor switch, the system incorporates a hardware-level alarm lockout function. Once the alarm state is activated, the MCU sets the alarm lockout flag in its internal Flash memory. Even if the system experiences a momentary power outage and subsequent power-on, the MCU will immediately re-enter the alarm state upon reading the alarm lockout flag. The alarm lockout flag will only be cleared after the system completes an authorized unlocking operation (power-on switch disconnection time ≥ 5 seconds).
[0132] (II) The following is a description of the software control logic for each stage of the tag anti-theft system.
[0133] 1. Entering locked and protected state
[0134] Pull out a steel wire rope of appropriate length and wrap it around the outside of the product to form a binding restraint;
[0135] Pushing the slider assembly inward causes the locking block to engage with the slider groove under the action of the locking block's elastic reset component, locking the slider. Simultaneously, the slider assembly pushes the power-on switch S1 to close, powering on the system and causing the MCU to execute the initialization program.
[0136] Rotate the ratchet turntable clockwise to gradually tighten the wire rope. When the wire rope tension reaches 2N, push the slack rope pusher to move upward by 3mm and compress the elastic reset piece.
[0137] The contact wall of the loosened rope pusher squeezes the inductive switch S2, causing it to close, and the voltage of the PA0 pin of the MCU becomes 0V;
[0138] After the MCU performs sliding average filtering and debouncing, it confirms that the sensor switch is closed, switches the system state to "protection state", and drives the LED to flash briefly once to indicate that the system is ready.
[0139] 2. Abnormal state detection and alarm triggering
[0140] In protected mode, the MCU samples the voltage signal from the inductive switch every 10ms to monitor the tension of the wire rope in real time. The system will trigger an alarm if any of the following abnormal conditions occur:
[0141] Wire rope cut: After the wire rope is cut, the tension disappears immediately, the elastic reset component pushes the slack rope pusher downward, and the inductive switch S2 is disconnected;
[0142] Label peeling: After the label is pried off the product surface, the steel wire rope loses its restraint, the tension disappears, and the sensor switch S2 is disconnected;
[0143] Product detachment: After the product is removed from the wire rope, the wire rope loosens, the tension disappears, and the sensor switch S2 disconnects;
[0144] Loosening of the binding: When the wire rope becomes loose due to plastic deformation or external force, and the tension is less than 2N, the elastic reset component pushes the loosening screw downward, and the inductive switch S2 is disconnected.
[0145] When the MCU detects that the sensor switch is open, it immediately performs the following operations:
[0146] Switch the system status to "alarm status";
[0147] The PB0 pin is driven to output a PWM signal with a frequency of 2Hz and a duty cycle of 50%, which causes the LED to blink.
[0148] The PB1 pin is driven to output a square wave signal with a frequency of 2kHz, causing the buzzer to emit a continuous buzzing sound of 85dB.
[0149] Set the alarm lock flag in Flash to lock the alarm status.
[0150] 3. Unlocking and System Reset
[0151] Place the special magnetic unlocking device in the lock block slot of the housing, and the magnetic force will attract the lock block to move upward, causing it to disengage from the slider slot;
[0152] The slider elastic reset component pushes the slider assembly to move backward, disengaging the ratchet from the ratchet turntable; simultaneously, the slider assembly moves away from the power switch S1, and S1 is disconnected.
[0153] When the system loses power, the MCU stops working and the alarm is automatically cleared.
[0154] Rotate the ratchet turntable counterclockwise to retract the wire rope, ready for the next use.
[0155] 4. EAS access control alarm
[0156] The system's built-in EAS frequency components work in conjunction with the mall's EAS access control antenna system to achieve channel alarm functionality.
[0157] The EAS access control system's transmitting antenna continuously emits an 8.2MHz radio frequency signal;
[0158] When a product with an unlocked tag passes through the access control system, the parallel circuit consisting of the resonant coil L1 and capacitor C2 inside the tag resonates, absorbing and reflecting radio frequency signals.
[0159] When the access control system's receiving antenna detects the reflected signal, it triggers an audible and visual alarm, alerting staff that some goods have been taken out without payment.
[0160] III. Application Methods Based on This System
[0161] The specific application steps of the binding electronic anti-theft tag of the present invention are as follows:
[0162] 1. Label preparation and self-inspection
[0163] Component integrity check: Check for cracks or damage to the label housing, broken wires or rust on the wire rope, and whether the locking mechanism is flexible.
[0164] Battery power detection: After the system is powered on, the MCU automatically detects the battery voltage. If the voltage is lower than 2.4V, the LED will flash 3 times to prompt the battery to be replaced.
[0165] Function self-test:
[0166] Push the slider assembly to lock it, and confirm that the LED flashes once to indicate that the system has entered the protection state.
[0167] Manually pull the steel wire rope to slack it, and confirm that the system triggers the audible and visual alarm within 0.2 seconds;
[0168] Unlock using a magnetic unlocking device, confirm the alarm stops immediately, and the wire rope can be successfully retracted.
[0169] 2. Product bundling and locking
[0170] Choose the binding points: Select appropriate binding points based on the shape and structure of the product to ensure that the wire rope can securely restrain the product without damaging its appearance.
[0171] Adjust the length of the wire rope: Pull out a sufficient length of wire rope and wrap it around the outside of the product to form a stable binding structure.
[0172] Locking mechanism: Push the slider assembly inward until you hear a "click" sound, confirming that the locking block has engaged in the slider slot and the slider cannot move backward.
[0173] Tighten the wire rope: Rotate the ratchet turntable clockwise to gradually tighten the wire rope until the product cannot be removed from the wire rope and the label body is firmly fixed to the product surface.
[0174] Confirm system status: Observe whether the LED flashes once to confirm that the system has entered the protection state. If the LED does not flash, check whether the power switch and the sensor switch are closed normally.
[0175] 3. Real-time monitoring and anomaly handling (e.g.) Figure 6 (The process shown)
[0176] (1) Local alarm handling:
[0177] When the tag triggers a local audible and visual alarm, the MCU automatically records the alarm time and status.
[0178] Upon arrival at the scene, staff will inspect the condition of the merchandise. If theft is confirmed, the mall's emergency response plan will be activated immediately.
[0179] If it is a false alarm, use a magnetic unlocking device to unlock the system, stop the alarm, and check the cause of the false alarm (such as a loose wire rope, a tag being bumped, etc.). After troubleshooting, relock the system.
[0180] (2) EAS access control alarm processing:
[0181] When the EAS access control system triggers an alarm, the access controller automatically records the alarm time and location;
[0182] Staff politely stopped the customer to check if they were carrying any unpaid items;
[0183] If the item has been paid for but the tag is not unlocked, use a magnetic unlocker to unlock the tag for the customer.
[0184] If it is a false alarm, apologize to the customer and check the access control system and tag status.
[0185] 4. Normal sales and unlocking
[0186] Checkout: The cashier scans the product barcode to complete the payment process.
[0187] Tag unlocking: Place the magnetic unlocker in the lock slot of the tag and hold for 2-3 seconds until you hear a "click" sound. Confirm that the slider has been reset and turn off the power switch.
[0188] Remove the label: Rotate the ratchet turntable counterclockwise to loosen the wire rope and remove it from the product.
[0189] Tag recycling: The steel wire rope is completely retracted into the tag, and the tag is placed in a special recycling box for reuse.
[0190] 5. System Maintenance and Management
[0191] Regular inspections: A comprehensive inspection of the tags in use is conducted once a month. The MCU automatically records the number of times each tag is used, the number of alarms, and the battery level.
[0192] Battery Replacement: When the system prompts that the battery is low, replace it with a CR2032 button cell battery. After battery replacement, the system will automatically initialize and perform a self-test.
[0193] Label disposal: Labels with severely damaged casings, malfunctioning locking mechanisms, or that cannot be repaired are disposed of as scrap labels, and the batteries are removed before recycling.
[0194] Example 1
[0195] The binding electronic anti-theft tag anti-theft system provided in this embodiment has the following specific components:
[0196] The parameters of each core component in this embodiment are as follows:
[0197] Microprocessor: STM8L051F3P6, an 8-bit ultra-low power MCU, operating voltage 2.4V-3.6V, sleep current 0.8μA, operating current 100μA, with built-in 12-bit ADC and 8KB Flash;
[0198] Inductive switch: Surface mount tactile switch, rated voltage 3V, rated current 10mA, operating force 1N, stroke 0.5mm, mechanical life 1 million cycles;
[0199] LED light: Red SMD LED, wavelength 620nm, operating voltage 2.0V, operating current 20mA, brightness 100mcd;
[0200] Buzzer: Piezoelectric buzzer, resonant frequency 2kHz, sound pressure level 85dB (at 10cm), operating voltage 3V;
[0201] Power-on switch: Surface mount micro switch, rated voltage 3V, rated current 10mA, operating force 0.5N, electrical life 500,000 cycles;
[0202] EAS frequency components: 8.2MHz RF resonant coil, inductance 2.5μH, Q value 50, readout distance 1.2m;
[0203] Steel wire rope: 304 stainless steel wire rope, diameter 0.8mm, length 1000mm, tensile strength 1500N;
[0204] Elastic reset component: Compression spring, wire diameter 0.3mm, outer diameter 3mm, free length 8mm, spring constant k=0.5N / mm;
[0205] Power source: CR2032 button cell battery, nominal voltage 3V, capacity 220mAh.
[0206] 1. Application in normal protection mode
[0207] Operating procedure: Thread the steel wire rope through the handle of a designer handbag worth xxx yuan, pull it out 600mm, push the slider inward, and confirm the lock is in place after hearing a "click" sound. Rotate the ratchet dial 5.1 clockwise to tighten the steel wire rope until the handbag can no longer wobble.
[0208] Mechanical Analysis: Tension of the Wire Rope An upward thrust is applied to the slack rope pusher through the contact wall 6.2.1. The elastic reset element is compressed by 3mm, generating elastic force. .because Keep the slack rope pusher in the highest position.
[0209] Electrical signal status: When the inductive switch is pressed and closed, the voltage of the MCU's PA0 pin is 0.2V; when the power-on switch is pressed and closed by the slider, the system is powered on.
[0210] MCU control process: After the MCU passes through a moving average filter (N=10), the average voltage is... The voltage is below the low threshold of 0.5V; after 200ms of continuous detection of this state, the sensor switch is confirmed to be closed, and the system enters the protection state. At this time, the MCU is in low-power sleep mode, and the total system current is 4.8μA. The system operates stably without generating alarm signals, effectively protecting the handbag from theft.
[0211] 2. Abnormal wire rope shearing
[0212] Abnormal example: Criminals use scissors to cut the steel cable in an attempt to steal a handbag.
[0213] After the wire rope breaks, the tension The upward thrust disappears immediately. The elastic force of the elastic reset component Push the slack rope lever downwards by 3mm to return to the initial position. The inductive switch is disconnected, and the voltage at the PA0 pin of the MCU becomes 3V.
[0214] MCU control process:
[0215] The MCU samples the voltage of the PA0 pin every 10ms, and the voltage value obtained in 10 consecutive samples is 3V.
[0216] After moving average filtering, the average voltage It is greater than the high threshold of 2.5V;
[0217] If the PA0 pin is detected to be high for 200 consecutive seconds, the sensor switch is confirmed to be open.
[0218] The MCU immediately enters alarm mode, drives the PB0 pin to output a 2Hz PWM signal, and the LED starts to flash; drives the PB1 pin to output a 2kHz square wave signal, and the buzzer emits a continuous 85dB beep; the alarm lock flag in Flash is set, so the alarm will not stop even if someone reconnects the wire rope.
[0219] The system triggered an audible and visual alarm within 0.2 seconds of the wire rope being cut, allowing staff to arrive promptly, apprehend the perpetrators, and prevent the loss of goods.
[0220] 3. Abnormal overall label peeling
[0221] Abnormal example: Criminals used a crowbar to pry the tag off the handbag. The steel cable was not cut, but the handbag was no longer restrained.
[0222] It is exactly the same as the abnormal shearing of the wire rope. The tension of the wire rope disappears and the slack rope pusher moves downward by 3mm under the action of the elastic reset component.
[0223] The electrical signal change and MCU control process are exactly the same as in the case of a wire rope shearing anomaly, immediately triggering an audible and visual alarm. Even if the tag is not damaged but simply peeled off as a whole, the system can accurately detect the anomaly and trigger an alarm, completely solving the biggest loophole of existing technology.
[0224] 4. EAS access control alarm
[0225] Example scenario: Criminals conceal a handbag with an unlocked tag inside their clothing and attempt to pass through the EAS access control system at the mall exit.
[0226] The EAS access control system's transmitting antenna emits an 8.2MHz radio frequency signal. The EAS frequency element inside the tag resonates, reflecting a signal of the same frequency back. Upon detecting the reflected signal, the access control system's receiving antenna immediately triggers an audible and visual alarm, allowing security personnel to intercept and recover the goods (similar to the alarm mechanism of near-field communication such as RFID tags).
[0227] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0228] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.
[0229] In this invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be a single item or multiple items.
[0230] It should be understood that, in various embodiments of the present invention, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0231] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0232] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0233] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0234] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0235] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0236] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0237] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A control system for a restraining electronic anti-theft tag anti-theft system, comprising a locking system, characterized in that, It also includes a microprocessor, a sensor switch, an audible and visual alarm unit, and an EAS frequency element, among which: The inductive switch is used to detect changes in the tension state of the constraint member and transmit the signal to the microprocessor; The microprocessor, as the control core, is electrically connected to the induction switch, the power-on switch, and the audible and visual alarm unit, respectively. It is used to collect and process the signals from the induction switch, determine the system status, and control the audible and visual alarm unit to work. The audible and visual alarm unit issues a warning under the control of the microprocessor; The EAS frequency element is used in conjunction with the EAS access control system to implement channel alarm; The microprocessor is electrically connected to the inductive switch and the audible and visual alarm unit, respectively.
2. The control system according to claim 1, characterized in that: The microprocessor has a built-in signal processing unit that uses a moving average filtering algorithm to filter the original voltage signal of the inductive switch; the moving average filtering algorithm is as follows: , in For the first Average voltage after filtering from the previous sample. For the first The original voltage value of the second sample. This is the size of the sliding window.
3. The control system according to claim 2, characterized in that: The microprocessor has a built-in state judgment unit that uses a dual threshold anti-shake mechanism to determine the state of the inductive switch. When the filtered voltage is detected to be less than the first voltage threshold for 200 ms consecutively, it is determined that the inductive switch is in a closed state. When the filtered voltage is detected to be greater than the second voltage threshold for 200 consecutive ms, it is determined that the inductive switch is in the open state.
4. The control system according to claim 1, characterized in that: The microprocessor has a built-in finite state machine, which defines four core states: power-off state, initialization state, protection state, and alarm state. When the system is in protection mode and detects that the sensor switch is open, it automatically switches to alarm mode. When the system is in alarm mode, it will not exit alarm mode even if the sensor switch closes again until the power switch in the system is turned off.
5. The control system according to claim 4, characterized in that: The microprocessor has a built-in alarm locking unit. Once an alarm is triggered, the alarm locking flag in the internal Flash will be set. Even if the system is momentarily powered off and then powered on again, it will immediately enter the alarm state after reading the alarm locking flag. The alarm locking flag will only be cleared when the power-on switch is off for more than or equal to the first time threshold.
6. The control system according to claim 4, characterized in that: The power-on switch is rigidly connected to the slider assembly of the locking system; when the slider assembly is pushed forward to lock, the power-on switch closes and the system is powered on; when the slider assembly is reset backward to unlock, the power-on switch opens and the system is completely powered off.
7. The control system according to claim 1, characterized in that: The audible and visual alarm unit includes a red LED light and a piezoelectric buzzer; the microprocessor controls the flashing frequency of the LED light and the sounding frequency of the buzzer through a PWM signal; in the alarm state, the LED light flashes at a frequency of 2Hz and the buzzer emits a continuous buzzing sound at a frequency of 2kHz.
8. A method for applying the system as described in any one of claims 4-7, characterized in that, Includes the following steps: Power-on initialization: When the power-on switch is closed, the system is powered on, and the microprocessor performs initialization operations to configure the system clock, I / O ports, ADC, and timers. Signal acquisition and processing: The microprocessor acquires the voltage signal of the inductive switch at 10ms intervals and uses a moving average filtering algorithm to filter the original signal. Status determination: A dual-threshold anti-shake mechanism is used to determine the status of the inductive switch, and the system working mode is switched according to the status of the inductive switch and the power-on switch. Alarm control: When the sensor switch is detected to be open and the power switch is still closed, an audible and visual alarm is triggered and the alarm state is locked. The system resets when the power switch is turned off, causing the system to lose power and all functions to stop.
9. The method according to claim 8, characterized in that: The state judgment in step S3 specifically includes: when the sensor switch is detected to be closed for 200 ms continuously, the system enters the protection state and the microprocessor enters the low-power sleep mode; when the sensor switch is detected to be open for 200 ms continuously and the power-on switch is still closed, the system enters the alarm state.
10. The method according to claim 8, characterized in that: It also includes an EAS access control alarm step. When a product with an unlocked tag passes through the EAS access control antenna system, the EAS frequency element in the tag resonates with the radio frequency signal emitted by the access control system. After the access control system detects the resonance signal, it triggers an audible and visual alarm.