You are on page 1of 6

Proceedings of the 2011 IEEE International Conference on Mechatronics and Automation August 7 - 10, Beijing, China

Research of Wireless Sensor Networks for an Intelligent Measurement System Based on ARM
Wenbin Huang Guanglong Wang Jianglei Lu Fengqi Gao Jianhui Chen
Institute of Nanotechnology and Microsystems College of Mechanical Engineering, Shijiazhuang, Hebei province, China
Abstract - The paper introduces a wireless sensor network (WSN) used for an intelligent temperature measurement system. In the system, temperature signals are acquired by digital multipoint thermometers, and transmitted to the advanced RISC microprocessor (ARM) by using Wireless Fidelity (WiFi) technology. Then they are stored in SD card which is controlled by the microprocessor according to the IIS-bus standard format. The software design of data acquisition is completed in this paper. The progress of transplanting Linux operating system to the ARM hardware platform is described, and the driver programs of SD card and SD WiFi device are developed based on Linux operating system and SD card agreement. A special data storage file system is accomplished for reading and writing SD card, as well as managing of the data file by the FATl6 file system. At last, the function of man-machine interaction is accomplished. Index Terms - ARM; Wireless Sensor Network; WiFi; Linux

huangwenbinde-2008@163.com This paper firstly presents the fundamental theory of WiFibased wireless transmission. And secondly introduces the system hardware design, including the system structure, four hardware modules and corresponding functions. The design of system software is described thirdly, it consists of the transplantation of operating system, the driver program development of hardware devices and the application accomplishment. II. FUNDAMENTAL THEORY OF WIRELESS TRANSMISSION The fundamental theory of wireless transmission talked about in this paper includes: the theory of WiFi-based wireless transmission and the theory of path loss. A. The Theory of WiFi-based Wireless Transmission In the WSN designed, WiFi-based wireless transmission is a process of radio waves behaving between sensor nodes and the U1 after they are transmitted. During the process, there are three types of transmission mechanisms: reflection, scattering and diffraction. Therefore, wireless transmission is also called as multi-path signal transmission. Reflection occurs when radio waves transmitted encounter an object whose dimension is larger than the wavelength. Some of the waves energy will be absorbed into the obstacle and the remaining energy will be reflected. The energy of the transmitted and reflected waves is a function of the geometric and material properties of the obstacles and the amplitude, phase, and polarization of the incident wave. Scattering appears when radio waves transmitted encounter a large quantity of objects with small dimensions. The reflected energy in a scattering situation is spread into all directions before reaching the receiver. Diffraction occurs when the surface of the obstacle has sharp edges, even secondary waves will appear around the obstacle. Like reflection, diffraction is affected by the physical properties of the obstacles and the characteristics of the incident wave [4]. B. The Theory of Path Loss Because of the three types of transmission mechanisms, path loss always exists in the process of WiFi-based wireless transmission, the quantity of energy loss depends on the corresponding environmental scenario [5]. Path loss prediction model is basically an empirically mathematical formulation, which is developed to predict the energy loss during the process of transmission inside a limited room. Besides, this model is also suitable to outdoor transmission in a short range distance. The mathematical

I. INTRODUCTION With the development of the science and technology, all kinds of vehicles are becoming more and more. In order to ensure safety, it is needed to supervise temperatures of some key points in vehicles, including the fuel tank, the engine and the speed changer, etc. However, it is difficult to link too many points to the processor through electric wires, and the classical isolated sensors have some disadvantages as follows: slow reaction rate, high measuring errors, complex installation and so on [1]. There is a possible solution to overcome these problems through developing a WSN for an intelligent temperature measurement system. A WSN is a wireless network consisting of many sensor nodes and a control terminal. It could detect and collect a variety of environmental or object information in the network coverage area, and process the information effectively. As the core module of the temperature measurement system, the embedded microprocessor Samsung S3C6410 (U1) is used. It is a 32-bit, 533MHz, low power consumption and high performance RISC microprocessor with ARM1176JZF-S as its kernel, which is particularly suitable for real-time control. Moreover, it supplies SD WiFi device inside, so there is no need of collocating excess wireless equipment any more [2]. Besides, the embedded Linux operating system is selected to support the hardware. It is a kind of mature open-source operating system, which is encapsulated in ARM, to accomplish complex algorithms and finish a variety of tasks.Besides, depending on the specific-application, the software system could be also tailored to adapt the requirements [3].

978-1-4244-8115-6/11/$26.00 2011 IEEE

1074

formulation is shown as follows [6]:


PL = UL + 10 n log(d )

(1)

