Design of Virtual Temperature Measurement System
Temperature is a very important parameter in industrial production and scientific research experiments. Many physical phenomena and chemical properties of objects are related to temperature. Many production processes are carried out within a certain temperature range. It is necessary to measure and control temperature. Extremely broad. The current temperature measurement and control system often adopts single-chip microcomputer control. This technology is widely used, but its programming is complicated, the control is unstable, and the accuracy of the system is not high. The temperature measurement system developed and designed using virtual instrument technology uses an ordinary PC as the host and uses the graphical visual testing software LabVIEW as the software development platform to monitor temperature changes, collect data, and process, store, and display. The equipment has low cost, convenient and flexible use, and is suitable for industrial and agricultural production and teaching.
1 Introduction to virtual instrument technology and LabVIEW
Virtual technology, computer communication technology and network technology are the three major technologies of information technology, among which virtual instrument is an important part of virtual technology. Virtual Instrument (VI) is a generation of measuring instruments that break through the concept of traditional instruments. It uses high-performance modular hardware, combined with efficient and flexible software, and is defined by users to complete various testing, measurement and control applications. Its essential feature is: "Software is an instrument." It is a computer-based software and hardware test platform, which can replace traditional measuring instruments, such as oscilloscopes, logic analyzers, signal generators, spectrum analyzers, etc.; it can be integrated into automatic control and industrial control systems; it can be freely constructed into proprietary instruments system. Virtual instrument technology has the four major advantages of high performance, strong scalability, less development time and excellent integration, making it the development trend of modern measurement and control technology.
LabVIEW (Laboratory Virtual Instrument Engineering Workbench) is a program development environment. It uses the graphical programming language G to create source programs in flowcharts, instead of using text-based languages to generate source code. LabVIEW also integrates all the functions of hardware communication such as GPIB, VXI, RS-232 and RS-485, and data acquisition cards. Built-in library functions convenient for TCP/IP, Active X and other software standards. LabVIEW programs are called virtual instruments (VIs) because their appearance and operation can mimic actual instruments. Even if users do not have much programming experience, they can still use LabVIEW to develop their own applications.
2 system scheme design
The virtual instrument temperature measurement system is to use virtual instrument technology to transform the traditional thermometer to make it have more powerful functions. The system framework is shown in Figure 1. The instrument system converts the temperature of the measured object into analog signals such as voltage or current through the sensing elements of the front-end temperature sensing device. After the signal conditioning circuit performs power amplification and filtering, it is transformed into A standard voltage signal that can be collected by a data acquisition card. The analog signal is converted into a digital signal in the data acquisition card, and it is sent to the computer bus under the data acquisition instruction, and the collected data is processed in the PC using the virtual instrument software that has been installed.
Figure 1 Block diagram of the temperature measurement system
The temperature measurement system based on virtual instrument technology is composed of hardware and software.
2.1 Hardware system design
The hardware system is composed of a front-end temperature sensing device (temperature sensor), a data acquisition card, a PC system, etc., and mainly realizes the functions of temperature signal acquisition, conversion, and processing.
Figure 2 Schematic diagram of the hardware circuit of the temperature measurement system
The front-end temperature sensing device of this system adopts thermistor, thermistor RT1 and R1 are connected in series to divide the voltage, and the output voltage of the circuit is proportional to the temperature. The output signal of the sensor is usually small, and a suitable signal conditioning circuit (such as amplification) must be used to minimize the quantization error. When the temperature becomes larger, the resistance of the thermistor RT1 becomes smaller, and a linear voltage is generated at the voltage divider point. After being maintained by the voltage follower, it is amplified by the LM324 and output a positive direction proportional to the temperature change. Linear voltage. The analog voltage output by the measuring circuit is sent to the data acquisition card, converted into a digital signal, and then input to the PC. 2.2 Software system design
The software part is mainly for data follow-up processing, alarm, display and other functions, and specifically realize the functions of acquisition card parameter setting, data calibration, real-time display, temperature limit setting, alarm and human-computer interaction.
(1) Calibration of the sensor
The calibration of the sensor is to establish the relationship between the input and output of the sensor through experiments. Calibration is a calibration procedure that the instrument must go through after the design is completed and before the formal use. For the virtual temperature measurement system, calibration is to obtain the functional relationship between the voltage and the temperature of the measured object, so as to calculate the temperature through the voltage.
Thermistor has the advantages of high sensitivity, small size, light weight, long service life, suitable for long-distance measurement, etc., but its nonlinear error is relatively large, and the stability is slightly poor, so it must be calibrated.
By calibrating the system by curve fitting method, the temperature corresponding to any voltage within the temperature measurement range can be obtained.
(2) Front panel design
The user interface (front panel) is an important part of the virtual instrument. The functions such as the setting of instrument parameters and the display of test results are all realized by software. Therefore, the software interface is required to be simple, direct and easy to use. This system uses LabVIEW8.2 software to design the user interface as shown in Figure 3. This interface can display the voltage waveform changes obtained by sensor detection, data card acquisition and conversion. At the same time, the temperature value obtained after calibration is displayed in three ways: waveform, pointer and numerical value to meet the needs of different users. The switch sets the over-limit alarm indication.
Figure 3 System front panel (user interface)
(3) Block diagram design
The source program of LabVIEW is block diagram type, and provides a very rich library functions, from data acquisition to instrument control, from signal generation to signal processing, from data analysis to graphic display, from file reading and writing to network communication, various , Which greatly improves the efficiency of user programming and reduces the workload of programming. The program block diagram design of this system mainly includes equipment initialization, AD component initialization, analog data reading, voltage-temperature conversion, data processing and display, over-limit alarm, AD component release, equipment release and other modules. Some of these modules directly call LabVIEW Sub-modules (library functions), such as multiplication, subtraction, comparison overrun or not, timers, etc.; some modules such as Create/Release ID, AD Int/Read/Close, etc. are implemented by user-defined designs.
The specific flowchart and program block diagram are shown in Figure 4 and Figure 5.
Figure 4 System flow chart
Figure 5 Block diagram of temperature measurement system
4 Conclusion
The virtual temperature measurement system is implemented using LabVIEW software, which improves working conditions, improves accuracy, saves time and reduces costs. The system has strong scalability and can further expand its functions, such as realizing remote temperature measurement and control. This method of constructing a measurement and control system can be extended to similar applications, which has very important practical significance.
The innovation of this article lies in: the use of virtual instruments to build a temperature measurement system, to achieve the intelligent temperature measurement, high precision, low cost, and strong versatility and scalability.
Please read the Chinese version for the figures.