Top Banner
SCADA based Industrial Automation DEPT OF ECE 1
70

53504529 Industrial Automation Using SCADA

Apr 21, 2015

Download

Documents

Darshan Darshu
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

DEPT OF ECE 1

Page 2: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

Index

1 Introduction........................................................4

1.1 Problem Definition......................................................4

1.2 Proposed Solution.......................................................4

2 Hardware Description........................................10

2.1 MAIN FIG OF SCADA based Industrial Automation…………

2.1.1MicroController.........................................................10

2.1.2Max 232....................................................................11

2.1.3Relay and drivers......................................................11

2.1.4ADC..........................................................................12

2.1.5 Power Supply...........................................................14

2.1.6 DB9 Connector.........................................................15

2.1.7Sensors....................................................................13

1 Fire Sensor..................................................................................

2 Panic Sensor…………………………………………………………………..….

3 Temperature Sensor……………………………………………………..…

3 GSM................................................................15

4 Software..........................................................15

5 Schematic.........................................................16

6 Code Of Microcontroller………………………………….18

DEPT OF ECE 2

Page 3: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

7 Advantages………………………………………..………….

8 Applications…………………………………………………..……

9 Conclusion…………………………………………………………

Chapter 1

DEPT OF ECE 3

Page 4: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

INTRODUCTION

1.1 Problem Definition:

There are two distinct threats to a modern SCADA system. First is the

threat of unauthorized access to the control software, whether it be

human access or changes induced intentionally or accidentally by virus

infections and other software threats residing on the control host

machine. Second is the threat of packet access to the network segments

hosting SCADA devices. In many cases, there is rudimentary or no

security on the actual packet control protocol, so anyone who can send

packets to the SCADA device can control it. In many cases SCADA users

assume that a VPN is sufficient protection and are unaware that physical

access to SCADA-related network jacks and switches provides the ability

to totally bypass all security on the control software and fully control

those SCADA networks. These kinds of physical access attacks bypass

firewall and VPN security and are best addressed by endpoint-to-endpoint

authentication and authorization such as are commonly provided in the

non-SCADA world by in-device SSL or other cryptographic techniques.

The reliable function of SCADA systems in our modern infrastructure may

be crucial to public health and safety. As such, attacks on these systems

may directly or indirectly threaten public health and safety. Such an

attack has already occurred, carried out on Maroochy Shire Council's

sewage control system in Queensland, Australia. Shortly after a contractor

installed a SCADA system there in January 2000 system components

began to function erratically. Pumps did not run when needed and alarms

were not reported. More critically, sewage flooded a nearby park and

contaminated an open surface-water drainage ditch and flowed 500

meters to a tidal canal. The SCADA system was directing sewage valves

to open when the design protocol should have kept them closed. Initially

DEPT OF ECE 4

Page 5: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

this was believed to be a system bug. Monitoring of the system logs

revealed the malfunctions were the result of cyber attacks. Investigators

reported 46 separate instances of malicious outside interference before

the culprit was identified. The attacks were made by a disgruntled

employee of the company that had installed the SCADA system. The

employee was hoping to be hired full time to help solve the problem.

1.2 Proposed Solution:

The real advantages of a SCADA system is that you have a real-time

control of inventories and can program a system to "see ahead", to notify

you that the tank will be empty in "76 hrs". It also will take most operator

errors (or neglect) out of the process. The system doesn't tire, take

breaks, or go on vacation. You can monitor the system over a network,

from a remote site over the Internet or through a dial-up line. It can

decide who to notify and if the situation is not corrected, be programmed

to alert personal at higher levels of responsibility.

Systems have multiple levels of security available so that screens can be

locked, hidden or display only depending on the security level. Higher

levels of authorization can change setpoints and timing.

Updating software is a dial-up operation and is easily done without a site

visit. Once a system is running, program changes are easily made at little

cost. We can remotely monitor a system to debug or update software in

real time. The system stays running while we work. 

The potential is endless, only limited by your imagination. Costs are

relative low and the new object oriented systems can be programmed

DEPT OF ECE 5

Page 6: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

rapidly. You can have a 50 point system running is a few weeks, a 500

point system in a few months.

 

Chapter 2

HARDWARE DESCRIPTION

DEPT OF ECE 6

Max 232

VB Code running in

the PC

Page 7: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

Block Diagram of SCADA Based Industrial Automation

The Block diagram of the SCADA based Industrial Automation

consists of following components:

2.1.1 Microcontroller

DEPT OF ECE 7

74HC14Schmitt Trigger

Micro-controller 89C51

Relay control mechanism

Temperature Sensing 1

LM35

Analog to Digital Converter ADC0809

DC Motor 1 DC Motor 2

Panic sensor

Fire sensor

Page 8: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

This is the heart of the circuit which controls and co-ordinates a every

activity of ALBP & PSM. The IC used here is AT89S52. It controlles the

operation of the all peripheral devices connected to this controller board.

2.1.2 MAX232

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

hysteretic of 0.5 V, and can accept ±30-V inputs. Each driver converts

TTL/CMOS input levels into EIA-232 levels.

2.1.3 Relay and Drivers

A relay is an electrical switch that opens and closes under the control of