Where PL is the path loss, UL is the power loss at 1 m distance, n is the path loss coefficient factor, d is the distance between transmitter and receiver. The path loss coefficient factor n is usually used to reflect the environment scenario and how the signals are transmitted in an unknown environment. It is derived from the mathematical formulation of the path loss model. The value n is computed as follows:
PL 30 n = 10log( d )

(2)

The value of the path loss coefficient factor for each environment scenario is obtained from the average value of n. III. THE SYSTEM HARDWARE DESIGN According to module design discipline, the WSN for the intelligent temperature measurement system consists of four modules: system core module, data acquisition and transmission module, data storage module and man-machine interaction module. A. The System Structure In order to acquire temperatures of many points, a variety of sensor nodes are designed and placed at corresponding positions. Each sensor node consists of a single-chip C8051F410 (U2), a digital thermometer DS18B20 (U3) and a WiFi transmitter. Temperature signals are acquired by the U3, then sent by wireless means, and transported to the U2 for processing. All above constitutes a WSN, which allows users to fully grasp temperature information in the region to monitor and respond to them. The network architecture of the system is shown in Fig. 1.
WiFi Digital Thermometer(U3) uPC (U2) WiFi WiFi uPC (U2) Digital Thermometer(U3)

the cost of the whole system and there is no need of collocating excess equipments any more. The buses inside the U1 are all high performance ones designed with larger bandwidth. The functions of integrated circuit include: separate 16KB instruction Cache and 16KB data Cache, MMU virtual memory management, LCD controller, supporting NAND Flash system induction, outside memory controller, 3channels UART, 4-channels DMA, 4-channels PWM timer, 117 currency I/O interface, 24-channels outer interrupt recourse, RTC with calendar, 8-channels 10bit ADC and touch screen interface, IIC-bus interface, IIS-bus interface, USB mainframe, USB equipment, 2-channels SPI, and interior PLL clock times frequent count. The peripheral equipments inside of the chip are connected with the bus inside of the chip as well [7].

Fig. 2 The configuration of system core module

C. Data Acquisition and Transmission Module In the WSN designed, the data acquisition and transmission module is a sensor node in fact. As the core of the entire module, the U2 plays the control role. Both the U3 and the wireless WiFi transmitter are linked to it. The configuration of data acquisition and transmission module is shown in Fig. 3.

Fig. 3 The configuration of data acquisition and transmission module

...
Digital Thermometer(U3)

SDRAM NandFlash

ARM (U1)

SD Card LCD

...
Digital Thermometer(U3)

WiFi uPC (U2)

WiFi uPC (U2)

Fig. 1 The system structure

B. System Core Module The system core module includes core microprocessor, Nand Flash and SDRAM. The core microprocessor adopts the U1 as its CPU, whose configuration is shown in Fig. 2. It supports operating systems Linux, Windows CE, C/OSand some others. SDRAM is used for storing program code, and NAND FLASH is used to save the startup code and the file system. The U1 supplies abundant equipments inside to bring down

1) Data Acquisition Unit: The acquisition of temperature signals is realized by the U3, which is a 1-wire digital thermometer made by DALLAS of USA. Comparing with the traditional temperature sensors, the U3 has many advantages, mainly including digital counting, direct output of the measured temperature signals in digital form, less temperature error, high resolution, strong anti-interference ability, longdistance transmission and characteristic of serial bus interface [8]. The U3 provides 9-bit to 12-bit Celsius temperature measurements and has an alarm function with nonvolatile user-programmable upper and lower trigger points. It has an operating temperature range of -55C to +125C and is accurate to 0.5C over the range of -10C to +85C. There are two power supply ways for the U3: the external power supply and the parasite power supply. The parasite power supply will lead to the complexity of the hardware circuit, the difficulty of the software control and the performance degradation of the chip, so the external power supply is selected. This way is accomplished through connecting the U3 to the I/O port of the Microcontroller directly [9]. As shown in Fig. 4, the first pin of the U3 is connected to the ground; the second pin serves as signal wire and is directly connected to P0.3 of the U2; the third pin is used for external power supply.

1075

Rl is a pull-up resistor. After temperature signals are acquired by the U3, they are converted into digital ones and stored in the U2 temporarily [10].

and 4-wire reading/writing operating modes [13]. When 1wire operating mode is supported, DATA0 is used for serial data transmission, DATA1 works as an interrupt interface, the highest rate of transmission reaches 25Mbps. When 4-wire operating mode is supported, DATA0:3 are all used for serial data transmission, the highest rate of transmission is 100 Mbps. The interface block diagram of SD card is shown in Fig. 6.

