A NOVEL WEB BASED REAL TIME EMBEDDED ...

8 downloads 3786 Views 538KB Size Report
Data Acquisition and Control System using ARM based web server. It enables web ... In section 6 the testing of Embedded Web Server is described. In section 7 ...
A NOVEL WEB BASED REAL TIME EMBEDDED DATA ACQUISITION AND CONTROL SYSTEM USING LINUX PORTABLE ARM PROCESSOR M Poongothai1, A Rajeswari2 1

Asisstant Professor (Sr Gr), Department of Electronics and Communication Engineering, Coimbatore Institute of Technology Coimbatore 641014 India E-mail: [email protected] 2 Associate Professor & Head, Department of Electronics and Communication Engineering, Coimbatore Institute of Technology Coimbatore 641014 India E-mail: [email protected]

ABSTRACT: Web based Data Acquisition and Control system helps in remote data monitoring and control applications. It is specially designed for Industrial and home automation. In this paper we focus on the design and development of a Data Acquisition and Control System using ARM based web server. It enables web access to digital distributed control system and provides networking. The main core of the system is an ARM 920T CPU running a scaled-down version of Linux kernel 2.6.32.2. This method improves the processing capability of a system and overcomes the problem of poor real time and reliability. ARM 9 Processor portability with Linux operating system makes the system more real time and capable of running several tasks at a time based on multi tasking and scheduling algorithms. This single ARM board acts as data acquisition unit, control unit, embedded web server and self diagnosis. Remote client can access the embedded device from anywhere in the world through a web server integrated into device. The proposed system eliminates the need for central server, server software, and maintenance and minimizes the operational costs while operating within multitasking environment. The experimental results show that the proposed system design implements excellent prospects in the remote monitoring and controlling system of new automation application via internet access in real time. Therefore, the proposed Web server can be easily implemented into home and industry appliances, which reduces the complexity and size of system. Keywords: Real time, Linux kernel, multitasking, ARM processor 1.

INTRODUCTION

Data acquisition and control systems are widely used in industrial and consumer applications like monitoring, controlling, acquiring data, and automated testing. In some of the applications, labourers have been replaced by systems with devices that collect data and send the data to the base [2]. A data acquisition system in [3] explains data acquisition without considering remote access. A system based on GPRS in [4] is tracking vehicle‟s position for traffic applications. In [1] and [5] remote access is considered which are designed to send the data to the remote place from central server, user cannot interact directly with the system in real time. Another data acquisition system based on GSM is presented in [6] in which GSM provides connection between data acquisition system and clients. A bidirectional data transfer is presented in [7] which uses General Packet Radio Service (GPRS) for data acquisition and control. A recent work on GPRS based Industrial Automation using Linux RTOS has been proposed [8]. These systems are designed with GPRS without considering the cost of data transfer. Internet based systems in [9] and [10] have maintained data in a central server in which data were served to the remote clients through the Internet. In these applications a client requires the data information; he should send the request to the central server and then capturing the data from the embedded device. It is an indirect access to the data acquisition and control system which makes the system not suitable for real time applications. Maintaining a central server will increase the operational cost which demands the exclusion of server. In this paper we propose a new approach in which an inbuilt Data Acquisition and Control system with on-line interaction is implemented with Linux operating system to overcome the problem of deprived real time and consistency. It makes the system more reliable and avoids more complication. A single worker can interact with the machine and collect various data from on-going work in a single work station. Here the embedded web server application is developed and ported into ARM 920T CPU with this setup. All processes are allocated with essential resources and associated with reliable scheduling algorithms and internet protocols followed by ARM processor. This miniaturized setup reduces the complexity and size of system. A novel web based real time embedded data acquisition and control system using linux portable arm processor reduces the Costs and eliminates the central server. The user can network with embedded device in real time. In Section 2, an introduction to the details and architecture of the aforementioned system is discussed. In Section 3 the configuration of Complier, Bootloader, Linux kernel and peripherals are described. In Section 4 the development of Embedded Web Server is described. In section 5 the details of installation of Linux system are provided. In section 6 the testing of Embedded Web Server is described. In section 7 operational features and the results are presented. Section 8 presents the conclusion. 2.

