Printer Friendly

Read Data Of PLC Using Tranciver GSM.

1. INTRODUCTION

The technical uses of wireless communication motivates us to use the mobile phones to read the data of any control system of devices which can control different devices by sending an SMS message by two ways between the mobile phone and any control system. This controller is extremely handy at places without wire connection to that place being available. The microcontroller would then control and device based on the information given to it. The proposed solution will need to be easy to use on most mobile phones.

The important part of the system is the GSM Shield which can transfer the SMS in 8-bit as used to control temperature and motors. The GSM based control system implements the emerging applications of the GSM technology. Using GSM network control system that has been proposed will act as an embedded system like the PLC which can monitor and control devices locally using built-in input and output peripheral sand RTC model [1].

Remotely the system allows the use to effectively monitor and control the pump station of treatment the water for example or the draining and industrial appliance which uses the PLC the equipment's also via the mobile phones by transceivers commands in the form of SMS massages. The main concept behind the project is reading the data which is taken from the operations of the devices by the PLC and detecting the faults of devices.

This work designs a hardware which consists of a microcontroller board type ATMEGA256016AU and an integrated antenna system for transceiver; the signal type is GSM and this system provides a drive circuit which connects the microcontroller board and a device established by relays [2].

Initially an SMS is received from the sensors of the PLC control systems by transferring the analog to digital signal or digital signal using microcontroller unit; then, sending it to a mobile phone and this is done for an array of signals which are given by the sensors.

The MCU unit chooses the priority signals of sensors to transfer first to GSM model after that the user receives the message; if the PLC system does not cancel or make a solution for the fault for example then the user can send the SMS which controls the signal extracted and used to control the problem which functions from the signal of the programmed sensor of each device connected with the microcontroller. In this case, the signal which is coming from the GSM modem must be converted to septet of the phone because the microcontroller needs bytes with 8 bit length so the septet is 1byte with 7 bits length and octet is 1 byte with 8 bits length. All the process must decode the message from SMS [3].

A program for extracting the control signal part which is received by SMS is loaded into the microcontroller then the microcontroller tries to read the SMS from the inbox message of SIM card and after reading microcontroller gives order to clear the message in inbox [4].

For reading these data and controlling of devices, the messages will be converted to hexadecimal format. The hex data is converted to the equivalent binary. For example, if the message is "Device 1" the equivalent of hexadecimal to binary is D7 hex to "11010111" implies that the output ports of microcontroller are enabled and the remaining pins of ports are disabled. Each pin of port which is connected with relays by circuit drivers of control device has LED signal light to display the output, in this status indicates the ports are set to "ON" or reset "OFF" instead of the LCD display write the number of sending messages by times using the RTC model [5].

The microcontroller is also programmed to control device after incoming the SMS message to operate that device connecting with sensor which give the order that the device operates on condition of sensors of each device. The block diagram of system shown in figure (1) [6][7].

3. DEVICE DESCRIPTION

3.1- Microcontroller

The ATMEGA256016AU is a low-power CMOS8-bit microcontroller based on the AVR enhanced RISC architecture. By executing powerful instructions in a single clock cycle, the ATMEGA256016AU achieves through puts approaching 1MIPS per MHz allowing the system designed to optimize power consumption versus processing speed. The characteristic of the microcontroller is [8]:

-Architecture: 8 bit

- Program Memory (Flash): 256 k

- RAM: 8 kb

- EEPROM: 4 kb

- Pin:100 (Pin I/O:86 Pin)

- MAX CPU frequency: 16 MHz (1MIP 1MHzfrequency ) Peripherals:

- A/D Converter (10-bit):16 Channels

- Comparators: 2

- PWM: 12 Channels

- Timer Counter: 2X8-bit, 4X16-bit.

- I2C:1

- USART: 4

- SPI: 1

- LIN: Yes

Temperature: (-40/+85)C

Voltage: (2.7-5.5)V

The pin configuration of ATMEGA256016AU microcontroller with the functional pins are shown in figure 2 [8].

3.2- GSM Module

AGSM Shield with integrated antenna connects to the microcontroller for internet using the GPRS wireless network shown in figure (3). It is possible to communicate with the board using AT commands. The GSM library has a large number of methods for communication with the shield can be connected with microcontroller to transceiver the signal (RX)(TX) from GSM module to MCU by reading the message that stored in SIM card in box message and then transmit the signal (TX) from the MCU to SIM card to mobile phone.