Fig.

The interface block diagram of DS18B20

2) Data Transmission Unit: In the WSN, the data in the U2 is transmitted to the U1 by the WiFi-based wireless means. WiFi-based wireless technology has some outstanding advantages: the broader coverage, the lower cost, the ability of facilitating the up-grad, etc. It can work in the bandwidth of near 2.4 GHz which do not need any permission for use. Its maximum communication rate can reach 11 Mb/s, the transmission radius reaches 300 m outdoor and 100 m indoor [11]. All WiFi devices in such WSN are separated into two kinds according to the usage: one is used as the receiver and the others are all the transmitters. The receiver has been integrated on the development board and each of the transmitters is connected to the corresponding single-chip through linking its eight SD I/O buses to P2.0-P2.7 of the single-chip. The interface block diagram of WiFi transmitter is shown in Fig. 5. Temperature data stored in the single-chips temporarily are sent into the transmitters, and then transmitted out.

Fig. 6 The interface block diagram of SD card

E. Man-machine Interaction Module In order to realize the function of man-machine interaction, it is necessary to display temperature information through LCD screen. In the system, the 4.3 inches LCD is linked to the U1. IV. THE SYSTEM SOFTWARE DESIGN The embedded Linux operating system is mainly used for controlling data processing devices as well as user operation interfaces. The Linux software system is a kind of mature open-source operating system. It has been applied to a wide range of embedded hardware platforms, and possesses highly efficient and stable kernel [14]. The flow chart of the Linux software development is shown in Fig. 7.

Fig. 5 The interface block diagram of WiFi transmitter

3) Wireless Communication Standards: WiFi-based wireless communication belongs to the short-range wireless technology, whose current communication standards include: IEEE 802.11a, IEEE 802.11b, IEEE 802.11g and IEEE 802.11n, etc. The widely-used one in them is IEEE 802.11b, which can provide the credible data transmission and reasonable network bandwidth by using the protocol and the packet acknowledgement linking Ethernet. Therefore, IEEE 802.11b standard is selected in this WSN [12]. . Data Storage Module After the audio signals are received, SD card is selected to store them. The storage technology of SD card is the de facto industry standard for consumer electronic devices. SD cards are used in standard and high-capacity formats along with a variety of speed classes. SD card has four data wire interfaces (DATA0:3), one clock wire interface (CLK) and one command wire interface (CMD), they are all linked to the U1. SD card supports 1-wire

Fig. 7 Software development flow chart

A. Embedded Operating System Transplantation In the paper, the methods and progress of transplanting the embedded Linux operating system to the ARM hardware platform are described. The main content includes the establishment of cross-compiler environment, the reduction and compilation of startup code as well as Linux kernel, and the construction of the root file system. The key point focuses on the structure and function of bootloader as well as the transplantation of Linux kernel. The results show that the

1076

method of transplantation is feasible and Linux works well on the hardware platform. B. Program Design for Temperature Acquisition The U3 has strict time sequence to the operations of reading and writing, as it will not respond if any step in the sequence is missing or out of order. The U3 is operated by use of a series of commands. After issuing either of these ROM commands, the master must return to the operation of initialization. During the initialization sequence, the bus master transmits (TX) the reset pulse by pulling the 1-Wire bus low for a minimum of 500 s, then the bus master releases the bus and goes into receive mode (RX).When the bus is released, the 5 k pull-up resistor pulls the 1-Wire bus high. When the U3 detects this rising edge, it waits 15 s to 60 s and transmits a presence pulse by pulling the 1-Wire bus low for 60 s to 240 s. In order to operate easily, two operating functions are designed and the source codes are shown as follows [15]: Temperature Conversion: 1) The F void Convert T (void) ( RST18B20 (); / / initialization WR18B20 (0xcc); / / skip the multi-sensor recognition WR18B20 (0x44); / / Start temperature conversion ) 2) The Function of Reading the U3: int Read T (void) ( RST18B20 (); / / initialization WR18B20 (0xcc); / / skip the multi-sensor recognition WR18B20 (0xbe); / / read buffer DS18B20 DPL = RD18B20 (); / / temperature low DPH = RD18B20 (); / / temperature high return (DPTR); / / read back the temperature values ) C. Hardware Driver Program Development Device driver is an independent module, which can shield the details of physical device work completely, and provide a common programming interface. Users only need to do reading and writing operations on a virtual device file to control the specific action of a physical device [16]. In this paper, the hardware driver programs developed includes of SD card driver program and WiFi device driver program. 1) SD Card Driver Development: According to different types of devices, device drivers are usually divided into three kinds: character device drivers, block device drivers and network device drivers. The driver of SD card is a block device driver. When the system starts, perhaps the card hasnt been inserted, therefore, the drivers realization is divided into two modules: bus module and SD card operation module. Bus module is static compiled into the kernel, and interrupt service routine is registered when initializing the system. After SD card insert interrupt happens, SD card operation module is loaded into the kernel. SD card operation module is mainly

