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.
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
- Popular Resources
- Popular amplifiers
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
- Arduino Nano collects temperature and humidity data through LabVIEW and DHT11
- Modern Testing Technology and System Integration (Liu Junhua)
- Computer Control System Analysis, Design and Implementation Technology (Edited by Li Dongsheng, Zhu Wenxing, Gao Rui)
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Friends who are familiar with the MSP430 series of microcontrollers, please take a look (Beijing)
- How many of you guys are engaged in the FPGA industry?
- Implementation of Embedded RTOS on MSP430 MCU
- ADC parameter group delay time
- 【Beetle ESP32-C3】IX. OLED clock and weather assistant logic description (Arduino)
- 【ST NUCLEO-H743ZI Review】USB MSC Function Test
- WiFi indoor positioning technology and its evolution that has triggered the Internet of Things application
- Help: Does anyone have a power supply design that complies with industry design standards IEC61010, IEC60950?
- [Silicon Labs BG22-EK4108A Bluetooth Development Evaluation] + Development Board Firmware Upgrade
- Assembly Language (4th Edition)