EMBEDDED WEB SERVER DESIGN

This paper presents the design and development of novel web based real time embedded data acquisition and control system using Linux portable arm processor by which it is used to control and monitor remote devices. Fig 1. Shows the architecture of Data Acquisition and Control System with embedded web server. Linux portable

ARM920T S3C2440 processor is a centre core of this system [8]. It is a 16/32-Bit RISC architecture and provides powerful instruction set with ARM920T CPU. It has enhanced ARM architecture MMU to support instruction cache, data cache, write buffer and Physical address TAG RAM to reduce the effect of main memory bandwidth and latency on performance. The friendly ARM also known as mini S3C2440 [13] processor supports WinCE, EPOC 32 and Linux operating system. The proposed system based on Linux Operating System. ARM920T CPU core supports the ARM debug architecture. It provides internal Advanced Microcontroller Bus Architecture (AMBA) (AMBA2.0, AHB/APB).

INDUSTRY

EMBEDDED WEB SERVER (ARM9)

CLIENT 1

CLIENT N

CLIENT 2

Fig 1 EMBEDDED WEBSERVER ARCHITECTURE

In a novel web based real time embedded data acquisition and control system using Linux portable arm processor the embedded web server design is ported into MINI2440 32-bit ARM microprocessor development board in which the core is ARM920T and processor is Samsung S3C2440. The general hardware structure of MINI2440 [13] is shown in Fig 2. The hardware part of system consists of ARM920T core board, A/D, signal conditioning, sensors, and communications interface. ARM920T is a 16/32-bit RISC microprocessor with the characteristics of high cost-performance, low power, small size and high integration. External memory is used to store measured data. ARM920T supports the Ethernet service and RS485 communication. Hence the data has been stored and controlled by remote PCs or network through RS485 & Ethernet [13]. The features of MINI2440 development board have variety of display and Ethernet interfaces, serial ports, JTAG, etc. Samsung S3C2440AL is operating in the frequency of 400MHz and the highest 533 MHZ. It includes on-board 64MB SDRAM, flash memory such as On-board 64 MB NAND flash, On-board 2 MB NOR flash and LCD interface is On-board integrated 4-wire resistive touch screen interface.S3C2440AL UART provide three serial I/O port, each port can operation on interrupt or DMA mode. UART can support a maximum baud rate of 115.2Kbps when using the system clock. Each UART channel for the receiver and transmitter includes two 64-bit FIFO. It includes Expansion Interface consists of 34-pin 2.0 mm GPIO interface, 40-pin 2.0 mm system bus interface [13]. ETHERNET

LCD SENSORS

ARM 9 CORE OUTPUT DRIVER

EXTERNAL MEMORY Fig 2 HARDWARE STRUCTURE OF MINI2440 DEVELOPMENT BOARD.

3. SYSTEM SOFTWARE DESIGN 3.1 ESTABLISHMENT OF COMPILER ENVIRONMENT: The Linux platform, compile kernel for the development board, boot loader, and other applications require cross-compiler tool chain. Before, the system use a different compiler version to compile various parts of properly, so to keep switching settings in the development process, which is not convenient to begin, and also reduces performance of development. Linux kernel selected for the development board is 2.6.32.2; it requires a new cross compiler. The cross compiler selected for S3C2440 CPU is arm-linux-gcc-4.4.3 below are steps installation Step 1: Copy the armlinuxgcc4.4.3.tgz to directory /usr/local/bin/arm, then go to the directory, extract using the command: #tar xvzf arm-linux-gcc-4.4.3.tgz –C / Executing the command will install arm-linux-gcc to /usr/local/arm/4.4.3 directory. Step 2: Add the path to the compiler environment variables of the system to run commands. #gedit /root/.bashrc Edit /root/.bashrc3 file, add last line: export PATH=$PATH: /usr/local/bin/arm/4.4.3/bin after exporting path save and exit from window. Log in system there is no need to reboot the machine, just start logout and then login, the above settings will take effect. At the command line type arm-linux -gcc -v, the following message will appear, indicating that cross compiler environment has been successfully installed.

