International Journal of Scientific & Engineering Research, Volume 4, Issue 7, July-2013 125

ISSN 2229-5518

Design and development of low cost embedded data acquisition and control system in Virtual Instrumentation

Engr Saba Fakhar Mohammad Qadeer Ahmed Lecturer, Department of Electronic Engineering Electrical & Instrument Engineer NED University of Engineering & Technology OMV ( Pakistan)

Karachi Pakistan

sabahmed@neduet.edu.pk qadeer76@yahoo.com

Abstract— This paper describes the design of a low cost,speedy embedded wireless data acquisition and control module using applications of virual instrumentation. The implemented embedded system provides means of duplex communication from Master Terminal Unit( MTU) to Remote Terminal Unit (RTU) through GSM network. This work originally shows the monitoring, control and communication between a host computer (MTU) and a RTU equipped with Microcontroller. The objective is to monitor and control the status of the port to which remotely situated devices can be connected. This portable module is capable of processing 28 different types of strings from remote devices but to make the system cost-effective and faster, it has been tested on three sets of strings from RTU. The security and reliability of design was ensured by effective use of VIs in LabView.

Index Terms—Data Acquisition, Duplex Communication, LabView, Microcontroller, MTU, Remote control of devices.

————————————————————

1 INTRODUCTION

PC based instrumentation system can leverage off rapid technological changes in the computer industry to produce virtual instruments, new uses and applications
for such instrumentation systems are rapidly changing. As the performance of operating systems, processors and buses improve without increasing the overall system cost, these virtual instruments are becoming more advantageous for system analysis and design applications [1].
There are numerous real world applications of wireless data acquisition systems. Several real time embedded systems have been designed for remote monitoring of device parameters such as temperature, pressure, humidity and flow level on real time basis [2]. Modern power generation plants and industries have large and distributed complexes. A variety of utility oriented software based digital devices with communication capabilities have emerged likewise the source data available in modern substation included fault reports along with the fault location, equipment status, station alarm and sequence of events [3]. With the advent of remote sensing now a host computer can be used to acquire data from distant substations and take appropriate action, also can be used for metering. Some home electricity meters have wireless transmitter by which collected meter reading is transmitted to the central computer for billing purpose [4].
This work originally presents a low cost real time data acquisition system with simple hardware structure including high performance RISC CPU Peripheral Interface Controller (PIC) and GSM Modem. To minimize development time and associated costs high level language (LabView) was used for human-machine interface.
Virtual Instruments display the front panel and some functions on the screen by specific software. LabView not only provides large built in library for remote sensing and control but also offers extreme flexibility to design VIs that can be efficiently used for simulation, data acquisition, data processing and distributed control [5,6,7].
Technically, the designed system is capable of receiving input data from RTU and taking appropriate action depending upon the application. The nodes of RTU can be diffrent sensors and actuator, continuosly monitoring the corresponding parameter and transfer to MTU through Wireless network.

2 SYSTEM DESCRIPTION

The portable embedded module is composed of two components, MTU (base station) and RTU (remote station) as shown in figure 1.

Figure(1): Basic System Architecture

IJSER © 2013 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 4, Issue 7, July-2013 126

ISSN 2229-5518

A. MTU/ BASE STATION:

The user-friendly graphical interface is the vital part of virtual instrumentation. First component of the system comprises of a host computer and Sony Ericson GSM Modem GM 29. This modem is a powerful and flexible device that can be used in a wide range of telemetry and telematics application that rely on remote exchange of data, voice or faxes via GSM network [8]. User interface on the host computer has been designed in LabView because of its user friendly environment and availability of wide range of tools.

B. RTU/REMOTE STATION

The remote station comprises of GSM module and PIC 16F876, interfaced through RS-232 serial communication. The main reason for the selection of PIC 16F876 was that USART (UniversalSysnchrounus/AsynchronousReceiver Transmitter) was incorporated on chip [9]. USART is also known as serial communication interface which make microcontroller hardware compatable for serial communication and is going to be configured as duplex asynchronous system for communication with modem. For transmission and reception through microcontroller different registers need to be configured. For this module Baud rate of 9600 bit/sec was required for interfacing microcontroller with modem therefore a crystal of 3.6864MHz frequency was selected which produces no error thus adding reliability to the system, as shown in figure 2.

Figure(2): Microcontroller circuit schematic

Figure(3): RS-232 circuit schematic
Baud rate was calculated using the following formula: Baud Rate = { Foscillator /64(SPBRG+1)} for BRGH=0
Baud Rate = { Foscillator /16(SPBRG+1)} for BRGH=1
Serial port of GM 29 cannot be interfaced directly with the microcontroller because of the difference of operating voltage so a line driver Max 232 chip was added in the system as shown in figure 3. Microcontroller was programmed in C- language environment because of its more hardware compatibility.