The GSM Shield allows a microcontroller board to connect to the internet, to transceiver SMS messages. The shield uses a radio modem M10. The shield uses digital for software serial communication with the M10. Pin2 is connected to the M10'sTX pin and pin3 connected to RX pin. The M10 is a Quad-band GSM/GPRS modem that works at frequencies GSM850MHz, GSM900MHz, DCS1800MHz and PCS1900MHz.

It supports TCP/UDP and HTTP protocols through a GPRS connection. GPRS data down link and up link transfer speed maximum is 85.6 kbps [9][10].

3.3- Drive Circuits and Read Data

The PLC usually utilizes more power than the microcontroller that it contains which can provide via its I/O ports. To enable microcontroller to be connected to such devices, the system provided with (15) relays by means of which it is possible to provide up to 250 v power supply. Each relay has one normally open (W0, W1,...) and one normally closed (NW0, NW1,...) contact. Ten relays are programmed to control the PLC devices if the PLC does not respond to run or stop the devices that will be given to the mobile phone user to send message to operate the devices. Reading the data is usually specified with function which is stored in programs determined by the numbers of sensors that connected with MCU to read the parameters of the system station. The connection between the sensors and MCU is done by pull-up or pull- down resistance for digital input signal (digital sensors) and for analog input sensors using voltage divider to select the level of output sensors voltage. Drive type ULN2803 which consist of (8) Darlington connection transistors connects between the microcontroller and relays for each group of relays shown in figure (5). Figure (6) shows the connection between the digital sensors and MCU which used pull-up or pull-down resistors or the analog sensors which used voltage divider resistor connection [11][12] [13].

The hardware of project consists of 3 parts:

- LCD, RTC, ATMEGA Boards.

This board contains 4 parts (LCD board, RTC board, GSM board + SIM, ATMEGA board). These boards are connected by using serial and parallel pins which be can over controlled by software included in microchip ATMEGA instead of that the RTC board contains battery replacement to keep the time if the power is cut off from the system.

- Relay devices connection PCB board.

The board PCB consists of two devices of (8) array transistors and (16) relay and signalization diodes which are connected with each relay (devices).

- Keypad, wire connection between boards.

Using the array color wires to connect boards of PLC, the keypad to set the time of RTC board and to program each device by time instead of GSM control and the board contains the (8) pins for sensors for each device that is used to give the condition or situation ,for example in our pump station the condition each pump and other remote sensing signals.

4. SOFTWARE ALGORITHMIC FLOW CHART

The program of project containing two parts the first part which is explained in flow chart with blue color boxes means that the PLC controls the pump substation and sends messages to mobile phone every time the pumps operate if the user need to cancel these messages can do that by sending the messages to PLC cancel only that message however still other message is sent to mobile phone if new problem occurs in substation. The read boxes mean that the message send from mobile phone only is second part of program. The two part of program are shown in details by flowchart in figure (8), referring to appendix A in the main program merging these two parts. float. Each pump has the sensor to check the situation of working pump; if any pump is fault then PLC gives the caution that the standby pump understudied the fault pump. These signals display on LCD and send the messages to mobile phone to read the occurring in substation which are equal to data of PLC. The data is recorded by time through which the guard can control the substation and in time know More than 20 messages can be transferred. That means receiving messages by mobile phone and sending messages to PLC to solve the problems if occur in pump station. The program is written in micro C language and explained in appendix A.

5. WORKING THE SYSTEM & THE RESULT

The data which is read by MCU can be display on LCD, all of these data are identically displayed on mobile phone in message forms. The project was tested to control the pump station for draining the water rain in substation which consists of primary (4) pumps and one standby pump. The PLC controls these pumps to operate every time when the substation overflows sequentially between each pump delay time, approximately (5) minute. The sequence of operating the pumps changes for the next operating pumps. For example, the first sequence is (1,2,3,4) the second sequence (2,3,4,1) and the third sequence (3,4,1,2).... etc. This way can determine the time operation of all pumps to be constant usually using the digital sensors for overflowing and emptying the substation like the mercury float or other sensor less float.

Each pump has the sensor to check the situation of working pump; if any pump is fault then PLC gives the caution that the standby pump understudied the fault pump. These signals display on LCD and send the messages to mobile phone to read the occurring in substation which are equal to data of PLC. The data is recorded by time through which the guard can control the substation and in time know all the variable data of substation. Figure (9) shows all data on LCD and results on mobile phone.

