Multi-channel multi-parameter sensor detection system and detection method thereof
Technical Field
The invention relates to the technical field of sensor detection, in particular to a multi-channel multi-parameter sensor detection system and a detection method thereof.
Background
The sensor can convert the measured physical information into electric signals or other information in required form according to a certain rule and output the electric signals or other information so as to meet the requirements of information transmission, processing, storage, display, recording, control and the like, and is the primary link for realizing automatic detection and automatic control. The sensor is widely applied to various fields due to the advantages of miniaturization, digitalization, intellectualization, multifunctionalization, systematization, networking and the like, and the sensitivity and the accuracy of the sensor are directly related to the performance of equipment or a system using the sensor.
In order to ensure the accuracy of the output signal of the sensor, particularly the pressure sensor, a detection device is generally used to detect the accuracy of the output voltage signal, the output current signal, and the output other digital signals. At present, a high-precision multimeter is generally used for detecting voltage signals and current signals output by a sensor one by one, then detection software is used for communicating with the sensor one by one, and the performance of the sensor is detected by reading digital signals output by the sensor. The mode has no special detection device, various detection means are needed to detect all the parameters one by one, the detection period is long, the efficiency is low, the detection method is complex, and the consistency of detection results is poor.
Disclosure of Invention
The invention aims to provide a multi-channel multi-parameter sensor detection system and a detection method thereof, and solves the problems of long detection period, low efficiency, complex detection method and poor consistency of detection results of the conventional detection device.
In order to solve the technical problems, the invention adopts the following technical scheme: a multi-channel multi-parameter sensor detection system comprising hardware devices and hardware device dependent multi-parameter detection software, characterized by: the hardware equipment comprises a detection device and an upper computer provided with multi-parameter detection software, wherein the detection device comprises an MCU module, a signal conditioning circuit, a channel switching circuit, a voltage detection circuit, a current detection circuit, a sensor interface circuit, a power supply module, a communication interface and a sensor channel detection circuit.
The MCU module comprises a CPU and a memory and is in bidirectional signal connection with the signal conditioning circuit; the signal conditioning circuit is in bidirectional signal connection with the channel switching circuit, the channel switching circuit is connected with the sensor interface circuit, and the sensor interface circuit is connected with a plurality of sensors to be tested; the communication interface is in bidirectional signal connection with the MCU module, is in wired communication with the upper computer, transmits data of the MCU module into the upper computer for display and storage, and transmits the data to the MCU module through the communication interface; the voltage detection circuit is connected with the sensor interface circuit and transmits voltage detection data to the MCU module; the current detection circuit is connected with the sensor interface circuit and transmits current detection data to the MCU module; the sensor channel detection circuit is connected with the sensor interface circuit and simultaneously transmits the detected information data of the channel connected with the sensor to be detected to the MCU module; the power supply module is connected with the MCU module, the sensor interface circuit and the communication interface, provides voltage for the MCU module and the communication interface, and provides voltage for the sensor to be detected through the sensor interface circuit;
the multi-parameter detection software comprises a serial port module, an instruction sending module, a data reading and writing module, a data analyzing module, a data storage module and a data display module; the serial port module is used for configuring serial port parameters to ensure that the multi-parameter detection software is correctly communicated with the MCU module in the detection device; the instruction sending module transmits a detection instruction and a detection element control instruction generated by the multi-parameter detection software to the MCU module; the data read-write module packs data to be written in of the multi-parameter detection software and sends the data to the MCU module, and meanwhile, the data read-write module correctly receives the detection data of the MCU module; the data analysis module carries out classification analysis on the received and read detection data according to different channels and different parameters for display and storage; the data storage module stores the analyzed data into a hard disk of the upper computer according to a set format; and the data display module displays the analyzed data on a multi-parameter detection software interface.
The further technical proposal is that the upper computer is a PC computer with a display.
The sensor channel detection circuit is further technically characterized by comprising a current-limiting resistor R, an input buffer and a clamping circuit, wherein two input ends of the input buffer are connected with the current-limiting resistor R, and the output end of the input buffer is connected with the MCU module;
the other end of the current limiting resistor R is connected with two ends of a sensor interface on the sensor interface circuit respectively; the upper end of the clamping circuit is connected with one current-limiting resistor R, the lower end of the clamping circuit is grounded, and the power module supplies power to the upper end of the clamping circuit.
The power module is further provided with a power on-off button and a power indicator lamp.
The further technical scheme is that the communication protocol used by the signal conditioning circuit is one of RS485, CAN bus and RS 232.
A detection method of a multi-channel multi-parameter sensor detection system is characterized by comprising the following steps: the method comprises the following steps:
1) detection preparation work: inserting a sensor to be detected into a sensor interface on the sensor interface circuit, and connecting the upper computer with the communication interface through a communication line; powering on the detection device, stably supplying power to the power module, driving the detection device to perform self-checking by the multi-parameter detection software, sending a self-checking result to an upper computer through a communication interface within a limited period, and failing to perform self-checking if the self-checking result is not sent or is wrong in an overdue period;
2) detecting a sensor channel: the multi-parameter detection software starts a detection instruction, the instruction sending module sends the instruction, the MCU module controls the sensor channel detection circuit to detect the sensor interface circuit connected with the sensor to be detected, and channel information connected with the sensor to be detected is fed back to the MCU module;
3) detecting by a sensor: the MCU module selects one channel connected with the sensor to start detection, the voltage detection circuit acquires voltage detection data and feeds the voltage detection data back to the MCU module, the current detection circuit acquires current detection data and feeds the current detection data back to the MCU module, the signal conditioning circuit acquires digital signals output by the sensor and feeds the digital signals back to the MCU module, the MCU module packs the data after detection is finished and uploads the data to multi-parameter detection software through a communication interface, and a data read-write module of the multi-parameter detection software reads the data; switching the channel switching circuit to an undetected sensor channel, and detecting according to the steps until all sensors finish detection;
4) data processing: the data analysis module classifies the received and read detection data according to channel numbers and parameter types, compares the detection data with preset standard data and identifies abnormal data, the data storage module stores the analyzed data into a hard disk of an upper computer according to a set format, and the data display module displays the analyzed data on a multi-parameter detection software interface and highlights the abnormal data.
According to a further technical scheme, after the multi-parameter detection software is started in the step 1), serial port parameters are configured through a serial port module according to actual communication speed requirements, so that the upper computer and the detection device can normally communicate.
The further technical scheme is that the data processing module in the step 4) classifies the received channel codes into the first bit of data and the parameter types into the second bit of data, and classifies the data in such a way.
The working principle is as follows: the computer is connected with the detection device through a communication line, the sensor to be detected is plugged into a sensor interface on a sensor interface circuit, the detection device is powered on, and whether the detection device is powered on or not is judged through the state of the power indicator lamp and the power on-off button.
After power is supplied, multi-parameter detection software is started, serial port parameters are configured through the serial port module, so that the software is smoothly communicated with the detection device, and meanwhile, the detection device is self-checked, and the detection device and the detection software are ensured to be in a normal operation state.
The multi-parameter detection software sends an instruction to the MCU module, and the sensor channel detection circuit detects the sensor interface circuit and feeds back channel information connected with the sensor to the MCU module.
The MCU module selects one channel connected with the sensor to detect, the voltage detection circuit transmits the measured voltage data to the MCU module, the current detection circuit transmits the measured current data to the MCU module, and the signal conditioning circuit reads a digital signal output by the sensor to be detected and transmits the digital signal to the MCU module; the MCU module packs the detection data and transmits the detection data to a computer through a communication line of a communication interface, and the multi-parameter detection software reads corresponding data. And after one sensor is detected, the channel switching circuit automatically switches to detect other sensors to be detected until all the sensors to be detected are detected completely, and all data are transmitted to the computer terminal.
The multi-parameter detection software classifies and analyzes the read data according to channel numbers and parameter types, the analyzed data is stored in a hard disk of an upper computer according to a set format, and the analyzed data is synchronously displayed on a multi-parameter detection software interface, so that a tester can conveniently read and judge the data.
Compared with the prior art, the invention has the beneficial effects that: the detection device comprises a sensor interface circuit, a channel switching circuit and a channel switching circuit, wherein the sensor interface circuit is connected with a plurality of sensors; meanwhile, the detection device can read the output voltage signal, the current signal and the output digital signal of the sensor at one time, the multi-parameter detection software can read, analyze, store and display the detection data, and the multi-parameter detection software can comprehensively detect a plurality of parameters of the sensor at one time. The detection method is simple to operate, the detection device is connected with an upper computer with software through a communication line, the detection device is powered on, the multi-parameter detection software is started, the detection system automatically detects, the detection period is short, compared with the traditional detection method, the efficiency is improved by multiple times, and the detection data consistency is good.
Drawings
FIG. 1 is a schematic diagram of a detecting device in a multi-channel multi-parameter sensor detecting system according to the present invention.
FIG. 2 is a diagram of multi-parameter detection software in the multi-channel multi-parameter sensor detection system according to the present invention.
FIG. 3 is a circuit diagram of a sensor channel detection circuit of the present invention.
FIG. 4 is a flow chart of a detection method of the multi-channel multi-parameter sensor detection system according to the present invention.
In the figure: the system comprises a 1-MCU module, a 2-signal conditioning circuit, a 3-channel switching circuit, a 4-voltage detection circuit, a 5-current detection circuit, a 6-sensor interface circuit, a 7-power supply module, an 8-communication interface, a 9-sensor channel detection circuit, a 10-serial port module, an 11-instruction sending module, a 12-data reading and writing module, a 13-data analysis module, a 14-data storage module, a 15-data display module, a 91-input buffer and a 92-clamping circuit.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Example 1
Fig. 1 and 2 show: a multi-channel multi-parameter sensor detection system comprising hardware devices and hardware device dependent multi-parameter detection software, characterized by: the hardware equipment comprises an upper computer provided with multi-parameter detection software and a detection device, wherein the detection device comprises an MCU module 1, a signal conditioning circuit 2, a channel switching circuit 3, a voltage detection circuit 4, a current detection circuit 5, a sensor interface circuit 6, a power supply module 7, a communication interface 8 and a sensor channel detection circuit 9.
The MCU module 1 comprises a CPU and a memory and is in bidirectional signal connection with the signal conditioning circuit 2; the signal conditioning circuit 2 is in bidirectional signal connection with the channel switching circuit 3, the channel switching circuit 3 is connected with the sensor interface circuit 6, a plurality of sensor interfaces are arranged on the sensor interface circuit 6, and the sensor interfaces are connected with a sensor to be detected; the communication interface 8 is in bidirectional signal connection with the MCU module 1, the communication interface 8 is in wired communication with an upper computer, data of the MCU module 1 are transmitted into the upper computer to be displayed and stored, and the upper computer transmits the data to the MCU module 1 through the communication interface 8.
The voltage detection circuit 4 is connected with the sensor interface circuit 6 and transmits voltage detection data to the MCU module 1; the current detection circuit 5 is connected with the sensor interface circuit 6 and transmits current detection data to the MCU module 1; the sensor channel detection circuit 9 is connected with the sensor interface circuit 6, and simultaneously transmits the detected information data of the channel connected with the sensor to be detected to the MCU module 1.
The power module 7 is connected with the MCU module 1, the sensor interface circuit 6 and the communication interface 8, provides 3.3V voltage for the MCU module 1, provides 13V voltage for a sensor to be detected connected with the sensor interface circuit 6, and provides 5V voltage for the communication interface 8.
The multi-parameter detection software comprises a serial port module 10, an instruction sending module 11, a data reading and writing module 12, a data analyzing module 13, a data storage module 14 and a data display module 15.
The serial port module 10 is used for configuring serial port parameters to ensure that the multi-parameter detection software is correctly communicated with the MCU module 1 in the detection device; the instruction sending module 11 sends a detection instruction and a detection element control instruction generated by the multi-parameter detection software to the MCU module 1; the data read-write module 12 packs the data to be written in of the multi-parameter detection software and sends the data to the MCU module 1, and meanwhile, the detection data of the MCU module 1 is correctly received; the data analysis module 13 performs classification analysis on the received and read detection data according to channel numbers and parameter types for display and storage; the data storage module 14 stores the analyzed data into a hard disk of the upper computer according to a predetermined format; the data display module 15 displays the parsed data on the multi-parameter detection software interface.
As shown in fig. 4, when in use, the upper computer is connected with the detection device by a communication line, the sensor to be detected is inserted into the sensor interface on the sensor interface circuit 6, and the detection device is electrified. After power is on, multi-parameter detection software is started, serial port parameters are configured through the serial port module 10, so that the software is smoothly communicated with the detection device, meanwhile, the detection device is self-checked, and the detection device and the detection software are ensured to be in a normal operation state.
The multi-parameter detection software sends an instruction to the MCU module 1, the sensor channel detection circuit 9 detects the sensor interface circuit 6, and channel information connected with the sensor is fed back to the MCU module 1.
The MCU module 1 selects one channel connected with the sensor to detect, the voltage detection circuit 4 transmits the measured voltage data to the MCU module 1, the current detection circuit 5 transmits the measured current data to the MCU module 1, and the signal conditioning circuit 2 reads the digital signal output by the sensor to be detected and transmits the digital signal to the MCU module 1; the MCU module 1 packs the detection data and transmits the detection data to an upper computer through a communication line of the communication interface 8, and a data read-write module 12 in the multi-parameter detection software reads corresponding data. And after one sensor is detected, the channel switching circuit 3 automatically switches to detect other sensors to be detected until all the sensors to be detected are detected completely, and all data are transmitted to the upper computer.
A data analysis module 13 in the multi-parameter detection software classifies and analyzes the read data according to channel numbers and parameter types, compares the read data with preset standard data to identify abnormal data, a data storage module 14 stores the analyzed data into a hard disk of an upper computer according to a set format, and a data display module 15 synchronously displays the analyzed data on a multi-parameter detection software interface and highlights the abnormal data, so that a tester can read and judge the abnormal data conveniently.
The sensor interface circuit 6 on the detection device of the detection system can be connected with a plurality of sensors, and the channel switching circuit 3 can automatically switch to an undetected sensor channel after the detection of one sensor is finished, so that the detection of the plurality of sensors can be carried out at one time; meanwhile, the detection device can read the output voltage, the output current and the internal parameters of the sensor at one time, the multi-parameter detection software can read, analyze, store and display the detection data, and can comprehensively detect a plurality of parameters of the sensor at one time. The detection system is simple to operate, the detection device is connected with an upper computer with software through a communication line, the detection device is powered on, the multi-parameter detection software is started, the detection system automatically detects, the detection period is short, compared with the traditional detection method, the efficiency is improved by multiple times, and the detection data consistency is good.
Example 2
In order to further optimize the technical scheme in embodiment 1, the upper computer in this embodiment is a PC computer with a display, the communication interface 8 can be a USB communication interface, and the communication between the computer and the detection device is realized through a USB cable, so that the operation is simple and convenient.
Example 3
In order to further optimize the technical solution in embodiment 1, in this embodiment, the sensor channel detection circuit 9 is composed of two current limiting resistors R, an input buffer 91 and a clamp circuit 92, two input ends of the input buffer 91 are both connected with one current limiting resistor R, and an output end is connected with the MCU module 1; the other end of the current limiting resistor R is respectively connected with two ends of a sensor interface on the sensor interface circuit 6; the upper end of the clamping circuit 92 is connected with one of the current limiting resistors R, the lower end of the clamping circuit is grounded, and the power module 7 supplies power to the upper end of the clamping circuit 92.
As shown in fig. 3, the sensor interfaces of the sensor interface circuit 6 are respectively connected with a sensor channel detection circuit 9, when the sensor interfaces are connected with sensors, the buffer 91 transmits the corresponding voltage detection values to the MCU module 1, and the MCU module 1 records the connection channel information; when the sensor interface is not connected with a sensor, the buffer 91 transmits the corresponding voltage detection value to the MCU module 1, and the MCU module 1 records the information of the unconnected channel, so that the sensor channel is effectively detected and recorded, and the subsequent test is facilitated. When the sensor interface is short-circuited, the current-limiting resistor R can effectively protect the circuit; the clamp circuit 92 ensures that the voltage at the input end of the circuit is not higher than a set value, and avoids damaging components due to overhigh voltage.
Example 4
In order to further optimize the technical solution in embodiment 1, a power on-off button and a power indicator are disposed on the power module 7 in this embodiment. When the detection device is powered on, whether the detection device is powered on is judged through the state of the power indicator lamp and the power on-off button.
Example 5
In order to further optimize the technical solution in embodiment 1, the communication protocol used by the signal conditioning circuit 2 in this embodiment is one of RS485, CAN bus, and RS 232.
Example 6
As shown in fig. 3, a detection method of a multi-channel multi-parameter sensor detection system is characterized in that: the method comprises the following steps:
1) detection preparation work: the sensor to be measured is inserted into a sensor interface on the sensor interface circuit 6, and the upper computer is connected with the communication interface 8 through a communication line; electrifying the detection device, stably supplying power to the power module 7, driving the detection device to perform self-checking by the multi-parameter detection software, sending a self-checking result to an upper computer through a communication interface 8 within a limited period, and failing to perform self-checking if the self-checking result is not sent or is wrong in an overdue period;
2) detecting a sensor channel: the multi-parameter detection software starts a detection instruction, the instruction sending module 11 sends the instruction, the MCU module 1 controls the sensor channel detection circuit 9 to detect the sensor interface circuit 6 connected with the sensor to be detected, and channel information connected with the sensor to be detected is fed back to the MCU module 1;
3) detecting by a sensor: the method comprises the following steps that an MCU module 1 selects one channel connected with a sensor to start detection, a voltage detection circuit 4 acquires voltage detection data and feeds the voltage detection data back to the MCU module 1, a current detection circuit 5 acquires current detection data and feeds the current detection data back to the MCU module 1, a signal conditioning circuit 2 acquires a digital signal output by the sensor and feeds the digital signal back to the MCU module 1, the MCU module 1 packages the data after detection is finished and uploads the data to multi-parameter detection software through a communication interface 8, and a data read-write module 12 of the multi-parameter detection software reads the data; the channel switching circuit 3 is switched to the undetected sensor channel, and detection is carried out according to the steps until all sensors are detected;
4) data processing: the data analysis module 13 classifies the received and read detection data according to channel numbers and parameter types, compares the detection data with preset standard data and identifies abnormal data, the data storage module 14 stores the analyzed data into a hard disk of an upper computer according to a set format, and the data display module 15 displays the analyzed data on a multi-parameter detection software interface and highlights the abnormal data.
The sensor interface circuit 6 on the detection device of the detection system can be connected with a plurality of sensors, and the channel switching circuit 3 can automatically switch to an undetected sensor channel after the detection of one sensor is finished, so that the detection of the plurality of sensors can be carried out at one time; meanwhile, the detection device can read the output voltage, the output current and the internal parameters of the sensor at one time, the multi-parameter detection software can read, analyze, store and display the detection data, and can comprehensively detect a plurality of parameters of the sensor at one time. The detection method is simple to operate, the detection device is connected with an upper computer with software through a communication line, the detection device is powered on, the multi-parameter detection software is started, the detection system automatically detects, the detection period is short, compared with the traditional detection method, the efficiency is improved by multiple times, and the detection data consistency is good.
Example 7
In order to further optimize the technical solution in embodiment 6, in this embodiment, after the multi-parameter detection software is started in step 1), serial parameters need to be configured through the serial module 10 according to the actual communication speed requirement, so that the upper computer and the detection device communicate normally.
Example 8
To further optimize the technical solution in embodiment 6, in this embodiment, the data parsing module 13 in step 4) classifies the received channel codes into the first bit of data, and the parameter types into the second bit of data, so as to classify the data.
Although the invention has been described herein with reference to a number of illustrative embodiments thereof, it should be understood that numerous other modifications and embodiments can be devised by those skilled in the art that will fall within the spirit and scope of the principles of this disclosure. More specifically, various variations and modifications are possible in the component parts or arrangements of the subject combination arrangement within the scope of the disclosure, the drawings and the appended claims. In addition to variations and modifications in the component parts or arrangements, other uses will also be apparent to those skilled in the art.