Anti-disassembly switch detection circuit and POS machine
By designing a combination of general CPU, logic module and clamp module in POS machine, the problem that general CPU cannot detect anti-tie switches in real time is solved, and the anti-tie switch detection of POS machine in the on- and off states is realized, ensuring POS machine safety.
Patent Information
- Application Number
- CN202420326623.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-21
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2034-02-21
AI Technical Summary
General general CPUs cannot detect whether the anti-tamper switch is off in real time in the POS machine's on and off states, resulting in the inability to ensure the safety of the POS machine.
An anti-tie switch detection circuit is designed, including a general CPU, logic module and clamp module. By outputting trigger signals and clamp signals in the power-on and shutdown states, the latch trigger signals can be realized to ensure that the general CPU can detect it. Disconnected state of the anti-tamp switch.
It realizes that the POS machine can detect whether the anti-tie switch is off in real time when both on and off, ensuring the safety of the POS machine and the detection accuracy of the anti-tie switch, and avoiding potential security risks caused by the inability to detect the general CPU.
Smart Images

Figure CN222028373U_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of electronic circuits, and in particular, relates to an anti-disassembly switch detection circuit and a POS machine. Background Art
[0002] At present, the anti-tamper switch detection circuit commonly used in POS (Point of Sales) machines is usually implemented by a dedicated security CPU (Central Processing Unit), which has a real-time detection function: the POS machine can detect whether the anti-tamper switch is disconnected in real time when the machine is turned on or off; it also has the advantage of low power consumption. However, general-purpose CPUs cannot realize real-time detection of whether the anti-tamper switch is disconnected when the POS machine is turned on or off. Utility Model Content
[0003] The embodiments of the present application provide an anti-dismantling switch detection circuit and a POS machine, which can solve the problem that a general-purpose CPU cannot detect whether an anti-dismantling switch is disconnected in real time when the POS machine is powered on or powered off.
[0004] In a first aspect, an embodiment of the present application provides an anti-tamper switch detection circuit, including a general CPU, a logic module and a clamp module, wherein a first interface of the general CPU is electrically connected to the logic module and the clamp module respectively, and the logic module is electrically connected to the clamp module and an anti-tamper switch on a POS machine respectively;
[0005] The logic module is used to output a trigger signal after the anti-dismantling switch is disconnected; the clamp module is used to output a clamp signal to the logic module according to the trigger signal, so that the logic module keeps outputting the trigger signal; the general CPU is used to output an abnormal signal to the POS machine according to the trigger signal.
[0006] In a possible implementation manner of the first aspect, the second interface of the general-purpose CPU is also electrically connected to the logic module;
[0007] The general CPU is used to output a first level signal to the logic module according to the unlocking signal output by the POS machine after the anti-disassembly switch is disconnected, pull the trigger signal output by the logic module to a second level signal, and make the clamping module stop outputting the clamping signal.
[0008] In a possible implementation manner of the first aspect, the logic module includes a first logic unit, a second logic unit, and a battery unit, the first logic unit is electrically connected to the anti-tampering switch, the clamp module, the second logic unit, and the second interface of the general CPU, respectively, and the second logic unit is electrically connected to the battery unit, the clamp module, and the first interface of the general CPU, respectively;
[0009] The first logic unit is used to shut down after the anti-dismantling switch is disconnected, so that the second logic unit outputs the trigger signal; the first logic unit is also used to shut down according to the clamping signal, so that the second logic unit continues to output the trigger signal; the second logic unit is also used to pull the trigger signal to the second level signal according to the first level signal; the battery unit is used to power the second logic unit.
[0010] In a possible implementation of the first aspect, the first logic unit includes a first resistor and a first switch tube, the first end of the first resistor is used to be electrically connected to the anti-disassembly switch, the second end of the first resistor is electrically connected to the clamping module and the control end of the first switch tube respectively, the first conduction end of the first switch tube is electrically connected to the second logic unit and the second interface of the general CPU respectively, and the second conduction end of the first switch tube is used to be grounded.
[0011] In a possible implementation of the first aspect, the second logic unit includes a third resistor, a fourth resistor and a second switch tube, the first end of the third resistor and the first end of the fourth resistor are both electrically connected to the battery unit, the second end of the third resistor is respectively electrically connected to the first logic unit, the control end of the second switch tube and the second interface of the general CPU, the second end of the fourth resistor is respectively electrically connected to the clamping module, the first conduction end of the second switch tube and the first interface of the general CPU, and the second conduction end of the second switch tube is used for grounding.
[0012] In a possible implementation manner of the first aspect, the clamping module includes a clamping diode, an anode of the clamping diode is electrically connected to the first logic unit, and a cathode of the clamping diode is electrically connected to the second logic unit and a first interface of the general CPU, respectively.
[0013] In a possible implementation manner of the first aspect, the logic module includes a first logic unit, a second logic unit, and a battery unit, the battery unit is electrically connected to the first logic unit and the second logic unit, the first logic unit is electrically connected to the anti-disassembly switch, the clamp module, and the second logic unit, and the second logic unit is electrically connected to the clamp module, the first interface of the general CPU, and the second interface of the general CPU, respectively;
[0014] The first logic unit is used to output a first logic signal to the second logic unit after the anti-dismantling switch is disconnected; the second logic unit is used to output the trigger signal according to the first logic signal; the first logic unit is also used to output the first logic signal to the second logic unit according to the clamping signal; the battery unit is used to supply power to the first logic unit and the second logic unit.
[0015] In a possible implementation of the first aspect, the first logic unit includes a first resistor, a fifth resistor and a first switch tube, the first end of the first resistor is electrically connected to the first end of the fifth resistor and the anti-disassembly switch, respectively, the second end of the fifth resistor is electrically connected to the battery unit, the second end of the first resistor is electrically connected to the clamping module and the control end of the first switch tube, the first conduction end of the first switch tube is electrically connected to the second logic unit, and the second conduction end of the first switch tube is used for grounding.
[0016] In a possible implementation of the first aspect, the second logic unit includes a third resistor, a fourth resistor and a second switch tube, the first end of the third resistor and the first end of the fourth resistor are both electrically connected to the battery unit, the second end of the third resistor is respectively electrically connected to the first logic unit and the control end of the second switch tube, the first conduction end of the second switch tube is respectively electrically connected to the second end of the fourth resistor, the first interface of the general CPU and the second port of the general CPU, and the second conduction end of the second switch tube is used for grounding.
[0017] In a second aspect, an embodiment of the present application provides a POS machine, comprising an anti-dismantling switch and the anti-dismantling switch detection circuit described in any one of the first aspects, wherein the anti-dismantling switch is electrically connected to a logic module in the anti-dismantling switch detection circuit.
[0018] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0019] An embodiment of the present application provides an anti-dismantling switch detection circuit, including a general CPU, a logic module and a clamping module, wherein the first interface of the general CPU is electrically connected to the logic module and the clamping module respectively, and the logic module is electrically connected to the clamping module and the anti-dismantling switch on the POS machine respectively.
[0020] When the POS machine is powered on, the general-purpose CPU works normally. When the anti-disassembly switch on the POS machine is disconnected, the logic module is used to output a trigger signal. The clamp module is used to output a clamp signal to the logic module according to the trigger signal, so that the logic module keeps outputting the trigger signal according to the clamp signal, thereby realizing the function of latching the trigger signal, and ensuring that the general-purpose CPU can detect that the anti-disassembly switch has been disconnected. When the POS machine is powered on, the general-purpose CPU receives the trigger signal in real time, and outputs an abnormal signal to the POS machine according to the trigger signal, informing the POS machine that it is in an abnormal state.
[0021] When the POS machine is in the off state, the general CPU does not work. When the anti-disassembly switch on the POS machine is disconnected, although the general CPU does not work, the logic module will still output a trigger signal to ensure that the POS machine can still detect in real time whether the anti-disassembly switch is disconnected when it is turned off. The clamp module is used to output a clamp signal to the logic module according to the trigger signal, so that the logic module keeps outputting the trigger signal according to the clamp signal, thereby realizing the function of latching the trigger signal, ensuring that the general CPU can detect that the anti-disassembly switch has been disconnected. When the POS machine is in the off state, the general CPU can only receive the trigger signal after the POS machine is turned on, and output an abnormal signal to the POS machine according to the trigger signal to inform the POS machine that it is in an abnormal state.
[0022] In summary, the anti-dismantling switch detection circuit provided in the embodiment of the present application solves the problem that a general-purpose CPU cannot detect in real time whether the anti-dismantling switch is disconnected when the POS machine is in the power-on state or the power-off state.
[0023] It can be understood that the beneficial effects of the second aspect mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0025] Figure 1 It is a principle block diagram of an anti-tamper switch detection circuit provided in an embodiment of the present application;
[0026] Figure 2 is a principle block diagram of an anti-tamper switch detection circuit provided in another embodiment of the present application;
[0027] Figure 3is a principle block diagram of an anti-tamper switch detection circuit provided in another embodiment of the present application;
[0028] Figure 4 is a principle block diagram of an anti-tamper switch detection circuit provided in another embodiment of the present application;
[0029] Figure 5 It is a circuit connection diagram of an anti-tamper switch detection circuit provided in an embodiment of the present application;
[0030] Figure 6 is a circuit connection diagram of an anti-tamper switch detection circuit provided by another embodiment of the present application;
[0031] Figure 7 It is the detection flow chart of the anti-tamper switch;
[0032] Figure 8 It is the detection level change timing of the anti-tamper switch Figure 1 ;
[0033] Fig. 9 is a circuit connection diagram of an anti-tamper switch detection circuit provided by another embodiment of the present application;
[0034] Fig.10 is a circuit connection diagram of an anti-tamper switch detection circuit provided by another embodiment of the present application;
[0035] Fig.11 It is the detection level change timing of the anti-tamper switch Figure 2 ;
[0036] Fig.12 This is a principle block diagram of a POS machine provided in one embodiment of the present application.
[0037] In the figure: 10, anti-tamper switch detection circuit; 11, general CPU; 12, logic module; 121, first logic unit; 122, second logic unit; 123, battery unit; 13, clamp module; 20, anti-tamper switch; 9, POS machine. DETAILED DESCRIPTION
[0038] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0039] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0040] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0041] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0042] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0043] The anti-tamper switch detection circuit commonly used in POS machines is usually implemented by a dedicated security CPU, which has a real-time detection function: the POS machine can detect whether the anti-tamper switch is disconnected when the POS machine is turned on or off, while the general-purpose CPU cannot realize real-time detection of whether the anti-tamper switch is disconnected when the POS machine is turned on or off.
[0044] In view of the above problems, the present application provides an anti-disassembly switch detection circuit, such as Figure 1 As shown, the anti-tamper switch detection circuit 10 includes a general CPU 11, a logic module 12 and a clamp module 13. The first interface of the general CPU 11 is electrically connected to the logic module 12 and the clamp module 13 respectively. The logic module 12 is electrically connected to the clamp module 13 and the anti-tamper switch 20 on the POS machine respectively. Figure 1It can be seen that the logic module 12 is electrically connected to the clamp module 13 and one end of the anti-disassembly switch 20 respectively, and the other end of the anti-disassembly switch 20 receives the first signal S1. The logic module 12 is used to output a trigger signal after the anti-disassembly switch 20 is disconnected; the clamp module 13 is used to output a clamp signal to the logic module 12 according to the trigger signal, so that the logic module 12 keeps outputting the trigger signal according to the clamp signal; the general CPU 11 is used to output an abnormal signal to the POS machine according to the trigger signal.
[0045] In the embodiment of the present application, when the POS machine is in the power-on state, the general CPU 11 works normally. When the anti-disassembly switch 20 on the POS machine is disconnected, the logic module 12 is used to output a trigger signal. The clamping module 13 is used to output a clamping signal to the logic module 12 according to the trigger signal, so that the logic module 12 keeps outputting the trigger signal according to the clamping signal, and realizes the function of latching the trigger signal, ensuring that the general CPU 11 can detect that the anti-disassembly switch 20 has been disconnected. When the POS machine is in the power-on state, the general CPU 11 receives the trigger signal in real time, and outputs an abnormal signal to the POS machine according to the trigger signal, informing the POS machine that it is in an abnormal state. After receiving the abnormal signal, the POS machine will respond in time to ensure the safety of the POS machine.
[0046] When the POS machine is in the shutdown state, the general CPU 11 does not work. When the anti-disassembly switch 20 on the POS machine is disconnected, although the general CPU 11 does not work, the logic module 12 will still output a trigger signal to ensure that the POS machine can still detect in real time whether the anti-disassembly switch 20 is disconnected in the shutdown state. The clamping module 13 is used to output a clamping signal to the logic module 12 according to the trigger signal, so that the logic module 12 keeps outputting the trigger signal according to the clamping signal, and realizes the function of latching the trigger signal, ensuring that the general CPU 11 can detect that the anti-disassembly switch 20 has been disconnected. When the POS machine is in the shutdown state, the general CPU 11 can only receive the trigger signal after the POS machine is turned on, and output an abnormal signal to the POS machine according to the trigger signal to inform the POS machine that it is in an abnormal state. After receiving the abnormal signal, the POS machine will respond in time to ensure the safety of the POS machine.
[0047] In summary, the anti-dismantling switch detection circuit 10 provided in the embodiment of the present application solves the problem that the general-purpose CPU 11 cannot detect whether the anti-dismantling switch 20 is disconnected in real time when the POS machine is in the power-on state or the power-off state.
[0048] like Figure 2As shown, the second interface of the general CPU 11 is also electrically connected to the logic module 12. The general CPU 11 is used to output a first level signal to the logic module 12 according to the unlocking signal output by the POS machine after the anti-tamper switch 20 is disconnected, pull the trigger signal output by the logic module 12 to the second level signal, and make the clamping module 13 stop outputting the clamping signal.
[0049] In the embodiment of the present application, after the anti-disassembly switch 20 is disconnected, the general CPU 11 outputs an abnormal signal to the POS machine according to the trigger signal, notifying the POS machine that it is in an abnormal state. The POS machine will respond in time after receiving the abnormal signal. When the POS machine has processed the abnormal state, it will output an unlocking signal to the general CPU 11. The general CPU 11 outputs a first level signal to the logic module 12 according to the unlocking signal, pulls the trigger signal output by the logic module 12 to the second level signal, and stops the clamping module 13 from outputting the clamping signal, that is, the clamping module 13 fails. Since the POS machine has released the abnormal state, the anti-disassembly switch 20 is closed again. Due to the existence of the logic module 12, the anti-disassembly switch detection circuit 10 is restored to be able to detect whether the anti-disassembly switch 20 is disconnected. As can be seen from the above, the anti-disassembly switch detection circuit 10 provided in the embodiment of the present application needs to be unlocked to restore to the initial detection state after detecting that the anti-disassembly switch 20 is disconnected, which further ensures the safety of the POS machine.
[0050] It should be noted that when the anti-tamper switch detection circuit 10 is restored to be able to detect whether the anti-tamper switch 20 is disconnected, the general CPU 11 will set the second interface to a high impedance state or an input state. The first interface and the second interface are GPIO (General Purpose Input Output) interfaces.
[0051] like Figure 3 As shown, the logic module 12 includes a first logic unit 121, a second logic unit 122 and a battery unit 123. The first logic unit 121 is electrically connected to the anti-disassembly switch 20, the clamp module 13, the second logic unit 122 and the second interface of the general CPU 11, respectively. The second logic unit 122 is electrically connected to the battery unit 123, the clamp module 13 and the first interface of the general CPU 11, respectively. The first logic unit 121 is used to turn off after the anti-disassembly switch 20 is disconnected, so that the second logic unit 122 outputs a trigger signal. The first logic unit 121 is also used to turn off according to the clamp signal, so that the second logic unit 122 keeps outputting the trigger signal. The second logic unit 122 is also used to pull the trigger signal to the second level signal according to the first level signal. The battery unit 123 is used to power the second logic unit 122.
[0052] In the embodiment of the present application, when the POS machine is in the power-on state, the general CPU 11 works normally. When the anti-disassembly switch 20 on the POS machine is disconnected, the first logic unit 121 is turned off, so that the second logic unit 122 outputs a trigger signal. The clamping module 13 is used to output a clamping signal to the first logic unit 121 according to the trigger signal, and the first logic unit 121 is used to turn off according to the clamping signal, so that the second logic unit 122 keeps outputting the trigger signal, and realizes the function of latching the trigger signal, ensuring that the general CPU 11 can detect that the anti-disassembly switch 20 has been disconnected. When the POS machine is in the power-on state, the general CPU 11 receives the trigger signal in real time, and outputs an abnormal signal to the POS machine according to the trigger signal, informing the POS machine that it is in an abnormal state. After receiving the abnormal signal, the POS machine will respond in time to ensure the safety of the POS machine.
[0053] When the POS machine is in the shutdown state, the general CPU 11 does not work. When the anti-disassembly switch 20 on the POS machine is disconnected, although the general CPU 11 does not work, the first logic unit 121 is still in the shutdown state, so that the second logic unit 122 still outputs the trigger signal, ensuring that the POS machine can still detect in real time whether the anti-disassembly switch 20 is disconnected in the shutdown state. The clamping module 13 is used to output the clamping signal to the first logic unit 121 according to the trigger signal, and the first logic unit 121 is used to shut down according to the clamping signal, so that the second logic unit 122 keeps outputting the trigger signal, realizing the role of latching the trigger signal, ensuring that the anti-disassembly switch 20 can be detected by the general CPU 11 as long as it has been disconnected. Since the POS machine is in the shutdown state, the general CPU 11 can only receive the trigger signal after the POS machine is turned on, and output an abnormal signal to the POS machine according to the trigger signal, informing the POS machine that it is in an abnormal state. After receiving the abnormal signal, the POS machine will respond in time to ensure the safety of the POS machine.
[0054] The POS machine will respond in time after receiving the abnormal signal. When the POS machine handles the abnormal state, it will output an unlocking signal to the general CPU 11. The general CPU 11 outputs a first level signal to the second logic unit 122 according to the unlocking signal. The second logic unit 122 pulls the trigger signal to the second level signal according to the first level signal, so that the clamping module 13 stops outputting the clamping signal, that is, the clamping module 13 fails. Since the POS machine has released the abnormal state, the anti-disassembly switch 20 is closed again. Due to the existence of the first logic unit 121 and the second logic unit 122, the anti-disassembly switch detection circuit 10 is restored to detect whether the anti-disassembly switch 20 is disconnected.
[0055] Exemplarily, the battery unit 123 may be a single battery or a plurality of single batteries connected in series, wherein the single battery may be a button battery or a lithium battery. The present application adopts the battery unit 123 to reduce the power consumption of the POS terminal.
[0056] like Figure 5 As shown, the first logic unit 121 includes a first resistor R1 and a first switch tube Q1, the first end of the first resistor R1 is used to be electrically connected to the anti-disassembly switch 20, the second end of the first resistor R1 is electrically connected to the clamping module 13 and the control end of the first switch tube Q1 respectively, the first conduction end of the first switch tube Q1 is electrically connected to the second logic unit 122 and the second interface of the general CPU 11 respectively, and the second conduction end of the first switch tube Q1 is used to be grounded. Among them, the first resistor R1 plays a role of voltage division and current limiting.
[0057] In the embodiment of the present application, after the anti-tamper switch 20 is turned off, the first switch tube Q1 is turned off, that is, the first logic unit 121 is turned off.
[0058] like Figure 6 As shown, according to actual needs, the first logic unit 121 also includes a second resistor R2 and a first diode D1, the anode of the first diode D1 is electrically connected to the second end of the first resistor R1, the cathode of the first diode D1 is electrically connected to the first end of the second resistor R2 and the control end of the first switch tube Q1, and the second end of the second resistor R2 is grounded. The second resistor R2 plays a pull-down role. The first diode D1 plays a voltage-reducing and voltage-dividing role.
[0059] Exemplarily, the first switch tube Q1 is an NPN transistor or an NMOS (N-Metal-Oxide-Semiconductor) tube.
[0060] like Figure 5 or Figure 6 As shown, the second logic unit 122 includes a third resistor R3, a fourth resistor R4 and a second switch tube Q2. The first end of the third resistor R3 and the first end of the fourth resistor R4 are both electrically connected to the battery unit 123. The second end of the third resistor R3 is electrically connected to the first logic unit 121, the control end of the second switch tube Q2 and the second interface of the general CPU 11 respectively. The second end of the fourth resistor R4 is electrically connected to the clamp module 13, the first conduction end of the second switch tube Q2 and the first interface of the general CPU 11 respectively. The second conduction end of the second switch tube Q2 is used for grounding. Figure 5 or Figure 6 It can be seen that the second end of the third resistor R3 is electrically connected to the first conduction end of the first switch tube Q1, the control end of the second switch tube Q2 and the second interface of the general CPU 11. The third resistor R3 and the fourth resistor R4 play a pull-up role.
[0061] In the embodiment of the present application, after the anti-tamper switch 20 is disconnected, the first logic unit 121 is turned off, and under the pull-up effect of the third resistor R3, Figure 6 The voltage V2 in is at a high level, the second switch tube Q2 is turned on, and the output trigger signal is a low level signal.
[0062] After the anti-dismantling switch 20 is disconnected, when the general CPU 11 receives the unlocking signal, it outputs the first level signal to the second logic unit 122, that is, outputs the first level signal to the control end of the second switch tube Q2. The first level signal is low level, and the second switch tube Q2 is disconnected. Due to the pull-up effect of the fourth resistor R4, the trigger signal is forced to be pulled to the second level signal. The second level signal is a high level signal, which makes the clamping module 13 invalid. Due to the existence of the first logic unit 121 and the second logic unit 122, the anti-dismantling switch detection circuit 10 is restored to be able to detect whether the anti-dismantling switch 20 is disconnected.
[0063] Exemplarily, the second switch tube Q2 is an NPN transistor or an NMOS tube.
[0064] like Figure 5 or Figure 6 As shown, the clamping module 13 includes a clamping diode D2, the anode of the clamping diode D2 is electrically connected to the first logic unit 121, and the cathode of the clamping diode D2 is electrically connected to the second logic unit 122 and the first interface of the general CPU 11 respectively. Figure 6 It can be seen that the anode of the clamping diode D2 is electrically connected to the second end of the first resistor R1 , and the cathode of the clamping diode D2 is electrically connected to the first conduction end of the second switch tube Q2 and the first interface of the general CPU 11 .
[0065] Combine the following Figure 6 , Figure 7 and Figure 8 The working principle of the anti-tamper switch detection circuit 10 provided in one embodiment of the present application is described.
[0066] The overall testing process is as follows Figure 7 As shown, there are three states involved: initial state, trigger state, and de-trigger state. Figure 6 and Figure 8 The above states are introduced separately:
[0067] 1) Initial state:
[0068] The first signal S1 is at a high level, and the anti-dismantling switch 20 is closed. At this time, the voltage V1 is at a high level, the first switch tube Q1 is turned on, the voltage V2 is at a low level, and the second switch tube Q2 is disconnected. Due to the pull-up effect of the fourth resistor R4, the output trigger signal is at a high level. At this time, the general CPU 11 sets the second interface to a high impedance state or an input state. The first interface of the general CPU 11 receives a high level, indicating that the anti-dismantling switch 20 is in a closed state, and the POS machine is in a normal state.
[0069] 2) Trigger status:
[0070] The anti-tamper switch 20 is disconnected. Due to the pull-down effect of the second resistor R2, the voltage V1 is at a low level at this time, and the first switch tube Q1 is disconnected. Due to the pull-up effect of the third resistor R3, the voltage V2 is at a high level at this time. Then, the second switch tube Q2 is turned on at this time, and the output trigger signal is at a low level. The first interface of the general CPU 11 receives the low level, indicating that the anti-tamper switch 20 is in the disconnected state. At the same time, due to the presence of the clamping diode D2 and the first resistor R1, regardless of whether the state of the anti-tamper switch 20 is closed or disconnected, the voltage V1 can be effectively clamped at a low level. When the voltage V1 is clamped to a low level by the clamping diode D2, the first switch tube Q1 can be effectively disconnected, thereby ensuring that the output trigger signal always remains at a low level. Therefore, even if the POS machine is in the off state, once the anti-tamper switch 20 is disconnected, the disconnected state of the anti-tamper switch 20 can be effectively maintained. When the POS machine is turned on, the general CPU 11 can detect the trigger signal and output an abnormal signal to the POS machine, informing the POS machine that it is in an abnormal state. After receiving the abnormal signal, the POS machine will respond in time to ensure the safety of the POS machine.
[0071] 3) Untrigger status:
[0072] The POS machine will respond promptly after receiving the abnormal signal. When the POS machine handles the abnormal state, the disconnected state of the anti-tamper switch 20 is released and closed again. In order to effectively detect the next disconnected state of the anti-tamper switch 20, the anti-tamper switch detection circuit 10 needs to be restored at this time so that the trigger signal can feedback the level of the voltage V1 in real time. When the disconnected state of the anti-dismantling switch 20 is released, the POS machine will output an unlocking signal to the general CPU 11. The general CPU 11 outputs a first level signal to the control end of the second switch tube Q2 according to the unlocking signal. The first level signal is low level, and the second switch tube Q2 is disconnected at this time. The trigger signal is pulled to the second level signal by the fourth resistor R4, and the second level signal is high level. At this time, the clamping effect of the clamping diode D2 fails. Due to the closure of the anti-dismantling switch 20 and the existence of the first resistor R1, the voltage V1 is pulled to a high level, the first switch tube Q1 is turned on, the voltage V2 is low level, and the second switch tube Q2 is disconnected, so that the level of the trigger signal is consistent with that of the voltage V1. At this time, the general CPU 11 sets the second interface to a high impedance state or an input state, which can ensure that the trigger signal feeds back the level change of the voltage V1 in real time, that is, the anti-dismantling switch detection circuit 10 is restored to be able to detect whether the anti-dismantling switch 20 is disconnected.
[0073] It should be noted that the first signal S1 may be a high level signal provided by the battery unit 123 or other general high level signals.
[0074] like Figure 4 As shown, the logic module 12 includes a first logic unit 121, a second logic unit 122 and a battery unit 123. The battery unit 123 is electrically connected to the first logic unit 121 and the second logic unit 122 respectively. The first logic unit 121 is electrically connected to the anti-disassembly switch 20, the clamp module 13 and the second logic unit 122 respectively. The second logic unit 122 is electrically connected to the clamp module 13, the first interface of the general CPU 11 and the second interface of the general CPU 11 respectively. The first logic unit 121 is used to output a first logic signal to the second logic unit 122 after the anti-disassembly switch 20 is disconnected. The second logic unit 122 is used to output a trigger signal according to the first logic signal. The first logic unit 121 is also used to output the first logic signal to the second logic unit 122 according to the clamp signal. The battery unit 123 is used to supply power to the first logic unit 121 and the second logic unit 122.
[0075] In the embodiment of the present application, when the POS machine is in the power-on state, the general CPU 11 works normally. When the anti-disassembly switch 20 on the POS machine is disconnected, the first logic unit 121 is used to output the first logic signal to the second logic unit 122, and the second logic unit 122 is used to output the trigger signal according to the first logic signal. The clamping module 13 is used to output the clamping signal to the first logic unit 121 according to the trigger signal, so that the first logic unit 121 keeps outputting the first logic signal to the second logic unit 122 according to the clamping signal, and the second logic unit 122 keeps outputting the trigger signal according to the first logic signal, so as to achieve the function of latching the trigger signal, and ensure that the general CPU 11 can detect that the anti-disassembly switch 20 has been disconnected. When the POS machine is in the power-on state, the general CPU 11 receives the trigger signal in real time, and outputs an abnormal signal to the POS machine according to the trigger signal, informing the POS machine that it is in an abnormal state. After receiving the abnormal signal, the POS machine will respond in time to ensure the safety of the POS machine.
[0076] When the POS machine is in the shutdown state, the general CPU 11 does not work. When the anti-disassembly switch 20 on the POS machine is disconnected, although the general CPU 11 does not work, the first logic unit 121 still outputs the first logic signal to the second logic unit 122, and the second logic unit 122 still outputs the trigger signal according to the first logic signal, ensuring that the POS machine can still detect in real time whether the anti-disassembly switch 20 is disconnected in the shutdown state. The clamping module 13 is used to output the clamping signal to the first logic unit 121 according to the trigger signal, so that the first logic unit 121 keeps outputting the first logic signal to the second logic unit 122 according to the clamping signal, and the second logic unit 122 keeps outputting the trigger signal according to the first logic signal, realizing the role of latching the trigger signal, ensuring that the anti-disassembly switch 20 can be detected by the general CPU 11 as long as it has been disconnected. Since the POS machine is in the shutdown state, the general CPU 11 can only receive the trigger signal after the POS machine is turned on, and output the abnormal signal to the POS machine according to the trigger signal, informing the POS machine that it is in an abnormal state, and the POS machine will respond in time after receiving the abnormal signal to ensure the safety of the POS machine.
[0077] The POS machine will respond in time after receiving the abnormal signal. After the POS machine handles the abnormal state, it will output an unlocking signal to the general CPU 11. The general CPU 11 outputs a first level signal to the second logic unit 122 according to the unlocking signal. The first level signal directly pulls the trigger signal to the second level signal, so that the clamping module 13 stops outputting the clamping signal, that is, the clamping module 13 fails. Since the POS machine has released the abnormal state, the anti-disassembly switch 20 is closed again. Due to the existence of the first logic unit 121 and the second logic unit 122, the anti-disassembly switch detection circuit 10 is restored to detect whether the anti-disassembly switch 20 is disconnected.
[0078] Exemplarily, the battery unit 123 may be a single battery or a plurality of single batteries connected in series, wherein the single battery may be a button battery or a lithium battery. The present application adopts the battery unit 123 to reduce the power consumption of the POS terminal.
[0079] like Fig. 9 As shown, the first logic unit 121 includes a first resistor R1, a fifth resistor R5 and a first switch tube Q1, the first end of the first resistor R1 is electrically connected to the first end of the fifth resistor R5 and the anti-disassembly switch 20 respectively, the second end of the fifth resistor R5 is electrically connected to the battery unit 123, the second end of the first resistor R1 is electrically connected to the clamping module 13 and the control end of the first switch tube Q1 respectively, the first conduction end of the first switch tube Q1 is electrically connected to the second logic unit 122, and the second conduction end of the first switch tube Q1 is used for grounding. Among them, the first resistor R1 and the fifth resistor R5 play the role of voltage division and current limiting.
[0080] In the embodiment of the present application, after the anti-tamper switch 20 is disconnected, due to the pull-up effect of the fifth resistor R5, the first switch tube Q1 is turned on and outputs a first logic signal to the second logic unit 122, and the first logic signal is a low level.
[0081] After receiving the clamp signal output by the clamp module 13, the first switch tube Q1 is turned on according to the clamp signal, thereby maintaining the output of the first logic signal to the second logic unit 122. The clamp signal is at a high level.
[0082] like Fig. 9 As shown, the second logic unit 122 includes a third resistor R3, a fourth resistor R4 and a second switch tube Q2. The first end of the third resistor R3 and the first end of the fourth resistor R4 are both electrically connected to the battery unit 123. The second end of the third resistor R3 is electrically connected to the first logic unit 121 and the control end of the second switch tube Q2 respectively. The first conduction end of the second switch tube Q2 is electrically connected to the second end of the fourth resistor R4, the first interface of the general CPU 11 and the second interface of the general CPU 11 respectively. The second conduction end of the second switch tube Q2 is used for grounding. Fig. 9 It can be seen that the second end of the third resistor R3 is electrically connected to the first conduction end of the first switch tube Q1 and the control end of the second switch tube Q2 respectively. The third resistor R3 and the fourth resistor R4 play a pull-up role.
[0083] In the embodiment of the present application, after the anti-dismantling switch 20 is disconnected, the signal at the control end of the second switch tube Q2 is a first logic signal. Since the first logic signal is at a low level, the second switch tube Q2 is disconnected. Due to the pull-up effect of the fourth resistor R4, the output trigger signal is at a high level.
[0084] After receiving the abnormal signal, the POS machine will respond in time. After the POS machine handles the abnormal state, it will output an unlocking signal to the general CPU 11. The general CPU 11 outputs a first level signal to the first conduction end of the second switch tube Q2 according to the unlocking signal. The first level signal is a low level. The first level signal directly pulls the trigger signal to the second level signal. The second level signal is a low level, so that the clamping module 13 stops outputting the clamping signal, that is, the clamping module 13 fails. Since the POS machine has released the abnormal state, the anti-disassembly switch 20 is closed again. Due to the existence of the first logic unit 121 and the second logic unit 122, the anti-disassembly switch detection circuit 10 is restored to detect whether the anti-disassembly switch 20 is disconnected.
[0085] like Fig.10 As shown, according to actual conditions, the first logic unit 121 further includes a second resistor R2, a first end of the second resistor R2 is electrically connected to a second end of the first resistor R1, and a second end of the second resistor R2 is grounded. The second resistor R2 plays a pull-down role.
[0086] like Fig.10 As shown, according to actual conditions, the second logic unit 122 further includes a third diode D3, an anode of the third diode D3 is electrically connected to the first conduction end of the second switch tube Q2, and a cathode of the third diode D3 is electrically connected to the second interface of the general CPU 11.
[0087] like Fig. 9 or Fig.10 As shown, the clamping module 13 includes a clamping diode D2 , an anode of the clamping diode D2 is electrically connected to the first conduction end of the second switch tube Q2 , and a cathode of the clamping diode D2 is electrically connected to the second end of the first resistor R1 .
[0088] Combine the following Figure 7 , Fig.10 and Fig.11 The working principle of the anti-tamper switch detection circuit 10 provided in another embodiment of the present application is described.
[0089] The overall testing process is as follows Figure 7 As shown, there are three states involved: initial state, trigger state, and de-trigger state. Fig.10 and Fig.11 The above states are introduced separately:
[0090] 1) Initial state:
[0091] The first signal S1 is at a low level, and the anti-dismantling switch 20 is closed. At this time, the voltage V1 is at a low level, and the first switch tube Q1 is disconnected. Due to the pull-up effect of the third resistor R3, the voltage V2 is at a high level, and the second switch tube Q2 is turned on. The output trigger signal is at a low level. At this time, the general CPU 11 sets the second interface to a high-impedance state or an input state. The first interface of the general CPU 11 receives a low level, indicating that the anti-dismantling switch 20 is in a closed state, and the POS machine is in a normal state.
[0092] 2) Trigger status:
[0093] The anti-dismantling switch 20 is disconnected. Due to the pull-up effect of the fifth resistor R5, the voltage V1 is at a high level at this time, the first switch tube Q1 is turned on, and the voltage V2 is at a low level at this time. Then the second switch tube Q2 is disconnected at this time. Due to the pull-up effect of the fourth resistor R4, the output trigger signal is at a high level. The first interface of the general CPU 11 receives a high level, indicating that the anti-dismantling switch 20 is in the disconnected state. At the same time, due to the presence of the clamping diode D2 and the first resistor R1, no matter whether the state of the anti-dismantling switch 20 is closed or open, the voltage V1 can be effectively clamped at a high level. When the voltage V1 is clamped to a high level by the clamping diode D2, the first switch tube Q1 can be effectively turned on, thereby ensuring that the output trigger signal always maintains a high level. Therefore, even if the POS machine is in the off state, once the anti-dismantling switch 20 is disconnected, the disconnected state of the anti-dismantling switch 20 can be effectively maintained. When the POS machine is turned on, the general CPU 11 can detect the trigger signal and output an abnormal signal to the POS machine, informing the POS machine that it is in an abnormal state. After receiving the abnormal signal, the POS machine will respond in time to ensure the safety of the POS machine.
[0094] 3) Untrigger status:
[0095] The POS machine will respond promptly after receiving the abnormal signal. When the POS machine handles the abnormal state, the disconnected state of the anti-tamper switch 20 is released and closed again. In order to effectively detect the next disconnected state of the anti-tamper switch 20, the anti-tamper switch detection circuit 10 needs to be restored at this time so that the trigger signal can feedback the level of the voltage V1 in real time. When the disconnected state of the anti-dismantling switch 20 is released, the POS machine will output an unlocking signal to the general CPU 11. The general CPU 11 outputs a first level signal to the cathode of the third diode D3 according to the unlocking signal. The first level signal is low level, and the trigger signal is forcibly pulled to the second level signal. The second level signal is low level. At this time, the clamping effect of the clamping diode D2 fails. Due to the closure of the anti-dismantling switch 20 and the existence of the first resistor R1, the voltage V1 is pulled to a low level, the first switch tube Q1 is not turned on, the voltage V2 is high level, and the second switch tube Q2 is turned on, so that the level of the trigger signal is consistent with that of the voltage V1. At this time, the general CPU 11 sets the second interface to a high impedance state or an input state, which can ensure that the trigger signal feeds back the level change of the voltage V1 in real time, that is, the anti-dismantling switch detection circuit 10 is restored to be able to detect whether the anti-dismantling switch 20 is disconnected.
[0096] It should be noted that the first signal S1 may be a ground signal or other general low-level signals.
[0097] The present application also provides other alternative solutions: when multiple anti-dismantling switches 20 are connected in parallel on the POS machine, the anti-dismantling switch detection circuit 10 can be expanded in parallel, and the GPIO interface of the processor CPU 11 can be increased accordingly to increase the number of detection paths.
[0098] It should be noted that once the anti-dismantling switch detection circuit composed of a security CPU in the prior art detects that the anti-dismantling switch 20 is disconnected, the key in the security CPU will be cleared. However, the anti-dismantling switch detection circuit 10 provided in the embodiment of the present application can, according to actual needs, not clear the encryption key in the general CPU, thereby making the status detection and control of the anti-dismantling switch 20 more flexible.
[0099] The present application also provides a POS machine, such as Fig. 9 As shown, the POS machine 9 includes an anti-tamper switch 20 and the anti-tamper switch detection circuit 10 described above, and the anti-tamper switch 20 is electrically connected to the logic module in the anti-tamper switch detection circuit 10. Since the POS provided in the embodiment of the present application adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought by the technical solutions of the above embodiments, which will not be described one by one here.
[0100] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A tamper-proof switch detection circuit, characterized in that: It includes a general CPU, a logic module and a clamp module, wherein the first interface of the general CPU is electrically connected to the logic module and the clamp module respectively, and the logic module is electrically connected to the clamp module and the anti-disassembly switch on the POS machine respectively; The logic module is used to output a trigger signal after the anti-dismantling switch is disconnected; the clamp module is used to output a clamp signal to the logic module according to the trigger signal, so that the logic module keeps outputting the trigger signal; the general CPU is used to output an abnormal signal to the POS machine according to the trigger signal.
2. The anti-tamper switch detection circuit according to claim 1, characterized in that: The second interface of the general CPU is also electrically connected to the logic module; The general CPU is used to output a first level signal to the logic module according to the unlocking signal output by the POS machine after the anti-disassembly switch is disconnected, pull the trigger signal output by the logic module to a second level signal, and make the clamping module stop outputting the clamping signal.
3. The anti-tamper switch detection circuit according to claim 2, characterized in that: The logic module includes a first logic unit, a second logic unit and a battery unit, the first logic unit is electrically connected to the anti-tamper switch, the clamp module, the second logic unit and the second interface of the general CPU respectively, and the second logic unit is electrically connected to the battery unit, the clamp module and the first interface of the general CPU respectively; The first logic unit is used to shut down after the anti-dismantling switch is disconnected, so that the second logic unit outputs the trigger signal; the first logic unit is also used to shut down according to the clamping signal, so that the second logic unit continues to output the trigger signal; the second logic unit is also used to pull the trigger signal to the second level signal according to the first level signal; the battery unit is used to power the second logic unit.
4. The anti-tamper switch detection circuit according to claim 3, characterized in that: The first logic unit includes a first resistor and a first switch tube, the first end of the first resistor is used to be electrically connected to the anti-disassembly switch, the second end of the first resistor is electrically connected to the clamping module and the control end of the first switch tube respectively, the first conduction end of the first switch tube is electrically connected to the second logic unit and the second interface of the general CPU respectively, and the second conduction end of the first switch tube is used for grounding.
5. The anti-tamper switch detection circuit according to claim 3, characterized in that: The second logic unit includes a third resistor, a fourth resistor and a second switch tube. The first end of the third resistor and the first end of the fourth resistor are both electrically connected to the battery unit. The second end of the third resistor is respectively electrically connected to the first logic unit, the control end of the second switch tube and the second interface of the general CPU. The second end of the fourth resistor is respectively electrically connected to the clamping module, the first conduction end of the second switch tube and the first interface of the general CPU. The second conduction end of the second switch tube is used for grounding.
6. The anti-tamper switch detection circuit according to claim 3, characterized in that: The clamping module comprises a clamping diode, an anode of the clamping diode is electrically connected to the first logic unit, and a cathode of the clamping diode is electrically connected to the second logic unit and the first interface of the general CPU respectively.
7. The anti-tamper switch detection circuit according to claim 2, characterized in that: The logic module includes a first logic unit, a second logic unit and a battery unit, the battery unit is electrically connected to the first logic unit and the second logic unit respectively, the first logic unit is electrically connected to the anti-disassembly switch, the clamp module and the second logic unit respectively, and the second logic unit is electrically connected to the clamp module, the first interface of the general CPU and the second interface of the general CPU respectively; The first logic unit is used to output a first logic signal to the second logic unit after the anti-dismantling switch is disconnected; the second logic unit is used to output the trigger signal according to the first logic signal; the first logic unit is also used to output the first logic signal to the second logic unit according to the clamping signal; the battery unit is used to supply power to the first logic unit and the second logic unit.
8. The anti-tamper switch detection circuit according to claim 7, characterized in that: The first logic unit includes a first resistor, a fifth resistor and a first switch tube, the first end of the first resistor is electrically connected to the first end of the fifth resistor and the anti-disassembly switch respectively, the second end of the fifth resistor is electrically connected to the battery unit, the second end of the first resistor is electrically connected to the clamping module and the control end of the first switch tube respectively, the first conduction end of the first switch tube is electrically connected to the second logic unit, and the second conduction end of the first switch tube is used for grounding.
9. The anti-tamper switch detection circuit according to claim 7, characterized in that: The second logic unit includes a third resistor, a fourth resistor and a second switch tube. The first end of the third resistor and the first end of the fourth resistor are both electrically connected to the battery unit. The second end of the third resistor is electrically connected to the control end of the first logic unit and the second switch tube respectively. The first conduction end of the second switch tube is electrically connected to the second end of the fourth resistor, the first interface of the general CPU and the second port of the general CPU respectively. The second conduction end of the second switch tube is used for grounding.
10. A POS machine, characterized in that: It comprises an anti-dismantling switch and the anti-dismantling switch detection circuit according to any one of claims 1 to 9, wherein the anti-dismantling switch is electrically connected to a logic module in the anti-dismantling switch detection circuit.
Citation Information
Cited By
Tamper detection circuit and communication device
WO2026114072A1
