Wireless Sensor Network Communication Terminal ... - IEEE Xplore

25 downloads 0 Views 1MB Size Report
connects the entire sensor node via zigbee p wireless sensor network and collects sensors sensors. This board continuously collects all the from different sensor ...
2014 International Conference on Circuit, Power and Computing Technologies [ICCPCT]

Wireless Sensor Network Communication Terminal Based on Embedded Linux and Xbee Mr. Sudhir G. Nikhade

Dr. Mrs. A. A. Agashe

PG Student, Walchand College of Engineering, Electronics Department, Sangli, Maharashtra, India. [email protected]

Associate Professor, Walchand College of Engineering, Electronics Department Sangli, Maharashtra, India. [email protected] which is embedded on the raspberry pi Linux board. We propose a design scheme abou ut wireless sensor network communication terminal based on embedded technology. This raspberry pi is used to connect each sensor node and can guarantee information processin ng efficiency, timely and accuracy. Users can view the collected data onto raspberry pi through graphical user interface (G GUI) at the client side.

Abstract-In this paper, raspberry Pi iss used as an embedded Linux board which is used as a communication terminal in wireless sensor network. Raspberryy pi uses ARM 11 system structure of the microcontroller in n which Linux operating system can install in it. The embeddeed Linux board connects the entire sensor node via zigbee p protocol in the wireless sensor network and collects sensors data from the sensors. This board continuously collects all thee real time data from different sensor nodes a save in the rasp pberry pi board which can be accessed remotely on more thaan one client’s computer. Thus we design the application whicch can group a large number of data based on the embedded d Linux system platform. It could reduce the power consumption of the he quantities of wireless sensor node; meanwhile, it improves th data processing ability and strengthens the datta transmission speed.

II.

THE SYSTEM’S OVER RALL ARCHITECTURE

Keywords- Embedded Linux; Wireless Seensor Network; Raspberry Pi; Zigbee.

I.

INTRODUCTION

Wireless sensor networks (WSN) are a wiireless network made up of thousands of smart sensor nodess. These smart sensors constitute a network topology through self organization, network nodes, the data that cann transmit their own sensor, can also pass the data of adjaceent nodes. The entire topology of the network is flexible and variable, when some nodes join in or leave out of the netwoork, the whole network topology can automatically change, aand the changes of the status of a single node will not affect thee safe operation of the entire network [1][2]. ZigBee is the prootocol which is specifically designed for wireless sensor neetwork; it is a simple, efficient, reliable, low-power standaard of wireless technology. So, wireless sensor network with zzigbee protocol have broad application prospect. It can bee used in the precision agriculture, security purpose, industrries, home, and environment monitoring [3]. So, it is considereed as one of the top most advanced technology which will chaange the world in the future. Sensor nodes can collect and transmit thhe data. In the sensor network, because the nodes are distribuuted intensively and need to deal with the large amounts of datta, however the node itself is not suitable for it, so communiccation terminal between the nodes has the extremely vital siggnificance. We use the ARMv11 system structure of the miccrocontroller to

Fig. 1. The system Overall Structure

978-1-4799-2397-7/14/$31.00 ©2014 IEEE 1468

2014 International Conference on Circuit, Power and Computing Technologies [ICCPCT]

The raspberry pi manages multiple senssor nodes, and client also interacts with the raspberry pi. Thee whole system structure is shown in figure 1 [4]. The whole system composes as follows:

• Two USB

1) Raspberry Pi: - Collecting the perceivved information send by sensor nodes, and processing large quuantities of data timely, and it is available for users to view andd store into it; it is the core of the core of the whole system. Itt can be access by the users remotely from anywhere. 2) The sensor node: - Many sensor nodess including the temperature sensor, humidity sensors, photosennsitive sensors, acoustic sensors and gas sensor etc. they aree composed by perception part and wireless transmission moduules, which are primarily responsible for information ccollection and distribution. 3) Zigbee: - Zigbee protocol for wireless ssensor network which is based on the underlying protocol IEEE 802.15.4, which defines the network’s physical layer aand controlling layer for media access, while zigbee protoccol defines the network layer, application layer and specifiications of the network security services[5]. 4) The Client: - User can access the raspbberry remotely from anywhere and can monitor the data coollected in the raspberry pi. More than one client or user ccan access the raspberry pi at a time. III.



HDMI



LINUX OS



ARM 11 processor @700M MHz



BCM2835 SoC based chip pset.



SD card slot

nal SD card. The raspberry pi is boot by extern • Download raspbian wheezzy image. • Burn 4GB (minimum) SD D card with that image using win32 disk imager softw ware which is a utility in windows machine to burn SD card. • Insert this SD card into raspberry pi SD card slot and boot raspberry pi. A. Interfacing HDMI screen to ra aspberry pi Raspberry pi has one HDM MI and s-video slot. So, raspberry pi has to start on HDM MI screen first time for its setting, such as its internet settin ng and setting its graphical user interface (GUI) to the clientt’s computer. On first boot we will come to the raspi-config window. w

INTRODUCTION OF RASPBERR RY PI

Fig. 3. The Raspi-config window.