another electrical circuit, the switch is operated by an electromagnet to

open or close one or many set of contacts. The movement either makes

or breaks a connection with a fixed contact. Relay has 5 pins normally

connect(NC),normally open(NO),C1,C2 and pole. NC is given 5V , NO is

grounded, C1 is given 12V, C2 is connected to microcontroller, pole is

connected to motor.A relay is an electrically controllable switch. It allows

the isolation of 2 separate sections of a system with 2 different voltage

sources, one such relay is called an electromagnetic or electromechanical

relay

Relays are used to allow a low power circuit to switch a

relatively high current on and off • 1 CO (SPDT), 10 A Sugar cube size PCB

mounts relay is used to serve the purpose of level converter between

microcontroller TTL logic and relay excitation voltage. ULN 2003 is used

DEPT OF ECE 8

Page 9: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

has a series base resistor to each Darlington pair, thus allowing operation

directly with TTL or CMOS operating at supply voltages of 5.0V.

Relay Switch

A relay is an electrically operated switch. Current flowing through

the coil of the relay creates a magnetic field which attracts a lever and

changes the switch contact. Relays allow one circuit to switch a second

circuit which can be completely separate from the first. There is no

electrical connection inside the relay between the two circuits; the link is

magnetic and mechanical.

Fig 4.2 Cubic Relay Fig 4.3 Cubic Relay

1 Advantage of Relays

Relays can switch AC and DC, transistors can only switch DC.

Relays can switch high voltages, transistors cannot.

Relays are better choice for switching large currents.

Relays can switch many contacts at once.

2 Disadvantage of Relays

Relays are bulkier than transistors for switching small currents.

Relays use more power due to the current flowing through their

coil.

DEPT OF ECE 9

Page 10: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

3 Features

Printed circuit mounts 10 A relay

• 1 Pole changeover contacts or

1 Pole normally open contact

• Miniature - "Sugar cube" package

• DC coil - 360 mW

•Wash tight: RT III

• Cadmium Free contact material option

2.1.4 ADC0809

ADC0809 is an 8-bit analog to digital converter. It is used to convert

the analog voltage of temperature sensor and battery circuit. The

reference voltage of ADC0809 is 5V. It is an 8 channel ADC. The Voltage

sensors are connected from channel 0 to Channel 3.

DEPT OF ECE 10

Page 11: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

C L K1 0

O E9

E O C7

D 01 7

D 11 4

D 21 5

D 38

D 41 8

D 51 9

D 62 0

D 72 1

S TA R T6

A L E2 2

V C C1 1

G N D1 3

R E F +1 2

R E F -1 6

I N 02 6

I N 12 7

I N 22 8

I N 31

I N 42

I N 53

I N 64

I N 75

A 02 5

A 12 4

A 22 3

U 2

A D C 0 8 0 9

34

U 3 B

7 4 H C 1 4

R 3 1 K

C 4

0 . 0 0 1 u F (1 0 2 )

To M ic ro C o n t ro lle r P in 3 3 P 0 . 6

To M ic ro C o n t ro lle r P in 3 2 P 0 . 7

To M ic ro C o n t ro lle r P in 3 7 P 0 . 2

To M ic ro C o n t ro lle r P in 3 6 P 0 . 3

To M ic ro C o n t ro lle r P in 3 4 P 0 . 5

To M ic ro C o n t ro lle r P in 3 5 P 0 . 4

To M ic ro C o n t ro lle r P in 3 8 P 0 . 1

To M ic ro C o n t ro lle r P in 3 9 P 0 . 0

F ro m M ic ro C o n t ro lle r P in 2 7 P 2 . 6

F ro m M ic ro C o n t ro lle r P in 2 8 P 2 . 7

+5 V

Te m p e ra t u re _ 1

Te m p e ra t u re _ 2

V o lt a g e

Fig: 3.4 ADC with the clock generation Ckt

DEPT OF ECE 11

Page 12: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

1 5

6

4 8

T1

TR A N S F O R M E R C T

230V AC

D 1

D I O D E

D 2

D I O D E

+C 51 0 0 u F

+ C 61 u F

To A D C P in 2 8

V S +1

VO

UT

2

G N D3

U 4L M 3 5 / Te m p e ra t u re S e n s o r_ 2

+5 V

+5 V

V S +1

VO

UT

2

G N D3

U 5L M 3 5 / Te m p e ra t u re S e n s o r_ 1

To A D C P in 2 7

To A D C P in 2 6

Fig: 3.4 Values Temperature and Voltage Inputs to the ADC

DEPT OF ECE 12

Page 13: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

ADC SECTION (ADC0809)

Figure4.3 Analog to digital converter

DESIGN OF CLOCK GENERATION:

f=0.7/R3C.

f=0.7/1x10³x0.01x10^-6.

F=0.7x10^5

F=700 KHz...

DEPT OF ECE 13

Page 14: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

The main function of this section is to convert analog voltage

generated by rectifier output to their corresponding digital output. Analog

to digital converters are among the most widely used devices for data

acquisition. A physical quantity is converted to electrical voltage/current

using a device called transducers. Transducers are also referred to as

