I. Introduction
MTU (Master Terminal Unit) and RTU radio telemetry systems based on AVR microcontrollers and dedicated MODEM chips.
Remote RTUs (the system can carry 256 RTUs) distributed at pipeline monitoring points throughout the city collect data, process the data and send the data to the central dispatch end through a radio station. After receiving the data, the central dispatch end processes the data, stores the data, and sends it to the simulation screen for display.
2. Design Concept
The existing system had the following main problems: 1. The wireless communication baud rate was low (300bps), the bit error rate was high, the inspection speed was slow, and it could only carry 32 RTU terminals at most; 2. When the radio station at a remote RTU end was in a long-term mis-transmission state (referred to as "long-transmission"), it would occupy the system frequency. Since the system shared a set of radio frequencies, all other radio stations in the system would be unable to communicate, paralyzing the entire system. The radio station at fault could not send valid data, so the fault point could not be determined. The pressure measurement points were widely distributed and scattered, making fault finding very difficult, often taking several days; 3. The RTU board had low integration, a high failure rate, and difficult to purchase components.
Taking into account the versatility of the system and the actual situation of the company, the RTU system is required to make maximum use of the original radio station, antenna, power supply, analog screen, detection instruments, etc., and to realize the following functions: 8-way 10-bit analog input, 8-way switch input and 2-way pulse input, of which 8-way switch input can be expanded to 64-way switch input, and 24-hour historical data (15 minutes/time) can be stored in the RTU station, with power-off protection function.
Through the organic coordination of software and hardware, we have solved the problems and system function requirements of the original system economically and effectively, making the MTU board and RTU board completely consistent in hardware, and integrating the wireless modem MODEM that is usually independent of the RTU board on the RTU board, simplifying the hardware structure of the system. The RTU board of this system has a wireless communication baud rate of 1200bps, a low bit error rate, and can carry up to 256 RTU terminals, effectively solving the problem of system paralysis caused by "long hair" of the radio station, and has the advantages of high data acquisition accuracy, high integration of the RTU board, strong versatility, and easy software upgrade.
3. RTU Design
1. Selection of components
The CPU uses ATMEL's AVR series microcontroller AT90S8535, which is a relatively new type of microcontroller. Its internal resources are as follows: 8K bytes of FLASH program memory, 512 bytes of EEPROM data memory, 8 channels of 10-bit precision A/D converter, a standard serial port, 1 16-bit timer/counter, 1 8-bit timer/counter, 1 real-time clock, 2 external interrupts, built-in watchdog circuit, etc. The functions required by RTU and data acquisition functions can basically be realized on this microcontroller; the connection with the radio station uses OKI's MSM7512B MODEM chip for modulation and demodulation, the communication with the computer uses MAX232 chip, and the historical data storage uses 8K bytes of serial EEPROM storage chip AT24C64. The power supply of the radio station is controlled by the CPU and provided through relays.
2. Data communication
(1) Communication between RS-232 serial port and PC
Since the only serial port of the microcontroller is used for radio station communication, the accuracy of wireless communication must be ensured first. The communication with the PC uses the MAX232 chip to convert the TTL level of the microcontroller into the standard RS-232 level, and uses the external interrupt INT0, INT1 and I/O ports of the microcontroller to simulate the application software to achieve two half-duplex three-wire serial port communications with a baud rate of 9600Bps, and the receiving data adopts the interrupt mode.
(2) Wireless communication between radio stations
We integrate the wireless modem, which is usually independent of the RTU board, on the RTU board, which simplifies the hardware structure of the system, reduces costs, improves the reliability of communication, and realizes the close integration of RTU and MODEM. The MODEM chip uses the MSM7512B modem chip of OKI. MSM7512B is a relatively mature chip with a communication baud rate of 1200Bps and a working mode of half-duplex mode. In practice, we found that when the radio station changes from the receiving state to the transmitting state or from the transmitting state to the receiving state, there is an unstable state, and the data at this time is prone to bit errors. According to the experiment, a more appropriate delay time is obtained. We delay the appropriate time after controlling the radio station to transmit and receive conversion, which greatly improves the reliability and accuracy of data transmission. In the process of data transmission, the system code, RTU station code, and the low byte of the sum value are added to ensure the reliability and correctness of the system communication.
3. Solutions to the system paralysis when the radio station is in a state of long-term mis-transmission ("long-transmission") (1) Set the radio power control port on the RTU board (the power of the radio station is controlled by the single-chip microcomputer through a relay). The RTU board can control the on and off of the radio power; set a software trap. If the RTU does not receive any signal from the radio within 15 minutes, it may be that the radio station is "long-transmitting", the radio reception failure, other radio stations are "long-transmitting", the RTU data port failure, or the repeater failure. At this time, cut off the radio power, but turn on the radio power again after 15 minutes and continue the above detection process. At this time, if the signal cannot be received due to external failures such as the repeater, other radio stations "long-transmitting", etc., the RTU board can resume normal operation; set a watchdog reset system so that working failures caused by the program can be reset.
(2) Judgment by the Central Dispatching Office
If only signals from certain points cannot be received while signals from other points are always normal, then there are faults at these points themselves; if signals from all points cannot be received, then there is a fault with the relay station or dispatching machine or the frequency is continuously interfered with; if only signals from certain points cannot be received for 15 minutes while signals from other points are normal, and signals from all points cannot be received for 15 minutes, then there is a "long hair" phenomenon at certain points, and the fault point can be determined from the 15 minutes in which data can be received; if the received data is intermittent and not regular at 15-minute intervals, then the system frequency is interfered with or there is an irregular fault with the relay station or dispatching machine.
By taking the above measures, the fault point can be found more quickly, and the system paralysis caused by the radio's "long hair" can be eliminated, which greatly reduces the maintenance workload and maintenance costs.
4. Data Collection
Remote telemetry RTUs are distributed in pipe network monitoring points throughout the city. The environment is relatively messy and there are various interferences in the surrounding environment. Filtering is performed on the input channel and larger interferences are filtered out through hardware circuits. In order to improve the reliability and accuracy of collected data, the software design adopts a discrete collection method and selects corresponding data filtering technology according to the specific situation.
(1) Discrete acquisition method
When designing the data acquisition program for multiple parameters such as pressure on site using analog input, we design it according to the principle of "discrete acquisition of the same parameter, continuous acquisition of different parameters". Because short-term continuous acquisition of the same parameter is likely to cause the collected data values to be affected by interference, digital filtering technology is powerless to this; the method of "discrete acquisition of the same parameter, continuous acquisition of different parameters" makes parameter acquisition discrete in time and space, reduces the probability of interference, and distributes interference on different parameters, so that multiple acquisitions and digital filtering can remove the influence of interference.
(2) Digital filtering technology
Digital filtering is to smooth the collected signal through a certain algorithm program. Here we collect each data four times. The algorithm removes the highest and lowest values and takes the arithmetic average of the remaining data to eliminate or reduce interference and ensure the authenticity of the system data. By using the above anti-interference measures, the system's anti-interference ability is greatly improved and the reliable operation of the system is guaranteed.
IV. Application and Promotion
Since the system was officially put into operation in May 2000, it has been operating stably and basically without any trouble for more than two years. It has made contributions to the company's reasonable scheduling, energy saving, timely detection of pipe breakage, etc., and has significant economic benefits.
Previous article:The difference between the sending identifier UDRE and TXC used in AVR microcontroller communication
Next article:How to configure AVR fuse bits correctly
Recommended ReadingLatest update time:2024-11-16 13:25
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- National College Student Electronic Design Competition TI Processor Board Application Details
- Finally I've waited for you, all the terminal R&D and testing data has been collected!
- Application of Lock-in Amplifier in TDLAS Technology
- Addressing the challenges of diverse multi-standard wireless communication devices in the connected home
- [RVB2601 Creative Application Development] Chapter 7: Using lvgl and solving the problem of insufficient SRAM memory
- Domestic operating systems are on the rise. Is this Linux your cup of tea?
- GD32L233 GCC startup file and link file sharing
- MSP430 MCU Example 21 - Timer B generates 8-channel periodic signals
- Switching power supply waveform
- MSP430FR2355 LaunchPad Development Kit