• Change settings such as timezone t and locale if you want.

Fig. 2. Raspberry Pi



The raspberry pi is a low cost credit size coomputer which has recently become very popular. The raspbberry pi is the cheapest ARM11 powered Linux capable single board computer board. This board runs an ARM11 m microcontroller @700MHz and comes with a 512 Mega B Bytes of RAM memory. Figure 2 shows the picture of thhe raspberry pi board [6] [7]. Here are the features of the boardd,

Finally, select the second d choice: expand_rootfs and say ‘yes’ to a reboot.

• The Raspberry Pi will reboot and we will see raspberry pi login: • Type: pi • We will be asked for your Password

• 512MB SDRAM

• Type: raspberry



• You will then see the prom mpt: pi@raspberry ~ $

Ethernet

1469

2014 International Conference on Circuit, Power and Computing Technologies [ICCPCT]

• Start the desktop by typing: startx

B. Hardware interface between raspberry r Pi and xbee module

For internet connection we have to edit ‘resolve.conf’ file and change the name server. For remote accesssing raspberry pi’s GUI from other client’s computer,, first install tightvncserver on raspberry pi by typing coommand “sudo apt-get install tightvncservser”. And also install tightvnc viewer at the client machine to view raspberrry pi GUI. We can access raspberry pi remotely by just typingg its IP address on putty terminal shown in figure 4 below whhich is software utility on windows machine and in linux macchine it can be access by command “ssh@raspberry pi IP addrress”. Figure 5 shows raspberry pi’s desktop graphical user intterface.

Fig. 6. Connection between Raspberry Pi and Xbee Module

Figure 6 shows connection between raspberry pi and coordinator xbee module through UART. For this connection we have to turning off UART fun nctioning as a serial console. The raspberry pi’s serial port is configured to be used for serial console input/output. Whilee this is useful if we want to login using the serial port, it mean ns we can’t use serial port in our programs. To use the serial port p to connect and talk to other devices like xbee, the seriall port console login must be disabled. To enable the serial po ort for our use we need to disable login on the port. There are a two files that need to be edited. 1./etc/inittab. 2./boot/cmdline.txt. Before editing that files first take its back up by commands 1. sudo cp /etc/inittab /etc/inittab.bak 2. sudo cp /boot/cmdline.txt /boott/cmdline.txt.bak . The first file has the command d to enable the login prompt and this need to be disabled. Edit the file by command “sudo nano /etc/inittab’’ and then we seee a line similar to “TO: 23: respawn:/sbin/getty –L ttyAMA0 0 115200 vt100”. Disable it by adding # character to the beeginning and save the file. “#TO: 23: respawn:/sbin/getty –L L ttyAMA0 115200 vt100”. When the raspberry pi boots up, all the boot up information is sent to the serial port. This is an optional whether it disabled or not. Sometimes it is useful to see what is happening at bootup. If we haave decided to connect at bootup, it will receive the informaation over the serial port, so it is up to us to decide whether thiis should be disabled or not. We can disable it by editing 2n nd file by command “sudo nano /boot/cmdline.txt”. The file contents will look like this

Fig. 4. Putty Termainl

Fig. 5. Raspberry Pi Gui

1470

2014 International Conference on Circuit, Power and Computing Technologies [ICCPCT]

Figure 9 shows interfacing betw ween sensor node and xbee router module.

“dwcotg.lpmenable=0console=ttyAMA0,115200kgdboc=tty AMA0,115200console=tty1root=/dev/mmcblkk0p2rootfstype =ext4elevator=deadline rootwait”. Remove alll the reference to ttyAMA0 (the name of the serial port). The file will now look like this “dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait”. After editing these file, reboots thhe raspberry pi machine. Minicom program is used to test tthe serial port. This program is installed onto the raspberry ppi by command “sudo apt-get install minicom”. From client computer, first access the raspberry pi using a putty terminaal on windows machine and ssh command on Linux machhine. Set up a connection using the serial port at 9600 baudd. Now run up the minicom on the raspberry pi using coommand “sudo minicom –b 9600 –o –D /dev/ttyAMA0”. Noow raspberry pi is ready to read the sensors data by serial portt and save it to raspberry pi database. Figure 7 shows flowchaart of raspberry pi data collection process [8].

Fig. 8. Block diagram of WSN node

outer module Fig. 9. Interfacing sensor node to xbee ro

A. Zigbee Standard nly standards-based wireless ZigBee/IEEE 802.15.4 is the on technology which has low-cost, low-power wireless sensor and control networks. Since zigbee can be used almost anywhere, is easy to implement and needs little power to operate [9]. 1) XBee: XBee is a device ussed to send and receive data wirelessly and can build up a ZigB Bee/IEEE 802.15.4 network reference standard. XBee functions can be divided by network topology in differeent ways including the coordinator, router and end dev vice. Figure 10 shows the picture of the Xbee module seriess 2.

Fig. 7. Flowchart of Raspberry Pi Data collection Proceess

IV.

HARDWARE SYSTEM DESIGN OF THE WSN NODE

