+ All Categories
Home > Documents > Smart Grid Report-2

Smart Grid Report-2

Date post: 06-Jul-2018
Category:
Upload: sanchitjain
View: 218 times
Download: 0 times
Share this document with a friend

of 34

Transcript
  • 8/17/2019 Smart Grid Report-2

    1/34

    SMART GRID FAILURE CONTROL SYSTEM

    Project Report submitted to

    Delhi Technological University

    In partial fulfillment for the award of the degree of 

    Bachelors in Technology in

    Electrical engineering

    By  Sanchit Jain !"#!$%%$##&'

      Tushant (ijayran !"#!$%%$#)!'

      Tushar Jindal !"#!$%%$#)*'

      (ishesh Jindal !"#!$%%$#)+'

    Under the guidance o !ro" Mini Sree#eth

    $%&'($%&)

  • 8/17/2019 Smart Grid Report-2

    2/34

    ,%RTI-I,.T%

    This is to certify that the project report titled /Smart grid failure control system0

    submitted by SANCHIT JAIN, TUSHANT VIJAYRAN,  TUSHAR JINDAL AND

    VISHESH JINDAL in the fulfillment of the re1uirements of the course 2ajor project3I'

    at DELHI TECHNL!ICAL UNIVERSITY  as a part of the degree in

    ELECTRICAL EN!INEERIN!4 The wor5 was carried and has not submitted

    anywhere else for any other purpose4

      "rs# "ini Sree$eth%

      &R'ESSR 

      DE&T ' ELECTRICAL

    EN!INEERIN!

     

  • 8/17/2019 Smart Grid Report-2

    3/34

    .,"6789%D:%2%6T

    8% SANCHIT  JAIN, TUSAHNT VIJAYRAN, TUSHAR JINDAL ( VISHESH

    JINDAL are using this opportunity to e;press my gratitude to everyone who supported

    me throughout the course of this major project4 8e are than5ful for their aspiring

    guidance< invaluably constructive criticism and friendly advice during the project wor54

    8e are sincerely grateful to them for sharing their truthful and illuminating views on a

    number of issues related to the project4

    8e e;press our warm than5s to "rs# "ini Sree$eth for their support and guidance at

    DELHI TECHNL!ICAL UNIVERSITY

    SANCHIT JAIN, TUSHANT VIJAYRAN, TUSHAR JINDAL, VISHESH JINDAL

  • 8/17/2019 Smart Grid Report-2

    4/34

    Contents

    1. Certificate............................................................................2

    2. Acknowledgement…………………………….. ...............…..3

    3. Abstract and key words...........................………..................4

  • 8/17/2019 Smart Grid Report-2

    5/34

    Project aim: To seek out the world's biggest blackout roblem! "# crore$ndians without ower.

    Project working$n our final year ro%ect we had sought out the world's biggest blackoutroblem by using ic microcontroller.&e are using one ower source as grid north grid( and connect threedifferent bulb holders on that ower source grid( as a consumer states.)ow what we are doing different is! we fi* three ower load coil o+er thestate lines! these load coil sense the consumtion load and send ulse toic controller unit.&e rogram our ic controller in such a manner that ,-w load is sensationload. $f any of the three state o+erloads to ower source grid( by crossing,-w sensation load! controlling unit disconnect state ower suly torotect o+er loading on grid.

    Block diagram

  • 8/17/2019 Smart Grid Report-2

    6/34

    Circuit

  • 8/17/2019 Smart Grid Report-2

    7/34

    COMPONENTS USED1. ic 1"f,##a

    2. /ssilator0"mh3. cd 1" * 24. $c uln2--3. oad coil". egulator0#,-#. Caacitor,. esistance5. 6iode1-.eds11. elay12. Transformer

  • 8/17/2019 Smart Grid Report-2

    8/34

    COMPONENT DETA! "# Current trans$ormer %CT&$n electrical engineering! a current transformer CT( is used for measurement ofelectric currents. Current transformers! together with +oltage transformers 7T(otential transformers T((! are known as instrumenttransformers. &hen current in a circuit is too high todirectly aly to measuring instruments! a currenttransformer roduces a reduced current accurately

    roortional to the current in the circuit! which can becon+eniently connected to measuring and recordinginstruments. A current transformer also isolates themeasuring instruments from what may be +ery high+oltage in the monitored circuit. Current transformersare commonly used in metering and rotecti+e relays inthe electrical ower industry.

    Design

    ike any other transformer! a current transformer has a rimary winding! a magneticcore! and a secondary winding. The alternatingcurrent flowing in the rimary roduces amagnetic field in the core! which then induces acurrent in the secondary winding circuit. Arimary ob%ecti+e of current transformer designis to ensure that the rimary and secondarycircuits are efficiently couled! so that thesecondary current bears an accurate

    relationshi to the rimary current. 

    The most common design of CT consists of a length of wire wraed many timesaround a silicon steel ring assed o+er the circuit being measured. The CT's rimarycircuit therefore consists of a single 'turn' of conductor! with a secondary of manytens or hundreds of turns. The rimary winding may be a ermanent art of thecurrent transformer! with a hea+y coer bar to carry current through the magnetic

  • 8/17/2019 Smart Grid Report-2

    9/34

    core. &indow0tye current transformers aka ero se8uence current transformers! or9:CT( are also common! which can ha+e circuit cables run through the middle of anoening in the core to ro+ide a single0turn rimary winding. &hen conductorsassing through a CT are not centered in the circular or o+al( oening! slightinaccuracies may occur.

    :haes and sies can +ary deending on the end user or switchgear manufacturer.Tyical e*amles of low +oltage single ratio metering current transformers are eitherring tye or lastic moulded case. ;igh0+oltage current transformers are mounted onorcelain bushings to insulate them from ground. :ome CT configurations sliaround the bushing of a high0+oltage transformer or circuit breaker! whichautomatically centers the conductor inside the CT window.

    The rimary circuit is largely unaffected by the insertion of the CT. The rated

    secondary current is commonly standardied at 1 or ameres.

  • 8/17/2019 Smart Grid Report-2

    10/34

    Current transformers are used e*tensi+ely for measuring current and monitoring theoeration of the ower grid. Along with +oltage leads! re+enue0grade CTs dri+e theelectrical utility's watt0hour meter on +irtually e+ery building with three0hase ser+iceand single0hase ser+ices greater than 2-- ams. 

    The CT is tyically described by its current ratio from rimary to secondary. /ften!multile CTs are installed as a >stack> for +arious uses.

  • 8/17/2019 Smart Grid Report-2

    11/34

    circuits! and each class has an allowable ma*imum hase error for a secified loadimedance.

    Current transformers used for rotecti+e relaying also ha+e accuracy re8uirements ato+erload currents in e*cess of the normal rating to ensure accurate erformance ofrelays during system faults. A CT with a rating of 2.4-- secifies with an oututfrom its secondary winding of 2- times its rated secondary current usually A * 2- D1-- A( and 4-- 7 $9 dro( its outut accuracy will be within 2. ercent.

    Burden

    The secondary load of a current transformer is usually called the >burden> todistinguish it from the load of the circuit whose current is being measured.

    The burden! in a CT metering circuit is the largely resisti+e( imedance resented toits secondary winding. Tyical burden ratings for $C CTs are 1. 7A! 3 7A! 7A! 1-7A! 1 7A! 2- 7A! 3- 7A! 4 7A E "- 7A. As for A):$@$ burden ratings are ?0-.1!?0-.2! ?0-.! ?01.-! ?02.- and ?04.-. This means a CT with a burden rating of ?0-.2can tolerate u to -.2 F of imedance in the metering circuit before its secondaryaccuracy falls outside of an accuracy secification. These secification diagramsshow accuracy arallelograms on a grid incororating magnitude and hase angleerror scales at the CT's rated burden. $tems that contribute to the burden of a currentmeasurement circuit are switch0blocks! meters and intermediate conductors. Themost common source of e*cess burden is the conductor between the meter and the

    CT. &hen substation meters are located far from the meter cabinets! the e*cessi+elength of wire creates a large resistance. This roblem can be reduced by using CTs

     with 1 amere secondaries! which will roduce less +oltage dro between a CT andits metering de+ices.

    (NEE)PONT *O!TA+E

    The knee0oint +oltage of a current transformer is the magnitude of thesecondary +oltage after which the outut current ceases to follow linearly

    the inut current. This means that the one0to0one or roortionalrelationshi between the inut and outut is no longer within declaredaccuracy. $n testing! if a +oltage is alied across the secondary terminalsthe magnetiing current will increase in roortion to the alied +oltage!u until the knee oint. The knee oint is defined as the +oltage at which a1-B increase in alied +oltage increases the magnetiing current by

  • 8/17/2019 Smart Grid Report-2

    12/34

    -B. lightload!> or 1-B of the nominal current there are! howe+er! secial CTs designed tomeasure accurately currents as small as 2B of the nominal current(. The ratingfactor of a CT is largely deendent uon ambient temerature. Host CTs ha+e ratingfactors for 3 degrees Celsius and degrees Celsius. $t is imortant to be mindfulof ambient temeratures and resultant rating factors when CTs are installed insideadmount transformers or oorly +entilated mechanical rooms. ecently!manufacturers ha+e been mo+ing towards lower nominal rimary currents with

    greater rating factors. This is made ossible by the de+eloment of more efficientferrites and their corresonding hysteresis cur+es.

    S.ecial designs

    :ecially constructed wideband current transformers are also used usually with anoscilloscoe( to measure wa+eforms of high fre8uency or ulsed currents withinulsed ower systems. /ne tye of secially constructed wideband transformerro+ides a +oltage outut that is roortional to the measured current. Another tyecalled a ogowski coil( re8uires an e*ternal integrator in order to ro+ide a +oltageoutut that is roortional to the measured current. Inlike CTs used for owercircuitry! wideband CTs are rated in outut +olts er amere of rimary current. CTAT$/

    Standards

    http://en.wikipedia.org/wiki/Current_transformer#cite_note-GEC75-1http://en.wikipedia.org/wiki/Current_transformer#cite_note-GEC75-1

  • 8/17/2019 Smart Grid Report-2

    13/34

    6eending on the ultimate clients re8uirement! there are two main standards to which current transformers are designed. $C "--4401 ?:) "--4401( E $C#.13 A):$(! although the Canadian E Australian standards are also recognised.

    /ig0 1oltage t'.es

    Current transformers are used for rotection! measurement and control in high+oltage electrical substations and the electrical grid. Current transformers may beinstalled inside switchgear or in aaratus bushings! but +ery often free0standingoutdoor current transformers are used. $n a switchyard! live tank  current transformersha+e a substantial art of their enclosure energied at the line +oltage and must bemounted on insulators. Dead tank  current transformers isolate the measured circuit

    from the enclosure. i+e tank CTs are useful because the rimary conductor is short! which gi+es better stability and a higher short0circuit current withstand rating. Therimary of the winding can be e+enly distributed around the magnetic core! whichgi+es better erformance for o+erloads and transients. :ince the ma%or insulation ofa li+e0tank current transformer is not e*osed to the heat of the rimary conductors!insulation life and thermal stability is imro+ed.

    A high0+oltage current transformer may contain se+eral cores with multilesecondary windings for different uroses such as metering circuits! control! orrotection(.

  • 8/17/2019 Smart Grid Report-2

    14/34

    2# ,E!A3

    $t is often desirable or essential to isolate one circuit electrically from another! whilestill allowing the first circuit to control the second.

  • 8/17/2019 Smart Grid Report-2

    15/34

    Ad1antages o$ ,ela's

    • The comlete electrical isolation imro+es safety by ensuring that high

    +oltages and currents cannot aear where they should not be.

    • elays come in all shaes and sies for different alications and they ha+e

    +arious switch contact configurations. 6ouble ole 6ouble Throw 66T(relays are common and e+en 40ole tyes are a+ailable. Jou can thereforecontrol se+eral circuits with one relay or use one relay to control the directionof a motor.

    • $t is easy to tell when a relay is oerating 0 you can hear a click as the relay

    switches on and off and you can sometimes see the contacts mo+ing.

    Disad1antages o$ ,ela's

    ?eing mechanical though! relays do ha+e some disad+antages o+er other methodsof electrical isolation=

    • Their arts can wear out as the switch contacts become dirty 0 high +oltages

    and currents cause sarks between the contacts.

    • They cannot be switched on and off at high seeds because they ha+e a slowresonse and the switch contacts will raidly wear out due to the sarking.

    • Their coils need a fairly high current to energise! which means some micro0

    electronic circuits can't dri+e them directly without additional circuitry.

    • The back0emf created when the relay coil switches off can damage the

    comonents that are dri+ing the coil. To a+oid this! a diode can be laced

  • 8/17/2019 Smart Grid Report-2

    16/34

    across the relay coil! as will be seen in any lectronics in Heccano circuitsthat use relays with sensiti+e comonents.

    C0oosing a ,ela'

    &hen choosing a relay to use in a circuit! you need to bear in mind roerties of boththe coil and the switch contacts.

  • 8/17/2019 Smart Grid Report-2

    17/34

    The technical name for this tye of beha+ior is 'bi0stable'! since the circuit has twostable states for its outut 0 on and off. ?istable circuits can also be constructed

    using many other comonents! including the timer $C and transistors.

    &hat's the oint of this circuitK The )ormally /en switch contact of the relay couldalso be connected to a de+ice such as a motor! as shown by the dotted connectionsin figure 3. The de+ice will then run indefinitely until some e+ent maybe triggered bythe de+ice( momentarily resses the eset button! thereby turning off the coil readyfor the Trigger button to be ressed again.This system could be used in a model which needs a 'ush to /erate' button. Amotor and gearing system in the model can be used to ress the eset button to cutthe ower to the relay coil after the model has been running for a certain amount oftime! or until a certain e+ent has occurred. /f course! you would ha+e to be sure thatthere was enough momentum in the mechanism that the button is released ready forthe ne*t cycle.

  • 8/17/2019 Smart Grid Report-2

    18/34

    5# T,ANS-O,ME,

    Transformers are a ma%or class of coils ha+ing two or more windings usually wraed around a common core made from laminated iron sheets.

    $t has two coils named rimary E secondary. $f the current flowing through rimary isfluctuating! then a current will be induced into the secondary winding. A steadycurrent will not be transferred from one coil to other coil.

    Transformers are of two tyes=

    1. :te u transformer

    2. :te down transformer

    $n ower suly we use ste down transformer. &e aly 22-7 AC on the rimary ofste down transformer. This transformer stes down this +oltage to 57 AC. &e gi+ethis 5 7 AC to rectifier circuit! which con+ert it to 7 6C.

    6# ,E+U!ATO, 789

    #,- $C is used as regulator in 7 ower suly.

    &=>?

    # * !

    # 3 I6! 3 7UT

    * 3 :6D

  • 8/17/2019 Smart Grid Report-2

    19/34

    $) #,- in no.1 is inut in through which non0regulated signal is alied. in no.3is grounded E the regulated outut is taken from in no.2.

    # PO4E, SUPP!3Host of the digital circuits oerate on +olt 6C suly which is obtained by thefollowing circuit. The ower suly circuit consists of a ste down transformer! bridgerectifier and #,- +oltage regulator $C.

    B,D+E ,ECT-E,S

    ?ridge rectifier circuit consists of four diodes arranged in the form of a bridge asshown in figure.

    OPE,ATON:

    6uring the ositi+e half cycle of the inut suly! the uer end A of the transformersecondary becomes ositi+e with resect to its lower oint ?. This makes oint1 ofbridge ositi+e with resect to oint2. The diode 61 E 62 become forward biased E

     AC

    SUPPLY

    D#

    D!

    D*

    D)

    #

    @ !

    .

    * )

    &=>?

    #>>> µ- A A

    33

    ? (

    D,

  • 8/17/2019 Smart Grid Report-2

    20/34

    63 E 64 become re+erse biased. As a result a current starts flowing from oint1!through 61 the load E 62 to the negati+e end.

    6uring negati+e half cycle! the oint2 becomes ositi+e with resect to oint1. 6iode61 E 62 now become re+erse biased. Thus a current flow from oint 2 to oint 1.

    ;# CAPACTO,

    $t is an electronic comonent whose function is to accumulate charges and thenrelease it.

    To understand the concet of caacitance! consider a air of metal lates which all

    are laced near to each other without touching. $f a battery is connected to theselates the ositi+e ole to one and the negati+e ole to the other! electrons from thebattery will be attracted from the late connected to the ositi+e terminal of thebattery. $f the battery is then disconnected! one late will be left with an e*cess ofelectrons! the other with a shortage! and a otential or +oltage difference will e*istsbetween them. These lates will be acting as caacitors. Caacitors are of twotyes= 0 1( $i

  • 8/17/2019 Smart Grid Report-2

    21/34

    7# ,ESSTANCE

    esistance is the oosition of a material to the current. $t is measured in /hms

    (. All conductors reresent a certain amount of resistance! since no conductor is

    1--B efficient. To control the electron flow current( in a redictable manner! we use

    resistors. lectronic circuits use calibrated lumed resistance to control the flow of

    current. ?roadly seaking! resistor can be di+ided into two grous +i. fi*ed E

    ad%ustable +ariable( resistors. $n fi*ed resistors! the +alue is fi*ed E cannot be

    +aried. $n +ariable resistors! the resistance +alue can be +aried by an ad%uster knob.

    $t can be di+ided into a( Carbon comosition b( &ire wound c( :ecial tye. The

    most common tye of resistors used in our ro%ects is carbon tye. The resistance

    +alue is normally indicated by colour bands. ach resistance has four colours! one of

    the band on either side will be gold or sil+er! this is called fourth band and indicates

    the tolerance! others three band will gi+e the +alue of resistance see table(.

  • 8/17/2019 Smart Grid Report-2

    22/34

    ?lack00000000000000000000000000000000000000000000000000000000-?rown00000000000000000000000000000000000000000000000000000001ed00000000000000000000000000000000000000000000000000000000002/range000000000000000000000000000000000000000000000000000003Jellow00000000000000000000000000000000000000000000000000000004Nreen0000000000000000000000000000000000000000000000000000000?lue000000000000000000000000000000000000000000000000000000000"7iolet00000000000000000000000000000000000000000000000000000000#Nrey000000000000000000000000000000000000000000000000000000000,&hite000000000000000000000000000000000000000000000000000000005

     

    The first rings gi+e the first digit. The second ring gi+es the second digit. The thirdring indicates the number of eroes to be laced after the digits. The fourth ring gi+estolerance gold MB! sil+er M 1-B! )o colour M 2-B(.

    $n +ariable resistors! we ha+e the dial tye of resistance bo*es. There is a knob witha metal ointer. This resses o+er brass ieces laced along a circle with somesace b@w each of them.

    esistance coils of different +alues are connected b@w the gas. &hen the knob isrotated! the ointer also mo+es o+er the brass ieces. $f a ga is skied o+er! itsresistance is included in the circuit. $f two gas are skied o+er! the resistances ofboth together are included in the circuit and so on.

  • 8/17/2019 Smart Grid Report-2

    23/34

    A dial tye of resistance bo* contains many dials deending uon the range! which ithas to co+er. $f a resistance bo* has to read uto 1-!--- ! it will ha+e three dialseach ha+ing ten gas i.e. ten resistance coils each of resistance 1- . The thirddial will ha+e ten resistances each of 1-- .

    The dial tye of resistance bo*es is better because the contact resistance in thiscase is small E constant.

    8# T,ANSSTO,The name is transistor deri+ed from Otransfer resistorsP indicating a solid state:emiconductor de+ice. $n addition to conductor and insulators! there is a third classof material that e*hibits roortion of both. Inder some conditions! it acts as aninsulator! and under other conditions itPs a conductor. This henomenon is called

    :emi0conducting and allows a +ariable control o+er electron flow. :o! the transistor issemi conductor de+ice used in electronics for amlitude. Transistor has threeterminals! one is the collector! one is the base and other is the emitter! each leadmust be connected in the circuit correctly and only then the transistor will function(.lectrons are emitted +ia one terminal and collected on another terminal! while thethird terminal acts as a control element. ach transistor has a number marked on itsbody. +ery number has its own secifications.

    There are mainly two tyes of transistor i( )) E ii( )

    NPN Transistors:

    &hen a ositi+e +oltage is alied to the base! the transistor begins to conduct byallowing current to flow through the collector to emitter circuit. The relati+ely smallcurrent flowing through the base circuit causes a much greater current to assthrough the emitter @ collector circuit. The henomenon is called current gain and itis measure in beta. PNP Transistor:

    $t also does e*actly same thing as abo+e e*cet that it has a negati+e +oltage on itscollector and a ositi+e +oltage on its emitter.

  • 8/17/2019 Smart Grid Report-2

    24/34

    Transistor is a combination of semi0conductor elements allowing a controlled currentflow. Nermanium and :ilicon is the two semi0conductor elements used for making it.There are two tyes of transistors such as /$)T C/)TACT and QI)CT$/)TA):$:T/:. oint contact construction is defecti+e so is now out of use.Qunction triode transistors are in many resects analogous to triode electron tube.

    A %unction transistor can function as an amlifier or oscillator as can a triode tube! buthas the additional ad+antage of long life! small sie! ruggedness and absence ofcathode heating ower.

    Qunction transistors are of two tyes which can be obtained while manufacturing.

    The two tyes are= 0

    "& PNP T3PE: This is formed by %oining a layer of tye of germanium to an

    )0 Qunction

     

    2& NPN T3PE: Thisis formed by %oining a layer of ) tye

    germanium to a 0) Qunction.

     

    ?oth tyes are shown infigure! with their symbols for reresentation. The

    )

    ) )

  • 8/17/2019 Smart Grid Report-2

    25/34

  • 8/17/2019 Smart Grid Report-2

    26/34

    2( The current flowing across the collector is slightly less than that of the emitter!

    3( The collector current is a function of emitter current i.e. with the decrease orincrease in the emitter current a corresonding change in the collector current isobser+ed.

    The facts can be e*lained as follows=0

    1. As already discussed that 2 to B of the holes are lost in recombination with theelectron n base region! which result in a small base current and hence thecollector current is slightly less than the emitter current.

    2. The collector current increases as the holes reaching the collector %unction areattracted by negati+e otential alied to the collector.

    3. &hen the emitter current increases! most holes are in%ected into the base region! which is attracted by the negati+e otential of the collector and hence results inincreasing the collector current. $n this way emitter is analogous to the control oflate current by small grid +oltage in a +acuum triode.

    ;ence we can say that when the emitter is forward biased and collector is negati+elybiased! a substantial current flows in both the circuits. :ince a small emitter +oltage ofabout -.1 to -. +olts ermits the flow of an areciable emitter current the inut oweris +ery small. The collector +oltage can be as high as 4 +olts.

  • 8/17/2019 Smart Grid Report-2

    27/34

    ># DODE

    The simlest semiconductor de+ice is made u of a sandwich of 0tye semiconducting material! with contacts ro+ided to connect the 0and n0tye layers to ane*ternal circuit. This is a %unction 6iode. $f the ositi+e terminal of the battery isconnected to the 0tye material cathode( and the negati+e terminal to the )0tyematerial Anode(! a large current will flow. This is called forward current or forwardbiased.

    $f the connections are re+ersed! a +ery little current will flow. This is because underthis condition! the 0tye material will accet the electrons from the negati+e terminalof the battery and the )0tye material will gi+e u its free electrons to the battery!resulting in the state of electrical e8uilibrium since the )0tye material has no more

    electrons. Thus there will be a small current to flow and the diode is called e+ersebiased.

    Thus the 6iode allows direct current to ass only in one direction while blocking it inthe other direction. ower diodes are used in concerting AC into 6C. $n this! current

     will flow freely during the first half cycle forward biased( and ractically not at allduring the other half cycle re+erse biased(. This makes the diode an effecti+erectifier! which con+ert ac into ulsating dc. :ignal diodes are used in radio circuitsfor detection. 9ener diodes are used in the circuit to control the +oltage.

  • 8/17/2019 Smart Grid Report-2

    28/34

    :ome common diodes are=0

    1. 9ener diode.

    2. hoto diode.

    3. ight mitting diode.

    "# ?ENE, DODE:)

    A ener diode is secially designed %unction diode! which can oerate continuously without being damaged in the region of re+erse break down +oltage. /ne of the mostimortant alications of ener diode is the design of constant +oltage ower suly.The ener diode is %oined in re+erse bias to d.c. through a resistance of suitable+alue.

    2# P/OTO DODE:)

    A hoto diode is a %unction diode made from hoto0 sensiti+e semiconductor ormaterial. $n such a diode! there is a ro+ision to allow the light of suitable fre8uencyto fall on the 0n %unction. $t is re+erse biased! but the +oltage alied is less than thebreak down +oltage. As the intensity of incident light is increased! current goes onincreasing till it becomes ma*imum. The ma*imum current is called saturationcurrent.

  • 8/17/2019 Smart Grid Report-2

    29/34

  • 8/17/2019 Smart Grid Report-2

    30/34

    66T

    The dashed line means both sides mo+e together(

    :6T R :ingle0ole! 6ouble0throw

    6:T R 6ouble0ole! :ingle0throw

    66T R 6ouble0ole! 6ouble0throw

    OT/E, S4TC/ES

    PUS/ BUTTON= usually ::T! normally oen )/( or normally closed )C(.

    :ring loader

    ,OTA,3= wafer like with one ole and 2 or more contacts. &afers can be stacked to

    ro+ide more oles. Hany +ariations are ossible.

  • 8/17/2019 Smart Grid Report-2

    31/34

    rogramming Code

    Binclude Cpic4h

    $$lcd

    Bdefine RS RD+Bdefine %6 RD&

    Bdefine 9,DD.T. P7RT@

    Bdefine D9E97.D RD>

    Bdefine FRE97.D R,*

    Bdefine UPE97.D R,!Bdefine reset RD*

    Bdefine limit !*>

    typedef unsigned int uiG

    typedef unsigned char ucG

    unsigned long int D9

  • 8/17/2019 Smart Grid Report-2

    32/34

    ifflag!>'

    phaseE!'GdisplaylineK 76 KM,+'G

    Lelse

    displaylineK7-- K;c+'G

    ifflag*>' phaseE*'GdisplaylineK 76 KM,,'G

    L

    elsedisplaylineK7-- K;cc'G

    ifD9limit'

    flag##GD9E97.D>G

    LifFRlimit'

    flag!#GFRE97.D>G

    L

    ifUPlimit' flag*#GUPE97.D>G

    Lifreset#'

    display#'GD9E97.D#GFRE97.D#GUPE97.D#G

    flag#>Gflag!>Gflag*>GL

    L

    L

    void delayui i' whilei33'G

    L

    void displayuc mode' switchmode'

    case > NdisplaylineKS2.RT :RID P78%RK>>>'Gdelay+>>>>'Gdelay+>>>>'G

     brea5G

    case # NdisplaylineK D9 FR UP K

    L

    Lvoid displaylinechar HpM=>'Gelse ifline !'

    lcdcommand>;c>'G

    else

    lcdcommandline'G

  • 8/17/2019 Smart Grid Report-2

    33/34

    lcddataHp'G

    L

    $$HHHHHHHHHHHHHHHH=@ITHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHvoid lcdcommanduc com'

    9,DD.T. comG

    RS#G%6#Gdelay?'G%6>Gdelay#>>'G

    L

    void lcddatauc val' 9,DD.T. valG

    RS>G%6#Gdelay?'G%6>G

    delay#>>'G

    Lvoid lcdinit'

    lcdcommand>;*='Gdelay#>>>'G

    lcdcommand>;*='Gdelay#>>>'G

    lcdcommand>;>c'Gdelay#>>>'Glcdcommand>;>#'Gdelay#>>>'G

    lcdcommand>;=>'Gdisplay>'Gdisplay#'G

    L

    void phaseE#' unsigned long int F#>>'$#>!*G

    PFE#-#G

    Lvoid phaseE!'

    unsigned long int F#>>'$#>!*G

    PFE!-#GL

    void phaseE*'

    unsigned long int F#

  • 8/17/2019 Smart Grid Report-2

    34/34

    ,FS>>G $$channel >

    while:7'G

    F#.DR%SFGF#F#CC=G

    9#.DR%S9G

    -#-#H?>>>'$#>!*GPFE*-#G

    L

    void systemEinit' .D,76>>M>>G.D,76#>M=)GTRIS.>M>-GTRIS@>M>>G

    TRIS,>M>>GTRISD>b>>###>>>GTRIS%>M>>G

    D9E97.D#GFRE97.D#GUPE97.D#Greset>G

    lcdinit'GL


Recommended