3 SYSTEM OPERATION AND TESTING

Remote station is assumed to have three possible states out of
256 possibilities and the tested port status are 0XF0, 0X0F and
0X5A. For demonstration and to understand the system
operation port status 0XF0 is selected. The port status 0XF0
from RTU was transmitted and then received at GSM modem
connected to MTU which is configured to direct the string to

the serial port of host computer.
Figure(4): String received on Hyperterminal

Figure(5): Hex editor
Strings from RTU consists of 82 bits containing service center address , message length, number of octets , phone number, time , date and actual message.

IJSER © 2013 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 4, Issue 7, July-2013 127

ISSN 2229-5518

The key feature of this research is to decode the actual message and sender details from the received string. Decoding can be divided into two parts: firstly, before testing the system for the selected string system should be able to recognize the format of received string which is totally different on receiving end. This is because of the fact that GSM character set consists of 123 characters which only use 7 bits of GSM system and encodes these 7 bits characters into 8 bits. It is done by taking the required number of bits from LSB side to the next character and placing them at the MSB side of current character making it 8 bits long. If the status PORT B = 0XF0 is sent to the modem it will encode it and the received message will be described as follows:
For PORT B= 0XF0

P O R T B = 0 x F 0

Hex code

50 4F 52 54 42 3D 30 78 46 30


1010000 1001111 1010010 1010100 1000010 0111101

01100001111000

1000110 0110000

The encoded message will be

11010000 10100111 10010100 00101010 11101100

11000001 11110000

D0 A7 94 2A EC C1 F0

01000110 00011000

46 18

Second part of decoding is to compare the string with another string. For which, it is necessary to have the information about the exact bit location of the port status inside the received string, to extract and compare it with already stored string but due to the presence of some non printable characters (figure 4) it is not possible on LabView. To check the exact number of these characters and actual length of the string, hex editor software was used which prints the non printable characters as shown in figure 5.
The extracted message was then compared with the default string and on verification corresponding LEDs were turned on the user interface of the host computer as shown in figure 6.

4 CONCLUSION

The presented embedded module can be used to perform real time monitoring and control of the remote sites. The data was transferred flawlessly in duplex mode via GSM channel. The built hardware as shown in figure 7 was tested for many

Figure(6): User interface
strings both from MTU and RTU and vice versa and was found accurate.

Figure(7): Hardware picture
A data base of supervisory control numbers was incorporated in the graphical user interface to maximize the security and reliability of control signal from MTU.

IJSER © 2013 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 4, Issue 7, July-2013 128

ISSN 2229-5518

The presented hardware and software provide a platform for diverse applications including process control and industry automation hence this device is a general embedded module that can be widely utilized for sensing various parameters with addition of different sensors according to the requirement of the system.

5 REFERNCES

[1] korrapati, R; Anderson, J.A,; Swain, N.K; Swain, M; “ SystemModelling using virtual Instruments” , SoutheastCon, 2002, Proceedinds IEEE, Columbia SC, USA.
[2] Dr. AdtiyaGoel& Ravi Shankar Mishra, “ Remote Data Acquisition using Wireless- Scada System”, International Journal of Engineering (IJE), Volume(3), Issue(1), 2009.
[3] Fong, J.C; Cameron, M.M; “Integration of substation protection, control and data acquisition system”, Pulp and Paper industry Technical confrenece, 1996, Birmingham AL, USA.
[4] Priddy B,; Javanov, E,; “ Wireless distributed data acquisition system”, System Theory 2002. Proceedings of the thirty fourth SoutheastCon Symposium 2002.
[5] Hui Zhu; Lijin Jin; XiaojunShen; YuzhuoShen; Kai Gu; “ Properties and applications of dielectric materials”, ICPADM
2009, IEEE 9th International Conference 2009.
[6] Swain, N.K; Anderson, J.A; Ajit Singh; Swain,M; Fulton, M; Garret, J; Tcker, O; “ Remote Data Acquisition, Control and analysis using LabView Front Panel and Real Time Engine”, SouthEast Con, 2003, Proceedings IEEE.
[7] Learning with LabView, Robert H. Bishop, Prentice Hall. [8] Sony Ericsson GM 29 GSM/GPRS modem,
http://www.icpdas.com
[9] PIC 16F876 Data Shhet, http://www.micrichip.com

IJSER © 2013 http://www.ijser.org