Fig 3 INSTALLATION OF CROSS COMPILER ENVIROMENT

3.2 BOOT LOADER Boot loader is a piece of code that runs before any operating system is running. Boot loaders are used to boot other operating systems, usually each operating system associated with a set of boot loaders specific for it. Boot loaders usually contain several ways to boot the OS kernel and also contain commands for debugging and modifying the kernel environment. Since it is usually the first software to run after power up or reset, it is highly processor dependent [13]. LOADING THE LINUX KERNEL INTO MEMORY The boot sector which will not be run and the setup part of the kernel are loaded near the top of low memory. If it is not a bzImage type kernel, the rest of the kernel will be loaded in low memory at 0000:1000. If it is a bzImage type kernel, the rest of the kernel will be loaded in high memory, starting at 0x100000.The boot loader does not know or care that the rest of the kernel contains a compressed part. The boot loader must set some relevant parameters in the setup part and jump to it. From there the kernel takes control and the boot loader's part is over. The setup code checks how much memory is available, performs some hardware initialization and prepares to enter protected mode. In protected code, the rest of the kernel is being decompressed. A.COMMON BOOTLOADER CONFIGURATION AND COMPILATION vivi : This is Provided by Samsung, it is an open source, must use arm-linux-gcc to compile. It is mainly developed for Samsung S3C24xx series ARM chips to start the Linux system [13], support serial download and other commonly used network file system starts with simple functions. supervivi : This is Provided by a Friendly ARM for active maintenance, which is based on vivi evolved, supervivi[13] have many other useful features, such as support CRAMFS, YAFFS file system, USB download, automatic identification and start Linux, WinCE, uCos, Vxworks and other embedded operating systems.

vboot : The function of vboot is simple, to start the Linux system. vboot can automatically adapt to the mini2440/micro2440 64M/128M NAND Flash support board. U-Boot: This is an open source boot loader specifically designed for the most popular embedded Linux systems, with a strong network functions. It Supports network. Through the network to download the kernel and start the system [13]. B. VBOOT COMPILATION Compile vboot very simple, enter the directory, run the following command: #cd /home/vboot #make

Fig 4 COMPILATION OF VBOOT BOOT LOADER

vboot.bin programmed into the target board NAND Flash to start the Linux system shown in fig 4. C. VIVI CONFIGURATION AND COMPILATION Enter the directory, run the following command: #cd /bootloader/vivi #cp fa.config .config ; using the default configuration files #make menuconfig Then run "make" to compile, execute the following results #make

Fig 5 CONFIGURATION AND COMPILATION OF VIVI BOOTLOADER

Then vivi can be downloaded to the board.

3.3 LINUX KERNEL ARCHITECTURE As the Linux kernel is monolithic, it has the largest footprint and the most complexity over the other types of kernels. One thing that the Linux kernel developers did to get around these flaws was to make kernel modules that could be loaded and unloaded at runtime, meaning user can add or remove features of kernel on the fly [13]. This can go beyond just adding hardware functionality to the kernel, by including modules that run server processes, like low level virtualization, but it can also allow the entire kernel to be replaced without needing to reboot computer in some instances. CUSTOMIZING LINUX KERNEL The need for customizing linux kernel is to reduce the kernel size and it takes small amount of system memory. The kernel source-code unpacked, customization options is recommended to edit current kernel configuration rather than starting from scratch. #make menuconfig command line presents full menu of customization options. In CPU platform configuration options processor S3C2440 IS selected. The S3C2440 machine type is specified in /arch/arm/machine-type. The different sections allow for configuring different areas of the kernel and select drivers of the hardware depends on applications. In this system the device drivers were configured for MINI 2440 development board such as LCD driver for each size and backlight control support, Touch screens, network card driver, LED driver, USB support, USB camera driver, CMOS camera driver, audio driver, SD/MMC card driver, PWM control and buzzer driver, ADC driver, serial port driver, button driver, YAFFS2 file system [13]. 3.4 LINUX KERNEL COMPILATION #make zImage command line complies kernel and modules and produce kernel image in arch/arm/boot directory. The kernel is obtained as a compressed zImage,. The cross compiled kernel can be downloaded to the development board through USB cable. The following interface shows execution results.

