Distributed Speed ​​Detection System Based on LabVIEW Virtual Instrument Technology

Publisher:灵感狂舞Latest update time:2011-10-12 Keywords:LabVIEW Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
0 Introduction
In actual production and life, it is often necessary to detect the speed of an object. At present, there are two main ways to measure the speed of a general object moving at a constant speed: one is to measure the average speed, such as the average speed obtained by determining the time taken between two stations through the IC card of the adjacent station in the highway traffic system; the other is to measure the instantaneous speed, which is generally measured by Doppler radar speed measurement, that is, the Doppler effect of the moving object is used to measure the speed. These speed measurement methods have a wide range of applications, but they also have some disadvantages, such as high cost or low detection accuracy, especially inconvenient for remote distributed monitoring. The distributed detection system designed here based on single-chip microcomputer and LabVIEW virtual instrument technology solves these problems well.

1 Overall structure of distributed speed detection system
The overall structure block diagram of the distributed automobile speed detection system designed and implemented here is shown in Figure 1. That is, the single-chip microcomputer is used as the core component of the speed data acquisition circuit, and the speed data of each test point is sent to the computer through the RS 485 bus interface. The LabVIEW software is used to program the processing, storage, and display of the vehicle speed data of each monitoring point. And the computer is used as the server, and the Datasocket technology in LabVIEW is used to realize networked remote control. The serial port of the computer adopts the RS 232 standard. If the RS 485 standard is adopted, level conversion must be performed. This design uses an RS 232-RS 485 converter to complete the level conversion from RS 232 to RS 485. The serial data sent by the 51 single-chip microcomputer chip in the system is TTL level, and it can only receive TTL level. When the RS 485 standard is adopted, level conversion must also be performed. In this design, MAX485 is used to realize the mutual conversion between TTL and RS 485 standards.

2 Host computer programming implementation
The system host computer programs are all implemented by LabVIEW 7.1 programming. LabVIEW is a 32-bit software development platform for computer measurement and control developed by NI Corporation of the United States using virtual instrument technology. It is intuitive and easy to learn, has high programming efficiency, and can run under multiple operating systems. LabVIEW is powerful and is increasingly concerned by personnel in the field of measurement and control technology.
Functionally speaking, the host computer program is mainly divided into serial communication module and network communication module. Serial communication is very simple, that is, after the program runs, it determines which test point the received information belongs to according to the established communication protocol and stores it in the corresponding text file. The program flow is shown in Figure 2. In order to increase the system speed, the data is directly stored and not displayed in real time. If you want to view the data of each detection point, you can select trigger speed data display in the menu.

[page]

In addition, in order to facilitate the remote network monitoring of each point data, the host computer responsible for receiving speed data is used as a server, so that the client on the network can remotely view the speed data. This is the network communication module, which is realized by using the Datasocket technology in LabVIEW 7.1. The basic working process of remote monitoring is: first, the client selects the test point to be viewed and sends it to the server. After receiving the test point code information that the client is ready to view, the server opens the corresponding file and displays the data in a waveform Graph control. Since the Datasocket connection property configuration dialog box of the Waveform Graph control has been set when creating the server-side software, there is no need for complex programming to create the client software. You only need to copy the server-side waveform Graph control to the client program. Considering that the system is only for remote sharing of speed data, no additional programming is done in the client program. Datasocket: Communication server-side block diagram program and client-side block diagram program are shown in Figure 3 and Figure 4 respectively.

3 Speed ​​detection of each test point
Doppler speed measurement is widely used, but the technology is complex and the cost is high. The long-distance average speed measurement makes the measured speed too vague, which limits its application. Therefore, a new approach is taken in the design, and the average speed within a short distance is approximated as the single-point speed. That is, two sets of infrared laser transmitting and receiving modules separated by a certain distance s are used to generate interrupt signals to the single-chip microcomputer respectively, and the single-chip microcomputer counts the time difference t between the two interruptions, and the speed value can be obtained according to the formula v=s/t. The distance s can be accurately measured in advance, and the timing accuracy of the current single-chip microcomputer is quite high, which is enough to ensure that the speed data has a high accuracy. The speed detection hardware circuit mainly includes power supply, crystal oscillator, reset, display, 485 transceiver circuit and laser transmitting and receiving module. Among them, the 485 transceiver circuit and the laser transmitting and receiving module are the main circuits for speed measurement and communication, which are briefly introduced below. The laser transmitting and receiving module
consists of an infrared laser transmitting device and a detector, which are respectively placed on both sides of the object to be measured. When no object passes, there is a constant signal in the detector, and the single-chip microcomputer interrupt is not triggered. When an object blocks the optical path, an effective signal is generated and enters the microcontroller to trigger an interrupt. In order to effectively filter out the influence of stray light, a 980 nm infrared semiconductor laser is selected as the light-emitting device, and a 38 kHz square wave signal is generated by the microcontroller to modulate it. The receiving circuit uses an infrared-sensitive 38 kHz dedicated photodetector HS0038B. Figure 5 shows the schematic diagram of one of the infrared laser emission and receiving signal processing circuits.