We choose ARM core microcontroller AT TMEGA324PA as main control chip of the hardware system. This chip is a high performance, low power AVR 8 bit m microcontroller. This chip has a 32 KB in system self programmable flash program memory, 1KB EEPROM, 2KB internnal SRAM, two 16 bit timer, programmable watchdog timer,8 channel 10-bit ADC, master/slave interface and 32 programm mable I/O lines. The block diagram of sensor node is show wn in figure 8.

Fig. 10. Xbee Module

1471

2014 International Conference on Circuit, Power and Computing Technologies [ICCPCT]

2) Topology: For wireless network of Z ZigBee, it will consist of at least two nodes including coordinnator node and sensor node types (Router/End device) too be able to communicate and work in PAN (Personal A Area network). Wireless sensor network topology is divided into 3 topologies: star topology, cluster tree topoloogy, and mesh Topology. Our wireless sensor network uses mesh network topology shown in figure 11. Mesh networkinng is a type of network topology in which a device (node) traansmits its own data as well as serves as a relay for other nodees. In the event of a hardware failure, many routes are availabble to continue the network communication process. Mesh networks are regularly distributed networks that gennerally allow transmission only to a node’s nearest neighboors. The nodes in these networks are generally identical, so that mesh nets are also referred to as peer-to-peer nets. Figuure 12 shows connection between raspberry pi and sensor noodes .

3) Serial Interface Protocolls: Xbee module supports both transparent and API (A Application Programming Interface) serial interfaces. n: When operating in a) Transparent Operation transparent mode, the modulees act as a serial line replacement. All uart data receiv ved through the DIN pin is queued up for RF transmission. When RF data is received, OUT pin. the data is sent out through the DO b) API Operation: API op peration is an alternative to transparent operation. The frame-b based API extends the level to which a host application can in nteract with the networking capabilities of the module. When in API mode, all data entering and leaving the module is contained in frames that n the module. By receiving define operations or events within the request for any sensor data, th he microcontroller will read the data from different sensors and send the data to the raspberry pi. For data transmissiion, it has only one sensor node which is the coordinator with w raspberry pi for data monitoring and recording. For F the transmission to coordinator, sensor nodes can nnot directly contact the coordinator; it needs to transmit data d to sensor nodes near the coordinator. Figure 13 shows thee flowchart of sensor node process.

Fig. 11. Mesh Topology

Fig. 13. Flowchart of Sensor Node Process

V.

CONCLUSION

This paper designs the WSN communication c terminal for monitoring, data collection of WSN W node. The raspberry pi uses one xbee module to join netw work and provide an access to remote network of sensor nodees. This system allows us to use it with sensors networks im mplemented using different hardware platforms. Comparing g with the collection and forwarding data of the traditio onal gateway, this system reduces the wireless sensor no odes power consumption, improves processing ability of laarge quantities of data and strengthens the data transmission n speed. This paper presents

Fig. 12. System overview consists of Router/End D Device Node and Coordinator Node.

1472

2014 International Conference on Circuit, Power and Computing Technologies [ICCPCT]

the design of the wireless sensor network communication based on the embedded Linux board and Xbee. VI. [1]

[2] [3] [4]

[5] [6] [7]

[8]

[9]

REFERENCES

F. Akyildiz, W. Su, Y. Sankarasubramaniam, and E. Cayirci, “A survey on sensor networks,” IEEE Communications Magazine, vol. 40, no. 8, pp. 102-114, August 2002. http://en.wikipedia.org/wiki/Wireless_sensor_network. ZigBee Specification.ZigBee Alliance 2006. http://www.zigbee.org/ Xiaohui Cheng; Fanfan Shen, "Design of the wireless sensor network communication terminal based on embedded Linux," Software Engineering and Service Science (ICSESS), 2011 IEEE 2nd International Conference on, vol., no., pp.598, 601, 15-17 July 2011. J. S. Lee, “Performance evaluation of IEEE 802.15.4 for low-rate wireless personal area networks,” IEEE Trans. Consumer Electron., vol. 52, no. 3, pp. 742-749, Aug. 2006. Powers, Shawn. "The open-source classroom: your first bite of raspberry pi." Linux Journal 2012.224 (2012):7. http:// www.raspberrypi.org/. Sundaram, G.S.; Patibandala, B.; Santhanam, H.; Gaddam, S.; Alla, V.K.; Prakash, G.R.; Chandracha, S.C.V.; Boppana, S.; Conrad, J.M., "Bluetooth communication using a touchscreen interface with the Raspberry Pi," Southeastcon, 2013 Proceedings of IEEE , vol., no., pp.1,4, 4-7 April 2013. Cholatip Yawut; Sathapath Kilaso “A Wireless Sensor Network for Weather and Disaster Alarm Systems” International Conference on Information and Electronics Engineering( IPCSIT), vol.6, (2011). Jin-Shyan Lee, Yu-Wei Su, and Chung-Chou Shen “A Comparative Study of Wireless Protocols: Bluetooth, UWB, ZigBee, and Wi-Fi” The 33rd Annual Conference of the IEEE Industrial Electronics Society (IECON) Nov. 5-8, 2007, Taipei, Taiwan

1473