Fig 6 COMPILATION OF LINUX KERNEL

3.5 YAFFS FILESYSTEM A running Linux kernel must have a root file system. This is the file system upon which the root directory can be mounted and which contains the files necessary to bring the system to a state where other file systems can be mounted and user space daemons and applications started. The directory structure for a root file system can be extremely minimal, it can contain the usual set of directories including /dev, /bin, /etc, and /sbin, among others that can be seen in any desktop Linux distribution. The kernel boot process concludes with the init code whose primary purpose is to create and populate an initial root file system with a set of directories and files. It then tries to launch the first user mode process to run an executable file found on this initial file system. This first process ("init") is always given process ID 1. There are three ways for the kernel to find the file that will be run by the init process. The first method is to use a file specified at boot time with the init= kernel parameter. If this parameter is not set, the kernel tries a series of locations to find a file named "init". These include /sbin/init, /etc/init, and /bin/init. If all these fail, the kernel tries to run any shell it finds at /bin/sh. If this last fallback is not found, the kernel will print an error saying that no init could be found. Once the init process is started it typically begins to launch other user space programs. YAFFS (Yet Another Flash File System) [13] is a file system designed specifically for NAND flash.YAFFS2 is simple, portable, reliable and self-contained. It is widely used in embedded OS and can also be used stand-alone

without an OS, e.g. in boot loaders. YAFFS2 is designed to boot quickly. It uses check pointing so that if a partition was unmounted cleanly then there is no need to rescan the flash on power-up. All the features of the File System are configurable like maximum file/partition size, flash block size, file granularity etc. Data is written straight through to the flash except for caching to ensure efficient use of blocks.

4. DEVELOPMENT OF AN EMBEDDED WEB SERVER Fig7 shows the web server implemented with CGI to access hardware‟s of the system. All the remote user‟s requests are submitted by using a standard browser. When the remote client grant access to the automation system, the status and control information of data acquisition and control system will be displayed on the web browser. In this paper, Boa is selected as web server which is suitable for embedded systems. Boa Web server can support multiple connections by accepting a list of HTTP requests. An embedded web server is similar to general web server; it can carry out tasks such as getting client‟s monitor and control request, processing requests and sending results to the client side.

Fig 7 Architecture of Embedded web server

The work flow of embedded web server is shown in Fig 8 as follows: 1. Start loading Linux OS and Boa web server for variables initialization, port listening, socket creation and waiting for requests from client‟s side. 2. If the request is available Boa server accepts the request and analysis the request type. At the same time Boa server processes the request accordingly. 3. If the connection request is „monitor‟, server starts monitoring and sends the monitored parameters to the client‟s browser. 4. If the connection request is „control‟, Boa server is executing CGI programs, controls the devices and returns the controller parameters to the client‟s browser. The pseudo code with basic operational steps of Fig.8 are briefly described as follows: Pseudo Code: (1) Load Linux Operating System and reset the system; (2) Start the Boa web server; (3) Listening the port status and check the request from clients; (4) If „YES‟ check the Request type “Monitor” or “Control”; If „NO‟ go to step 3; (5) If Request type is “Monitor”; Start monitoring and display monitored parameters at the Client‟s browser. (6) Whether continue the “Monitor” request; if YES go to step 3; if NO go to step 9; (7) if Request type is “ Control”; Execute CGI control program and send results to Web browser; (8) Whether continue the “Control” request; if YES go to step 3; if NO go to step 9; (9) End