[page]

The function of the 485 transceiver circuit module is to realize the mutual conversion between the TTL level of the single-chip microcomputer and the RS 485 standard, which is realized by using the MAX485 chip. The MAX485 chip has two parts, the transceiver and the receiver. Figure 6 is the hardware circuit schematic diagram of the connection between the A and B lines in RS 485 and the single-chip microcomputer.

The speed detection part of the MCU program mainly includes the timing processing module, the speed measurement processing module and the serial communication module. The modular programming method makes the entire design and debugging very simple. It is worth mentioning that, considering the different shapes of the specific test objects, an interrupt delay debounce program is also added to the program to prevent the multiple spikes at the moment of interruption from continuously generating interrupt signals and causing the MCU to trigger the operation by mistake.

4 Experimental results
Here, a remote-controlled model car with controllable speed is used to test the system. It is driven at variable speeds on a closed track with five observation points. Figure 7 shows the speed waveform of the second test point collected by the client. The test shows that the whole system works properly.

The system uses the LabVIEw software platform with simple peripheral hardware circuits to realize distributed speed acquisition, storage, and remote monitoring and display functions. The system fully draws on the idea of ​​virtual instruments and uses common components, making the overall system cost low, the speed measurement accuracy high, and the upgrade and maintenance convenient, which has good practicality.

Keywords:LabVIEW Reference address:Distributed Speed ​​Detection System Based on LabVIEW Virtual Instrument Technology

Previous article:Application of virtual instrument LabVIEW in digital circuit experimental teaching
Next article:Design of Gas Concentration Detection System Based on Virtual Instrument

Recommended ReadingLatest update time:2024-11-16 16:23

Piezoelectric ceramic actuator drive power supply based on LabView8.5 and PA96
Piezoelectric ceramic actuators are new micro-displacement devices developed in recent years. They have the characteristics of small size, large thrust, high precision and displacement resolution, and fast frequency response. They are noiseless and heat-free during use, and are ideal micro-displacement devices. They ha
[Test Measurement]
Piezoelectric ceramic actuator drive power supply based on LabView8.5 and PA96
Conversion between character strings and other types of data in Labview serial port program
Labview's serial port can only transmit string data, so to send and receive numeric data, you need to convert the data type.     Numeric data string data --------------Data sent --------- Received string Numeric data   The principle seems simple, but many problems are encountered in the actual implementation p
[Test Measurement]
Portable Vibration Analyzer Based on Labview
  introduction   Traditional vibration analysis instruments have the characteristics of complex structure, large size, and inconvenient operation; while the vibration acquisition and analysis instrument based on single-chip microcomputer is small in size, its analysis ability is limited and often cannot meet the spe
[Test Measurement]
Portable Vibration Analyzer Based on Labview
Labview and MCU serial port communication
VISA is the abbreviation of Virtual Instruments Software Architecture, which is essentially a general term for an I/O port software library and its specifications. VISA is a standard I/0 application programming interface for instrument programming. It is a standard API (application programming interface) for instrumen
[Microcontroller]
Design of Heart Sound Signal Detection System Based on LabVIEW
Heart sound signal is one of the most important physiological signals of the human body. It contains a lot of pathological information about the functional status of various parts of the heart, such as the atrium, ventricle, large blood vessels, cardiovascular and various valves. It reflects the mechanical movement of
[Test Measurement]
Design of Heart Sound Signal Detection System Based on LabVIEW
Programming of 2ASK Communication System Based on LabVIEW
Abstract: The design method, computer simulation and results of ASK signal are studied. The 2ASK communication system is modulated and demodulated by using LabVIEW language. The modulation method is to multiply the input sequence with the carrier, and then the modulated waveform is filtered through the channel and low
[Test Measurement]
Programming of 2ASK Communication System Based on LabVIEW
LabVIEW programming skills: copying conditional structures and event structures
  When writing a medium-sized program, state machines and event structures are common design patterns. SR (SHIFT REGISTER) is often used to transfer data between various cases. When there are many cases, it is often the case that SR is forgotten to be connected or a new SR needs to be added. This is very troublesome a
[Test Measurement]
LabVIEW programming skills: copying conditional structures and event structures
Design of Relay Test System Based on LabVIEW
  1 Introduction   Relay is one of the key components of automatic control systems, remote control and telemetry systems, and communication systems. It is widely used in aviation, aerospace, electronics, communications, machinery and other equipment. The reliability of relays directly affects the reliability of the
[Test Measurement]
Design of Relay Test System Based on LabVIEW
Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号