Enhanced Wireless Personal Area Network based Real Time motion(human) data Collection for advanced control room in Power Plants using ZigBee Transceiver Module

Full text

(1)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 5, May 2012)

467

Enhanced Wireless Personal Area Network based Real Time

motion(human) data Collection for advanced control room in

Power Plants using ZigBee Transceiver Module

Rajesh Singh

1

, Madhu Sharma

2

, Vivek Kaundal

3

1Head, Robotics Institute R&D, University of Petroleum and Energy Studies, Dehradun (U.K), India 2Assistant Professor, CoES, University of Petroleum and Energy Studies, Dehradun (U.K), India 3Assistant Professor, CoES, University of Petroleum and Energy Studies,Dehradun (U.K), India

1 rsingh@ddn.upes.ac.in 2madhusharma@ddn.upes.ac.in

3 vkaundal@ddn.upes.ac.in

Abstract – In many applications a communication link between two devices becomes essential. This communication can be wired or wireless. If two devices are close to each other (like a microprocessor control unit and a Memory) then wired link is preferred. However in many applications two devices are reasonably far apart. In such applications, the data transmission can be achieved using Infrared (IR) and Radio frequency (RF). Line of sight (LOS) path is required between the transmitter and receiver in IR communication and hence is not used frequently. Instead, RF communication is used in wireless sensor network as it implements a wireless link in which the waves can penetrate a limited number of walls. In such cases a wireless link is preferred. In proposed system ZigBee module is used to establish wireless link between transmitter and receiver. The proposed advanced control room can be addressed as a part of design & evaluation of Nuclear Power Plant

Keywords— PIR, ATMEGA32, WPAN,ZIGBEE, USART, Nuclear Power Plant

I.

I

NTRODUCTION

Fig.1 and Fig.2 shows the Zigbee as receiving node or coordinator node and Zigbee as transmitting node. Transmitting node is capable to collect the sensory information and with the help of Zigbee transceiver module transmit it wirelessly to receiving node. Here receiving node is capable to receive with the help of Zigbee transceiver module the information which is transmitted by transmitting node and result will be displayed on PC with the help V1.9b Bray terminal or through hyper-terminal. AVR microcontrollers also have a dedicated hardware for serial communication this part is called the USART - Universal Synchronous Asynchronous Receiver Transmitter.

Figure 1 Zigbee as a Receiving Node

(2)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 5, May 2012)

468 You just have to supply the data you need to transmit and it will do the rest. Serial communication occurs at standard speeds of 9600, 19200 bps etc and this speeds are slow compared to the AVR CPUs speed. The advantage of hardware USART is that you just need to write the data to one of the registers of USART, you are free to do other things while USART is transmitting the byte. USART automatically senses the start of transmission of RX line and then inputs the whole byte and when it has the byte it informs CPU to read that data from one of its registers.

The USART of AVR is very versatile and can be setup for various different modes as required by our application. It will be little complicated but more useful as it will have a FIFO buffer and will use interrupt to buffer incoming data so that we are free to anything in your main () code and read the data only when we need. All data is stored into FIFO (first in first out queue) in the RAM by the ISR

II. USART OF AVRMICROCONTROLLER

The USART of the AVR microcontroller has following registers:

A. UDR - USART Data Register

This is two register but when you read it you will get the data stored in receive buffer and when you write data to it goes into the transmitter’s buffer. This important to remember it.

B. UCSRA - USART Control and status Register A

It is used to configure the USART and it also stores some status about the USART. There is two more of this kind the UCSRB and UCSRC.

C. UBRRH and UBRRH

This is the USART Baud rate register, it is 16BIT wide so UBRRH is the High Byte and UBRRL is Low byte. But as we are using C language it is directly available as UBRR and compiler manages the 16BIT access.

So the connection of AVR and its internal USART can be visualized as shown in Fig.3 below.

This is the USART Baud rate register, it is 16BIT wide so UBRRH is the High Byte and UBRRL is Low byte. But as we are using C language it is directly available as UBRR and compiler manages the 16BIT access. This register is used by the USART to generate the data transmission at specified speed (say 9600Bps). UBRR value is calculated according to following formula:

1

16 

BaudRate f

UBBR osc  

Where focus is your CPU frequency say 16MHz.Baud Rate is the required communication speed say 19200 bps.

Figure 3 USART Registers

III. FUNCTION TO TRANSMIT AND RECEIVE DATA

A. Initialization of USART

This function will initialize the USART.

