1 Introduction
With the rapid development of computer technology and network technology, the application of multi-sensor control systems to achieve remote measurement of multiple parameters and remote control of multiple objects has become one of the research hotspots in the field of computer control. It can greatly shorten the production cycle, save labor costs, and improve corporate efficiency, which is of great significance in today's increasingly competitive market. In combination with the rapidly developing embedded technology, this paper gives an implementation plan based on an embedded networked remote monitoring system. It uses the uClinux operating system, an embedded Web server, and connects multiple sensor control units through the CAN bus to achieve remote measurement and control of multiple objects.
2 Network Monitoring System Overview
An embedded system is a computer system that is embedded in an object system, application-centric, with tailorable hardware and software, and has strict requirements on size, power consumption, and cost. Compared with traditional single-chip microcomputers, one of its important breakthroughs is that it solves the problem of interconnection between devices and the Internet, allowing people to remotely monitor the devices of each node in the network in real time through existing network facilities. In recent years, embedded technology has developed rapidly, and a wide variety of powerful CPUs and off-chip connections have provided a stable and reliable hardware environment for network applications; embedded operating systems also have good support for these hardware and Ethernet, and the transplantation of operating systems has been greatly simplified, which has facilitated the implementation of embedded webservers. The embedded webserver converts the data of various protocols in the monitoring system into a unified TCP/IP protocol format, so that users can remotely access the webserver through Ethernet to monitor the equipment.
The embedded remote monitoring system introduced in this article adopts the client/server structure mode. It consists of a three-layer architecture of client host, on-site embedded WebServer and underlying sensor control unit. The bottom layer is the sensor control unit, which is responsible for collecting data from the field and executing control instructions. The second layer is composed of the on-site WebServer. The WebServer has Internet functions and can be directly connected to the Internet through network communication cables. Its main function is to publish the data uploaded by the sensor control unit in real time in the form of network services, and the published information can be received by the client host on the third layer. The client host is an ordinary PC. The user remotely accesses the embedded WebServer homepage through a Web browser on the client host and issues various control instructions to the underlying sensor control unit, thereby realizing functions such as data collection, monitoring and control. In this three-layer structure,
The embedded webServer is the core of the system. The overall block diagram of the system is shown in Figure 1:
Figure 1
3 System Hardware Design
The embedded Webserver is based on a high-performance microprocessor, on which the uClinux operating system can run. According to the requirements of the network service, the Samsung ARM7TDMI core microprocessor S3C44BOX was selected. S3C44BOX is a cost-effective embedded processor with rich on-chip peripherals, such as: extended memory controller; LCD controller with dedicated DMA channel; 2 DMA channels, 1 DMA channel with external request pin; I2C bus controller; 5 PWM timers and 1 internal timer; 8 external interrupt sources; 5 PWM timers and 1 internal timer; clock generator with PLL, etc. Its high integration greatly simplifies the hardware design of its application system, greatly shortens the software design process, and improves the reliability of the system. To provide hardware support for running uClinux, the storage system uses 2MB Flash (AM29LV160DB, AMD) and 2 8MB SDRAM (57V651620B, HYUNDAI). Flash is used to store boot code and compressed Linux kernel; SDRAM is used as system memory. The system uses SJA1000T and TJA1040T to expand a CAN bus interface for S3C44BOX, so that it can be connected to each sensor control unit through the CAN bus. The Ethernet controller chip is RTL8019AS. RTL8019AS is a cost-effective, plug-and-play full-duplex Ethernet controller produced by Realtek. It has an integrated RAM for transceiver buffering, which reduces the requirements for processor speed. The entire hardware system is shown in Figure 2.
Figure 2 [page]
4 System Software Design
4.1 uClinux operating system transplantation
Due to the limited hardware resources of the embedded webserver, only a small operating system can be run on this platform. Considering the characteristics of the hardware and the functional requirements of the system, we chose a relatively mature uClinux operating system and implemented the embedded webserver on this basis. uClinux is derived from the standard Linux kernel and meets the development requirements of MMU-free processors by rewriting related aspects such as memory management and process management. It inherits the stable and excellent performance of Linux, and through personalized kernel customization, it can better meet the diverse needs of embedded applications and provide rich application software support.
In order to enable uClinux to run on the hardware platform, uClinux must be ported. The porting of uClinux can be achieved by modifying the relevant files in the kernel. There are many files to be modified, and it is impossible to introduce them one by one. The main ones are as follows: (1) The processor structure in the linux/arch/mach-S3C44B0X directory, such as: arch.c, irq.c, etc. arch.c specifies the address used when the system starts. The address will be different according to the hardware design; irq.c is a program related to interrupt processing. Since linux supports a wide variety of architectures, for a new system, its low-level routines can be written by imitating the system routines similar to it. Here, they can be modified from the files in the mach-S3C4510 directory. (2) Relevant files in include/asm-armnommu /arch-S3C44B0X, such as: dma.h, hardware.h, irq.h, system.h, time.h, etc. The dma.h file defines the DMA channel and the memory space that DMA can use. The hardware.h file defines the memory address and 10 address, which vary according to the designed hardware circuit. Functions such as fixup_irq() and irq_init_irq() are defined in irq.h. Two functions need to be defined in the system.h file: arch-idle() and arch-reset(). time.h implements the timer interrupt processing s3c44b0x_timer_interrupt() and related functions. (3) Relevant makefiles at all levels. Compile the kernel in a cross-compilation environment. When the compilation is completed, the kernel image file image.rom will be generated. It will be burned into the Flash of the board together with the bootloader. After powering on again, the kernel startup information can be observed through the serial port, proving that the system transplantation is successful.
4.2 Implementation of Daemon Process
After uClinux is transplanted, application development can be carried out on this platform. The main functional requirements of system development are to make the system respond to the request of the remote client, complete specific operations, and automatically transmit local monitoring data to the remote client. According to this requirement, a daemon process must be implemented on the server. The program is written in C language under uClinux and will run automatically when the uClinux operating system is started. The flow chart is shown in Figure 3.
Figure 3
4.3 Implementation of Embedded Webserver
Considering the limitation of hardware resources, we choose boa server under uClinux. Boa is a single-task HTTP server. It handles multiple connection requests by establishing HTTP request lists, and it only creates new processes for CGI programs, which saves a lot of system resources. Therefore, Boa has a high HTTP request processing speed and efficiency, and has high application value in embedded systems. To run boa on uClinux, you need to modify uClinux. In user/Makefile, add dir_$(CONFIG_USER_BOA_SRC_BOA) += boa; in config/config.in, add
comment 'Network Applications'
bool 'boa' CONFIG_USER_BOA_SRC_BOA
Add a line of ifconfig eth0 202.117.0.2 up in uClinux-dist/vendors/Samsung/44b0/rc, and then add a line of script command boa &, define Default.html as the control page for remote clients to browse, and put it under /uClinux-dist/romfs [3]. Finally, when performing kernel configuration, select boa when making Menuconfig, recompile the kernel, and burn the final generated file into Flash.
4.4 Client Software Implementation
The client uses an application written in Java to browse the HTML information on the embedded Web server and complete data processing and corresponding control functions, including: generating a command stream sent to the Web server, displaying the data returned from the Web server, prompting the information to be executed during the command execution process, and simple processing of the returned data.
5 Conclusion
Innovation of this paper: This paper overcomes the limitation of single-chip microcomputer in forming large-scale network and proposes a network remote monitoring system based on uClinux. This system makes full use of the many advantages of Ethernet network and the wide application of CAN bus network in industrial control, realizes the seamless interconnection of the two networks, and realizes the remote centralized monitoring and control of electromechanical equipment on the basis of this connection. This monitoring system has the advantages of small size, reliable performance, convenient and flexible networking, etc. It can greatly improve the automation and information level of enterprises and has broad application prospects.
References
[1] Liu Zhengrong et al. Detailed Explanation of Embedded Linux Application Development. Beijing: Machinery Industry Press, 2005
[2] Mao Decao and Hu Ximing. Scenario Analysis of Linux Kernel Source Code. Hangzhou: Zhejiang University Press, 2001
[3] Huang Zhiqiang et al. Design of embedded home remote monitoring system. Microcomputer Information 2005, 21(3): 91-92
[4] Zou Siyi. Embedded Linux Design and Application[M]. Beijing: Tsinghua University Press, 2002.
[5] www.uclinux.org
[6] SAMSUNG.S3C44BOXdatasheet.pdf
[7] CAN.Controller Area Network CAN,an Invehicle Serial Communication Protocol[Z].SAE Handbook 1992,SAE Press,1990.
[8] Kurt Wall et al., translated by Zhang Hui. GNU/Linux Programming Guide (Second Edition)[M]. Tsinghua University Press, 2002
Previous article:Discussion on Mobile Agent Problems in Embedded Mobile Database
Next article:Design and implementation of embedded MIDI file format parsing
- 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
- In order to kill mosquitoes, the doctor DIYed a laser gun using Raspberry Pi!
- Thoughts on the development of single-chip microcomputers
- FPGA_100 Days Journey_Breathing Light
- The Chinese community is down?
- I just started learning analog electronics and I don't understand how to calculate the cutoff frequency of an op amp.
- Analog Electronics Course Selection Test Experience Activity Version 2.0~How to learn analog electronics? TI helps you customize a course list, and you can win a prize by completing the course list~
- How to reduce electromagnetic interference between switching power supplies?
- Download kicad library files
- ADC conversion with 1M sampling rate
- Loto practical tips (8) Fuse measurement using an oscilloscope with a current probe