1 Overall design of monitoring system
According to the performance requirements of sewage treatment equipment, the monitoring point system consists of data acquisition system, image acquisition system and wireless communication network. The data acquisition system consists of analog sensors, transmitters, A/D converters and ARM systems. Each analog sensor sends analog signals to the signal transmitter to amplify them into standard signals, and then sends them to the AD/converter one by one to convert the analog signals into digital signals. The ARM processor then collects data. The image acquisition part consists of a serial camera and an ARM controller. The camera first collects the scene picture and then transmits it to the ARM controller through the serial port. The ARM controller transmits the collected data and images to the monitoring center through the GPRS wireless communication network. The overall structure of the system is shown in Figure 1.
Use AT commands to dial through GPRS Modem. After the correct answer, a physical channel, that is, the GPRS channel, is established between the GPRS Modem and the GPRS network in the system. The PPP protocol transforms the original GPRS physical layer connection into an error-free data link, and the system will remotely log in to the Internet. And get the IP address assigned by the GPRS gateway. The IP protocol is used as the network layer protocol. The IP protocol connects all terminals with different IP addresses connected to the Internet. After IP routing selection, the system can interact with any IP terminal connected to the Internet. TCP is selected as the transport layer protocol to provide connection-oriented, end-to-end reliable services for data transmission. The data packet is sent to the monitoring center server port with a fixed IP address through the wireless network so that the monitoring center can monitor the parameters of the sewage in real time. The monitoring center processes, displays, stores, and prints the collected data.
The following article briefly introduces the hardware design and software parts of the monitoring terminal.
2 System hardware design
According to the performance requirements of the sewage treatment device, the system of the monitoring point consists of analog sensors, transmitters, analog-to-digital (A/D) converters, and ARM processors. Each analog sensor sends the analog signal to the signal transmitter to amplify it into a standard signal, and then the multiplexer sends it to the A/D converter one by one to convert the analog signal into a digital signal. The ARM processor then collects, processes and displays the data. At the same time, the ARM processing system sends images and data to the remote monitoring center via the GPRS network. The system hardware block diagram is shown in Figure 2.
The system terminal uses LPC2148 as the core to control the communication module TR800. The ARM CPU uses Philips' LPC2148, and the core is a general-purpose 32-bit high-speed microprocessor based on the reduced instruction set of ARM7DMI-S. The operating voltage is 3.3 V, and the core operating voltage is 1.8 V; the built-in PLL phase-locked loop can set the CPU operating frequency to 60 MHz, and the dual UART ports provide asynchronous serial transmission and reception of data: 16 kB RAM and 128 kB Flash program memory on the chip. LPC2148 provides 2 serial ports, and a total of 6 I/O ports are available. Its interface circuit part includes 8 analog input channels and RS232 serial port communication interface, among which the digital-to-analog conversion is used to control the built-in module with an accuracy of 12 bits, which can basically meet the requirements of general control objects. The terminal application is compiled with IAR on the PC and downloaded to FLASH through the JTAG interface. The commonly used parameters of the system are placed in the information memory of the main controller through the program settings. [page]
The GPRS module uses the TR800 of iwow. The TR800 module provides a complete GPRS and GSM wireless connection port, and can be directly used as a terminal product to complete the transmission of images and data. This is because its integrated RF circuit and GPRS baseband processor are very complete. The GSM baseband processor is the core component, which is equivalent to a protocol processor. It is used to process AT commands sent by the external system through the serial port. The RF antenna part mainly realizes the modulation and demodulation of the signal and the signal conversion between the external RF signal and the internal baseband processor. The matching power supply provides the required power for the processor baseband RF part. The GPRS module provides a standard TTL level interface, which is connected to the UART1 port of LPC2148 through the TTL level for full-duplex communication. The operating voltage of TR800 is 3.4~5.5 V. After the module is powered on, a low level of at least 30 ms is given to the module RESET pin or PWON pin (the former is recommended), and the module is started.
3 System software design
The program of this system is mainly the single-chip microcomputer control program. The main function is to cooperate with the hardware function of the system to ensure the stable and reliable operation of the entire system and meet the design requirements. The software structure of the system is shown in Table 1.
The main program is responsible for the entire process from power-on to the start of normal operation of the system. The task of this process is to initialize each submodule, including the initialization of the system clock, serial port initialization, and input and output port initialization. The system initialization subroutine set is composed of these subroutines. The main program flow chart of the microcontroller of the monitoring terminal is shown in Figure 3.
For the monitoring terminal module, the system clock of the main controller LPC2148 uses an 8M high-speed clock source. The function of input and output port initialization is to initialize the input and output modules, clear the flag bit and enable the interrupt. For the serial port USART0 receiving terminal of LPC2148 responsible for communicating with the camera module, its transmission baud rate should be set to 38400 bps during the serial port initialization process, and the serial port receiving interrupt should be enabled. The serial port USART1 is responsible for the communication between the receiving terminal and the GPRS module, and the baud rate is set to 9600 bps. Use the command AT+IPR to change the baud rate.
TCP/IP adopts a protocol layered structure: application layer, transport layer, network layer and link layer. Since the system transmits sewage parameters and images, the TCP/IP protocol can be greatly reduced. The application layer only needs to use the HTYP protocol. Using the TCP transmission control protocol in the transport layer helps to improve the reliability of data communication. The network layer needs to use IP, APP/RARP, and ICMP. The role of IP is to provide highly reliable and connectionless data packet transmission services. The ARP protocol completes the mapping of IP addresses and physical addresses. ICMP is used to monitor network communication conditions. Since wireless communication is used, it is easy to be disconnected, so GPRS sends ICMP echo requests through the timing monitoring center and monitors in real time. Once an abnormality occurs, the GPRS module automatically re-establishes the link to keep the system online in real time. The link layer uses the IP protocol supported by GPRS. As long as the socket functions 80(2ket, connect, close, bind, listen, accept, send, etc. provided by TCP/UDP are used, the TCP connection between the client and the server can be realized. By reducing the TCP/IP protocol, the functional needs can be met and the memory resources of ARM can be saved.
4
Conclusion The wireless monitoring system designed and implemented in this paper for small sewage treatment plants uses a mature third-party network to build a remote wireless monitoring communication network for real-time data, which is a new idea for wireless monitoring systems. The remote wireless monitoring system based on the GPRS network is an important attempt at enterprise informatization in the information society. Starting from the needs of small water plants, this paper designs a remote monitoring system for small water plants based on the GPRS network, combining factors such as cost, function, and transmission speed.
A useful attempt has been made on the basic theories and basic methods of system implementation. Due to the limitations of level and time, there are still many areas that need to be improved in the software and hardware of the real-time wireless monitoring system. Further research can be carried out from the following aspects: the main station software of the system can be further developed to display the collected data in real time in the form of graphics or curves, and multi-threading technology can be used to develop multi-terminal main station software.
In short, the wireless monitoring system plays a huge role in the informatization of social life and industrial automation. How to make good use of the third-party network is an important task in the development of wireless monitoring. Moreover, with the construction and use of 3G networks, the demand for application development research in this area will flourish.
Previous article:Design of UART serial communication based on DMA controller
Next article:Design of household intelligent controller
Recommended ReadingLatest update time:2024-11-16 15:37
- 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
- Will you still go crazy shopping on Double 11 now?
- Answer the questions and get a gift | Rochester Electronics will help you solve the problems of the entire semiconductor cycle
- C language (vd6.0) sleep function usage and delay usage
- Battery applications in medical monitoring and the changing environment
- TI Power Supply Learning and Growth Road: DC-DC/AC-DC Control Circuit
- Thank you + thank you EEWORLD
- msp430 library serial PWM
- EEWORLD University Hall----Live Replay: Using NI CompactDAQ and LabVIEW to Build a Sensor-Based Test System
- Application ends - [TI E2E community year-end benefits] CC3200-LAUNCHXL is given away for free, write a review and win a gift!
- UC2845 power supply problem