Fig. 8 The flow diagram of SD card driver development

Fig. 9 The flow diagram of establishing file on SD card

used to complete drivers registering, unloading and the REQUEST function [17]. The corresponding flow diagram is shown as below in Fig. 8. 2) WiFi Device Driver Development: SD WiFi device used in this system has the same way of being linked to the U1 with SD card, so they have the similar device driver program. D. FAT16 File System Establishment

1077

1) The Structure of FAT16 File System: FAT16 is made up of four parts: System Record Region, FAT Region, File Directory Table (FDT) and Data Region. In System Record Region, there are bootstrap program, vendors sign, end mark and BIOS Parameter Block. FAT16 Region includes two similar file distribution tables: FAT1 and FAT2. FDT has 32 sections, and every section can host 16 registers, recording every files note, length and so on. Data Region is used to store file data, it occupies the most disk space. 2) The Creation of File: As mentioned above, the API functions provided to the application layer by file system includes: CreateFile(), OpenFile(), WriteFile(), ReadFile(), DelFile() and so on [18]. It is a process of applying registration in FDT to establish files on SD card. These steps are all shown in Fig. 9. 3) The Reading and Writing Operation of File: The files on SD card are read and written in cluster. The sequence diagrams of SD cards reading and writing operations are respectively shown in Fig. 10 and Fig. 11.

{ Q_OBJECT public : Inter(QWidget *parent = 0, Qt::WindowFlags f = 0); ~Inter(); QPushButton * label 1; QPushButton * label 2; QPushButton * label 3; QPushButton * label 4; QPushButton * label 5; QPushButton * label 6; QPushButton * label 7; QPushButton * label 8; } 2) The Design of Object: There are eight objects needed to be defined, but their program codes are similar. Take the first object label1 for an example, the program codes are shown as follows: { label1=new QPushButton(); label1 setText(tr(Sensor node 1)); } V. DATA ANALYSIS In the limited room of a vehicle, the distance of WiFibased wireless transmission is short. However, the path loss differs from each other depending on the environmental scenarios of transmission, which mainly refers to the number and material of the obstacles which exist in the transmission path. As mentioned in section , the path loss coefficient factor n is used to reflect the environmental scenario of transmission. As shown below, the path loss coefficients applicable for 2.4 GHz frequency in different environmental scenarios are listed in Table I [20].
TABLE I PATH LOSS COEFFICIENT FOR 2.4GHZ FREQUENCY

Fig. 10 The sequence diagram of SD cards reading operation

Fig. 11 The sequence diagram of SD cards writing operation

To read the file on SD card, the first step is looking for the files directory entry on the basis of its name, then the file content in the first cluster of Data Region can be found according to the beginning cluster code in directory entry. By the same rule, other cluster codes and the file content will be got easily. At last, the whole file data will be achieved. When writing something onto SD card, it must be ensured that the content in FAT1 is the same to that in FAT2 [19]. E. Realization of Man-machine Interaction Suppose eight sensor nodes are designed in the WSN, then there are eight signals needed to be displayed in the LCD screen at the same time. In order to accomplish the manmachine function, Qt/Embedded tool is used to design the interaction. Eight push-buttons are designed on the LCD screen based on the need, the corresponding class and objects are shown as below. 1) The Design of Class: A class named Inter is defined, the corresponding program codes are shown as follows: class Inter : public QDialog

n Scenario Ideal situation 2.7 Plastic plate on the path 3.2 Iron plate on the path 4 The path loss prediction curve with respect to the n value for each environment scenario is shown in Fig. 12, Fig. 13 and Fig. 14.

Fig. 12 Path loss (ideal situation) with n = 2.7

1078

[2]

[3]

[4] [5] [6] Fig. 13 Path loss (plastic plate on the path) with n = 3 [7]

[8]

[9] [10]

[11]

[12] Fig. 14 Path loss (iron plate on the path) with n = 4 According to the figures above, the path loss coefficient n plays an important role in determining the path loss. The n value is different when the obstacles on the path of transmission are different. And as it increases, the path loss becomes more and more even if the transmission distance is unchanged [21].

[13]

[14] [15]

