Industrial Automation Using SCADA

Published on June 2016 | Categories: Documents | Downloads: 69 | Comments: 0 | Views: 542
of 56
Download PDF   Embed   Report

Comments

Content

SCADA based Industrial Automation

DEPT OF ECE

1

SCADA based Industrial Automation

Index

INTRODUCTION...........................................................................................................................2 1.1 Problem Definition:..................................................................................................................2

2.1.5 POWER SUPPLY...............................................14

Chapter 1 INTRODUCTION 1.1 Problem Definition:
DEPT OF ECE 2

SCADA based Industrial Automation 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 this was believed to be a system bug. Monitoring of the system logs revealed the malfunctions were the result of cyber attacks. Investigators reported DEPT OF ECE 46 separate instances of malicious 3 outside

SCADA based Industrial Automation 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 realtime 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

4

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 Code VB running in Max 232 the PC

5

SCADA based Industrial Automation

Block Diagram of SCADA Based Industrial Automation
74HC14 Schmitt Trigger Temperature Sensing 1 LM35

Analog to Digital Converter ADC0809

Panic sensor Micro-controller 89C51 Fire sensor

Relay control mechanism

DC Motor 1

DC Motor 2

The Block diagram of the SCADA based Industrial Automation consists of following components: 2.1.1 Microcontroller

DEPT OF ECE

6

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 DEPT OF ECE 7

SCADA based Industrial Automation microcontroller TTL logic and relay excitation voltage. ULN 2003 is used 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 Relay 1 Advantage of Relays

Fig 4.3 Cubic

 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 DEPT OF ECE 8

SCADA based Industrial Automation  Relays are bulkier than transistors for switching small currents.  Relays use more power due to the current flowing through their coil. 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

DEPT OF ECE

9

SCADA based Industrial Automation 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.
U 1 2 3 4 5 6 7 + 5 V 1 1 1 1 1 8 9 0 1 2 3 4 I N I N I N I N I N S E D O C V R G D T O 3 E L C E N 1 K C F D + R D 2 3 4 5 6 7 A C R T A D D D D D E 2 I N I N I N A A A L 7 6 5 4 0 F 0 1 2 E 2 1 0 2 2 2 2 2 2 2 2 2 1 1 1 1 1 8 7 6 5 4 3 2 1 0 9 8 7 6 5 F T T T T T T T r o m o o o o o o o M M M M M M M M i c i c i c i c i c i c i c ic M r o r o r o r o r o r o r o r o i c r o C C C C C C C C o o o o o o o C o n t r o ll e ll e ll e ll e ll e ll e ll e r r r r r r r ll e P P P P P P P P r in in in in in in in i n P in 3 2 3 3 3 4 3 5 3 6 3 7 3 8 3 9 F r o m M i c r o C o n t r o ll e r P in

V T T

o l t a e m e m

g e p e p e r a r a t u r e t u r e _ 2 _ 1

n t r o n t r o n t r o n t r o n t r o n t r o n t r o

T o A D C 0 8 0 9

o n

t r o l l e r

R U 4

31 3

K B 3 C 4

0 1 4

. 0 0

1 u

F

( 1 0

2 )

7

4 H

C

Fig: 3.4 ADC with the clock generation Ckt

DEPT OF ECE

10

SCADA based Industrial Automation
D 1

T 1 1 5 6 4 T R 8 A N S F O D R 2 M E R C T 5+ 1 0 0 u F C + C 6 1 u F D I O D E T o A D C P i n 2 8

230V AC

D

I O

D

E

+ 5 V 1

U V

4 L S M VO U T + 3 G 5 / N T e m 3 D p e r a t u r e S e n s o r _ 2

2

T o

A

D

C

P

i n

2 7

+ 5

V U 1 V 5 L S M VO U T + 3 G 5 / N T e m 3 D p e r a t u r e S e n s o r _ 1

2

T o

A

D

C

P

i n

2 6

Fig: 3.4 Values Temperature and Voltage Inputs to the ADC

DEPT OF ECE

11

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.

DEPT OF ECE

12

SCADA based Industrial Automation F=0.7x10^5 F=700 KHz...

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 DEPT OF ECE 13

SCADA based Industrial Automation 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 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.

+

1 2 1

V R 1 1 K L E D 2 1 L E D 1 2

1 U 4 S O C K E T B R I D 3 G

C

O 1 2 3

N

1

1 + E 4 7 0 u 2

+

1 2

V U 1 V 2 G N D I N L V M O 7 U 8 0 3 T 5 1

+

5 V

1

2

3

P

I N

D

C

C F 2

+3

2

C

4 . 1 u F

+ C 2 1 0 u 2

F

/ 6

3 V

DEPT OF ECE

14

1

/ 3

5 V0

SCADA based Industrial Automation LM7805 Positive Voltage Regulator General Description

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 DEPT OF ECE 15

SCADA based Industrial Automation • • • • • • • Output current in excess of 0.5A No external components Internal thermal overload protection Internal short circuit current-limiting Output transistor safe-area compensation 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. DEPT OF ECE 16

SCADA based Industrial Automation 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 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.

DEPT OF ECE

17

SCADA based Industrial Automation 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 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

18

SCADA based Industrial Automation

DEPT OF ECE

19

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.

DEPT OF ECE

20

SCADA based Industrial Automation 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 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. DEPT OF ECE 21

SCADA based Industrial Automation

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. 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. DEPT OF ECE 22

SCADA based Industrial Automation * 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

SCADA based Industrial Automation

Chapter 4 Software
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. DEPT OF ECE 24

SCADA based Industrial Automation 3. Give the File Name. A project with extension of .uv2 will be created

DEPT OF ECE

25

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

26

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 27

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.

DEPT OF ECE

28

SCADA based Industrial Automation 4. These files will contain your actual program in assembly or in embedded C language 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

DEPT OF ECE

29

SCADA based Industrial Automation 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 command, 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. all source files are translated, regardless of

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 DEPT OF ECE 30

SCADA based Industrial Automation 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.

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.

DEPT OF ECE

31

SCADA based Industrial Automation

2. KEIL SOFTWARE 2.1 INTRODUCTION 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

DEPT OF ECE

32

SCADA based Industrial Automation 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 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)

DEPT OF ECE

33

SCADA based Industrial Automation 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 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

34

SCADA based Industrial Automation

Fig: 6.1 visual Basic Front End

DEPT OF ECE

35

SCADA based Industrial Automation

DEPT OF ECE

36

SCADA based Industrial Automation

Chapter 5 Schematic Diagram
+ 5 V

R

1 1 0

C K4 7

3+ u F

4

. 7 K

S

R I P

N R

1 1 e s is t o r U T o H T 1 2 E D 0 1 2 3 4 5 6 7 8 P P P P P P P P 1 9 R ST 1 . 0 1 . 1 1 . 2 1 . 3 1 . 4 1 . 5 1 . 6 1 . 7 V P P P P P P P P T o T o M M A A X 2 3 2 X 2 3 2 P P i n i n 1 1 2 1 1 1 1 1 1 1 1 1 1 1 2 0 1 2 3 4 5 6 7 8 9 0 A P P P P P P P P 3 . 0 / R X D A E L E P P P P R D P P P P P 5 1 0 0 0 0 0 0 0 0 A C C 4 0 3 9 D 3 8 D 0 1 2 3 4 5 6 7 F F F F F F F F r o r o r o r o r o r o r o r o m m m m m m m m A A A A A A A A D D D D D D D D C C C C C C C C D D D D D D D D 0 1 2 3 4 5 6 7 . 0 / A . 1 / A 3 7 . 2 / A D 3 6 . 3 / A D . 4 / A 3 5 D 3 4 . 5 / A D . 6 / A 3 3 D 3 2 . 7 / A D 3 1 / V P P / P S 3 0 R O 2 9 E N 5 4 3 2 1 0 T o T o A A D D C C S A t a d d r t A G 3 . 1 / T X D 3 . 2 / I N 3 . 3 / I N 3 . 4 / T 0 3 . 5 / T 1 3 . 6 / W 3 . 7 / R L 2 L 1 D T 0 T 1 2 8 2 . 7 / A 1 2 7 2 . 6 / A 1 2 6 2 . 5 / A 1 2 5 2 . 4 / A 1 2 4 2 . 3 / A 1 2 3 2 . 2 / A 1 2 . 1 2 . 0 2 2 / A 9 2 1 / A 8 X T A X T A G N T 8 9 C 1 1 . 0 X 1 5 9 2 M H z C 2 3 3 P F C 1 3 3 P F

DEPT OF ECE

37

2 3 4 5 6 7 8 9 10

SCADA based Industrial Automation Fig: 3.2 schematic diagram of Main Controller

The ATMEL 89C51 Microcontroller 1 Introduction 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 costeffective 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 DEPT OF ECE 38

SCADA based Industrial Automation • Six Interrupt Sources • Programmable Serial Channel 3 Pin Description

Fig: 4.1 Pin Description of AT89C51

VCC Supply voltage. GND DEPT OF ECE 39

SCADA based Industrial Automation 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 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 DEPT OF ECE 40

SCADA based Industrial Automation 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 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

DEPT OF ECE

41

SCADA based Industrial Automation 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 ALEdisable bit has no effect if the microcontroller is in external execution mode. 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

DEPT OF ECE

42

SCADA based Industrial Automation 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 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)

DEPT OF ECE

43

SCADA based Industrial Automation  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. 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

DEPT OF ECE

44

SCADA based Industrial Automation

Fig 4.2 Cubic Relay Relay 4.4.1 Advantage of Relays

Fig 4.3 Cubic

 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.  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

45

SCADA based Industrial Automation

DEPT OF ECE

46

SCADA based Industrial Automation

Chapter 6 Code of Microcontroller

DEPT OF ECE

47

SCADA based Industrial Automation

DEPT OF ECE

48

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

SCADA based Industrial Automation

DEPT OF ECE

50

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

SCADA based Industrial Automation

DEPT OF ECE

52

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

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 [2] http://www.vsnl.com [3] http://www.google.com [4] http://www.efy.com [5] http://www.ieee.com DEPT OF ECE 54

SCADA based Industrial Automation

DEPT OF ECE

55

SCADA based Industrial Automation

DEPT OF ECE

56

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close