More than 20 messages can be transferred. That means receiving messages by mobile phone and sending messages to PLC to solve the problems if occur in pump station. The program is written in micro C language and explained in appendix A. all the variable data of substation. Figure (9) shows all data on LCD and results on mobile phone.

6. CONCLUTION

To remote sensing of PLC control system of any industrial factory or substation using GSM module by transceiver connection between PLC and mobile phone which gives better technology of using this module wherever the user is and to know any fault occurring on location of which the user is responsible. This way can use a few messages to read all data in that factory without any trouble or severe work for the user who controls that substation. By controlling and reading data using GSM module which use the SIM card mobile communication by sending/receiving addressable SMS message from each mobile with PLC that help to function on all of the owner's devices to have control from a far distance.

REFERENCES

[1] Datasheet of the RTC: DS1307-Character-WINSTAR Dis Co.

[2] Maxim Integrated Products (2010) Powered Derivers PLC.

[3] Yuksekkaya, B,; Kayalar, A.A.; Tosun, M.B.; Ozacan, M. K." AGSM wireless imbedded control system(2007).

[4] AVR microcontroller software and hardware interfacing with GSM, Han-Way Huang, (2011).

[5] Viewing industrial automation system as multiple, Conte G., Scaradozzi D.(20013).

[6] Goldsmith A. (2011) GSM communication.

[7] N. P. Jawarkar, V. Ahmed, S. A. Ladhake, R. D. Thakare. AVR based remote monitoring. GSM, (2010).

[8] Microchip technology (2014), Datasheet Enhanced Flash USB AVR technology.

[9] GSM Association, Mobile Telephony Services Description,(2009). .

[10] Mobile Terminals S. P. A. (QUECTEL), datasheet (2012).

[11] ULN2803A--eight Darlington Arrays--ST Microelectronics (2008)

[12] Microchip technology (2012), AVR technology I/O connections.

[13] PLC for industrial advance controller, W. Bolton (2015).

Appendix(A)