VI. CONCLUSION In this paper, a WSN used for an intelligent temperature measurement system is introduced, and the hardware and software architectures are described in detail. In the system, WiFi-based wireless communication technology is used. It has outstanding advantages, including broader coverage (10000 m indoor and 90000 m outdoor) and higher transmission rate (11Mbps). All the data wire interfaces (DATA0:3) of SD card can be used for serial data transmission, the highest rate of transmission reaches 100Mbps. The system fully makes advantage of SD cards characteristic of huge and long-time storage, remedying the defect of Nor Flashs small storage in ARM. Long-distance control is accomplished, the huge data stored in SD card can be transferred to the control center. ACKNOWLEDGMENT The authors wish to thank the Institute of Nanotechnology and Microsystems, which provided the good studying environment and much technical support for this paper. REFERENCES
[1] Qingdong Wang and Jianfeng Wei, Design of Temperature Control Device Underground Coal Mine Based on AT89S52, The 2nd ICPEITS, 2009, pp.36-39.

[16]

[17] [18]

[19] [20] [21]

Jianglei Lu, Guanglong Wang, Jianhui Chen, Peng Qiu, Design of Intelligent Voice Recording Instrument Based on ARM Microprocessor, Instrument Technique and Sensor, 2009, pp.42-45. Wenbin Huang, Guanglong Wang, Fengqi Gao, Min Gao and Jianhui Chen, Research of Huge Storage Device for Audio Signals Based on Embedded Linux Operating System, The 3rd ICCNT, 2011, pp.350353. Muzaiyanah Hidayab, Abdul Halim Ali and Khairul Bariah Abas Azmi, Wifi Signal Propagation at 2.4 GHz, The 2009 IEEE, pp.528-531. Tommy Szalapski and Sanjay Madria, Real-Time Data Compression in Wireless Sensor Networks, The 11th ICMDM 2010, pp.307-308. T. S. Rappaport, Wireless communications principles and practices, Prentice-Hall, 2002. Shouqian Yu Weihai Chen Li Li, and Jianglei Qin, Development of ARM-based Embedded System for Robot Applications, 2006 ICEMT, 2006, pp.101-105. Pengfei Li, Jiakun Li and Junfeng Jing, Wireless temperature monitoring system Based on the ZigBee technology, The 2nd ICCET, 2010, pp.160-163. Wentian Huang and Jinping Li, Research and design of intelligent temperature control system, The 2nd IWETCS, 2010, pp.538-541. Xihai Zhang, Junlong Fang and Xiao Yu, Design and Implementation of Nodes Based on CC2430 for the Agricultural Information Wireless Monitoring, The 2nd ICCET, 2010, pp.255-258. Rashid A. Saeed, Hafizal Mohamad, Borhanuddin Mohd. Ali and Mazlan Abbas, WiFi/WiMAX Heterogeneous Seamless Handover, The ICBROADCOM, 2008, PP.170-174 Qing Wu, Weihua Hu, Zhiling Hu, Hongbiao Xie, A Linux-based Development and Application of Automatic Test System, The 9th ICYCS, 2008, pp.2481-2484. Yu Zhang, Zhishan Wang and Jinhua Li, Design a Wireless Temperature Measurement System Based on NRF9E5 and DS18B20, The ICMTMA, 2010, pp.910-1913. Hua Li, Fei Gao, Lei Sun, Embedded Linux Device Driver Research, Embedded Software Application, 2010, pp.71-73. Hongjiang He Yamin Zhang, Research on Vehicle Travelling Data Recorder Based on Radio Frequency Identification, 2009 ICIMA, 2009, pp.232-235. Karla Felix Navarro and Elaine Lawrence, WSN Applications In Personal Healthcare Monitoring Systems: A Heterogeneous Framework, The 2nd ICeTELEMED, 2010, pp.77-82. Hyun-Jin Kim and Junmo Yang, The Practical System Architecture for the Wireless Sensor Networks, The ICMUE, 2008, pp.547-551. Bo Feng, Junfeng Wang, Youxiao Sun, Lina Wang, The Application and Design of Embedded Wireless Sensor Networks, The CCDC, 2010, pp.142-144 . Hua Li, Fei Gao, Lei Sun, Embedded Linux Device Driver Research, Embedded Software Application, 2010, pp.71-73. Muzaiyanah Hidayab, Abdul Halim Ali and Khairul Bariah Abas Azmi, Wifi Signal Propagation at 2.4 GHz, The 2009 IEEE. Bin Zhang, Jiayu Lin, Huiqing Zheng, Embedded Audio Acquisition and Missive Storage System, Microprocessors, No.1, 2010, pp.91-94.

1079

You might also like