In recent years, with the continuous improvement of my country's geological exploration level, water level detection, temperature detection, metal content detection and other technologies have become increasingly mature. However, when carrying out specific engineering applications, many factors need to be considered. This paper proposes a wireless remote detection method based on the situation that the geological exploration team is in a harsh natural environment such as an exploration mine, which is not suitable for motor vehicles to enter and staff to stay for a long time. The pressure sensor in the detection system mostly uses a single crystal silicon pressure sensor. Because this type of sensor is made using the piezoresistive effect of single crystal silicon, its piezoresistive coefficient changes with temperature, and the piezoresistive effect principle itself can cause temperature drift of the sensor output [1]. In addition, the manufacturing process of semiconductor sensitive elements will also cause the overall temperature drift of the sensor, which requires a set of effective methods to solve the defects caused by the pressure sensor itself being easily affected by temperature. Therefore, a compensation method based on Lagrange interpolation is proposed, which greatly improves the reliability of detection. The upper computer display interface is designed using LabVIEW 8.5, which has a friendly interface and is easy to operate. It can not only display the data change curve, but also store the data in real time and in time-sharing. When a fault occurs, it can also issue an audible and visual alarm in time.
1 Overall structure of water level detection system
The water level detection system adopts a modular design concept and consists of a wireless communication module, a signal acquisition module, an AD conversion module, a power supply module, etc. The system structure diagram is shown in Figure 1.
The system uses the display end controller as the host and the signal acquisition end controller as the slave. The host sends a start signal, which is transmitted to the slave through the radio station. After receiving the signal, the slave starts data acquisition, and transmits the collected data to the 12-bit precision AD574 for AD conversion through impedance transformation (voltage follower). Then, AVR16 uses the Lagrange interpolation principle to process the data, and then transmits these signals to the host computer LabVIEW through Max232 for real-time display.
2 Hardware Design of Water Level Detection System
2.1 Structure and performance characteristics of Atmega16
ATmega16 is a new AVR high-end single-chip microprocessor launched by ATMEL in 2002. Its main advantages are that the chip itself has 16 KB Flash program memory, 512 B EEPROM, 1 KB SRAM data memory, watchdog circuit and 8-channel 10-bit A/D conversion; it comes with SPI synchronous serial port and UART asynchronous serial port, and effectively supports C language and assembly language in software.
2.2 AD module
AD574A is a single-chip high-speed 12-bit successive approximation A/D converter launched by Analog Devices of the United States. It is a hybrid integrated conversion chip composed of built-in bipolar circuits. It has the characteristics of few external components, low power consumption, high precision, etc. It also has automatic zero calibration and automatic polarity conversion functions. It only needs a small number of external resistors and capacitors to form a complete A/D converter. Its main functional characteristics are: resolution of 12 bits, nonlinear error less than ±1/2 LBS or ±1 LBS, conversion rate of 25 μs, analog voltage input range of 0 V ~ 10 V and 0 V ~ 20 V or 0 V ~ ±5 V and 0 V ~ ±10 V, power supply voltage of ±15 V and 5 V, data output format of 12 bit/8 bit, chip working mode of full-speed working mode and single working mode.
2.3 Power Module
In addition, the size of the power supply is required to be as small as possible, so that the power supply part and the control and drive parts in the AVR system can be placed in the same control box. The entire circuit structure is simple and reliable, and the outputs are electrically isolated from each other. The main output power of the control power supply is required to be large, and the voltage regulation accuracy is ±5%. The output power of each drive is small, and the voltage regulation accuracy is ±10%.
2.4 Wireless Communication Module
The host uses FC222-CH to communicate with the slave. FC222-CH is a two-way data transmission and low-power modular radio designed by Shenzhen Youxunda Company using advanced single-chip microcomputer technology, wireless radio frequency technology, digital processing technology and voice processing technology. It has the advantages of adjustable frequency, adjustable bandwidth, adjustable power, multiple channels, high coding efficiency, high receiving sensitivity, and provides three data interfaces: RS-232, RS-485 and TTL. This system uses this device to meet the needs of remote control of water supply in the pump room. In this system, FC222-CH selects the RS-232 data interface.
2.5 Keyboard module and display module
The keyboard module is used to set the actual atmospheric pressure, water density, data access time interval and other system working parameters, and these working parameters are stored in the EEPROM of Atmega16. The user does not need to enter these parameters again when using it next time, so that the deep water level detection system has a memory function. The PC is used to display the water level in real time, and the water level, temperature, power supply, serial port usage and baud rate setting are displayed during normal operation. When a fault occurs, it is displayed in a modular manner, such as whether the AD module is working, whether the power module is powered, whether the communication module is normal, etc., so as to facilitate maintenance in the event of an error, and an audible and visual alarm is used when the serial port line is in poor contact to remind people to connect.
3 Software Design of Water Level Detection System
3.1 Main program design of the system
The software design of the water level detection system adopts a modular design concept and is implemented in C language. The various functional modules of the software are interconnected through input and output parameters, which can shorten the development cycle. Figure 3 is the main program structure diagram.
3.2 Parameter settings of digital radio
The parameter settings of the data transmission radio include the address code, version number, power level, channel selection, air baud rate, serial port baud rate, data bit, check mode, frequency inversion mode, bandwidth and other parameters. The parameter settings of the two radios are shown in Figure 4(a) and Figure 4(b).
3.3 Data processing using Lagrange interpolation method
The measurement accuracy of piezoresistive sensors is greatly affected by nonlinearity and ambient temperature. How to compensate for the errors generated by the sensor becomes a key link in the design. In terms of hardware, the general compensation method is to correct the differences in bridge resistance, leakage current of bridge arm resistance, assembly stress, etc., but due to the large number of peripheral components, it will lead to poor stability and low accuracy, and it is difficult to achieve the desired expected effect under complex working conditions. With the application of microprocessor technology in the field of sensors, it is possible to achieve automatic compensation of sensor working characteristics by designing software algorithms. This design focuses on analyzing the changes in the working characteristic curve of the single-crystal silicon piezoresistive pressure sensor, and provides a software algorithm for correcting its errors. It can ensure that the accuracy of the sensor remains almost unchanged over a wide temperature range, and can be widely transplanted to the compensation design of other piezoresistive pressure sensors.
As the pressure increases, the voltage gradually increases. After many experiments, the following effective data can be measured, see Table 1.
Since there are certain small errors in the experimental data, filtering methods should be used to remove the false and retain the true, and obtain the required approximate value. Here, the bubbling method is used to process, remove the maximum and minimum values, and then take the arithmetic mean (Note: 0.1 Mpa is the voltage value measured on the ground, corresponding to 1 standard atmospheric pressure).
U0: The first group of measured voltage values.
U1: The second group of measured voltage values.
U2: The voltage value measured by the fifth group.
x(n): voltage value after filtering, where n is 1, 2, 3, 4, and 5, corresponding to the five pressure collection points respectively.
Use the Lagrange interpolation algorithm to analyze it:
4 Host computer LabVIEW display module
LabVIEW is a program development environment similar to C and BASIC. However, the significant difference between LabVIEW and other computer languages is that other computer languages use text-based languages to generate codes, while LabVIEW uses the graphical editing language G to write programs, and the generated programs are in the form of block diagrams.
The host computer program is written by LabVIEW software, which can process various real-time signals collected from the field. It has a friendly interface and is easy to operate. It can realize sound and light alarm for circuit break problems caused by faults, which is safe and reliable.
5 System Reliability Design
5.1 Problems encountered during testing experiments
Experimental environment:
(1) Connect the probe to a 300 m armored cable and place it in a 5 m deep iron water pipe outdoors in a suitable environment.
(2) A 12 V DC power supply was used during the radio test. The power of the radio was 5 W. The experimental distance was 1 000 m, and the antenna height of Radio 2 was kept constant at 3.4 m.
This situation will cause the following problems:
(1) Sometimes the circuit contact is unreliable, the microprocessor resets, freezes, and the casing leaks electricity.
(2) The host computer displays signals that are jittery and severely distorted.
(3) The signal quality of wireless communication is poor.
Figure 5 is the water level curve in the experiment.
5.2 Solution to the problem
Based on the above problems, the following solutions are proposed:
(1) To address the problem of unreliable circuit contact, PCB boards were used instead of copper mold test boards, and anti-interference measures were taken during the PCB manufacturing process, such as making the power and ground lines as wide as possible during wiring; separating the digital and analog ground lines; reasonably configuring decoupling capacitors; and copper-cladding the circuit board.
(2) To address the problems of microprocessor freeze and reset, adopt anti-interference measures combining software and hardware. Use photoelectric isolation technology in hardware; set flags in software; verify key exits; use instruction redundancy technology for important instructions such as communication sending instructions; set the power-on reset flag in RAM.
(3) To deal with unclean power supply and mutual interference between power supplies, switching power supplies are used to supply power separately.
(4) Since the cable length is 300 m, distributed capacitance will be formed between the conductors, and the excess cable is wound on the drum, which is equivalent to a large inductor, which will affect the stability of the circuit. Therefore, software filtering (bubble method) is used to compensate for it. The processed graph is shown in Figure 6.
The system designed this time has been running successfully for 2 months without any fault. Field experiments show that this setting method can effectively reduce measurement errors, meet the requirements of field use, and ensure the reliable operation of the system. At the same time, the reliability design scheme proposed has certain reference value for the design and application of similar products.
Previous article:Metal film resistor temperature detection circuit diagram
Next article:Research and Application of OPC Interface in PID Optimization Tuning System
- Popular Resources
- Popular amplifiers
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- 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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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
- STEVAL-IDB007V1_by cruefox
- AI automatically generates Spring Festival couplets to warm up for FZ5
- STM32F407VG mount SD card
- Four-bit parallel 9012 drive digital tube
- Integrated Circuit Naming Method (Introduces the Integrated Circuit Naming Method stipulated by Chinese Ministry Standards)
- Design of Industrial Temperature Transmitter
- How to calculate the gain of this amplifier?
- Almost 10 years later, I started to work on C++ again
- Technical Article: Reliable Power-Up and Power-Down Sequencing
- What skills do embedded software development engineers need?