FLOW CHART

Fig 8 Boa web server flow chart

5. LINUX SYSTEM INSTALLATION Linux binary image file is in image/linux folder. USB driver installed and the development board is set to NOR flashes to start the system update. Major steps for Linux installation: (1) Partitioning the NAND flash (2) Installation of boot loader (3) Installation of kernel (4) File system installation STEP 1: PARTITIONING THE NAND flash Partition will erase all data inside NAND flash .Serial port connected, open HyperTerminal, power on the development board, enter the BIOS menu and select “ x “ and format the NAND flash

STEP 2: INSTALLING BOOTLOADER Now the next step is to load supervivi to target board using DNW procedures, connected to USB cable, and select the function [v] to start the download supervivi.

After downloading, BIOS kernel programmer will automatically write kernel to the NAND flash and return to the main menu.

STEP3 INSTALLING LINUX KERNEL In the BIOS main menu, select the feature number [k], to download Linux kernel zImage

STEP4 ROOT FILE SYSTEM INSTALLATION In the BIOS main menu, select the feature number [y], to start downloading yaffs root file system image file

6. TESTING EMBEDDED WEB SERVER Fig 9 shows the experimental setup of embedded web server. Initially, booting and testing the MINI 2440 development board for the functioning of Linux operating system using hyper terminal. The board checks the connectivity of the network environment using Ping 192.168.1.230 command. The client‟s need to access the data acquisition and control unit by entering the IP addresses http://192.168.1.230/mainpage.html in the client‟s browser. The operating system of client processes the request and forwards the request to the LAN controller of the client system and it sends the HTTP request to the router. The router finds the system with the same IP address connected to the network. If the IP address matches with server address, the HTTP request is send to the server and a TCP/IP connection is established. The server transferring the web pages to the client.

Fig 9 Experimental setup of Embedded Web Server.

7. RESULTS AND DISCUSSIONS Fig10 shows the Login web page designed by using HTML language which is requested by the client to the server. This page validates user name and password then transfer the control to the Home page shown in Fig 10. The authenticated users only can be allowed to access the server and it responses to client request with web page.

Client‟s enters IP Address here

Fig 10 Login Web Page on ARM 920T S3C2440 processor

Fig 11 Home Page on ARM 920T S3C2440 processor

Home page includes the Monitor and Control options. The Client can monitor the status of industry machineries and can control the machines through its own browser from remote location. It is shown in Fig.11. In industrial applications the web server can be transplanted into ARM 9 board for data acquisition and control. So the system is very compact and less complexity. This system replaces the traditional system for remote access and control by embedded web server with Linux operating system. Hyper link to navigate to HOME page

Fig 12 Web Page for Monitoring the Parameters on ARM 920T S3C2440 processor

The Monitoring program enables serial communication between the server based on S3C2440 and sensors. Next the data collected by the sensors is stored into S3C2440 and the server is start processing information provided by sensors and send it to a client‟s side. The Monitoring program is responsible for displaying control parameters on the screen. Fig 12 shows the information about pressure sensor, temperature sensor and speed of motor. Hyper link to navigate to HOME page

Fig 13 Web Page for controlling the devices on ARM 920T S3C2440 processor

Fig 13 shows Web Page for controlling the devices on ARM 920T S3C2440 processor. Using this web page client can control the remote devices at anytime and anywhere in the world. One can check the status of device as well as switch on or off the remote devices. 8. CONCLUSION In this paper, the built in Data Acquisition and Control system on ARM processor with on-line interaction has been designed and implemented with Linux operating system in order to overcome the problem of deprived real time and consistency. The experimental results show that the proposed system designed implements excellent prospect in the remote monitoring and controlling system of new automation application via internet access in real time. Therefore, the proposed Web server can be easily implemented into home and industry appliances, which reduce the complexity and size of system and also reduces the man power and more reliable with portability. The user can monitor and control any device by clicking on the web server page in accordance with the devices can be switched turned on or turned off. The proposed system can be widely applied to any industry and Research centres. The system can be further enhanced by putting all attached devices into sleep mode when they are in idle to reduce power consumption.