sensors. Therefore we need an analog to digital converter to translate the

analog signals to digital numbers so that the micro controller can read

and process them.

ADC0809 data acquisition component is a CMOS device with an 8

bit analog to digital converter, 8 channels multiplexer and microprocessor

compatible control logic, the 8 bit A/D converter uses successive

approximation as the conversion technique. ADC0809 allows monitoring

into 8 different analog inputs using only a single chip. It also has 8 bit

data outputs. The 8 analog input channels are multiplexed and selected

using 3 address pins A, B, C. One important element in ADC0809 on the

board is the analog comparator. It looks like an opamp schematically. The

difference is that it accepts analog inputs but produces a digital

output .Its output will be high if the +ve analog level is greater than –ve

analog level, else its output will be low.

ADC0809 offers high speed, minimal temperature dependence,

excellent long- term accuracy and repeatability, and consumes minimal

power. A clock of 700 KHz, generated by the Schmitt trigger circuit ,is

given to pin number 10 of ADC .The analog input channel IN0 is selected

by grounding the three address pins A,B,C. Input at IN0 is the

temperature data. The analog input channel IN1 is selected by grounding

the pins B and C. Input at IN1 is the data from the weight sensor. Output

enable (OE) is always made high to produce a digital output for equivalent

DEPT OF ECE 14

Page 15: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

analog input . The 8-bit data outputs are given as inputs to the

microcontroller.

2.1.5 POWER SUPPLY

An AC to DC adaptor as been used to get DC input for the mother

board. In mother board, we have developed a 5V regulator circuit, which

is needed for microcontroller as supply voltage. IR transmitters are also

connected to 5V supply, so that they always transmit high signal. LM7805

is used for 5V regulated supply.

- +

U 1

B R I D G E

1

2

3

4U 2 L M 7 8 0 5

V I N1

GN

D2

V O U T3

+ C 21 0 u F / 6 3 V

12

R 11 K

1 2

C O N 1

3 P I N D C S O C K E T

123

L E D 1

L E D

1 2

C 4

0 . 1 u F12

+1 2 V

+1 2 V

+C 34 7 0 u F / 3 5 V

12

+5 V

LM7805 Positive Voltage Regulator

General Description

DEPT OF ECE 15

Page 16: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

The LM78XX series of three terminal positive regulators are

available in the TO-220 package and with several fixed output voltages,

making them useful in a wide range of applications. Each type employs

internal current limiting, thermal shut down and safe operating area

protection, making it essentially indestructible. If adequate heat sinking is

provided, they can deliver over 1A output current. Although designed

primarily as fixed voltage regulators, these devices can be used with

external components to obtain adjustable voltages and currents.

Features

Output current in excess of 0.5A

No external components

Internal thermal overload protection

Internal short circuit current-limiting

Output transistor safe-area compensation

DEPT OF ECE 16

Page 17: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

Available in TO-220, TO-39, and TO-252 D-PAK packages

Output voltages of 5V, 12V, and 15V

2.1.6 DB-9 CONNECTOR

Figure DB-9 connector

Many Pcs today use DB-9 connectors since all you need in

asynchronous mode is 9 signals. Since not all the pins are used in pc

cables, IBM introduced the DB-9 version of the serial I/O standard, which

uses 9 pins only. In many applications only one of each is used. For

example, T1 and R1 are used together for TXD and RXD of the 89C51, and

the second set is left unused. Notice in max232 that the T1 line driver has

a designation of T1 in and T1 out on pin numbers 11 and 14,

respectively .The T1 in pin is the TTL side and is connected to the RXD pin

of the RS232 DB-9 connector. The R1 line driver has a designation of R1in

and R1 out on pin number 13 and 12, respectively.The R1in (pin 13) is the

RS232 side that is connected to the RXD pin of the microcontroller.

2.1.7 SENSORS

1. Fire Sensor

Tungsten A steel-gray metal under standard conditions when

uncombined, tungsten is found naturally on Earth only in chemical

compounds. It was identified as a new element in 1781, and first isolated

DEPT OF ECE 17

Page 18: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

as a metal in 1783. Its important ores include wolframite and scheelite.

The free element is remarkable for its robustness, especially the fact that

it has the highest melting point of all the non-alloyed metals and the

second highest of all the elements after carbon. Also remarkable is its

high density of 19.3 times that of water, comparable to that of uranium

and gold, and much higher (about 1.7 times) than that of lead. [3] Tungsten

with minor amounts of impurities is often brittle[4] and hard, making it

difficult to work. However, very pure tungsten is more ductile, and can be

cut with a hacksaw.[5]

The unalloyed elemental form is used mainly in electrical applications.

Tungsten's many alloys have numerous applications, most notably in

incandescent light bulb filaments, X-ray tubes (as both the filament and

target), and superalloys. Tungsten's hardness and high density give it

military applications in penetrating projectiles. Tungsten compounds are

most often used industrially as catalysts.

Tungsten is the only metal from the third transition series that is known to

occur in biomolecules, where it is used in a few species of bacteria. It is

the heaviest element known to be used by any living organism. However,

tungsten it is also used as a fire sensor in many industrial area.

2. Panic Sensor:

