Disclosure of Invention
In order to overcome the above-mentioned drawbacks of the prior art, an embodiment of the present invention provides a tension detection system for processing a fishing line based on data transmission, so as to solve the above-mentioned problems in the prior art.
In order to achieve the above purpose, the invention provides a tension detection system for processing a fish wire based on data transmission, which comprises a data acquisition module, a control module, an alarm module and a display module;
The data acquisition module is used for connecting the tension sensor with the singlechip, acquiring tension data of the fish wire, sending the tension data to the singlechip for processing, and wirelessly transmitting the processed data to the control module;
The control module comprises a singlechip, receives the tension data transmitted by the data acquisition module, transmits the tension data to the display module, sets a tension target value and an alarm threshold value, calculates a tension error by comparing the currently received tension data with the set tension target value, compares the tension error with the set alarm threshold value, and generates an alarm signal when the tension error exceeds the alarm threshold value, and transmits the alarm signal to the alarm module;
The single chip microcomputer is a control unit of the control module and comprises an analog input pin and an output pin, wherein the output of the sensor is connected to the analog input pin of the single chip microcomputer, data from the tension sensor is received, and the control pin of the alarm module is connected to the output pin of the single chip microcomputer so as to trigger an alarm action;
the alarm module is connected with the singlechip, receives an alarm signal from the control module, reads the value of the current tension error, judges the alarm level according to the received signal content, and sends alarm state information to the display module;
The display module is connected with the singlechip, receives and analyzes the data transmitted by the singlechip, and is used for displaying the tension data and the alarm state information of the fishing line.
In a preferred embodiment, the data acquisition module is connected with the single-chip microcomputer through a tension sensor, and is used for acquiring tension data of the fish wire, sending the tension data to the single-chip microcomputer for processing, and wirelessly transmitting the processed data to the control module, and the specific steps are as follows:
Step A1, analog signal conversion: the tension sensor is arranged on the fish wire processing equipment, senses the tension change of the fish wire in the processing process, and outputs an analog electric signal according to the tension change, wherein the magnitude of the analog electric signal is in direct proportion to the tension applied by the fish wire;
step A2, analog-to-digital conversion: an analog-to-digital converter on a singlechip is used for converting an analog electric signal output by a sensor into a digital signal, the digital signal D output by the sensor is converted into a corresponding actual tension value F through measurement and calibration, and tension values of a plurality of sampling points are recorded to obtain the change rate of tension along with time;
The expression of the actual tension value F is as follows: f=k×d+b, where D is a digital signal output by the sensor, k is a scaling factor, and b is an offset used to adjust the offset output by the sensor to more accurately correspond to the zero point of the actual tension;
Step A3, data transmission: after processing the collected tension data, the singlechip adds a time stamp and state information, combines the time stamp, the tension data and the state information into a data frame, packages the data frame, and sends the data frame to the control module, wherein the data frame format comprises a start byte, a time stamp field, a tension data field, a state information field and a check field.
In a preferred embodiment, the control module includes a single chip microcomputer, receives the tension data transmitted from the data acquisition module, transmits the tension data to the display module, sets a tension target value and an alarm threshold, calculates a tension error by comparing the currently received tension data with the set tension target value, compares the tension error with the set alarm threshold, and generates an alarm signal when the tension error exceeds the alarm threshold, and transmits the alarm signal to the alarm module, wherein the specific steps are as follows:
Step B1, setting a tension target value: the single chip microcomputer analyzes the received data frame, extracts tension data F, sets a target tension value, and calculates the current tension error as e=F target -F, wherein e is the tension error, F target is the target tension value, and F is the actual tension value;
And step B2, controlling output: based on the collected fish wire tension data and the set tension target, the singlechip calculates a control output value, converts the calculated control output value into a control signal for controlling tension adjusting equipment, calculates control output by using a PID control algorithm, and has the following specific calculation formula:
P(t)=Kp·e(t)
I(t)=Ki·∫e(t)dt
U(t)=P(t)+I(t)+D(t)
Wherein K p、Ki、Kd is proportional, integral and differential gain parameters of the PID controller, P (t) is proportional control quantity at time t, I (t) is cumulative effect of error at time t, D (t) is variation trend of error at time t, U (t) is output of the PID controller at time t;
Step B3, triggering an alarm: setting an alarm threshold, comparing the calculated tension error with the set alarm threshold, generating an alarm signal by the control module when the tension error exceeds the set alarm threshold, wherein the alarm signal is changed from low level to high level, the state of a control pin can be changed, the generated signal is transmitted to the alarm module, and after the signal is sent, the control module waits for confirmation of the alarm module, and the method further comprises the following steps:
Step B301, setting an alarm threshold value: setting an alarm threshold value as e threshold in a program of the singlechip, storing an alarm trigger value of the tension of the fishing line, and comparing the alarm trigger value with the set alarm threshold value after the control module calculates the tension error each time;
step B302, triggering an alarm condition: when the calculated tension error |e| > e threshold, judging that the tension deviates from the set target range, and controlling the GPIO pin of the alarm module by the singlechip to trigger the alarm action.
In a preferred embodiment, the single chip microcomputer is a core control unit of the control module, and comprises an analog input pin and an output pin, wherein the output of the sensor is connected to the analog input pin of the single chip microcomputer, data from the tension sensor is received, a tension value is calculated, the control pin of the alarm module is connected to the GPIO output pin of the single chip microcomputer to trigger an alarm action, the GPIO pin is a general purpose input/output pin and is configured into an output mode by the single chip microcomputer, and the action of the alarm module is controlled by changing the level state of the GPIO pin, and the specific steps are as follows:
Step S1, calculating a tension value: initializing connection and parameter setting of each module, receiving and processing data from the tension sensor, and converting digital signals into actual tension values by using calibration data and sensitivity of the sensor;
Step S2, comparing a set threshold value: comparing the tension error with a preset alarm threshold value to judge whether the tension exceeds a set safety condition;
step S3, triggering alarm logic: and according to the comparison result, when the tensile force exceeds a set threshold value, triggering alarm logic, controlling an alarm module to send out a signal, and stopping the operation of the equipment.
In a preferred embodiment, the alarm module is connected with the singlechip, receives an alarm signal from the control module, reads the value of the current tension error, judges the alarm level according to the received signal content, and sends alarm state information to the display module, and the specific steps are as follows:
Step C1, connecting a control pin of an alarm module to a GPIO output pin of a singlechip, receiving an alarm signal from the singlechip, judging an alarm level according to the received signal content, and further comprising the following steps:
Step C101, the singlechip reads the state of a connected control pin in a polling mode, when the alarm module detects that the state of the connected GPIO pin is from low level to high level, the starting time and the ending time of a signal are recorded, and the duration of the signal is calculated;
Step C102, judging whether an alarm is triggered according to the received signal, including verifying the stability and duration of the signal, judging whether the signal is stable by comparing the high level duration of the signal, defining a minimum stable time threshold T min, and considering the signal to be stable and triggering the alarm when the signal duration exceeds T min;
Step C103, judging the alarm level: reading the current value of the tension error from the control module, comparing the read tension error with a preset alarm threshold value, judging different alarm levels according to the comparison result, and judging that the alarm is low in level when e threshold<|e|<1.5ethreshold; when 1.5e threshold≤|e|≤2ethreshold is detected, the alarm is judged to be a medium-grade alarm; when |e| > 2e threshold, judging that the alarm is high-level;
step C2, executing an alarm action: when the triggering of the alarm is confirmed, the alarm signal output port is set to be high level to light the LED, and the alarm module is started to make the buzzer sound;
Step C3, resetting and recovering: the method comprises the steps that a reset signal input port is set and used for manually triggering reset operation, the single chip microcomputer monitors that an alarm triggering condition is not met any more, the monitored tension error is recovered to be in a normal range and a manual reset signal is received, the single chip microcomputer stops outputting an alarm signal and triggers the reset operation, the reset operation is that an alarm signal output port is set to be in a low level to extinguish an LED and close a buzzer, the alarm module is stopped to operate and recover a system state to a normal working state, the alarm state is relieved, alarm state information is sent to a connected display module, and the alarm state information comprises triggering time and alarm level.
In a preferred embodiment, the display module is connected with the singlechip, receives and analyzes data transmitted from the singlechip, and displays the data on a display screen in real time, and is used for monitoring and recording tension changes and alarm state information of the fishing line, and the specific steps are as follows:
step D1, displaying in real time: receiving a data frame transmitted from the singlechip, extracting tension data and alarm state information from the data frame, displaying the analyzed data on a display screen in real time, and displaying the change trend of the current tension data in a graphic form by a display module for monitoring the tension of the fishing line;
Step D2, alarm state display: the received data frame contains alarm state information, the display module displays corresponding identifications according to alarm levels, different colors are used on alarm information frames of the display screen to represent different alarm levels, a red frame represents high-level alarm, a yellow frame represents middle-level alarm and a green frame represents low-level alarm;
step D3, recording historical data: a recording function is added in the display module, history data is stored, and the latest alarm event is displayed for later analysis.
The beneficial effects of the invention are as follows: the control module comprises a single chip microcomputer as a control unit, receives the tension data transmitted by the data acquisition module, transmits the tension data to a display module, sets a tension target value and an alarm threshold value, calculates a tension error by comparing the currently received tension data with the set tension target value, compares the tension error with the set alarm threshold value, generates an alarm signal when exceeding the alarm threshold value, transmits the alarm signal to the alarm module, connects the alarm module with the single chip microcomputer, receives the alarm signal from the control module, reads the value of the current tension error, judges the alarm level according to the received signal content, transmits alarm state information to a display module, connects the display module with the single chip microcomputer, receives the data transmitted from the single chip microcomputer, analyzes the data, and is used for displaying the tension data and the alarm state information of the fish wire.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the description of the present application, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more of the described features. In the description of the present application, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
In the description of the present application, the term "for example" is used to mean "serving as an example, instance, or illustration. Any embodiment described as "for example" in this disclosure is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is presented to enable any person skilled in the art to make and use the application. In the following description, details are set forth for purposes of explanation. It will be apparent to one of ordinary skill in the art that the present application may be practiced without these specific details. In other instances, well-known structures and processes have not been described in detail so as not to obscure the description of the application with unnecessary detail. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
Example 1
The embodiment provides a tension detection system for processing a fish wire based on data transmission, which is shown in fig. 1, and specifically comprises a data acquisition module, a control module, an alarm module and a display module;
The data acquisition module is used for connecting the tension sensor with the singlechip, acquiring tension data of the fish wire, sending the tension data to the singlechip for processing, and wirelessly transmitting the processed data to the control module;
The control module comprises a singlechip, receives the tension data transmitted by the data acquisition module, transmits the tension data to the display module, sets a tension target value and an alarm threshold value, calculates a tension error by comparing the currently received tension data with the set tension target value, compares the tension error with the set alarm threshold value, and generates an alarm signal when the tension error exceeds the alarm threshold value, and transmits the alarm signal to the alarm module;
The single chip microcomputer is a control unit of the control module and comprises an analog input pin and an output pin, wherein the output of the sensor is connected to the analog input pin of the single chip microcomputer, data from the tension sensor is received, and the control pin of the alarm module is connected to the output pin of the single chip microcomputer so as to trigger an alarm action;
the alarm module is connected with the singlechip, receives an alarm signal from the control module, reads the value of the current tension error, judges the alarm level according to the received signal content, and sends alarm state information to the display module;
The display module is connected with the singlechip, receives and analyzes the data transmitted by the singlechip, and is used for displaying the tension data and the alarm state information of the fishing line.
In this embodiment, the specific needs to be described is a data acquisition module, the data acquisition module is connected with a tension sensor and a singlechip, and is used for acquiring tension data of a fish wire and sending the data to the singlechip for processing, and the processed data is wirelessly transmitted to a control module, so that data circulation from the tension sensor to the control module is realized, the system is ensured to accurately monitor the tension condition of the fish wire in real time, and control and monitoring capability in the production process are improved, and the specific steps are as follows:
Step A1, analog signal conversion: the tension sensor is arranged on the fish wire processing equipment, senses the tension change of the fish wire in the processing process, and outputs an analog electric signal according to the tension change, wherein the magnitude of the analog electric signal is in direct proportion to the tension applied by the fish wire;
step A2, analog-to-digital conversion: an analog-to-digital converter on a singlechip is used for converting an analog electric signal output by a sensor into a digital signal, the digital signal D output by the sensor is converted into a corresponding actual tension value F through measurement and calibration, and tension values of a plurality of sampling points are recorded to obtain the change rate of tension along with time;
The expression of the actual tension value F is as follows: f=k×d+b, where D is a digital signal output by the sensor, k is a scaling factor, and b is an offset used to adjust the offset output by the sensor to more accurately correspond to the zero point of the actual tension;
step A3, data transmission: after processing the collected tension data, the singlechip adds a time stamp and state information, combines the time stamp, the tension data and the state information into a data frame, packages the data frame and sends the data frame to the control module;
Wherein the data frame format includes a start byte, a timestamp field, a tension data field, a status information field, and a check field.
In this embodiment, a specific need is to specify a control module, where the control module includes a single chip microcomputer, receives the tension data transmitted from the data acquisition module, transmits the tension data to the display module, sets a tension target value and an alarm threshold, calculates a tension error by comparing the currently received tension data with the set tension target value, and compares the tension error with the set alarm threshold, when the tension data exceeds the alarm threshold, the control module generates an alarm signal, and transmits the alarm signal to the alarm module, and sets the tension target value and the alarm threshold so that the system can automatically perform tension control, and by comparing the currently received tension data with the set target value, the system can calculate the tension error, and then adjust the control strategy to keep within an expected range, and the specific steps are as follows:
Step B1, setting a tension target value: the single chip microcomputer analyzes the received data frame, extracts tension data F, sets a target tension value, and calculates the current tension error as e=F target -F, wherein e is the tension error, F target is the target tension value, and F is the actual tension value; the tension target value is a desired target tension, and the alarm threshold value is the maximum value of the allowable tension error;
And step B2, controlling output: based on the collected fish wire tension data and the set tension target, the singlechip calculates a control output value, converts the calculated control output value into a control signal for controlling tension adjusting equipment, calculates control output by using a P ID control algorithm, and controls a tension detection system by using a PID control algorithm, so that the tension detection system can quickly respond to changes, maintain a stable operation state and generate an alarm to prevent system damage when necessary, wherein the specific calculation formula is as follows:
P(t)=Kp·e(t)
I(t)=Ki·fe(t)dt
U(t)=P(t)+I(t)+D(t)
Wherein K p、Ki、Kd is proportional, integral and differential gain parameters of the PID controller, P (t) is proportional control quantity at time t, I (t) is cumulative effect of error at time t, D (t) is variation trend of error at time t, U (t) is output of the PID controller at time t;
Step B3, triggering an alarm: setting an alarm threshold, comparing the calculated tension error with the set alarm threshold, generating an alarm signal by the control module when the tension error exceeds the set alarm threshold, changing the state of the control pin from low level to high level, transmitting the generated signal to the alarm module, and waiting for confirmation of the alarm module by the control module after sending out the signal, thereby being beneficial to quickly finding out abnormal conditions and avoiding equipment damage, and further comprising the following steps:
Step B301, setting an alarm threshold value: setting an alarm threshold value as e threshold in a program of the singlechip, storing an alarm trigger value of the tension of the fishing line, and comparing the alarm trigger value with the set alarm threshold value after the control module calculates the tension error each time;
Step B302, triggering an alarm condition: when the calculated tension error |e| > e threshold, judging that the tension deviates from the set target range, and controlling a GPIO pin of an alarm module by the singlechip to trigger an alarm action;
The single chip microcomputer is a core control unit of the control module and comprises an analog input pin and an output pin, the output of the sensor is connected to the analog input pin of the single chip microcomputer, data from the tension sensor is received, a tension value is calculated, the control pin of the alarm module is connected to the GPIO output pin of the single chip microcomputer so as to trigger an alarm action, the GPIO pin is a general purpose input output pin and is configured into an output mode by the single chip microcomputer, and the action of the alarm module is controlled by changing the level state of the GPIO pin, and the specific steps are as follows:
Step S1, calculating a tension value: initializing connection and parameter setting of each module, receiving and processing data from the tension sensor, and converting digital signals into actual tension values by using calibration data and sensitivity of the sensor;
Step S2, comparing a set threshold value: comparing the tension error with a preset alarm threshold value to judge whether the tension exceeds a set safety condition;
step S3, triggering alarm logic: and according to the comparison result, when the tensile force exceeds a set threshold value, triggering alarm logic, controlling an alarm module to send out a signal, and stopping the operation of the equipment.
In this embodiment, the specific description is an alarm module, where the alarm module is connected with the singlechip, receives an alarm signal from the control module, reads the current value of the tension error, determines an alarm level according to the received signal content, and sends alarm state information to the display module, and the specific steps are as follows:
Step C1, connecting a control pin of an alarm module to a GPIO output pin of a singlechip, receiving an alarm signal from the singlechip, judging an alarm level according to the received signal content, and further comprising the following steps:
Step C101, the singlechip reads the state of a connected control pin in a polling mode, when the alarm module detects that the state of the connected GPIO pin is from low level to high level, the starting time and the ending time of a signal are recorded, and the duration of the signal is calculated;
Step C102, judging whether an alarm is triggered according to the received signal, including verifying the stability and duration of the signal, ensuring that the signal is not a false alarm condition caused by transient noise and interference, judging whether the signal is stable by comparing the high-level duration of the signal, defining a minimum stable time threshold T min, and considering that the signal is stable and triggering the alarm when the signal duration exceeds T min;
Step C103, judging the alarm level: reading the current value of the tension error from the control module, comparing the read tension error with a preset alarm threshold value, judging different alarm levels according to the comparison result, and judging that the low-level alarm indicates that the tension of the fish line slightly deviates from the target range when e threshold<|e|<1.5ethreshold; when 1.5e threshold≤|e|≤2ethreshold is judged to be a middle-level alarm, the tension deviation is larger in the target range; when |e| > 2e threshold, the alarm is judged to be high-level alarm, and the deviation of the pulling force from the target range is obvious;
step C2, executing an alarm action: when the triggering of the alarm is confirmed, the alarm signal output port is set to be high level to light the LED, and the alarm module is started to make the buzzer sound;
Step C3, resetting and recovering: the method comprises the steps that a reset signal input port is set and used for manually triggering reset operation, the single chip microcomputer monitors that an alarm triggering condition is not met any more, the monitored tension error is recovered to be in a normal range and a manual reset signal is received, the single chip microcomputer stops outputting an alarm signal and triggers the reset operation, the reset operation is that an alarm signal output port is set to be in a low level to extinguish an LED and close a buzzer, the alarm module is stopped to operate and recover a system state to a normal working state, the alarm state is relieved, alarm state information is sent to a connected display module, and the alarm state information comprises triggering time and alarm level.
In this embodiment, the display module is specifically described, and is connected with the singlechip, receives and analyzes the data transmitted from the singlechip, and displays on the display screen in real time, so as to monitor and record the tension change and alarm state information of the fishing line, effectively monitor the tension condition of the fishing line, and improve the control and safety of the production process, and specifically comprises the following steps:
Step D1, displaying in real time: receiving a data frame transmitted from the singlechip, extracting tension data and alarm state information from the data frame, displaying the analyzed data on a display screen in real time, and displaying the change trend of the current tension data in a graphic form by a display module for monitoring the tension of the fishing line, wherein the real-time display is beneficial to an operator to accurately know the current system state;
Step D2, alarm state display: the received data frame contains alarm state information, the display module displays corresponding identifications according to alarm levels, different colors are used on alarm information frames of the display screen to represent different alarm levels, a red frame represents high-level alarm, a yellow frame represents middle-level alarm and a green frame represents low-level alarm;
step D3, recording historical data: a recording function is added in the display module, history data is stored, and the latest alarm event is displayed for later analysis.
In the foregoing embodiments, the descriptions of the embodiments are focused on, and for those portions of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.