REFERENCES: 1. 2.

3.

4.

5. 6. 7.

Klimchynski, “Extensible embedded Web server for internet-based data acquisition and control,” in Proc. 3rd IEEE Int. Conf. Sensors,Vienna, Austria, Oct. 24–27, 2004, vol. 1, pp. 52–55. C. E. Lin, C.-W. Hsu, Y.-S. Lee, and C.C.Li, “Verification of unmanned air vehicle flight control and surveillance using mobile communication,”J. Aerosp. Comput. Inf. Commun., vol. 1, no. 4, pp. 189–197, Apr. 2004 Q. Zhou, W. Wu, and Y. Ma, “The embedded data acquisition system for Mössbauer spectrum,” in Proc. Third Real-Time Linux Workshop Embedded Linux Expo Conf. Real-Time Embedded Comput. Conf., Milan, Italy, Nov. 2001, pp. 26–29. M. A. Al-Taee, O. B. Khader, and N. A. Al-Saber, “Remote monitoring of vehicle diagnostics and location using a smart box with Global Positioning System and General Packet Radio Service,” in Proc. IEEE/ACS AICCSA,May 13–16, 2007, pp. 385–388. W. Kattanek, A. Schreiber, and M. Götze, “A flexible and cost-effective open system platform for smart wireless communication devices,” in Proc. ISCE, 2002. E. Bekiroglu and N. Daldal, “Remote control of an ultrasonic motor by using a GSM mobile phone,” Sens. Actuators A, Phys., vol. 120, no. 2,pp. 536–542, May 17, 2005. Ali Ziya Alkar, Atif Karaca, “An Internet-Based Interactive Embedded Data-Acquisition System for RealTime Applications” IEEE Transactions on Instrumentation and Measurement, Vol 58 No.3,March 2009

Manivannan M , Kumaresan N, “Embedded WebServer & GPRS based advanced industrial automation using Linux RTOS” in International Journal of Engineering Science and Technology, Vol.2(11) ,2010, 6074-6081. 9. Sang, H. Lin, and C. E. Y. Z. Goua, “Wireless Internet-based measurement architecture for air quality monitoring,” in Proc. 21st IEEE IMTC,May 18–20, 2004, vol. 3, pp. 1901–1906. 10. G. Zhenyu and J. C. Moulder, “An Internet based telemedicine system,” in Proc. IEEE EMBS Int. Conf. Inf. Technol. Appl. Biomed.,2000, pp. 99–103. 11. Tran Nguyen, Bao Anh, Su-Lim Tan, September 2009, IEEE Comp society, pp. 31-45, “Real-Time Operating Systems for small microcontrollers”. 12. Srinivas Raja, G. Srinivas Babu, “Design of Web based Remote Embedded Monitoring system” International Journal of Technology and Engineering system(IJTES),Jan-March 2011-Vol.2,No.2. 8.

Ms M Poongothai is currently an Asst Professor (Sr Gr) with the Department of Electronics and Communication Engineering, Coimbatore Institute of Technology, Coimbatore 641014 India. She is having 12 years of teaching experience and her research area includes real time embedded systems, energy efficient computing systems, low power design and power management of energy harvesting real time embedded system.

Dr A Rajeswari is currently an Associate Professor and Head of Department of Electronics and Communication Engineering, Coimbatore Institute of Technology, Coimbatore 641014 India. She is having 21 years of teaching experience and 5 years of research experience. Her areas of interest includes wireless communication, signal and image processing.

Suggest Documents