void USARTInit(uint16_t ubrr_value) {

UBRR= ubrr_value; //Set Baud rate UCSRC=(1<<URSEL)|(3<<UCSZ0); // Set Frame Format

UCSRB=(1<<RXEN)|(1<<TXEN); //Enable The receiver and transmitter }

B. Reading From The USART :

This function will read data from the USART.

char USARTReadChar() {

while(!(UCSRA & (1<<RXC))) //Wait untill a data is available

{

//Do nothing }

return UDR;

//Now USART has got data from host and is available is buffer

}

C. Writing to USART USARTWriteChar()

void USARTWriteChar(char data) {

while(!(UCSRA & (1<<UDRE))) //Wait untill the transmitter is ready {

(3)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 5, May 2012)

469 }

UDR=data; //Now write the data to USART buffer }

D. Sending and Receiving data.

For sending and receiving data the steps are shown below.  We begin transmission by sending character 'A'  We again send one more 'A'

 Then we send the actual data.

 Now we send the inverse of data. That is all 0's are converted to 1 and vice-versa.

 We end the packet by sending 'Z'

In this way we create a packet based transmission with error detection algorithm is shown in Fig.4. If we went to the end of algorithm successfully it means that we have got a valid data and we can use it. So in this way we saw how a byte of data is transmitted from MCU#1 to MCU#2 via air. This simple algorithm filters real data from garbage data. We will use the received data to control the IO ports of MCU, in this way we will create a simple multi channel wireless remote control.

IV. HARDWARE

A. Transmitting Node Design

The Slave node is in charge of collecting and transmitting motion. The chip CC2500and Human motion sensor PIR constitute the sub-node. CC500 is the first SOC solution which supports the ZigBee protocol all over the world. An ATMEGA 32 MCU and a 2.4GHz wireless transceiver that suits to IEEE802. 15.4 standards are integrated inside.

There’s an 2 KB random access memory in it, including 32 Flash storage unit, A/D converter, timer, watchdog timer, , meanwhile 1 UART interfaces and 32 programming I/O pins are contained in the chip.

The following sections discuss the hardware components of the slave node.

1) Power supply unit

This unit is basically designed to power up the node 1 and node 2. This provides 5 V, 500mA output to drive the nodes.

2) Sensing module

The Passive Infrared Sensor (PIR) sensor module is used for motion detection. It can be used as motion detector for security systems or robotics. It works form 3.3V to5Vand gives TTL output which can be directly given to microcontroller or to relay through a transistor. It consists of pyro-electric sensor and Fresnel lens that detects motion by measuring change in the infrared levels emitted by the objects. It can detect motion up to 20ft. This module is very sensitive to change in infrared levels subjected by human movement.

3) Microcontroller

The ATmega16 is a low-power CMOS 8-bit microcontroller based on the AVR RISC architecture. By executing powerful instructions in a single clock cycle, the ATmega16 achieves throughputs approaching 1 MIPS per MHz, allowing the system designed to optimize power consumption versus processing speed.

(4)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 5, May 2012)

470 4) LCD module

The LCD unit receives character codes (8 bits per character) from a microprocessor or microcomputer, latches the codes to its display data RAM (80-byteDD RAM for storing 80 characters, transforms each character code into a 5 ´ 7 dot-matrix character pattern, and displays the characters on its LCD screen.

5) Transmitting module (ZigBee)

This is the radio frequency receiver module, which can facilitate the OEM designers to design their remote control applications in remote control in the quickest way. The circuit is designed with SMD components and the module size is small enough to be able to be fitted in almost any application. These modules are based on IC CC2500 by Texas Instrument. It works at frequency of 2.4GHz.

When collecting temperature data with PIR through this system, the connection way between temperature sensors and CC2500of the Slave node has been shown in Fig.5

Figure 5 Hardware Design of the Slave Node

B. Coordinator or receiving node design

The Master node plays a coordinator role in the whole net, so it should be designed to a Full Function Device, the main responsibilities of it are network establishing and maintenance, temperature data received in a wireless way, communication with the upper computer by serial port. We select CC2500 chip as the processor of the major-node, and expanding the serial communication port base on the CC2500 typical application circuit, MAX3232 chip is used to realizing level switch between TTL and RS232.

1) Power supply unit Same as section 4.1 A

2) Receiving module (ZigBee) Same as section 4.1 A

3) Microcontroller Same as section 4.1 A 4) LCD Display

Same as section 4.1 A 5) Max 232(level converter)-