A panic sensor is an electronic device designed to assist in alerting

somebody in emergency situations where a threat to persons or property

exists.

A panic sensor is frequently but not always controlled by a concealed

panic sensor button. These buttons can be connected to a monitoring

DEPT OF ECE 18

Page 19: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

center or locally via a silent alarm or an audible bell/siren. The alarm can

be used to request emergency assistance from local security, police or

emergency services. Some systems can also activate closed-circuit

television to record or assess the event.[1]

Many panic sensor buttons lock on when pressed, and require a key to

reset them.

3. Temperature Sensor

While an individual thermometer is able to measure degrees of hotness,

the readings on two thermometers cannot be compared unless they

conform to an agreed scale. There is today an absolute thermodynamic

temperature scale. Internationally agreed temperature scales are

designed to approximate this closely, based on fixed points and

interpolating thermometers. The most recent official temperature scale is

the International Temperature Scale of 1990. It extends from 0.65 K

(−272.5 °C; −458.5 °F) to approximately 1,358 K (1,085 °C; 1,985 °F).

DEPT OF ECE 19

Page 20: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

DEPT OF ECE 20

Page 21: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

Chapter 3

GSM:

Global System for Mobile Communications, or GSM (originally from Groupe

Spécial Mobile), is the world's most popular standard for mobile telephone

systems. The GSM Association estimates that 80% of the global mobile

market uses the standard.[1] GSM is used by over 1.5 billion people[2]

across more than 212 countries and territories.[3] This ubiquity means that

subscribers can use their phones throughout the world, enabled by

international roaming arrangements between mobile network operators.

GSM differs from its predecessor technologies in that both signaling and

speech channels are digital, and thus GSM is considered a second

generation (2G) mobile phone system. This also facilitates the wide-

spread implementation of data communication applications into the

system.

The GSM standard has been an advantage to both consumers, who may

benefit from the ability to roam and switch carriers without replacing

phones, and also to network operators, who can choose equipment from

many GSM equipment vendors.[4] GSM also pioneered low-cost

implementation of the short message service (SMS), also called text

messaging, which has since been supported on other mobile phone

standards as well. The standard includes a worldwide emergency

telephone number feature (112).[5]

Newer versions of the standard were backward-compatible with the

original GSM system. For example, Release '97 of the standard added

DEPT OF ECE 21

Page 22: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

packet data capabilities by means of General Packet Radio Service

(GPRS). Release '99 introduced higher speed data transmission using

Enhanced Data Rates for GSM Evolution (EDGE).

GSM and IS-95 (aka cdmaOne) are the two most prevalent mobile

communication technologies. Both technologies have to solve the same

problem: to divide the finite RF spectrum among multiple users.