The program is written in Micro C language with library software of LCD and RTC and GSM, Keypad
Part one for GSM program:-
 void send_sms(){
 char remote Num[20]="Mobile Number";
 chart xt Msg[200]="Pump station filled All Pumps
Operate";
 sms. begin SMS (remote
Num);
sms. print (txtMsg);
sms.end SMS();
Serial. flush();
 voidsend1_sms(){
 char remote Num[20]="Mobile Number";
 char txtMsg[200]="Pump station empty All Pumps
Stop"; sms. begin
SMS(remote Num); sms.
print(txtMsg); sms. end
SMS();
Serial.flush();
 voidsend2_sms(){
 charremoteNum[20]="MobileNumber";
 chartxtMsg[200]="Pump1 isFailure StandbyPump
Operate";
sms.beginSMS(remoteNu
m); sms.print(txtMsg);
sms.endSMS();
Serial.flush();
 voidsend3_sms(){
 charremoteNum[20]="MobileNumber";
 chartxtMsg[200]="Standby Pump Failure
Caution";
sms.beginSMS(remoteNu
m); sms.print(txtMsg);
sms.endSMS();
Serial.flush();
 voidsend4_sms(){
 charremoteNum[20]="MobileNumber";
 chartxtMsg[200]="Pump1&2areFai;ureCheckthe
Pumps";
sms.beginSMS(remoteNu
m); sms.print(txtMsg);
sms.endSMS();
Serial.flush();
 voidsend5_sms(){
 charremoteNum[20]="MobileNumber";
 chartxtMsg[200]="Pump1&2&3areFai;ureCheck
thePumps";
sms.beginSMS(remoteNu
m); sms.print(txtMsg);
sms.endSMS();
Serial.flush();
voidsend6_sms(){
charremoteNum[20]="MobileNumber";
chartxtMsg[200]="AllPumpsFailure System is
Fault"; sms.beginSMS(remoteNum);

sms.endSMS();
Serial.flush();
 voidsend7_sms(){
 charremoteNum[20]="MobileNumber";
 chartxtMsg[200]="UpFloatFailure Warning";
sms.beginSMS(remoteNum);
sms.print(txtMsg);
sms.endSMS();
Serial.flush();
 voidsend8_sms(){
 charremoteNum[20]="MobileNumber";
 char txtMsg[200]="Dawn Float Failure
Warning";
sms.beginSMS(remoteNum);
sms.print(txtMsg);
sms.endSMS();
Serial.flush();
 voidsend9_sms(){
 charremoteNum[20]="MobileNumber";
 char txtMsg[200]="Mantenance Station
Overall";
sms.beginSMS(remoteNum);
sms.print(txtMsg);
sms.endSMS();
Serial.flush();
 voidsend10_sms(){
 charremoteNum[20]="MobileNumber";
chartxtMsg[200]="TheSystemIS
READY";
 sms.beginSMS(remoteNum); sms.print(txtMsg);
 sms.endSMS(); Serial.flush();}

 Part two for LCD program:

 lcd.begin (20, 4);
 lcd.clear();        lcd.setCursor(1,0);
 lcd.print("text1"); lcd.setCursor(0,1);
 lcd.print("text2"); lcd.setCursor(6,2);
 lcd.print("text3"); lcd.setCursor(0,3);
 lcd.print("timeread fromRTC");  lcd.setCursor(11,3);
 lcd.print("dateread fromRTC");

 PartthreeforRTCprogram:-
 lcd.setCursor(0,4);
 lcd.print(rtc.get"TimeStr()); lcd.setCursor(11,4);
 lcd.print(rtc.get"DateStr());


 PartfourforKeypadprogram:-
 charkey=keypad.getKey();
 if(key=='*'){
 lcd.setCursor(0,8);
lcd.print("MENU");
mm;}
if(key=='A'){
lcd.setCursor(0,8);
lcd.print("SetTime");
gg;}
if(key=='B'){
lcd.setCursor(0,8);
lcd.print("SetHour");
hh;}
if(key=='1'){
lcd.setCursor(0,8);
lcd.print("SetMin.");
kk;}
if(key=='D'){
lcd.setCursor(0,8);
lcd.print("SetDate");
ff;}
if(key=='C'){
lcd.setCursor(0,8);
lcd.print("SetMonth");
xx;}
if(key=='#'){
lcd.setCursor(0,8);
lcd.print("SetYEAR");
ww;}
embedded


L. Kais Wadi (1), Jamal Hamid (2), L. Mubarak Hamad (3)

(1) Computer Control Eng. De pt. Tikrit University, Tikrit-Iraq.

(2) Electrical Eng. Dept. Tikrit University, Tikrit-Iraq.

(3) Computer Control Eng. Dept. Tikrit University, Tikrit-Iraq.

Received:3 Dec. 2015, Revised: 5 Aug. 2016, Accepted: 12 Aug. 2016, Published: 1 Sep. 2016

E-mail: kais_w@yahoo.com, jamalhamed2000@gmail.com, aukla mubarak74@yahoo.com

Kais Wadi Ibrahim MSc in Digital Electronics from Belgrade /Yugoslavia 1988--College of Electrical engineering and now is lecturer of Computer control Engineering /Tikrit University Work field: design PLC, Embedded System, Robotic and CNC Using PIC32 and FPGA Devices. Instead of wireless control System.

Jamal A. Hameed was born in Iraq/(Haditha)1953. He received the Diploma Eng. and PhD. from the University of TU Chemnitz(Germany) in 1979,1987 respectively, all in electrical engineering, specializing in computer Technology. He is currently a lecturer at the Department of Computing control Eng. .Before this he is director of Electrical Engineering Department/ Tikrit University. Dr. Jamal has a lot of publication in his

Mubarak Hamad Oglah. MSc degrees in physics from Mosul University in 1998 and 2001 and also served as a Faculty Member of Sebha University /Libya for ten years. He is currently a Lecturer at College of Petroleum& Minerals Engineering Department of Control& Computer Engineering at the University of Tikrit in Iraq Prior research activities were in the areas of semiconductor lasers ,optical nonlinearities and applications and Renewable Energy.. Currently, his research is addressing Solar cells with microbus controller.
COPYRIGHT 2016 University of Bahrain : Scientific Publishing Center
No portion of this article can be reproduced without the express written permission from the copyright holder.
Copyright 2016 Gale, Cengage Learning. All rights reserved.

Article Details
Printer friendly Cite/link Email Feedback
Author:Wadi, L. Kais; Hamid, Jamal; Hamad, L. Mubarak
Publication:International Journal of Computing and Network Technology
Geographic Code:7IRAQ
Date:Sep 1, 2016
Words:2847
Previous Article:Analysis and Performance Evaluation of OSPF and RIP Routing Protocols Using QualNet.
Next Article:A Survey of Lexical Functional Grammar in the Arabic Context.
Topics:

Terms of use | Privacy policy | Copyright © 2022 Farlex, Inc. | Feedback | For webmasters |