Design of network remote monitoring system based on uClinux

Publisher:czc天天Latest update time:2012-05-17 Source: 微计算机信息 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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

Reference address:Design of network remote monitoring system based on uClinux

Previous article:Discussion on Mobile Agent Problems in Embedded Mobile Database
Next article:Design and implementation of embedded MIDI file format parsing

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号