TDMA (Time Division Multiple Access - underlying technology used in

GSM's 2G) does it by chopping up the channel into sequential time slices.

Each user of the channel takes turns to transmit and receive signals. In

reality, only one person is actually using the channel at a specific

moment. This is analogous to time-sharing on a large computer server.

CDMA (Code Division Multiple Access - underlying technology used in

GSM's 3G and IS-95's 2G) on the other hand, uses a special type of digital

modulation called spread spectrum which spreads the voice data over a

very wide channel in pseudorandom fashion. The receiver undoes the

randomization to collect the bits together and produce the sound.

As a trivial comparison imagine a cocktail party, where couples are talking

to each other in a single room. The room represents the available

bandwidth. In GSM, a speaker takes turns talking to a listener. The

speaker talks for a short time and then stops to let another pair talk.

There is never more than one speaker talking in the room, no one has to

worry about two conversations mixing. In CDMA, any speaker can talk at

any time; however each uses a different language. Each listener can only

understand the language of their partner. As more and more couples talk,

the background noise (representing the noise floor) gets louder, but

because of the difference in languages, conversations do not mix.

DEPT OF ECE 22

Page 23: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

Advantagesof 2G GSM

* GSM is mature; this maturity means a more stable network with robust

features.

* Less signal deterioration inside buildings.

* Ability to use repeaters.

* Talktime is generally higher in GSM phones due to the pulse nature of

transmission.

* The availability of Subscriber Identity Modules allows users to switch

networks and handsets at will.

* GSM covers virtually all parts of the world so international roaming is not

a problem.

Disadvantages of 2G GSM

* Pulse nature of TDMA transmission used in 2G interferes with some

electronics, especially certain audio amplifiers. 3G uses W-CDMA now.

* Intellectual property is concentrated among a few industry participants,

creating barriers to entry for new entrants and limiting competition

among phone manufacturers.

* GSM has a fixed maximum cell site range of 35 km, which is imposed by

technical limitations.

DEPT OF ECE 23

Page 24: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

Chapter 4

Software

DEPT OF ECE 24

Page 25: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

1. KEIL Development Tool

Keil software provides the ease of writing the code in either C or

ASSEMBLY. U-VISION 2, the new IDE from Keil Software combines

Project

management, Source Code Editing and Program Debugging in one

powerful

environment. It acts as a CROSS-COMPILER.

1.1 How to Create a New Project

1. Select the Project from the menu bar.

2. Select New Project.

3. Give the File Name. A project with extension of .uv2 will be created

DEPT OF ECE 25

Page 26: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

DEPT OF ECE 26

Page 27: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

1.2 Selecting the Device

1. After giving the file name the device list windows opens.

2. Select the respective company’s microcontroller IC that is going to

be implemented in hardware.

3. From the drop down arrow, we get a list of all the chips from that

particular manufacturer. Choose the appropriate one.

4. Now the target is ready.

5. The data sheets and user manuals are automatically added.

DEPT OF ECE 27

Page 28: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

1.3 Configuring the essentials

1. Right Click on Target to view the options for Target 1.

2. The Target tab enables to give the Starting address and size of RAM

and ROM. We also have to specify the frequency of the crystal used

which in our case is 11.0592Hz.

3. The Output tab has the option to create the HEX file. Confirm the

check box given beside it.

4. The A166 and C51 tabs shows the compiler options.

DEPT OF ECE 28

Page 29: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

1.4 Addition of files in Source group

1. After the Target is created the source group is added to it.

2. Select the file menu and choose the ‘New’ option in it to get a page.

Save the same with a .a51 or .asm extension. These assembler files

are the ones recognized by the compiler.

3. Right click on source group and select add files to include the

program. Select the assembler files created earlier and confirm the

action. The selected files appear in the left-hand side project

window.

4. These files will contain your actual program in assembly or in

embedded C language

DEPT OF ECE 29

Page 30: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

5. Options for source group includes the compilers C51 and A51 paths.

1.5 Running the program

1. Any number of sub programs can be added to source group.

2. To run the program right click on it and select Build Target. When

you

build an application with syntax errors, µVision2 will display errors

and warning messages in the Output Window – Build page. A double

click on a message line opens the source file on the correct location

in a µVision2 editor window.

3. Then select rebuild all the target files too. With the Rebuild Target

DEPT OF ECE 30

Page 31: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

command, all source files are translated, regardless of

modifications.

4. After the target is built, debugging is done.

5. After all the debugging the file is built again which creates a hex

file. This hex file is then used to download to the microcontroller

using a programmer kit.

1.6 Target Program Execution & Debugging

µVision2 lets execute your application program in several different ways:

With the Debug Toolbar buttons and the “Debug Menu and Debug

Commands”.

With the Run till Cursor line command in the local menu. The local

menu opens with a right mouse click on the code line in the Editor

or Disassembly window.

In the Output Window – Command page you can use the Go, Ostep,

Pstep, and Tstep commands.

1.7 Watch Window

The Watch window lets you to view and modify program variables

and lists the current function call nesting. The contents of the Watch

Window are automatically updated whenever program execution stops.

You can enable View Periodic Window Update to update variable values

while a target program is running.

DEPT OF ECE 31

Page 32: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

The Locals page shows all local function variables of the current function.

The

Watch pages display user-specify program variables. You add variables in

three different ways:

Select the text <enter here> with a mouse click and wait a second.

Another mouse click enters edit mode that allows you to add

variables. In the same way you can modify variable values.

In an editor window open the context menu with a right mouse click

and use Add to Watch Window. µVision2 automatically selects the

variable name under the cursor position, alternatively you may

mark an expression before using that command.

In the Output Window – Command page you can use the Watch Set

command to enter variable names.

To remove a variable, click on the line and press the Delete key.

The current function call nesting is shown in the Call Stack page. Double

clicking on a line shows the invocation an editor window.

2. KEIL SOFTWARE

2.1 INTRODUCTION

DEPT OF ECE 32

Page 33: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

The Keil Software 8051 development tools listed below are

programs you use to compile your C code, assemble your assembly

source files, link and locate object modules and libraries, create HEX files,

and debug your target program μVision2 for Windows™ is an Integrated

Development Environment that combines project management, source

code editing, and program debugging in one single, powerful

environment.

Keil Software delivers software in two types of kits: evaluation kits and

production kits.

Evaluation Kits include evaluation versions of our 8051 tools along with

this user’s guide. The tools in the evaluation kit let you generate

applications up to 2 Kbytes in size. This kit allows you to evaluate the

effectiveness of our 8051 tools and generate small target applications.

Production Kits (discussed in “Product Overview” on page 16) include

the unlimited versions of our 8051 tools along with a full manual set

(including this user’s guide). The production kits include 1 year of free

technical support and product updates. Updates are available at

www.keil.com

Product Overview

Keil Software provides the premier development tools for the 8051

family of microcontrollers. We bundle our software development tools into

different packages or tool kits. The “Comparison Chart” on page 17 shows

the full extent of the Keil Software 8051 development tools. Each kit and

its contents are described below.

PK51 Professional Developer’s Kit

The PK51 Professional Developer’s Kit includes everything the

professional developer needs to create and debug sophisticated

DEPT OF ECE 33

Page 34: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

embedded applications for the 8051 family of microcontrollers. The

professional developer’s kit can be configured for all 8051 derivatives.

DK51 Developer’s Kit

The DK51 Developer’s Kit is a reduced version of PK51 and does

not include the RTX51 Tiny real-time operating system. The developer’s

kit can be configured for all 8051 derivatives.

CA51 Compiler Kit

The CA51 Compiler Kit is the best choice for developers who need a

C compiler but not a debugging system. The CA51 package contains only

the μVision2 IDE. The μVision2 Debugger features are not available in

CA51. The kit includes everything you need to create embedded

applications and can be configured for all 8051 derivatives.

A51 Assembler Kit

The A51 Assembler Kit includes an assembler and all the utilities

you need to create embedded applications. It can be configured for all

8051 derivatives.

RTX51 Real-Time Operating System (FR51)

The RTX51 Real-Time Operating Systems is a real-time kernel for

the 8051 family of microcontrollers. RTX51 Full provides a superset of the

features found in RTX51 Tiny and includes CAN communication protocol

interface routines.

3. Visual Basic

3.1 INTRODUCTION

DEPT OF ECE 34

Page 35: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

It is no secret that Visual Basic is the favorite programming

environment of many programmers. When Visual Basic first appeared, it

created a revolution in Windows programming, and that revolution

continues to this day. Never before had Windows programming been so

easy just build the program you want, right before your eyes, and then

run it. Visual Basic introduced unheard-of ease to Windows programming

and changed programming from a chore to something very fun.

In time, Visual Basic has gotten more complex, as well as more

powerful. This is the best way to write about programming. Instead of

superimposing some abstract structure on the material in this book, we

will organize it the way programmers want it task by task. We will create

the foundation we will relyon later as we take a look at the basics of

Visual Basic, including how to create Visual Basic projects and seeing

what’s in such projects. We will also get an overview of essential Visual

Basic concepts like forms, controls, events, properties, methods, and so

on. And we will examine the structure of a Visual Basic program, taking a

look at variables, variable scope, and modules. In other words, we are

going to lay bare the anatomy of a Visual Basic program here.

DEPT OF ECE 35

Page 36: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

Fig: 6.1 visual Basic Front End

DEPT OF ECE 36

Page 37: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

Chapter 5

Schematic Diagram

DEPT OF ECE 37

Page 38: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

To A D C A d d A

To A D C S t a rt

R 11 0 K

+C 34 7 u F

RS

T9

XTA L 21 8

XTA L 11 9

G N D2 0

P S E N2 9

A L E / P R O G3 0

E A / V P P3 1

V C C4 0

P 1 . 01

P 1 . 12

P 1 . 23

P 1 . 34

P 1 . 45

P 1 . 56

P 1 . 67

P 1 . 78

P 2 . 0 / A 82 1

P 2 . 1 / A 92 2

P 2 . 2 / A 1 02 3

P 2 . 3 / A 1 12 4

P 2 . 4 / A 1 22 5

P 2 . 5 / A 1 32 6

P 2 . 6 / A 1 42 7

P 2 . 7 / A 1 52 8

P 3 . 0 / R XD1 0

P 3 . 1 / TXD1 1

P 3 . 2 / I N T01 2

P 3 . 3 / I N T11 3

P 3 . 4 / T01 4

P 3 . 5 / T11 5

P 3 . 6 / W R1 6

P 3 . 7 / R D1 7

P 0 . 0 / A D 03 9

P 0 . 1 / A D 13 8

P 0 . 2 / A D 23 7

P 0 . 3 / A D 33 6

P 0 . 4 / A D 43 5

P 0 . 5 / A D 53 4

P 0 . 6 / A D 63 3

P 0 . 7 / A D 73 2

U 1

A T8 9 C 5 1

12 3 4 5 6 7 8 9 10

R N 14 . 7 K S I P R e s is t o r

C 23 3 P F

C 13 3 P F

X1

1 1 . 0 5 9 2 M H z

+5 V

F ro m A D C D 1

F ro m A D C D 0

F ro m A D C D 3

F ro m A D C D 2

F ro m A D C D 6

F ro m A D C D 5

F ro m A D C D 4

F ro m A D C D 7

To H T1 2 E D 0

To M A X2 3 2 P in 1 2

To M A X2 3 2 P in 1 1

Fig: 3.2 schematic diagram of Main Controller

The ATMEL 89C51 Microcontroller

1 Introduction

DEPT OF ECE 38

Page 39: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

The AT89C51 is a low-power, high-performance CMOS 8-bit

microcomputer with 4K bytes of Flash programmable and erasable read

only memory (PEROM). The device is manufactured using Atmel’s high

density non-volatile memory technology and is compatible with the

industry-standard MCS-51 instruction set and pin out. The on-chip Flash

allows the program memory to be reprogrammed in-system or by a

conventional non-volatile memory programmer. By combining a versatile

8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a

powerful microcomputer which provides a highly-flexible and cost-

effective solution to many embedded control applications

2 Features of AT89C51

• Compatible with MCS-51™ Products

• 4K Bytes of In-System Reprogrammable Flash Memory

– Endurance: 1,000 Write/Erase Cycles

• Fully Static Operation: 0 Hz to 24 MHz

• Three-level Program Memory Lock

• 128 x 8-bit Internal RAM

• 32 Programmable I/O Lines

• Two 16-bit Timer/Counters

• Six Interrupt Sources

• Programmable Serial Channel

3 Pin Description

DEPT OF ECE 39

Page 40: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

Fig: 4.1 Pin Description of AT89C51

VCC

Supply voltage.

GND

Ground.

Port 0

Port 0 is an 8-bit open-drain bi-directional I/O port. As an output

port, each pin can sink eight TTL inputs. When 1s are written to port 0

pins, the pins can be used as high impedance inputs. Port 0 may also be

configured to be the multiplexed low order address/data bus during

DEPT OF ECE 40

Page 41: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

accesses to external program and data memory. In this mode P0 has

internal pull-ups. Port 0 also receives the code bytes during Flash

programming, and outputs the code bytes during program verification.

External pull-ups are required during program verification.

Port 1

Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The

Port 1 output buffers can sink/source four TTL inputs. When 1s are written

to Port 1 pins they are pulled high by the internal pull-ups and can be

used as inputs. As inputs, Port 1 pins that are externally being pulled low

will source current (IIL) because of the internal pull-ups. Port 1 also

receives the low-order address bytes during Flash programming and

verification. Port 2

Port 2 is an 8-bit bi-directional I/O port with internal pullups.The Port

2 output buffers can sink/source four TTL inputs. When 1s are written to

Port 2 pins they are pulled high by the internal pull-ups and can be used

as inputs. As inputs, Port 2 pins that are externally being pulled low will

source current (IIL) because of the internal pull-ups. Port 2 emits the high-

order address byte during fetches from external program memory and

during accesses to external data memories that use 16-bit addresses

(MOVX @ DPTR). In this application, it uses strong internal pull-ups when

emitting 1s. During accesses to external data memories that use 8-bit

addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special

Function Register. Port 2 also receives the high-order address bits and

some control signals during Flash programming and verification.

Port 3

Port 3 is an 8-bit bi-directional I/O port with internal pullups. The

Port 3 output buffers can sink/source four TTL inputs. When 1s are written

to Port 3 pins they are pulled high by the internal pullups and can be used

as inputs. As inputs, Port 3 pins that are externally being pulled low will

DEPT OF ECE 41

Page 42: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

source current (IIL) because of the pullups. Port 3 also serves the

functions of various special features of the AT89C51 as listed below: Port

3 also receives some control signals for Flash programming and

verification.

Port Pin Alternate Functions

P3.0 RXD (serial input port)

P3.1 TXD (serial output port)

P3.2 INT0 (external interrupt 0)

P3.3 INT1 (external interrupt 1)

P3.4 T0 (timer 0 external input)

P3.5 T1 (timer 1 external input)

P3.6 WR (external data memory write strobe)

P3.7 RD (external data memory read strobe)

RST

Reset input. A high on this pin for two machine cycles while the oscillator

is running resets the device.

ALE/PROG

Address Latch Enable output pulse for latching the low byte of the

address during accesses to external memory. This pin is also the program

pulse input (PROG) during Flash Programming. In normal operation ALE is

emitted at a constant rate of 1/6the oscillator frequency, and may be

used for external timing or clocking purposes. Note, however, that one

ALE pulse is skipped during each access to external Data Memory. If

desired, ALE operation can be disabled by setting bit 0 of SFR locations

8EH. With the bit set, ALE is active only during a MOVX or MOVC

instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-

disable bit has no effect if the microcontroller is in external execution

mode.

DEPT OF ECE 42

Page 43: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

PSEN

Program Store Enable is the read strobe to external program

memory. When the AT89C51 is executing code from external program

memory, PSEN is activated twice each machine cycle, except that two

PSEN activations are skipped during each access to external data

memory.

EA/VPP

External Access Enable. EA must be strapped to GND in order to

enable the device to fetch code from external program memory locations

starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is

programmed, EA will be internally latched on reset. EA should be strapped

to VCC for internal program executions. This pin also receives the 12-volt

programming enable voltage (VPP) during Flash programming, for parts

that require 12-volt VPP.

XTAL1

Input to the inverting oscillator amplifier and input to the internal clock

operating circuit.

XTAL2

Output from the inverting oscillator amplifier.

4.2 DS2003

High Current/Voltage Darlington Drivers

DEPT OF ECE 43

Page 44: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

General Description

The DS2003 is comprised of seven high voltage, high current

NPN Darlington transistor pairs. All units feature common emitter, open

collector outputs. To maximize their effectiveness, these units contain

suppression diodes for inductive loads and appropriate emitter base

resistors for leakage. The DS2003 has a series base resistor to each

Darlington pair, thus allowing operation directly with TTL or CMOS

operating at supply voltages of 5.0V. The DS2003 offers solutions to a

great many interface needs, including solenoids, relays, lamps, small

motors, and LEDs. Applications requiring sink currents beyond the

capability of a single output may be accommodated by paralleling the

outputs.

Features

Seven high gain Darlington pairs

High output voltage (VCE = 50V)

High output current (IC = 350 mA)

TTL, PMOS, CMOS compatible

Suppression diodes for inductive loads

Extended temperature range

4 Relay Switch

A relay is an electrically operated switch. Current flowing through

the coil of the relay creates a magnetic field which attracts a lever and

changes the switch contact. Relays allow one circuit to switch a second

circuit which can be completely separate from the first. There is no

electrical connection inside the relay between the two circuits; the link is

magnetic and mechanical.

DEPT OF ECE 44

Page 45: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

A relay is an electrical switch that opens and closes under the

control of another electrical circuit, the switch is operated by an

electromagnet to open or close one or many set of contacts. The

movement either makes or breaks a connection with a fixed contact.

Relay has 5 pins normally connect(NC),normally open(NO),C1,C2 and

pole. NC is given 5V , NO is grounded, C1 is given 12V, C2 is connected to

microcontroller, pole is connected to motor.A relay is an electrically

controllable switch. It allows the isolation of 2 separate sections of a

system with 2 different voltage sources, one such relay is called an

electromagnetic or electromechanical relay

Fig 4.2 Cubic Relay Fig 4.3 Cubic Relay

4.4.1 Advantage of Relays

Relays can switch AC and DC, transistors can only switch DC.

Relays can switch high voltages, transistors cannot.

Relays are better choice for switching large currents.

Relays can switch many contacts at once.

4.4.2 Disadvantage of Relays

Relays are bulkier than transistors for switching small currents.

DEPT OF ECE 45

Page 46: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

Relays use more power due to the current flowing through their

coil.

4.4.3 Features

Printed circuit mounts 10 A relay

• 1 Pole changeover contacts or

1 Pole normally open contact

• Miniature - "Sugar cube" package

• DC coil - 360 mW

•Wash tight: RT III

• Cadmium Free contact material option

DEPT OF ECE 46

Page 47: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

Chapter 6

Code of Microcontroller

DEPT OF ECE 47

Page 48: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

DEPT OF ECE 48

Page 49: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

Chapter 7

Advantages

Replacing human operators in tasks that involve hard physical or

monotonous work.[2]

Replacing humans in tasks done in dangerous environments (i.e.

fire, space, volcanoes, nuclear facilities, underwater, etc.)

Performing tasks that are beyond human capabilities of size, weight,

speed, endurance, etc.

Economy improvement. Automation may improve in economy of

enterprises, society or most of humanity. For example, when an

enterprise invests in automation, technology recovers its

investment; or when a state or country increases its income due to

automation like Germany or Japan in the 20th Century.

DEPT OF ECE 49

Page 50: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

DEPT OF ECE 50

Page 51: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

Chapter 8

Applications

Industrial processes include those of manufacturing, production,

power generation, fabrication, and refining, and may run in

continuous, batch, repetitive, or discrete modes.

Infrastructure processes may be public or private, and include water

treatment and distribution, wastewater collection and treatment, oil

and gas pipelines, electrical power transmission and distribution,

Wind farms, civil defense siren systems, and large communication

systems.

Facility processes occur both in public facilities and private ones,

including buildings, airports, ships, and space stations. They

monitor and control HVAC, access, and energy consumption

DEPT OF ECE 51

Page 52: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

DEPT OF ECE 52

Page 53: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

Chapter 9

CONCLUSION

In conclusion, we feel that our product is completely sound and has

great market value. The advantage of our product is that there are no

known competitors out there. The company that manufactures the X10

devices also produces a remote device called the Palmpad, and

Smarthome come closest to matching our project. However, the

advantages we have over them are twofold. First, we are able to run all

devices using the Palm Pilot; this is an obvious advantage, as users are

more likely to carry a Palm around with them, than a Palmpad remote

(often in addition to a Palm they may already be carrying). Secondly, our

project allows for greater development of products. The code is open

source and we are providing for development by others for application in

several ways. With our software, we could develop it for more

complicated applications such as TV control, VCR setup and usage, stereo

control, and even control of applications on the computer. In particular,

we will provide installation instructions on setting up Home Surveillance.

Even though we were unable to complete that application in time for this

Presentation, we have the system almost complete and ready to go within

a week. Hence we feel that there is no better product available in the

market.

DEPT OF ECE 53

Page 54: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

BIBILOGRAPHY

Reference Books:

[1] Kennet Ayalla “8051 micro-controller”, Johnson learning publication,

3rd edition 2007

[2] Muhammad Ali Mazidi “8051 micro-controller”

[3] J.Makhoul, “Spectral analysis of speech by linear prediction”, IEEE

Trans on Audio and acoustics

[4] VISUAL BASIC 6 MCSD Howard Hawhee, Senior Author Corby Jordan,

Richard Hundhausen , Felipe Martins, Thomas Moore

US Dept. of Energy: http://www.oe.energy.gov/smartgrid.htm

Natl. Inst. of Standards and Technology: http://www.nist.gov/smartgrid/

PSERC:

http://www.pserc.wisc.edu/ecow/get/generalinf/presentati/smartgride/

India-specific

Min. of Power (Report by CSTEP and Infosys):

http://www.cstep.in/docs/Power_Sector_Report.pdf

Reference Websites:

[1] http://www.atmel.com

DEPT OF ECE 54

Page 55: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

[2] http://www.vsnl.com

[3] http://www.google.com

[4] http://www.efy.com

[5] http://www.ieee.com

DEPT OF ECE 55

Page 56: 53504529 Industrial Automation Using SCADA

SCADA based Industrial Automation

DEPT OF ECE 56