The MAX232 is a dual driver/receiver that includes a capacitive voltage generator to supply EIA-232 voltage levels from a single 5-V supply. Each receiver converts EIA-232 inputs to 5-V TTL/CMOS levels. These receivers have a typical threshold of 1.3 V and a typical hysteresis of 0.5 V, and can accept ±30-V inputs. Each driver converts TTL/CMOS input levels into EIA-232 levels.

6) USB to Serial cable

This provide the interfacing between coordinator node and personal computer

7) Personal Computer

Data logged off on PC with the help HyperTerminal and V1.9b Terminal

Fig. 6 shows the hardware design of a Master Node.

Figure 6 Hardware Design of the Master Node

V. SOFTWARE DEVELOPMENT

(5)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 5, May 2012)

471 hardware as well to achieve the goal of to store the details of human information application, which involved the following steps ( Fig.7):

Coding/debugging of complete system Program is done by using AVR Studio 4.0 software shown in Fig. 7.Compiling of the code is done by using software Ponyprog2000v2.06f

Figure 7 Software Development

VI. VIEW OF THE SYSTEM

Figure9

Figure 11(a)

Figure 11(b) VII. RESULTS

The system has been integrated and tested to function properly. The goal of real time motion data transmission between the transmitting and receiving node is achieved. The wireless transmission results are given in figure 12. The results have been obtained through Terminal v1.9b. It shows the recorded motion.

Figure 8 Coding / Debugging

(6)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 5, May 2012)

472 The results obtained for power dissipation are shown in

Table 1. The three components that dominate power dissipation for slave sensor mote are the microcontroller, the radio and the buffer.

Table 1 Results: Power Dissipation

Node Design Current Consumption

Master node

Transceiver 2.4 GHz 60mA Miscellaneous (Driver,

Connector, cable) 12mA

Total 72mA

Slave node Microcontroller

Atmega32(Active) 19mA Transceiver 2.4 GHz 60mA

Motion sensor 3mA

Total 82mA

The results obtained for code size are shown in Table 2.

Table 2 Results: Code Size

Application Code Size

Program 3942B

Data 690B

Total 4632B

VIII. CONCLUSION AND FUTURE WORK

The Mica2 (MICA motes are available to the general public through a company called Crossbow sensor mote and Mica Z, which uses the TinyOS over the AVR platform, has been

compared in terms of code size and power with the present work. The current consumption of Mica Mote is found around 67mA while with that of present work is around 82mA. The code size of the Mica Mote for radio application has been found 9.5 KB while for the present work it has been found 4.632KB. It can be seen from the above data that power consumption of the motes is comparable while code size of the implemented sensor mote is much less than when compared to Mica Mote. The increase in code size in Mica Mote is due to TinyOS.

As a single node of network the overall system can be used as wireless security of commercial buildings, networking and some of the peculiar locations where human entrance is restricted like power plants, medical industries etc.

REFERENCES

[1] ZigBee Alliance, http://www.zigbee.org/

[2] http://www.tinyos.net/: TinyOS Operating system designed for

wireless embedded sensor networks

[3] J.Y. Chen, X.P. Zhou, “ZigBee Wireless Communication Technology

in Industrial Controls,” Radio Engineering of China, Vol. 36, No. 6, pp. 61-64, 2006

[4] Liu Jiangsha, Lei Wei, Yin You, “Designing of a wireless RF unit basingon CC2430,” International Electronic Elements, 2007

[5] JI ZhengZhou, Li Yan, Lu Hu “The Implementation of Wireless

Sensor Network node Based on ZigBee” - IEEE Journals 978-1-4244-2108-4/08, 2008

[6] Alan Mainwaring, Joseph Polastre, Robert Szewczyk, David

Culler,John Anderson “Wireless sensor networks for Habitat monitoring” - WSNA’02, September 28, 2002

Figure

Figure 1    Zigbee as a Receiving Node

Figure 1

Zigbee as a Receiving Node p.1
Figure 3   USART Registers

Figure 3

USART Registers p.2
Figure 4   Data Reception Algorithm

Figure 4

Data Reception Algorithm p.3
Figure 5    Hardware Design of the Slave Node

Figure 5

Hardware Design of the Slave Node p.4
Fig. 6 shows the hardware design of a Master Node.
Fig. 6 shows the hardware design of a Master Node. p.4
Figure 11(a)

Figure 11(a)

p.5
Table 2 Results: Code Size

Table 2

Results: Code Size p.6
Figure 10   Result through Terminal v1.9b.

Figure 10

Result through Terminal v1.9b. p.6
Table 1   Results: Power Dissipation

Table 1

Results: Power Dissipation p.6

References

  1. Crossbow