Subway gate ticket evasion prevention system and method based on capacitive sensor
Technical Field
The invention relates to the technical field of sensors, in particular to a subway gate ticket evasion prevention system and method based on a capacitive sensor.
Background
At present, the ticket evasion prevention device mainly adopts sensors such as an infrared sensor and a pressure sensor. The principle of the infrared alarm system adopting the infrared sensor is as follows: the infrared emission module emits infrared rays, the infrared receiver receives the infrared rays, and then whether the infrared receiver receives the infrared rays is checked, if not, an alarm is given. The principle of the pressure alarm system adopting the pressure sensor is as follows: and alarming once the weight is higher than the self-set threshold value. It is obvious that the above-mentioned anti-ticket-evasion system cannot identify people/things. Although the above anti-ticket-evasion devices have been popular, their local, indistinguishable human/object drawbacks are fatal, not suitable for large-area human behavior determination, and costly. At present, ticket evasion events occur frequently through subway gates, and the ticket evasion brings great economic loss to the country.
Disclosure of Invention
The invention aims to provide a subway gate ticket evasion prevention system and method based on a capacitive sensor, which can accurately identify people and objects for behaviors on the ground upper surfaces of a long guard rail, gates and gate inlet and outlet, can give an alarm in time, and uploads data to an APP (application) end of a guard mobile phone.
In order to achieve the above object, the present invention has the following configurations:
the invention provides a subway gate ticket evasion prevention system based on a capacitive sensor, which comprises a copper foil, a power supply module, a controller, the capacitive sensor, a voice broadcasting module, a 4G transparent transmission module, an APP (application) end, a voltage reduction module and a steering engine, wherein the power supply module is connected with the controller; wherein: the power supply module is used for supplying power to the controller, the capacitive sensor, the voice broadcast module, the 4G transparent transmission module, the APP terminal, the voltage reduction module and the steering engine, and the 4G transparent transmission module is used for communicating with the APP terminal of the mobile phone through the cloud server;
the copper foil is arranged at a position to be detected, the input end of the capacitance sensor is connected to an LC oscillation circuit, the copper foil is connected with the LC oscillation circuit, when a person approaches the copper foil, the oscillation frequency of the LC oscillation circuit changes, and the controller is connected with the capacitance sensor and used for receiving the detection value of the capacitance sensor;
the capacitive sensor is provided with four channels: the gate comprises a first channel, a second channel and a third channel, wherein the first channel is used for detecting the change value of an LC oscillating circuit corresponding to a copper foil at the front part of a gate, the second channel is used for detecting the change value of an LC oscillating circuit corresponding to a copper foil at the rear part of the gate, and the third channel is used for detecting the change value of an LC oscillating circuit corresponding to an upper surface copper foil at the left side (including a long guard rail) of the gate; and the fourth channel is used for detecting the change value of the LC oscillating circuit corresponding to the upper surface copper foil on the right side (including the long guard rail) of the gate.
The controller receives the detection value of each channel of the capacitance sensor and judges whether the detection value of the first channel of the capacitance sensor is larger than a preset threshold value or the detection values of the third channel and the fourth channel of the capacitance sensor are larger than a preset threshold value, if so, the controller controls the voice broadcast module to play preset prompt information and controls the 4G passthrough module to send an alarm signal to the APP end of the mobile phone, if the detection value of each channel of the capacitance sensor is smaller than or equal to the preset threshold value and detects that a passenger swipes the card, the controller controls the steering engine to rotate to reserve an angle, a gate is opened, the controller continues to judge whether the detection value of the first channel of the capacitance sensor is larger than the preset threshold value, if so, the controller controls the steering engine to reverse to reserve the angle, the gate is closed, the controller controls the voice broadcast module to play preset prompt information and controls the controller to control the gate 4G passes through the module to cell-phone APP end sends alarm signal, if the floodgate machine is opened the back, the detected value of capacitive sensor's first passageway is less than or equal to and predetermines the threshold value, then the controller judges whether the detected value of capacitive sensor's second passageway is greater than and predetermines the threshold value, if yes, then the controller control the steering wheel reversal is booked the angle, closes the floodgate machine.
Optionally, the controller develops the board using STM32F 103.
Optionally, the capacitive sensor employs an FDC2214 capacitive sensor.
Optionally, the LC oscillating circuit includes an inductor and a capacitor, and the copper foil is connected to the capacitor.
Optionally, the controller collects a preset number of detection values from the capacitive sensor within a preset time, removes a maximum value and a minimum value of the collected detection values, calculates a mean value of the remaining detection values, and uses the mean value as the detection value of the capacitive sensor.
Optionally, the controller sends an alarm signal to the 4G transparent transmission module through a serial port.
Optionally, the controller controls the steering engine to rotate by a preset angle, so that when the gate is opened, if the gate is influenced by external force and is not opened, the controller continuously sends a gate rotation signal to the steering engine to enable the steering engine to rotate by the preset angle, and the gate is opened;
if the detection value of the first channel of the capacitive sensor is smaller than or equal to a preset threshold value before the gate is opened, and the detection values of the third channel and the fourth channel are smaller than or equal to the preset threshold value, the controller waits for the passenger to swipe the card, if the passenger is not detected to swipe the card within a preset interval time, and after the preset waiting time, whether the detection values of the first channel and the third channel and the fourth channel are larger than the preset threshold value is continuously judged;
after the gate is opened, if the detection value of the first channel of the capacitive sensor is smaller than or equal to a preset threshold value and the detection value of the second channel is smaller than or equal to the preset threshold value, after a preset waiting time, whether the detection value of the first channel is larger than the preset threshold value or not is continuously judged.
The embodiment of the invention also provides a subway gate ticket-evading prevention method based on the capacitive sensor, which adopts the subway gate ticket-evading prevention system based on the capacitive sensor, and the method comprises the following steps:
a1: starting an anti-ticket-evasion method program;
a2: the ticket evasion prevention program is in standby, and the controller receives the detection value of each channel of the capacitive sensor;
a3: the controller judges whether the detection values of the third channel and the fourth channel of the capacitive sensor are larger than a preset threshold value, if so, the step A13 is continued, otherwise, the step A2 is continued;
a4: the controller judges whether the detection value of the first channel of the capacitive sensor is larger than a preset threshold value, if so, the step A13 is continued, otherwise, the step A5 is continued;
a5: waiting for the passenger to swipe the card;
a6: if the card swiping is detected, the controller controls the steering engine to rotate by a preset angle, the gate is opened, whether the gate is opened or not is judged, if yes, the step A9 is continued, and if not, the step A8 is continued;
a7: if the card swiping is not detected, delaying the preset waiting time and continuing to the step A4;
a8: if the gate is influenced by external force and is not opened, the controller continuously sends a gate rotation signal to open the gate; and continues with step a 9;
a9: the controller judges whether the detection value of the first channel of the capacitive sensor is larger than a preset threshold value, if so, the step A11 is continued, otherwise, the step A10 is continued;
a10: the controller judges whether the detection value of the second channel of the capacitive sensor is larger than a preset threshold value, if so, the step A12 is continued, otherwise, the step A15 is continued;
a11: the controller controls the steering engine to rotate reversely by a preset angle, the gate is closed, and then the step A13 is continued;
a12: the controller controls the steering engine to rotate reversely by a preset angle, the gate is closed, and then the step A14 is continued;
a13: the controller controls the voice broadcasting module to play preset prompt information, controls the 4G transparent transmission module to send an alarm signal to the mobile phone APP terminal, and then continues to the step A14;
a14: ending the anti-ticket evasion method program;
a15: after a preset wait time, step a4 continues.
Optionally, in the step a2, the controller receives the detection values of the channels of the capacitance sensor, and includes the following steps:
the controller collects a preset number of detection values from the capacitance sensor within a preset time;
the controller removes the maximum value and the minimum value in the collected detection values, calculates the average value of the rest detection values, and takes the average value as the detection value of the capacitance sensor.
The subway gate anti-ticket-evasion system and method based on the capacitive sensor have the following beneficial effects that:
(1) the FDC2214 capacitive sensor adopts a narrowband-based innovative architecture, can highly suppress noise and interference, provides high resolution under a high-speed condition, can perfectly replace the existing sensor, and fills the defects of locality of an anti-ticket-evasion device and incapability of distinguishing people and objects;
(2) the invention is based on the principle of the LC resonance circuit, can realize the accurate recognition of people and objects, and is suitable for judging the behaviors of people in a large area;
(3) when the ticket evasion behavior is found, the invention can timely inform the guard, and can adopt the voice broadcasting module to play the preset prompt information, thereby effectively reducing the ticket evasion behavior and being suitable for large-scale popularization and application.
Drawings
Fig. 1 is a schematic structural diagram of a subway gate ticket evasion prevention system based on a capacitive sensor according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for preventing ticket evasion of a subway gate based on a capacitive sensor according to an embodiment of the present invention;
fig. 3 is a schematic circuit diagram of a subway gate ticket evasion prevention system based on a capacitive sensor according to an embodiment of the present invention;
fig. 4 and 5 are schematic views showing that the copper foil of the measured end of the LC oscillating circuit of the present invention is mounted on the upper surface of the ground at the entrance and exit of the guard rail, the gate, and the gate, wherein fig. 4 is an exploded view at the time of mounting, and fig. 5 is a schematic view after the mounting is completed.
Detailed Description
The invention will be further illustrated with reference to the following specific examples. It should be understood that these examples are for illustrative purposes only and are not intended to limit the scope of the present invention. Further, it should be understood that various changes or modifications of the present invention may be made by those skilled in the art after reading the teaching of the present invention, and such equivalents may fall within the scope of the present invention as defined in the appended claims.
As shown in fig. 1, in order to solve the technical problems in the prior art, the invention provides a subway gate ticket evasion prevention system based on a capacitive sensor, which comprises a copper foil b1, a power module 1, a controller 2, a capacitive sensor 3, a voice broadcasting module 4, a 4G transparent transmission module 5, an APP end 6, a voltage reduction module 7 and a steering engine 8; wherein: power module 1 is used for doing controller 2, capacitive sensor 3, voice broadcast module 4, 4G pass module 5, APP end 6, step-down module 7, the steering wheel 8 power supply thoroughly, 4G passes module 5 thoroughly and is used for communicating through high in the clouds server and cell-phone APP end 6.
The copper foil b1 is installed at a position to be measured, the input end of the capacitance sensor 3 is connected to an LC oscillation circuit, the copper foil b1 is connected with the LC oscillation circuit, and if someone approaches the copper foil b1, the oscillation frequency of the LC oscillation circuit changes; controller 2 with capacitive sensor 3 is connected for receive capacitive sensor 3's detected value, controller 2 detects when capacitive sensor 3's detected value is greater than preset threshold value, judges that someone is located the position of awaiting measuring at present, then controller 2 control 4G passes through transmission module 5 to cell-phone APP end 6 sends alarm signal, just controller 2 control voice broadcast module 4 broadcasts predetermined prompt information, just controller 2 control steering wheel 8 is rotatory to be predetermine the angle. The mobile phone APP terminal 6 can be a mobile phone APP terminal of a guard of a subway gate, so that the invention can inform the guard and other staff in time when detecting that someone escapes the ticket. The voice broadcasting module 4 broadcasts prompt information to remind ticket evasion personnel to swipe cards to enter. The 4G transparent transmission module 5 sends the alarm signal to the cloud server, and the mobile phone APP terminal 6 can read related data from the cloud server.
In this embodiment, the controller 2 develops a board for the STM32F 103. Preferably, the capacitive sensor 3 is an FDC2214 capacitive sensor, which has the characteristics of low cost and excellent performance, the FDC2214 capacitive sensor adopts a narrowband-based innovative architecture, can highly suppress noise and interference, provides high resolution under a high-speed condition, can perfectly replace the existing sensor, and fills the defects of the locality of the ticket evasion prevention device and incapability of distinguishing people and objects.
Fig. 3 shows a schematic circuit diagram of the subway gate ticket evasion prevention system according to an embodiment of the present invention. In this embodiment, the LC oscillating circuit includes an inductor and a capacitor, and the copper foil b1 is connected to the capacitor. Further, in this embodiment, the capacitance sensor 3 includes a plurality of channel input terminals, and an LC oscillating circuit is connected to each of the channel input terminals. The capacitive sensor is provided with four channels: the gate comprises a first channel, a second channel and a third channel, wherein the first channel is used for detecting the change value of an LC oscillating circuit corresponding to a copper foil at the front part of a gate, the second channel is used for detecting the change value of an LC oscillating circuit corresponding to a copper foil at the rear part of the gate, and the third channel is used for detecting the change value of an LC oscillating circuit corresponding to an upper surface copper foil at the left side (including a long guard rail) of the gate; and the fourth channel is used for detecting the change value of the LC oscillating circuit corresponding to the upper surface copper foil on the right side (including the long guard rail) of the gate.
In this embodiment, the controller 2 uses a mean value filtering algorithm to collect a preset number of detection values from the capacitive sensor 3, remove the maximum value and the minimum value of the collected detection values, then calculate a mean value of the remaining detection values, and use the mean value as the detection value of the capacitive sensor 3.
In this embodiment, the controller 2 sends an alarm signal to the 4G transparent transmission module 5 through a serial port.
The embodiment of the invention also provides a subway gate ticket-evading prevention method based on the capacitive sensor, which adopts the subway gate ticket-evading prevention system based on the capacitive sensor, and the method comprises the following steps:
the controller 2 receives a detection value of the capacitance sensor 3;
the controller 2 judges whether the detection value of the capacitance sensor 3 is larger than a preset threshold value;
if yes, the controller 2 judges that a person is located at the position to be detected currently, the controller 2 controls the 4G transparent transmission module 5 to send an alarm signal to the mobile phone APP end 6, the controller 2 controls the voice broadcasting module 4 to broadcast preset prompt information, the controller 2 controls the voltage reduction module 7 to reduce the voltage and then supplies power to the steering engine 8, and the steering engine 8 rotates for a preset angle; if not, the controller 2 continues to receive the detection value of the capacitance sensor 3.
Referring to fig. 2, a flowchart of a method for preventing ticket evasion for a subway gate according to an embodiment of the present invention is shown, where the method specifically includes an S3 average filtering algorithm, specifically, 10 values are read in a short time (here, the 10 values are merely examples, specifically, the values may be selected as needed, and the length of the short time may also be selected as needed), and then an average value is obtained after the maximum and minimum values are removed, so that some noises can be effectively removed. After the program A1 starts, the system enters the standby state A2, the capacitive sensor 3 is used for acquiring the oscillation frequencies of the LC circuits on the guard rail and the ground respectively during standby, the oscillation frequencies are sent to the controller 2, then the controller 2 performs mean value filtering on the acquired data, and the controller 2 judges: the controller 2 receives detection values of channels of the capacitive sensor, executes steps A4 and A3, and judges whether the channels 1 and 3 of the capacitive sensor 3 are larger than a preset threshold value, wherein A4 is to judge whether data of an FDC2214 channel 1 (a front copper foil of a gate) is larger than the preset threshold value, and A3 is to judge whether data of the FDC2214 channel 3 (a left upper surface copper foil of the gate (including a long guard rail) and a right upper surface copper foil of the gate 4 (including a long guard rail)) are larger than the preset threshold value;
if yes, continuing to step A13, controlling a voice broadcasting module 4 to play preset prompt information by the controller 2, and controlling the 4G transparent transmission module 5 to send an alarm signal to the mobile phone APP terminal 6 by the controller 2;
if not, A5 waits for the passenger to swipe the card, if not, A7 delays for 10 milliseconds, and continues to determine whether channels 1 and 3 of the capacitive sensor 3 are greater than the preset threshold value.
If the card swiping is detected in the step A5, the controller A6 controls the steering engine 8 to rotate by a preset angle, the gate is opened, if the gate is influenced by external force and is not opened, the controller 2 continuously sends a gate rotation signal, and the gate is opened by the step A8; and whether the A9 judges that the channel 1 of the capacitive sensor 3 is larger than a preset threshold value or not is continued, if so, the steering engine 8 rotates reversely by a preset angle, the A11 closes the gate, the A13 controller 2 controls the voice broadcast module 4 to play preset prompt information, and the A14 controller 2 controls the 4G passthrough module 5 to send an alarm signal to the mobile phone APP end 6 to return to the end.
If the channel 1 of the capacitive sensor 3 is smaller than the preset threshold value, A10 judges whether the detection value of the channel 2 of the capacitive sensor 3 is larger than the preset threshold value; if yes, the steering engine 8 reversely rotates for a preset angle, A12 closes the gate, and the return is finished at A14.
If the channel 2 of the capacitive sensor 3 is smaller than the preset threshold value, delaying for ten milliseconds, A4 continuously judges whether the detection value of the channel 1 of the capacitive sensor 3 is larger than the preset threshold value, and the above process is repeated.
Referring to fig. 4 and 5, in this embodiment, B1 is a copper foil, and B2 and B3 are floors of guard rails, gates, and gate inlets and outlets to which the copper foil is attached, and when it is required to install the system provided by the present invention on the floors of guard rails, gates, and gate inlets and outlets of subway gates, the copper foil B1 may be installed on the upper surfaces of the guard rails B2 and the gates B3, and on the floors of gate inlets and outlets.
The subway gate ticket evasion prevention system and method based on the capacitive sensor 3 have the following beneficial effects:
(1) the capacitive sensor 3 is adopted, and further the FDC2214 capacitive sensor 3 can be selected, so that the capacitive sensor has the characteristics of low cost and excellent performance, the FDC2214 capacitive sensor 3 adopts a narrowband-based innovative framework, can highly inhibit noise and interference, provides high resolution under a high-speed condition, can perfectly replace the existing sensor, and fills the defects that the ticket evasion prevention device is local and people/objects cannot be distinguished;
(2) the invention is based on the principle of the LC resonance circuit, can realize the accurate recognition of people and objects, and is suitable for judging the behaviors of people in a large area;
(3) when the ticket evasion behavior is found, the invention can timely inform the guard, and can adopt the voice broadcasting module to play the preset prompt information, thereby effectively reducing the ticket evasion behavior and being suitable for large-scale popularization and application.
In this specification, the invention has been described with reference to specific embodiments thereof. It will, however, be evident that various modifications and changes may be made thereto without departing from the broader spirit and scope of the invention. The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense.