scada systems for power distribution for large machines and lighting loads [part2]
DESCRIPTION
FINAL REPORT OF MY BTECH MAIN PROJECT CARRIED OUT IN BHEL-TRICHY. PROJECT IS CARRIED OUT USING EMBEDDED SYSTEMS AND LABVIEWTRANSCRIPT
-
SCADA systems for power distribution
School Of Engineering Page 1
CHAPTER 1
INTRODUCTION
-
SCADA systems for power distribution
School Of Engineering Page 2
1. INTRODUCTION
1.1 INTRODUCTION
The aim of our project is to design a system to monitor and control the
power for motors and lighting systems using SCADA (Supervisory Control and Data
Acquisition) system. SCADA systems are used to monitor and control a plant or
equipment in industries such as telecommunications, water and waste control,
energy, oil and gas refining and transportation.
The input voltage, input current, frequency, power factor to a particular load
are all directly fed to PIC (Peripheral Interface Controller) microcontroller measured
by suitable step down voltage and current transformers. The PIC is programmed to
calculate the above mentioned parameters. It will be interfaced with a relay to
control the load and a GSM modem . In case of an abnormal trend in any of the
parameters the system will atonce notice the engineer and turns of the load.
The power condition and controlling through the SCADA system is carried
out with the help of LAB VIEW software. LabVIEW (short for Laboratory Virtual
Instrument Engineering Workbench) is a system-design platform and development
environment for a visual programming language from National Instruments. The
labview user interface will have means of monitoring the parameters , setting the
threshold values and control the load. The interface will also be equipped to show a
histogram of the various parameters with time.
1.2 EXISTING SYSTEM
Current, Voltage, Frequency, Power factor were measured by means of
various analog devices and manual database system. Its difficult to analyse the trend
in these parameters as it has to be done manually. Remote controlling and
coordination of the machines is a tedious task.
A particular person should be near to the machine in order to monitor the
Current, Voltage, Frequency , Power factor by using different processing elements
and analog elements. The data have to be manually entered in a log book.
-
SCADA systems for power distribution
School Of Engineering Page 3
1.3 DRAWBACKS
Gives inaccurate production information.
Increase company downtime.
Minimum safety.
Increase the working time of human.
Careless operation may cause fault
Error margin is high.
Trend analysis is difficult
Remote control and coordination is difficult.
Maintaining database is difficult
1.4 PROPOSED SYSTEM
This project is very useful to monitor the voltage, current, frequency and power
factor of the machines . The parameters are monitored by means of a SCADA
system . The parameters are measured by a embedded system which is designed to
measure and indicate the parameters. The load potential and current are fed to the
system by means of suitable current transformers and potential transformers .
The system will also be equipped with a GSM system to alert the engineer in
an event of malfunction . The system will be interfaced with a computer by means of
a RS232 protocol . In this project we create the SCADA interface with the help of
Lab VIEW. It will also have the provision to display the histograms of various
parameters thus enabling to easily analyse the trend in variation of the parameters
1.5 ADVANTAGES
Improved accuracy in parameter measurement
Time saving
Safety increased considerably as the worker need not be close to machine
Error margin is min.
Trend analysis is an easy task
Remote control and coordination is possible.
Digital database management is simpler
-
SCADA systems for power distribution
School Of Engineering Page 4
CHAPTER 2
LITERATURE REVIEW
-
SCADA systems for power distribution
School Of Engineering Page 5
2. LITERATURE REVIEW
Company Overview
2.1 ABOUT BHEL:
BHEL is an integrated power plant equipment manufacturer and one of the
largest engineering and manufacturing companies in India in terms of turnover. It
was established in 1964, ushering in the indigenous Heavy Electrical Equipment
industry in India - a dream that has been more than realized with a well-recognized
track record of performance. The company has been earning profits continuously
since 1971-72 and paying dividends since 1976-77.
BHEL is engaged in the design, engineering, manufacture, construction,
testing, commissioning and servicing of a wide range of products and services for the
core sectors of the economy, viz. Power, Transmission, Industry, Transportation
(Railway), Renewable Energy, Oil & Gas and Defence. BHEL have 16
manufacturing divisions, two repair units, four regional offices, eight service centres
and 15 regional centres and currently operate at more than 150 project sites across
India and abroad. BHEL research and development (R&D) efforts are aimed not
only at improving the performance and efficiency of BHEL existing products, but
also at using state-of-the-art technologies and processes to develop new products.
The high level of quality & reliability of BHEL products is due to adherence
to international standards by acquiring and adapting some of the best technologies
from leading companies in the world including General Electric Company, Alstom
SA, Siemens AG and Mitsubishi Heavy Industries Ltd., together with technologies
developed in BHEL own R&D centres.
Most of BHEL manufacturing units and other entities have been accredited to
Quality Management Systems (ISO 9001:2008), Environmental Management
Systems (ISO 14001:2004) and Occupational Health & Safety Management Systems
(OHSAS 18001:2007).
-
SCADA systems for power distribution
School Of Engineering Page 6
BHEL have a share of 57% in Indias total installed generating capacity
contributing 69% (approx.) to the total power generated from utility sets (excluding
non-conventional capacity) as of March 31, 2013.
BHEL have been exporting power and industry segment products and
services for over 40 years. BHELs global references are spread across over 75
countries. The cumulative overseas installed capacity of BHEL manufactured power
plants exceeds 9,000 MW across 21 countries including Malaysia, Oman, Iraq, the
UAE, Bhutan, Egypt and New Zealand. BHEL physical exports range from turnkey
projects to after sales services.
2.2 BHEL TRICHY:
BHELs Tiruchirapalli complex is Indias largest manufacturer of boilers
and auxiliaries providing total boiler land solution for Utility, Industrial, Captive
power and Heat Recovery applications.
The plant achieved its full annual capacity to design manufacture and supply
high pressure boiler equipment up to 4000MW in 1984 with boiler unit ratings up to
500MW.
BHEL, trichy has over the years seen formidable growth in capacity,
capability, turnover and profitability. Product diversification has resulted in the
development of new products enabling BHEL to absorb morden technologies. Such
innovations result in continuous updating of manufacturing facilities to serve the
customers in a more comprehensive way and for improving quality and productivity.
THE BHEL TIRUCHIRAPALLI COMPLEX COMPRISES FIVE
UNITS:
High Pressure Boiler plant (HPBP) Trichy
Seamless steel Plant (SSTP) Trichy
-
SCADA systems for power distribution
School Of Engineering Page 7
Boiler Auxiliaries Plant (BAP) Ranipet
Piping Center (PC) Chennai
Industrial Valves Plant (IVP) Govindwal.
POWER CAPABILITY:
BHEL has supplied boilers and auxiliaries accounting for nearly 70% of
the installed thermal power generation capacity in India. BHEL has successfully
executed boiler projects in Malaysia and the Middle East and continues to secure
repeat orders from overseas customers for servicing and renovation of boilers.
For power generation application, BHEL Designs, Engineers,
Manufactures, Suppliers, Erects and Commissions boilers of any rating upward of 30
MW.
For higher capacities, BHEL also offers customers the option of once
through type steam generators in addition to conventional natural and controlled
circulation types.BHEL utility boilers account for over 65% of the total installed
thermal power generation capacity in India.
BHEL supplies steam generators rating up to 450 ton/hr, for industrial
application to suit the requirements of industries viz. Fertilizers, Petro chemical,
refinery, steel, paper and other process industries.
Boilers of various types are supplied including vertical package (Oil/Gas
Fixed), Vertical units (Oil/Gas/Coal fixed), fluidized bed combustion (Coal and
other solid fuels), Chemicals recovery, Waste of heat recovery , Stoker fixed
chemical recovery boilers of capacity ranging from 100 to 1350 ton/day of dry solids
are manufactured for the paper and pulp industry.
-
SCADA systems for power distribution
School Of Engineering Page 8
2.3ABOUT BUILDING 50:
TUBULAR PRODUCTION SHOP:
Building 50 is to produce the tubular products. Ti consists of machines like
Bending machine.
Tig and mig welding machine.
Induction pressure machine.
Resistance and flash bed welding machine.
Panel processing machine.
Stud welding machine.
Continuous discharge furnace.
BAY 1- Heat recovery stream generator module & water wall panel.
BAY 2- Water wall panel.
BAY 3- Re-heater coils & super heater coils.
BAY 4- Low temperature super heater coils.
BAY 5- Flat thin welding panels.
BAY 6- Heat temperature shop.
BAY 7- Low temperature super heater coils.
BAY 8- Economizer coils.
BAY 9- Radiant roof panel.
BAY A- tube preparation.
BAY B- Shipping.
TUBULAR PRODUCTION:
In tubular production building tubes are brought as raw materials then, they
are made to prepare. The tubes are first subjected to end cutting process. Here the
tube ends are cut to correct size & then send to end preparation process.
In end preparation the cut end of the tubes are chambered deals with tapering the
tube end form. This chambered ends are bored slightly to make it easy to be welded
-
SCADA systems for power distribution
School Of Engineering Page 9
with another tube. Other than these three basic process like cleaning for removing
rust & painting tubes for further protection are done to make the tubes ready to build
boiler protection.
MAJOR ACTIVITIES:
Erection & commissioning of all new machines in short period.
In house designing fabrication & erection of tubes & coil handling
system.
System improvement to enhance productivity.
LPG convertion of producer gas furnace.
Indigenous development of machine.
-
SCADA systems for power distribution
School Of Engineering Page 10
CHAPTER 3
PROJECT DETAILS
-
SCADA systems for power distribution
School Of Engineering Page 11
3.PROJECT DETAILS
3.1 SYSTEM SPECIFICATION
3.1.1 HARDWARE REQUIREMENTS:
Power supply:
230-12v transformer
bridge rectifier
capacitor
7805 IC
Micro controller(PIC16F877A)
Voltage measurement:
Voltage transformer
Bridge rectifier
Capacitor
Resistor
Current measurement:
Current transformer
Bridge rectifier
Capacitor
Resistor
Power factor measurement:
-
SCADA systems for power distribution
School Of Engineering Page 12
Voltage transformer
Current transformer
Resistor
LM358
Switch
Relay
Diode
Transistor
16X2 Lcd display
LED
3.1.2 SOFTWARE REQUIREMENTS:
LABVIEW [ National Instruments]
MPLab
Proteus [ISIS]
PIC programmer
-
SCADA systems for power distribution
School Of Engineering Page 13
3.2 BLOCK DIAGRAM
Fig 1 : Block Diagram
BLOCK DIAGRAM DESCRIPTION
Potential Transformer
Potential transformers are used in usually in industrial and power plant
settings to reduce the AC voltage of a power line to a lower value (typically 120 or
70 volts full scale) for instrumentation purposes. They are low power, have accurate
voltage ratios and good galvanic isolation to isolate the instrumentation (and the
operators) from dangerous voltages and power. In this system the input of the PIC
microcontroller can withstand only upto 5 V. The load voltage is stepped down by
-
SCADA systems for power distribution
School Of Engineering Page 14
means of a PT and is fed to a precision rectifier and to the ZCD circuits for the
measurement of Voltage and Power Factor and Frequency.
Current Transformer
Current transformers are used to scale a large AC current which can be 10s of
thousands of amps or more to be measured to a lower value, typically 1 or 5
Amperes that does not require heavy wires to carry the full current flow to be
measured into the instrumentation. They are low power, do not disturb the current to
be measured, have accurate current ratios, and like potential transformers, good
galvanic isolation to isolate the instrumentation (and the operators) from dangerous
voltages and power. The current transformer steps down the current to suitable
values to be fed to the PIC. The output of the CT is fed across the Shunt resistor and
is also fed to the ZCD for measuring the load Current and Power factor.
Precision Rectifier
The precision rectifier, also known as a super diode, is a configuration obtained with
an operational amplifier in order to have a circuit behave like an
ideal diode and rectifier. It is useful for high-precision signal processing. Rectifier
circuits are used in the design of power supply circuits. In such applications, the
voltage being rectified are usually much greater than the diode voltage drop,
rendering the exact value of the diode drop unimportant to the proper operation of
the rectifier. The stepped down load output from the Potential Transformer is fed to
the Precision rectifier where its rectified to +6V . This is further fed across a variable
voltage divider circuit from which it is fed to the PIC. Voltage is calculated taking
the ratios of the divider and PT into consideration . The voltage divider circuit is
employed as the maximum input that can be given to a PIC input is +5V .
-
SCADA systems for power distribution
School Of Engineering Page 15
Shunt Resistor
A shunt resistor is a precision device used to measure current in an electrical circuit.
Also known as a current shunt or an ammeter shunt, it works by measuring the
voltage drop across a known resistance. Ohms law states that V = I x R, or solving
for I, I = V / R, where I is current, V is voltage, and R is resistance. If the resistance
is known and the voltage drop is measured, then the current can be determined.
Shunt resistors are used to measure currents that would potentially damage a
device. This could be a result of the magnitude of the current passing through the
circuit or the possibility of current spikes. They usually have a small, well-defined
resistance so as not to affect the current they are measuring. A shunt resistor
typically looks different from a normal resistor, having two large terminals with one
or more strips of metal connecting them. The resistance of a metal is inversely
proportional to its cross-sectional area, so the more strips a shunt resistor has, the
lower its resistance.
ZCD
A comparator is a circuit that accepts two voltages, V1 and V2 and outputs zero volts
if V1>V2 or outputs a positive voltage level if V2>V1. Comparators can be built
from operational amplifiers. They are basic operational amplifier circuits that
compare two voltages simultaneously and switch the output according to the
comparison. Zero crossing detection circuit is a comparator example. A zero
crossing detector literally detects the transition of a signal waveform from positive
and negative, ideally providing a narrow pulse that coincides exactly with the zero
voltage condition.
Here two ZCD are used one for current and voltage . In order to measure the
power factor the time gap between two positive edges of the comparator o/ps are
measured and the power factor is calculated from it . The frequency is also measured
from any one of the comparator circuit
-
SCADA systems for power distribution
School Of Engineering Page 16
Logic Circuit
Logic circuit is an electric circuit whose output depends upon the input in a way that
can be expressed as a function in symbolic logic; it has one or more binary inputs
(capable of assuming either of two states, e.g., "on" or "off") and a single binary
output. Logic circuits that perform particular functions are called gates. Basic logic
circuits include the AND gate, the OR gate, and the NOT gate, which perform the
logical functions AND, OR, and NOT. Logic circuits can be built from any binary
electric or electronic devices, including switches, relays, electron tubes, solid-
state diodes, and transistors; the choice depends upon the application and design
requirements. Modern technology has produced integrated logic circuits, modules
that perform complex logical functions. A major use of logic circuits is in electronic
digital computers.
LCD
LCD (Liquid Crystal Display) screen is an electronic display module and find a wide
range of applications. In this project we use a 16*2 LCD display. A 16x2 LCD
display is very basic module and is very commonly used in various devices and
circuits. These modules are preferred over seven segments and other multi
segment LEDs. The reasons being: LCDs are economical; easily programmable;
have no limitation of displaying special & even custom characters (unlike in seven
segments), animations and so on.
A 16x2 LCD means it can display 16 characters per line and there are 2 such
lines. In this LCD each character is displayed in 5x7 pixel matrix. This LCD has two
registers, namely, Command and Data.
The command register stores the command instructions given to the LCD. A
command is an instruction given to LCD to do a predefined task like initializing it,
clearing its screen, setting the cursor position, controlling display etc. The data
register stores the data to be displayed on the LCD.
Here the LCD is used to display the various parameters that is Voltage ,
Current , Power Factor and Frequency.
-
SCADA systems for power distribution
School Of Engineering Page 17
PIC MICROCONTROLLER
PIC is a family of modified Harvard architecture microcontrollers made
by Microchip Technology, derived from the PIC1650
originally developed
by General Instrument's Microelectronics Division. The name PIC initially referred
to Peripheral Interface Controller The first parts of the family were available in
1976; by 2013 the company had shipped more than twelve billion individual parts,
used in a wide variety of embedded systems.
Early models of PIC had read-only memory (ROM) or field-programmable
EPROM for program storage, some with provision for erasing memory. All current
models use Flash memory for program storage, and newer models allow the PIC to
reprogram itself. Program memory and data memory are separated. Data memory is
8-bit, 16-bit and in latest models, 32-bit wide. Program instructions vary in bit-count
by family of PIC, and may be 12, 14, 16, or 24 bits long. The instruction set also
varies by model, with more powerful chips adding instructions for digital signal
processing functions.
The various inputs for the parameter measurement are fed to the PIC. PIC
calculates the parameters and drives the relay and alarm circuit . The PIC is
interfaced to a computer using RS232 protocol
DRIVER CIRCUIT
In electronics,a driver is an electrical circuit or other electronic component used to
control another circuit or component, such as a high-power transistor, liquid crystal
display (LCD), and numerous others.
They are usually used to regulate current flowing through a circuit or is used
to control the other factors such as other components, some devices in the circuit.
The term is often used, for example, for a specialized integrated circuit that controls
high-power switches in switched-mode power converters. An amplifier can also be
considered a driver for loudspeakers, or a constant voltage circuit that keeps an
attached component operating within a broad range of input voltages.
-
SCADA systems for power distribution
School Of Engineering Page 18
Transistor triggered driver circuits are used in order to activate the Relay and
Alarm . A high output from the PIC will enable the circuits to activate or drive the
Relay/Alarm system
RS 232
The RS-232 interface is the Electronic Industries Association (EIA) standard for the
interchange of serial binary data between two devices. It was initially developed by
the EIA to standardize the connection of computers with telephone line modems.
The standard allows as many as 20 signals to be defined, but gives complete freedom
to the user. Three wires are sufficient: send data, receive data, and signal ground.
The remaining lines can be hardwired on or off permanently. The signal transmission
is bipolar, requiring two voltages, from 5 to 25 volts, of opposite polarity.
An RS-232 serial port was once a standard feature of a personal computer,
used for connections to modems, printers, data storage, uninterruptible power
supplies, and other peripheral devices. However, RS-232 is hampered by low
transmission speed, large voltage swing, and large standard connectors. In modern
personal computers, USB has displaced RS-232 from most of its peripheral interface
roles.
RELAY
A relay is an electrically operated switch. Many relays use an electromagnet to
mechanically operate a switch, but other operating principles are also used, such
as solid-state relays. Relays are used where it is necessary to control a circuit by a
low-power signal (with complete electrical isolation between control and controlled
circuits), or where several circuits must be controlled by one signal. The first relays
were used in long distance telegraph circuits as amplifiers: they repeated the signal
coming in from one circuit and re-transmitted it on another circuit. Relays were used
-
SCADA systems for power distribution
School Of Engineering Page 19
extensively in telephone exchanges and early computers to perform logical
operations.
A type of relay that can handle the high power required to directly control an
electric motor or other loads is called a contactor. Solid-state relays control power
circuits with no moving parts, instead using a semiconductor device to perform
switching. Relays with calibrated operating characteristics and sometimes multiple
operating coils are used to protect electrical circuits from overload or faults; in
modern electric power systems these functions are performed by digital instruments
still called "protective relays".
In this system the relay isolates the load from the supply in an event of
abnormal parameter readings or if the maintenance switch is switched.
ALARM
Alarm circuit is used to notify the user of large variations in circuit parameters.
Transistor triggered buzzer circuit is employed. On event of a variation in parameter
an ouput from a pin of pic will trigger the transistor causing the buzzer to activate.
-
SCADA systems for power distribution
School Of Engineering Page 20
3.3 CIRCUIT DIAGRAM AND EXPLANATION
3.3.1 Complete Circuit
Fig 2 : Complete Circuit Diagram
-
SCADA systems for power distribution
School Of Engineering Page 21
3.3.2 Voltage Measurement Circuit
Fig 3 : Voltage Measurement Circuit
The circuit is designed to monitor the supply voltage. Supply voltage that has to be
given is stepped down by the potential transformer which is rectified by the precision
rectifier. The precision rectifier is a configuration obtained with an operational
amplifier in order to have a circuit behaving like an ideal diode or rectifier.
The full wave rectifier is the combination of half wave rectifier and a
summing amplifier. When the input voltage is negative, the diode is reverse biased ,
thus it works like an open circuit. There will be no current flow through the load and
hence the output voltage will be zero. When the input is positive , it is amplified ny
the operational amplifier which makes the diode forward biased. Current will flow in
the load and because of the feedback circuit the output voltage is equal to the input.
When the input voltage is greater than zero, the diode D2 is ON and D1 is
OFF, hence the output is zero. When the input voltage is less than zero, D2 is OFF
and D1 is ON, and the output will be similar to the input but with an amplification of
R2/R1. The full wave rectifier working depends on the fact that both the half wave
rectifier and the summing amplifier are precision circuits. It operates by producing
an inverted half wave rectified signal and then adding the signal at double amplitude
-
SCADA systems for power distribution
School Of Engineering Page 22
to the original signal in the summing amplifier. The result is a reversal of the
selected polarity of the input signal.
Then the output of the rectifier is adjusted to 0-5v with the help of a variable resistor
VR1.
The input is given to the ADC module where it is converted on the basis of
the calculated ratios of transformer and rectifier circuit.
3.3.3 Current Measurement Circuit
Fig 4 : Current Measurement Circuit
This circuit is designed to monitor the supply current. The supply current that
has to be monitored is stepped down by the current transformer. The step down
current is converted to the required value by the help of a shunt resistor. Then the
converted voltage is rectified by the precision rectifier. The precision rectifier is a
configuration obtained with a operational amplifier in order to have a circuit
behaving like an ideal diode or rectifier.
The full wave rectifier combination of half wave precision rectifier and
summing amplifier. When the input voltage is negative, there is a negative voltage
on the diode 2, hence it works as an open circuit. There will be no current through
-
SCADA systems for power distribution
School Of Engineering Page 23
the load and therefore the output voltage is zero. When the input is positive it is
amplified the operational amplifier and it turns the diode ON. There is current in the
load and because of the feedback circuit , the output voltage will be equal to input
voltage.
In this case , when the input is greater than zero D2 is ON and D1 is OFF,
hence the output will be zero. When the input is less than zero , D2 iss OFF and D1
is ON and output is like the input but with an amplification of R2/R1. The full wave
rectifier working depends on the fact that both the half wave rectifier and the
summing amplifier are precision circuits. It operates by producing an inverted half
wave rectified signal and adding that signal at double amplitude to the original signal
in the summing amplifier. The result is reversal of the selected polarity of the input
signal.
The potential across the Shunt resistor is fed to the PIC which is
measured and current is calculated from the potential.
3.3.4 Power factor and Frequency Measurement Circuit
Fig 5 : Power factor and Frequency Measurement Circuit
-
SCADA systems for power distribution
School Of Engineering Page 24
This circuit is designed to find the power factor in the power line. The power line
voltage and current is monitored through the potential and current transformers
respectively.
The potential transformer is used to step down the main supply voltage to the low
voltage level. The voltage level is stepped down from 230 voltage ac to 6v ac. A zero
crossing detector is used as analog circuit to achieve the converting process of the
current and voltage signals. the outputs of the current and voltage transformers are
connected to numbered pins 2 and 6 of
LM358, respectively. When AC signal is applied to LM358, the output of LM358 is
1 as logically (5 Volt) while signal is crossing from the zero point. If the AC signal
is different from zero, the output is 0 (0 Volt). The input and output signals of
LM358 are given in Fig.
Fig 6 : LM358 Input/Output waveform
There are two inputs and outputs of LM358. One of them is used for the current
signal. The other one is used for the voltage signal. The current and voltage signals
are taken the same phase for measuring the power factor.The
current and voltage signals taken from the load are adapted into LM358 using
current and voltage transformers The logical voltage and current signals are inserted
pins RA2and RA3 of PIC16F877. TIMER0 of PIC16F877 is worked when the
voltage signal is passing from zero point.TIMER0 is stopped when current signal is
passing from zero point. TIMER0 is a special storage at the 01h address of RAM. It
is possible to start counting from 00h address or any wanted number and to make
-
SCADA systems for power distribution
School Of Engineering Page 25
zero of its content. The logic and algorithm of the measurement is depicted in the
below figure.
Fig 7 : Powerfactor program flow chart
-
SCADA systems for power distribution
School Of Engineering Page 26
3.3.5 Frequency Measurement
TIMER0 is stopped when current signal is passing from zero point. TIMER0 is a
special storage at the 01h address of RAM. It is possible to start counting from 00h
address or any wanted number and to make zero of its content. The counter is
verified at the end of 60 seconds and the frequency is identified on the basis of
counter value. An output from one of the LM358 ZCD is fed to RC0 from which the
frequency is measured.
3.3.6 GSM interface Circuit
Fig 8 : GSM interface circuit
SIM300 GSM Modem is able to take any GSM network operator SIM card and
behave
just like a mobile phone with its own unique phone number. The RS232 interface
lets modem to communicate with RS232 port of PC or compatible embedded
system circuitry. Implementation of SMS controlled devices, Auto reply; remote
control is possible via SIM300. The modem can be directly interfaced with
microcontroller. It can be used to send, receive and process SMS/ call.
The MAX232 is an IC, first created in 1987 by Maxim Integrated Products, that
converts signals from an RS-232 serial port to signals suitable for use
in TTL compatible digital logic circuits. The MAX232 is a dual driver/receiver
and typically converts the RX, TX, CTS and RTS signals. The MAX232(A) has
-
SCADA systems for power distribution
School Of Engineering Page 27
two receivers (converts from RS-232 to TTL voltage levels), and two drivers
(converts from TTL logic to RS-232 voltage levels). This means only two of the
RS-232 signals can be converted in each direction. Typically, a pair of a
driver/receiver of the MAX232 is used for TX and RX signals, and the second
one for CTS and RTS signals.
When any one of the parameter exhibits any abnormal variation the relay will
isolate the load and sends a message One of the parameter has exceeded the
limit to the corresponding engineer thereby helping the engineer know the
situation.
3.3.7 PC interface Circuit
Fig 9 : PC interface circuit
The MAX232 is an IC, first created in 1987 by Maxim Integrated Products, that
converts signals from an RS-232 serial port to signals suitable for use
in TTL compatible digital logic circuits. The MAX232 is a dual driver/receiver
and typically converts the RX, TX, CTS and RTS signals. The MAX232(A) has
two receivers (converts from RS-232 to TTL voltage levels), and two drivers
(converts from TTL logic to RS-232 voltage levels). This means only two of the
RS-232 signals can be converted in each direction. Typically, a pair of a
-
SCADA systems for power distribution
School Of Engineering Page 28
driver/receiver of the MAX232 is used for TX and RX signals, and the second
one for CTS and RTS signals.
Data is transferred across PC and embedded system via RS232 protocol . The
system is controlled and communicated by the System control user interface
program designed in LABVIEW. Utilising the user interface we can use the
computer to turn on and off the system , monitor the parameters as well present
the engineer with the histograms or variation pattern of various parameters.
3.3.8 Interfacing GSM and PC to the same PIC
Fig 10 : GSM PIC simultaneous interfacing
Since only one USART pins are available in the PIC16f877a its essential that
we employ some mechanism to connect both GSM modem and PC to the same PIC.
A relay mechanism has been employed in this project. The system remains
connected to the computer normally. On event of any abnormal parameter variation
the GSM relay actuates and GSM comes into connection with the USART pin
isolating the system for the moment and notifying the engineer. Thus we can connect
both computer and GSM modem without employing multiple Microcontrollers
-
SCADA systems for power distribution
School Of Engineering Page 29
.3.9 Alarm Circuit
Fig 11 : Alarm circuit
This circuit is used to control the buzzer/speaker circuit. When any one of the
parameters exceeds normal values alarm is triggered. When a high pulse is given to
the base of the transistor, it starts conducting and completes the speaker circuit
thereby causing the alarm to sound .
-
SCADA systems for power distribution
School Of Engineering Page 30
3.3.10 Relay Circuit
Fig 12 : Relay circuit
A relay is an electromagnetic switch which is used to switch High Voltage/Current
using Low power circuits. Relay isolates low power circuits from high power
circuits. It is activated by energizing a coil wounded on a soft iron core. A relay
should not be directly connected to a microcontroller, it needs a driving circuit. A
relay can be easily interfaced with microcontroller using a transistor as shown
below. Transistor is wired as a switch which carries the current required for
operation of the relay. When the pin of the PIC microcontroller goes high, the
transistor turns On and current flows through the relay. The diode D1 is used to
protect transistor and the microcontroller from Back EMF generated in the relays
coil. Normally 1N4148 is preferred as it is a fast switching diode having a peak
forward current of 450mA. This diode is also known as freewheeling diode.
-
SCADA systems for power distribution
School Of Engineering Page 31
The Relay Circuit is used to isolate the load from the supply that is turn of
the load in an event of parameter variation . When a parameter exceeds the limit the
relay is actuated thereby removing the load or turning it off.
3.3.11 Complete Working
This system is used to control the AC load using a PC and monitor its
parameters . The voltage , current , power factor and frequency parameters are
continuously monitored . The parameters are monitored in the LCD display as well
as in the computer . From the computer we are able to control the load and also view
the histogram. The relay circuit is activated when any one of the parameters is
exceeded and also the alarm is also triggered . If the maintenance switch is turned on
the relay keeps the load isolated for maintenance purpose.
3.4 USER INTERFACE
Fig 13 : User Interface
-
SCADA systems for power distribution
School Of Engineering Page 32
The User Interface application facilitates the communication between the user and
embedded system through Computer. The application is developed by means of
LAB VIEW software by National Instruments .
LabVIEW (short for Laboratory Virtual Instrument Engineering Workbench) is a
system-design platform and development environment for a visual programming
language from National Instruments.
The graphical language is named "G" (not to be confused with G-code).
Originally released for the Apple Macintosh in 1986, LabVIEW is commonly used
for data cquisition, instrument control, and industrial automation on a variety of
platforms including Microsoft Windows, various versions of UNIX, Linux, and Mac
OS X.
LabVIEW ties the creation of user interfaces (called front panels) into the
development cycle. LabVIEW programs/subroutines are called virtual instruments
(VIs). A key feature of LabVIEW is the extensive support for interfacing to devices
such as instruments, cameras, and other devices. Users typically interface to
hardware by either writing direct bus commands (USB, GPIB, Serial...) or using
high-level, device-specific, drivers that provide native LabVIEW function nodes for
controlling the device. National Instruments makes thousands of device drivers
available for download on the Instrument Driver Network (IDNet).
The UI developed here has the means of cotrolling (ON/OFF) the load using
the computer. The threshold values of the various parameters for a particular load
can be set from the Parameter Control section . The Indicator module displays the
real time values of the four parameters. In case of any abnormal variation in
parameters the blinkers at the right end corner will indicate which parameter has
exceeded the limits. The real time parameters are stored in a database and can be
viewed in a graphical manner on clicking the HISTOGRAM button .The UI depicted
here is the one designed for the model that is to control one AC load. It can be
modified to include all the equipments in the Bay.
-
SCADA systems for power distribution
School Of Engineering Page 33
3.4.1 HISTOGRAM
Histogram provides the graphical representation of the various parameters
against time. The real time parameters will be stored in computer database. On
clicking the Histogram Button in the UI a graph plotting all the parameters against
time will be shown. Histogram is very useful to analyse the trend in variation of the
parameters. Histograms are helpful in comparing the performance of load with
standard values. A typical Histogram used in the system is shown below
Fig 14 : Histogram
The real time values of the various parameters can be stored in a database and
produced later for analysis purpose . A window showing the real time values of the
different parameters of all the equipments in the bay is shown. The real time
parameters of all the equipments in Bay 50 has been depicted in the below figure .
-
SCADA systems for power distribution
School Of Engineering Page 34
Fig 15 : Real time data
Advantages of using Histograms :
Real time comparison of parameter variation is possible
Can easily identify the trend in parameter variation
Time based load parameter variation can be viewed
-
SCADA systems for power distribution
School Of Engineering Page 35
CHAPTER 4
PROJECT OUTCOME
-
SCADA systems for power distribution
School Of Engineering Page 36
4. PROJECT OUTCOME
An embedded system capable of monitoring the parameters of the equipments in a
factory and protecting the equipment has been developed . The system is capable of
being controlled remotely from a computer by means of UI application developed in
LAB VIEW . The connection between the measurement system and computer has
been employed by means of RS232 protocol .GSM system employed will help the
engineer notify any error at the instant . An effective system capable of monitoring
controlling the equipments in factories and notifying the engineer has been
developed
The proposed system has the following advantages
Accurate parameter measurement is possible
As all the measurements are done in real time , its time and cost effective.
The load parameters can be measured remotely , that is the worker need not
be close to the system for measurement , hence safety factor is
considerably increased
As human error probability is completely removed the margin of error in
parameter measurement is reduced
Since histograms are available time based parameter variation analysis of
AC load is possible
As Relay mechanism has been employed it protects the equipment in an
event of abnormal parameter variation.
Since digital database has been employed its management is much simpler
and can be used conveniently for analysis.
Use of GSM technology helps in notifying the engineer any abnormality in
the factory.
Following are the limitations of the project
Wired communication has been employed between remote computer and
system , any mechanical damage to the wire will shut down the system.
-
SCADA systems for power distribution
School Of Engineering Page 37
In order to facilitate wireless communication all the parameters for all the
equipment have to be transferred after encryption making it difficult and
costly to implement
Reliability of system is moderate due to the failure chances of the
microcontroller
-
SCADA systems for power distribution
School Of Engineering Page 38
CHAPTER 5
CONCLUSION
-
SCADA systems for power distribution
School Of Engineering Page 39
5.1 CONCLUSION
The proposed system will help in improving the overall efficiency of the
factory. Though the initial cost in setting up such a system is high the payback
period is quite low and helps in improving the output of factory. Timely maintenance
and protection of system can be ensured by employing this system. We have
proposed a brief or abstract system here.
E a c h a n d e v e r y p r o j e c t i s n e v e r c o m p l e t e a s n e w t h i n g s a r
e l e a r n e d f u r t h e r modifications can be done. The system can be further
developed to accommodate more parameters and add new facilities.
5.2 FUTURE SCOPE
The development of this project surely prompts many new areas of
investigation. This project has wide scope to implement it in any factory bays with
multiple equipments operating simultaneously. This project covers all functionalities
related load parameter analysis and control. Hence it can be implemented any-where
else after minute organization level customization
Moreover some parts of the project have remained uncompleted due to some
reasons. First of all limitations of our project, which has been discussed in previous
topic make place for future enhancements.
The project can be developed to measure more parameters such as harmonics
and so . In the proposed system the data communication between system and
computer is facilitated by RS232 protocol. It can be replaced by wireless
communication such as IR or any other encrypted protocol. In future the system may
be equipped with optoelectronic isolators thereby increasing the factor of safety and
accuracy more.
-
SCADA systems for power distribution
School Of Engineering Page 40
CHAPTER 6
BIBILOGRAPHY
-
SCADA systems for power distribution
School Of Engineering Page 41
6. BIBLIOGRAPHY
Books
Process Control Automation , Instrumentation and SCADA
Microcontroller Programming : An Introduction Syed R Rizvi
Papers
Supervisory control and data acquisition : Gaushell, D.J. ; Westin
Engineering, Inc., San Jose, CA, USA ; Darlington, H.T. Published
in: Proceedings of the IEEE (Volume:75 , Issue: 12 )
Websites
www.best-microcontroller-projects.com/pic-projects.html www.engineersgarage.com/embedded/pic-microcontroller-projects
www.embedded-lab.com
www.alldatasheets.com
www.electrofriends.com
-
SCADA systems for power distribution
School Of Engineering Page 42
CHAPTER 7
APPENDIX
-
SCADA systems for power distribution
School Of Engineering Page 43
7.1 APPLICATIONS USED
7.1.1 MPLAB
MPLAB IDE is an integrated development environment that provides
development engineers with the flexibility to develop and debug firmware for
various Microchip devices.
MPLAB IDE is a windows-based integrated development for the microchip
technology incorporated PIC microcontroller (MCU) and dsPIC digital signal
controller (DSC) families. In the MPLAB IDE, you can:
Create source code using the built-in editor.
Assemble, compile and link source code using various language tools. An
assembler, linker and librarian come with MPLAB IDE. C compilers are
available from microchip and other third party vendors.
Debug the executable logic by watching program flow with a simulator, such
as MPLAB SIM, or in real time with an emulator, such as MPLAB ICE.
Third party emulators that work with MPLAB IDE are also available.
Make timing measurements.
View variables in watch windows.
Find quick answers to questions from the MPLAB IDE on-line help.
7.1.2 PROTEUS
Proteus 7.0 is a Virtual System Modelling (VSM) that combines circuit simulation,
animated components and microprocessor models to co-simulate the complete
microcontroller based designs. This is the perfect tool for engineers to test their
microcontroller designs before constructing a physical prototype in real time. This
program allows users to interact with the design using on-screen indicators and/or
LED and LCD displays and, if attached to the PC, switches and buttons.
One of the main components of Proteus 7.0 is the Circuit Simulation -- a product that
-
SCADA systems for power distribution
School Of Engineering Page 44
uses a SPICE3f5 analogue simulator kernel combined with an event-driven digital
simulator that allow users to utilize any SPICE model by any manufacturer.
Proteus VSM comes with extensive debugging features, including breakpoints,
single stepping and variable display for a neat design prior to hardware prototyping.
In summary, Proteus 7.0 is the program to use when you want to simulate the
interaction between software running on a microcontroller and any analog or digital
electronic device connected to it.
7.1.3 LABVIEW
LabVIEW (short for Laboratory Virtual Instrument Engineering Workbench) is a
system-design platform and development environment for a visual programming
language from National Instruments.
The graphical language is named "G" (not to be confused with G-code). Originally
released for the Apple Macintosh in 1986, LabVIEW is commonly used for data
acquisition, instrument control, and industrial automation on a variety of platforms
including Microsoft Windows, various versions of UNIX, Linux, and Mac OS X.
The latest version of LabVIEW is LabVIEW 2014, released in August 2014.
The programming language used in LabVIEW, also referred to as G, is
a dataflow programming language. Execution is determined by the structure of a
graphical block diagram (the LabVIEW-source code) on which the programmer
connects different function-nodes by drawing wires. These wires propagate variables
and any node can execute as soon as all its input data become available. Since this
might be the case for multiple nodes simultaneously, G is inherently capable of
parallel execution. Multi-processing and multi-threading hardware is automatically
exploited by the built-in scheduler, which multiplexes multiple OS threads over the
nodes ready for execution.
LabVIEW ties the creation of user interfaces (called front panels) into the
development cycle. LabVIEW programs/subroutines are called virtual instruments
(VIs). Each VI has three components: a block diagram, a front panel and a connector
-
SCADA systems for power distribution
School Of Engineering Page 45
panel. The last is used to represent the VI in the block diagrams of other, calling VIs.
The front panel is built using controls and indicators. Controls are inputs they
allow a user to supply information to the VI. Indicators are outputs they indicate,
or display, the results based on the inputs given to the VI. The back panel, which is a
block diagram, contains the graphical source code. All of the objects placed on the
front panel will appear on the back panel as terminals. The back panel also contains
structures and functions which perform operations on controls and supply data to
indicators. The structures and functions are found on the Functions palette and can
be placed on the back panel. Collectively controls, indicators, structures and
functions will be referred to as nodes. Nodes are connected to one another using
wires e.g. two controls and an indicator can be wired to the addition function so
that the indicator displays the sum of the two controls. Thus a virtual instrument can
either be run as a program, with the front panel serving as a user interface, or, when
dropped as a node onto the block diagram, the front panel defines the inputs and
outputs for the given node through the connector pane. This implies each VI can be
easily tested before being embedded as a subroutine into a larger program.
The graphical approach also allows non-programmers to build programs by dragging
and dropping virtual representations of lab equipment with which they are already
familiar. The LabVIEW programming environment, with the included examples and
documentation, makes it simple to create small applications. This is a benefit on one
side, but there is also a certain danger of underestimating the expertise needed for
high-quality G programming. For complex algorithms or large-scale code, it is
important that the programmer possess an extensive knowledge of the special
LabVIEW syntax and the topology of its memory management. The most advanced
LabVIEW development systems offer the possibility of building stand-alone
applications. Furthermore, it is possible to create distributed applications, which
communicate by a client/server scheme, and are therefore easier to implement due to
the inherently parallel nature of G.
Benifits
A key feature of LabVIEW is the extensive support for interfacing to devices such as
instruments, cameras, and other devices. Users typically interface to hardware by
-
SCADA systems for power distribution
School Of Engineering Page 46
either writing direct bus commands (USB, GPIB, Serial...) or using high-level,
device-specific, drivers that provide native LabVIEW function nodes for controlling
the device. National Instruments makes thousands of device drivers available for
download on the Instrument Driver Network (IDNet).
Code compilation
In terms of performance, LabVIEW includes a compiler that produces native code
for the CPU platform. The graphical code is translated into executable machine code
by interpreting the syntax and by compilation. The LabVIEW syntax is strictly
enforced during the editing process and compiled into the executable machine code
when requested to run or upon saving. In the latter case, the executable and the
source code are merged into a single file. The executable runs with the help of the
LabVIEW run-time engine, which contains some precompiled code to perform
common tasks that are defined by the G language. The run-time engine reduces
compile time and also provides a consistent interface to various operating systems,
graphic systems, hardware components, etc. The run-time environment makes the
code portable across platforms. Generally, LabVIEW code can be slower than
equivalent compiled C code, although the differences often lie more with program
optimization than inherent execution speed.
Large libraries
Many libraries with a large number of functions for data acquisition, signal
generation, mathematics, statistics, signal conditioning, analysis, etc., along with
numerous graphical interface elements are provided in several LabVIEW package
options. The number of advanced mathematic blocks for functions such as
integration, filters, and other specialized capabilities usually associated with data
capture from hardware sensors is immense. In addition, LabVIEW includes a text-
based programming component called MathScript with additional functionality for
signal processing, analysis and mathematics. MathScript can be integrated with
graphical programming using "script nodes" and uses a syntax that is generally
compatible with MATLAB
-
SCADA systems for power distribution
School Of Engineering Page 47
Code re-use
The fully modular character of LabVIEW code allows code reuse without
modifications: as long as the data types of input and output are consistent, two
subVIs are interchangeable.
The LabVIEW Professional Development System allows creating stand-alone
executables and the resultant executable can be distributed an unlimited number of
times. The run-time engine and its libraries can be provided freely along with the
executable.
A benefit of the LabVIEW environment is the platform independent nature of the G
code, which is (with the exception of a few platform-specific functions) portable
between the different LabVIEW systems for different operating systems (Windows,
Mac OS X and Linux). National Instruments is increasingly focusing on the
capability of deploying LabVIEW code onto an increasing number of targets
including devices like Phar Lap or VxWorks OS based LabVIEW Real-Time
controllers, FPGAs, PocketPCs, PDAs, Wireless sensor network nodes, and
even Lego Mindstorms NXT.
Parallel programming
LabVIEW is an inherently concurrent language, so it is very easy to program
multiple tasks that are performed in parallel by means of multithreading. This is, for
instance, easily done by drawing two or more parallel while loops. This is a great
benefit for test system automation, where it is common practice to run processes like
test sequencing, data recording, and hardware interfacing in parallel.
Ecosystem
Due to the longevity and popularity of the LabVIEW language, and the ability for
users to extend the functionality, a large ecosystem of 3rd party add-ons has
developed through contributions from the community. This ecosystem is available
on the LabVIEW Tools Network, which is a marketplace for both free and paid
LabVIEW add-ons.
-
SCADA systems for power distribution
School Of Engineering Page 48
User community
There is a low-cost LabVIEW Student Edition aimed at educational institutions for
learning purposes. There is also an active community of LabVIEW users who
communicate through several e-mail groups and Internet forums.
Licensing
Building a stand-alone application with LabVIEW requires the Application Builder
component which is included with the Professional Development System but
requires a separate purchase if using the Base Package or Full Development
System.[1]
There is no LabVIEW 2011 student license for Linux.
Run-time environment
Compiled executables produced by version 6.0 and later of the Application Builder
are not truly standalone in that they also require the LabVIEW run-time engine be
installed on any target computer which runs the application.[2]
The use of standard
controls requires a run-time library for any language. All major operating systems
supply the required libraries for common languages such as C. However, the run-
time required for LabVIEW is not supplied with any operating system and has to be
specifically installed by the administrator or user. This can cause problems if an
application is distributed to a user who may be prepared to run the application but
does not have the inclination or permission to install additional files on the host
system prior to running the executable.
Race conditions and pseudo parallel execution
The G gives the impression of being a parallel language (cf VHDL) that has modules
that run in parallel, however, it is essentially implemented on a non parallel platform
without explicit race condition control. While this simplifies programming it gives a
false impression of security.
Performance
LabVIEW makes it difficult to get machine or hardware limited performance and
tends to produce applications that are significantly slower than hand coded native
-
SCADA systems for power distribution
School Of Engineering Page 49
languages such as C. This is especially obvious in complex applications involving
several pieces of hardware.
Light weight applications
Very small applications still have to start the runtime environment which is a large
and slow task. This makes writing and running small applications or applications that
might run in parallel on the same platform problematic and tends to restrict
LabVIEW to monolithic applications. Examples of this might be tiny programs to
grab a single value from some hardware that can be used in a scripting language - the
overheads of the runtime environment render this approach impractical with
LabVIEW.
-
SCADA systems for power distribution
School Of Engineering Page 50
7.2 DATA SHEETS
7.2.1 PIC16F877A MICROCONTROLLER
The microcontroller that has been used for this project is from PIC series.
PIC microcontroller is the first RISC based microcontroller fabricated in CMOS
(complementary metal oxide semiconductor) that uses separate bus for instruction
and data allowing simultaneous access of program and data memory. The main
advantage of CMOS and RISC combination is low power consumption resulting in a
very small chip size with a small pin count. The main advantage of cmos is that it
has immunity to noise than other fabrication techniques.
Various microcontrollers offer different kinds of memories. EEPROM, EPROM,
FLASH etc. are some of the memories of which FLASH is the most recently
developed. Technology that is used in PIC16F877A is flash technology, so that data
is retained even when the power is switched off. CORE FEATURES:
High-performance RISC CPU
Only 35 single word instruction to learn
All single instruction except for program branches which are two cycle
Operating speed: DC - 20 MHz clock input
DC 200 ns instruction cycle
Up to 8K x 14 words of flash program memory,
Up to 368 x 8 bytes of data memory (RAM)
Up to 256 x 8 bytes of EEPROM data memory
Pin out compatible to the PIC 16c 73/74/76/77
Interrupt capability (up to 14 internal/external)
Direct, indirect, and relative addressing modes
Watchdog timer (WDT) with its own on-chip RC oscillator for reliable
operation
Programmable code-protection
Power saving SLEEP mode
-
SCADA systems for power distribution
School Of Engineering Page 51
Selectable oscillator options
Low-power, high-speed CMOS EPROM/EEPROM technology
Only single 5V source needed for programming capability
In-circuit debugging via two pins
Processor read/write access to program memory
Wide operating voltage range: 2.5V to 5.5V
High sink/source current: 25mA
Low-power consumption:
< 2mA typical @ 5V, 4 MHz & 20mA typical @ 3V, 32 kHz
PERIPHERAL FEATURES:
Timer0: 8-bit timer/counter with 8-bit prescaler
Timer1: 16-bit timer/counter with prescaler, can be incremented
during Sleep via external crystal/clock
Timer2: 8-bit timer/counter with 8-bit period register, prescaler and
post scalar
Two Capture, Compare, PWM modules
- Capture is 16-bit, max. Resolution is 12.5 ns
- Compare is 16-bit, max. Resolution is 200 ns
- PWM max. Resolution is 10-bit
Synchronous Serial Port (SSP) with SPI (Master mode) and I2C
(Master/Slave)
Universal Synchronous Asynchronous Receiver Transmitter
(USART/SCI) with 9-bit address detection
Parallel Slave Port (PSP) 8 bits wide with external RD, WR and CS
controls (40/44-pin only)
Brown-out detection circuitry for Brown-out Reset (BOR)
Analog Features:
- 10-bit, up to 8-channel Analog-to-Digital Converter (A/D)
- Brown-out Reset (BOR)
Analog Comparator module with:
-
SCADA systems for power distribution
School Of Engineering Page 52
- Two analog comparators
- Programmable on-chip voltage reference
ARCHITECTURE OF PIC 16F877A:
The complete architecture of PIC 16f877A is shown in the figure.
Fig 16 : PIC 16f877a architecture
-
SCADA systems for power distribution
School Of Engineering Page 53
Fig 17 : PIN DIAGRAM OF PIC 16F877A:
-
SCADA systems for power distribution
School Of Engineering Page 54
PIN NUMBER DESCRIPTION:
Pin Number Description
1 MCLR/VPP
2 RA0/AN0
3 RA1/AN1
4 RA2/AN2/VREF-/CVREF
5 RA3/AN3/VREF+
6 RA4/T0CKI/C1OUT
7 RA5/AN4/SS/C2OUT
8 RE0/RD/AN5
9 RE1/WR/AN6
10 RE2/CS/AN7
11 VDD
12 VSS
13 OSC1/CLKI
14 OSC2/CLKO
15 RC0/T1OSO/T1CKI
16 RC1/T1OSI/CCP2
17 RC2/CCP1
18 RC3/SCK/SCL
19 RD0/PSP0
20 RD1/PSP1
-
SCADA systems for power distribution
School Of Engineering Page 55
21 RD2/PSP2
22 RD3/PSP3
23 RC4/SDI/SDA
24 RC5/SDO
25 RC6/TX/CK
26 RC7/RX/DT
27 RD4/PSP4
28 RD5/PSP5
29 RD6/PSP6
30 RD7/PSP7
31 VSS
32 VDD
33 RB0/INT
34 RB1
35 RB2
36 RB3/PGM
37 RB4
38 RB5
39 RB6/PGC
40 RB7/PGD
-
SCADA systems for power distribution
School Of Engineering Page 56
6.2.2 LM358
Utilizing the circuit designs perfected for recently introduced Quad
Operational Amplifiers, these dual operational amplifiers feature 1) low
power drain, 2) a common mode input voltage range extending to
ground/VEE, 3) single supply or split supply operation and 4) pinouts
compatible with the popular MC1558 dual operational amplifier. The LM158
series is equivalent to onehalf of an LM124.
These amplifiers have several distinct advantages over standard
operational amplifier types in single supply applications. They can operate at
supply voltages as low as 3.0 V or as high as 32 V, with quiescent currents
about onefifth of those associated with the MC1741 (on a per amplifier
basis). The common mode input range includes the negative supply, thereby
eliminating the necessity for external biasing components in many
applications. The output voltage range also includes the negative power
supply voltage.
Short Circuit Protected Outputs
True Differential Input Stage
Single Supply Operation: 3.0 V to 32 V
Low Input Bias Currents
Internally Compensated
Common Mode Range Extends to Negative Supply
Single and Split Supply Operation
Similar Performance to the Popular MC1558
ESD Clamps on the Inputs Increase Ruggedness of the Device without
Affecting Operation
-
SCADA systems for power distribution
School Of Engineering Page 57
Fig 18 : LM358 pin diagram
-
SCADA systems for power distribution
School Of Engineering Page 58
-
SCADA systems for power distribution
School Of Engineering Page 59
Fig 19 : LM358 schematic diagram
The LM258 series is made using two internally compensated, twostage operational
amplifiers. The first
stage of each consists of differential input devices Q20 and Q18 with input buffer
transistors Q21 and Q17 and the differential to single ended converter Q3 and Q4.
The first stage performs not only the first stage gain function but also performs the
level shifting and transconductance reduction functions. By reducing the
transconductance, a smaller compensation capacitor (only 5.0 pF) can be employed,
thus saving chip area. The transconductance reduction is accomplished by splitting
the collectors of Q20 and Q18. Another feature of this input stage is that the input
common mode range can include the negative supply or ground, in single supply
operation, without saturating either the input devices or the differential to single
ended converter. The second stage consists of a standard current source load
amplifier stage.
Each amplifier is biased from an internalvoltage regulator which has a low
temperature coefficient thus giving each amplifier good temperature characteristics
as well as excellent power supply rejection.
-
SCADA systems for power distribution
School Of Engineering Page 60
Fig 20 : LM358 charecteristics
-
SCADA systems for power distribution
School Of Engineering Page 61
Fig21 : LM 358 package
-
SCADA systems for power distribution
School Of Engineering Page 62
6.2.3 LCD DISPLAY
2 x 16 LCD DISPLAY:
Liquid crystal displays (LCDs) have materials which combine the properties
of both liquids and crystals. Rather than having a melting point, they have a
temperature range within which the molecules are almost as mobile as they would be
in a liquid, but are grouped together in an ordered form similar to a crystal.
An LCD consists of two glass panels, with the liquid crystal material sand
witched in between them. The inner surface of the glass plates are coated with
transparent electrodes which define the character, symbols or patterns to be
displayed polymeric layers are present in between the electrodes and the liquid
crystal, which makes the liquid crystal molecules to maintain a defined orientation
angle. One each polarizes are pasted outside the two glass panels. These polarizes
would rotate the light rats passing through them to a definite angle, in a particular
direction.
When the LCD is in the off state, light rays are rotated by the two polarizes
and the liquid crystal, such that the light rays come out of the LCD without any
orientation, and hence the LCD appears transparent. When sufficient voltage is
applied to the electrodes, the liquid crystal molecules would be aligned in a specific
direction. The light passing through the LCD would be rotated by the polarizes
which result in activating/highlighting the desired characters.
The LCDs are lightweight with only a few millimeters thickness. Since the
LCDs consume less power, they are compatible with low power electronic circuits
and can be powered for long durations. The LCDs dont generate light and so light
is needed to read the display. By using backlighting, reading is possible in the dark.
The LCDs have long life and a wide operating temperature range.
Changing the display size or the layout size is relatively simple which makes
the LCDs more customer friendly. The LCDs used exclusively in watches,
calculators and measuring instruments are the simple seven-segment displays, having
a limited amount of numeric data. The recent advances in technology have resulted
-
SCADA systems for power distribution
School Of Engineering Page 63
in better legibility, more information displaying capability and a wider temperature
range. These have resulted in the LCDs being extensively used in
telecommunications and entertainment electronics. The LCDs have even started
replacing the cathode ray tubes (CRTs) used for the display of text and graphics, and
also in small TV applications.
PIN DIAGRAM OF LCD DISPLAY:
Fig 22 : LCD pin diagram
PIN DESCRIPTION FOR LCD DISPLAY
Pin
No Function Name
1 Ground (0V) Ground
2 Supply voltage; 5V (4.7V 5.3V) Vcc
3 Contrast adjustment; through a variable resistor
VEE
4 Selects command register when low; and data register Register
-
SCADA systems for power distribution
School Of Engineering Page 64
when high Select
5 Low to write to the register; High to read from the register Read/write
6 Sends data to data pins when a high to low pulse is given Enable
7
8-bit data pins
DB0
8 DB1
9 DB2
10 DB3
11 DB4
12 DB5
13 DB6
14 DB7
15 Backlight VCC (5V) Led+
16 Backlight Ground (0V) Led-
LCD DISPLAY WITH PIC:
-
SCADA systems for power distribution
School Of Engineering Page 65
6.2.4 MAX232
MAX232 is purposed for application in high-performance information processing
systems and control devices of wide application.
Input voltage levels are compatible with standard _MOS levels.
Output voltage levels are compatible with input levels
of K-MOS, N-MOS and TTL integrated circuits.
Supply voltage : 5V
Low input current: 1.0; 0.1at _ = 25 _.
Output current 24 mA.
Latching current not less than 450 mA at _ = 25_
The transmitter outputs and receiver inputs are protected to 15kV Air
ESD.
-
SCADA systems for power distribution
School Of Engineering Page 66
Fig 23 : Max232 pinout diagram
-
SCADA systems for power distribution
School Of Engineering Page 67
-
SCADA systems for power distribution
School Of Engineering Page 68
7.2.4 GSM SIM 300
Product concept
Designed for global market, SIM300 is a Tri-band GSM/GPRS engine that works on
frequencies EGSM 900 MHz, DCS 1800 MHz and PCS1900 MHz. SIM300
provides GPRS multi-slot class 10 capability and support the GPRS coding schemes
CS-1, CS-2, CS-3 and CS-4.
With a tiny configuration of 40mm x 33mm x 2.85 mm , SIM300 can fit almost all
the space requirement in your application, such as Smart phone, PDA phone and
other mobile device.
The physical interface to the mobile application is made through a 60 pins board-to-
board connector, which provides all hardware interfaces between the module and
customers boards except the RF antenna interface.
The keypad and SPI LCD interface will give you the flexibility to develop
customized applications.
Two serial ports can help you easily develop your applications.
Two audio channels include two microphones inputs and two speaker
outputs. This can be easily configured by AT command.
SIM300 provide RF antenna interface with two alternatives: antenna connector and
antenna pad. The antenna connector is MURATA MM9329-2700. And customers
antenna can be soldered to the antenna pad.
The SIM300 is designed with power saving technique, the current consumption to as
low as 2.5mA in SLEEP mode.
The SIM300 is integrated with the TCP/IP protocolExtended TCP/IP AT
commands are developed for customers to use the TCP/IP protocol easily, which is
very useful for those data transfer applications.
-
SCADA systems for power distribution
School Of Engineering Page 69
-
SCADA systems for power distribution
School Of Engineering Page 70
-
SCADA systems for power distribution
School Of Engineering Page 71
-
SCADA systems for power distribution
School Of Engineering Page 72
7.3 PROGRAM CODE
#include
#include
#include
#include"pic_lcd4_msb.h"
#include"pic_adc.h"
#include"usart.h"
#define _XTAL_FREQ 4000000
int powerfactor()
{
int a=0,b=0,t=0,x=0;
float tm,pf;
TMR1L=0;
TMR1H=0;
do
{
if(RB0==1)
{
TMR1ON=1;
}
else if((RB0==0)&&(TMR1ON==1))
{
TMR1ON=0;
break;
}
}while(1);
a=((TMR1H*256)+TMR1L)*2;
TMR1L=0;
TMR1H=0;
do
-
SCADA systems for power distribution
School Of Engineering Page 73
{
if(RB0==1)
{
TMR1ON=1;
if(RB1==1)
{
TMR1ON=0;
break;
}
}
}while(1);
b=(TMR1H*256)+TMR1L;
tm=b/a;
pf=cos(tm*2*3.14);
x=abs(ceil(pf*100));
return(x);
}
void string(char *c)
{
while(1)
{
TXREG=*c;
while(TXIF==0);
__delay_ms(20);
c++;
if(*c=='\0')
break;
}
}
void enter()
{
TXREG=0X0D;
-
SCADA systems for power distribution
School Of Engineering Page 74
while(TXIF==0);
TXREG=0X0A;
while(TXIF==0);
}
void main()
{
int x=0,y=0,q=0,r=0,a=0,b=0,c=0,m=0;
TRISA=0xFF;
TRISB=0x03;
PORTB=0x00;
TRISC=0X83;
PORTC=0X00;
T1CON=0x0F;
ADCON1=0x80;
Lcd4_Init();
TMR1H=0;
TMR1L=0;
while(1)
{
RC5=0;
RC3=0;
x=Adc10_Cha(0);
y=x/2.67;
Lcd4_Command(0x01);
Lcd4_Display(0x80," voltage ",9);
Lcd4_Decimal3(0xc0,y);
Lcd4_Display(0xc3," v ",3);
__delay_ms(50);
TXREG='v';
-
SCADA systems for power distribution
School Of Engineering Page 75
while(TXIF==0);
TXREG=y;
while(TXIF==0);
TXREG='w';
while(TXIF==0);
a=Adc10_Cha(1);
b=a*10;
Lcd4_Command(0x01);
Lcd4_Display(0x80," current ",9);
Lcd4_Decimal2(0xc0,b);
Lcd4_Display(0xc2," A ",3);
__delay_ms(50);
TXREG='i';
while(TXIF==0);
TXREG=b;
while(TXIF==0);
TXREG='j';
while(TXIF==0);
TMR1H=0;
TMR1L=0;
__delay_ms(1000);
q=TMR1H*256;
r=q+TMR1L;
Lcd4_Command(0x01);
Lcd4_Display(0x80," frequency ",11);
Lcd4_Decimal2(0xc0,r);
Lcd4_Display(0xc2," hz ",4);
__delay_ms(50);
TXREG='f';
-
SCADA systems for power distribution
School Of Engineering Page 76
while(TXIF==0);
TXREG=r;
while(TXIF==0);
TXREG='g';
while(TXIF==0);
c=powerfactor();
Lcd4_Command(0x01);
Lcd4_Display(0x80," power factor ",14);
Lcd4_Decimal3(0xc0,c);
Lcd4_Display(0xc3," % ",3);
__delay_ms(50);
TXREG='p';
while(TXIF==0);
TXREG=c;
while(TXIF==0);
TXREG='q';
while(TXIF==0);
if((y>=229)||(b>=5)||(r>=50)||(RC4==1))
{
while(RC4==1);
RC5=1;
RC3=1;
string("AT");
enter();
__delay_ms(500);
string("AT+CMGF=1");
enter();
__delay_ms(500);
string("AT+CMGS=\"9809779967\"");
-
SCADA systems for power distribution
School Of Engineering Page 77
enter();
__delay_ms(500);
string("some parameters have exceeded the
limits\maintanence mode ");
enter();
__delay_ms(500);
TXREG=0X0D;
while(TXIF==0);
TXREG=0X1A;
while(TXIF==0);
__delay_ms(5000);
while(m==0)
{
if(RC2==1)
{
while(RC2==1);
m=1;
}
}
}
}
}
-
SCADA systems for power distribution
School Of Engineering Page 78
LAB VIEW Block Diagram