25
by Muhammet Burak Önen Sarajevo.2013 SCHOOL BELL & MOTION DETECTED ALARM SYSTEMS FOR HIGH SCHOOLS USING PROGRAMMABLE LOGIC CONTROLLER (PLC)

School Bell Final Project

Embed Size (px)

DESCRIPTION

gkgclć

Citation preview

  • 1

    by Muhammet Burak nen

    Sarajevo.2013

    SCHOOL BELL & MOTION

    DETECTED ALARM

    SYSTEMS FOR HIGH

    SCHOOLS USING

    PROGRAMMABLE LOGIC

    CONTROLLER (PLC)

  • 2

    Abstract

    Many years ago most schoolhouses had a large bell that was rung to announce the

    start and end of a school day. However, large bells fell out of favor long ago and were

    replaced by buzzers, digitized recordings or other electronic/computerized means of letting

    students know when classes were starting or changing. As new technology superseded the

    beautifully crafted bells, many schools were left wondering what to do with their old bells.

    This project has two parts which are hardware and software.Also this project supports

    two different systems which are school bell and alarm system with motion detecting.

    The push buttons, indicator lamp and speakers are connected to Zelio PLC Schneider

    SR2 B121 BD (24 V DC). The PLC controls every signal which is coming from the inputs

    (push buttons, motion detector) to software and display to the outputs (Indicator lamp and

    speaker). Using software, Function Block Diagrams (FBD) are programmed to control the

    intervals of time and alarm system in school.

  • 3

    Table of Contents

    Abstract.......................................................................................................2

    Goal.............................................................................................................4

    Scope...........................................................................................................4

    Introduction to PLC.....................................................................................4

    PLC Configuration......................................................................................5

    Inputs and Outputs.......................................................................................6

    Advantages of PLC....................................................................................8

    Hardware.....................................................................................................8

    Schneider Electric SR2B121BD Zelio Compact PLC Module...................9

    Technical Data...........................................................................................10

    Wiring System...........................................................................................11

    Software.....................................................................................................12

    How to Choose PLC..................................................................................12

    Function Block Diagram PLC...................................................................14

    FBD Application.......................................................................................15

    Conclusion.................................................................................................15

    Appendix A...............................................................................................16

    Appendix B................................................................................................18

    References.................................................................................................25

  • 4

    Goal

    The purpose to build this project is its fully automatically controlling the daily bell in

    each school periods and motion detected alarm system using same device. So no need

    manually ring the bell in each period by the user or no need a computer program to operate

    the Bell.Beside alarm systems requires many costs and it is hard to provide and control.My

    purpose to control school bell and alarm system by using same device and decrease the cost.

    Scope

    Construct a model of bell and alarm system combination.

    Program a function block diagram (FBD) to control school bell and alarm system.

    Combine all model with software and hardware in order to simulate school bell and

    motion detected alarm system.

    Build safe using alarm system and control intervals of time with same device.

    Background

    Introduction to PLC

    Programmable logic controllers are now the most widely used industrial process

    control technology. A programmable logic controller (PLC) is an industrial grade computer

    that is capable of being programmed to perform control functions. The programmable

    controller has eliminated much of the hardwiring associated with conventional relay control

    circuits. Other benei ts include easy programming and installation, high control speed,

    network compatibility, troubleshooting and testing convenience, and high reliability.

  • 5

    PLC Configuration

    PLCs consist of input modules or points, a Central Processing Unit (CPU), and output

    modules or points. An input accepts a variety of digital or analog signals from various field

    devices (sensors) and converts them into a logic signal that can be used by the CPU. The CPU

    makes decisions and executes control instructions based on program instructions in memory.

    Output modules convert control instructions from the CPU into a digital or analog signal that

    can be used to control various field devices (actuators). A programming device is used to

    input the desired instructions. These instructions determine what the PLC will do for a

    specific input. An operator interface device allows process information to be displayed and

    new control parameters to be entered.

    Central Process Unit

    The Central Process Unit (CPU) is a microprocessor that coordinates the activities of

    PLC system.It executes the program, process I/O signals and communicates with external

    devices.

    Power Supply

    This can be built into the PLC or be an external unit. Common voltage levels required

    by the PLC (with and without the power supply) are 24Vdc, 120Vac, 220Vac.

    I/O (Input/Output)

    A number of input/output terminals must be provided so that the PLC can monitor the

    process and initiate actions.Indicator lights.These indicate the status of the PLC including

    power on, program running, and a fault. These are essential when diagnosing problems.

  • 6

    Memory

    There are various type of memory unit.It is are that hold the operating system and user

    memory.The operating system is actually a system software that coordinates the PLC.Ladder

    program, Timer and Counter Values are stored in the user memory.Depending on users need,

    various type of memory are available for choise:

    a) Read-Only Memory (ROM)

    ROM is a non-volatile memory that can be programmed only once.It is therefore

    unsuitable.It is least popular as compared with others memory type.

    b) Random Access Memory (RAM)

    RAM is commonly used memory type for storing the user program and data.The data

    in the volatile RAM would normally be lost if the power source is removed.However, this

    problem is solved by backing up the RAM with a battery.

    c) Erasable Programmable Read Only Memory (EPROM)

    EPROM holds data permanently just like ROM.It does not require battery

    backup.However, its content can be erased by exposing it to ultraviolet light.A prom writer is

    required to reprogram the memory.

    d) Electrically Erasable Programmable Read Only Memory (EEPROM)

    EEPROM combines the access flexibility of RAM and the non-volatility of EPROM

    in one.Its contents can be erased and reprogrammed electrically, however, to a limit number

    of times.

    Inputs and Outputs

    Inputs to, and outputs from, a PLC are necessary to monitor and control a

    process.Both inputs and outputs can be categorized into two basic types: logical or

    continuous.Consider the example of a light bulb. If it can only be turned on or off, it is logical

    control.If the light can be dimmed to different levels, it is continuous. Continuous values seem

    more intuitive, but logical values are preferred because they allow more certainty, and

    simplify control. As a result most controls applications (and PLCs) use logical inputs and

    outputs for most applications. Hence, we will discuss logical I/O and leave continuous I/O for

    later.

    Outputs to actuators allow a PLC to cause something to happen in a process. A short

    list of popular actuators is given below in order of relative popularity.

    Solenoid Valves - logical outputs that can switch a hydraulic or pneumatic flow.

    Lights - logical outputs that can often be powered directly from PLC output boards.

    Motor Starters - motors often draw a large amount of current when started, so they

    require motor starters, which are basically large relays.

  • 7

    Servo Motors - a continuous output from the PLC can command a variable speed or

    position.

    Inputs come from sensors that translate physical phenomena into electrical

    signals.Typical examples of sensors are listed below in relative order of popularity.

    Proximity Switches - use inductance, capacitance or light to detect an object logically.

    Switches - mechanical mechanisms will open or close electrical contacts for a logical

    signal.

    Potentiometer - measures angular positions continuously, using resistance.

    LVDT (linear variable differential transformer) - measures linear displacement

    continuously using magnetic coupling.

  • 8

    Advantages of PLC

    PLCs have been gaining popularity on the factory floor and will probably remain predominant

    for some time to come. Most of this is because of the advantages they offer.

    Cost effective for controlling complex systems.

    Flexible and can be reapplied to control other systems quickly and easily.

    Computational abilities allow more sophisticated control.

    Trouble shooting aids make programming easier and reduce downtime.

    Reliable components make these likely to operate for years before failure.

    Hardware

    The hardware part of this project is Programmable logic controller (PLC) and motion

    detected alarm model. SCHNEIDER ZELIO SR2B121BD is the type of PLC used in this

    project as the processor to control the school bell, intervals of the time and holidays. This type

    of PLC is chosen because it has 4 outputs which is enough for this project and it is suitable for

    less cost. But if we need to increase amount of the indicator light, we have to choose another

    PLC.

    The motion detected alarm model is constructed to outdoor how this motion detector

    sensor will detect a person and light the indicator light.When the person who passed front of

    the sensor, The alert is given for 1 minute by an audio signal alternating 2 s ON, 1 s OFF, and

    by an indicator light activated by a motion detector.

    For the modeling alarm model, we can put indicator light wherever we want to see

    warning but i put it outdoors and for the audible signal, it is better to put the center of

    school.When we want to reset the system, we should press I3 button which is reset button.If

    we want, we can support this project with camera system and we can add LCD display to see

    situation of Bell that when will bell ring and what time.

    Bell is ringing firstly the time 8.00 am which is reminder of begining of the classes.It

    rings for 1 minute.Classes are 40 minutes and there is 10 minute break and 30 minutes lunch

    break.So i adjusted 40 minutes intervals in order to ring the bell and after 1 minute ringing it

    will be off.Also Bell will not ring during holidays.The time zone and holiday dates are as

    shown in the below;

  • 9

    7.59 FB = First Bell (Begining of Classes)

    8.00 P1 = Period One 40 Minutes

    8.50 P2 = Period Two - 40 Minutes

    9.40 P3 = Period Three - 40 Minutes

    10.20 IN = Interval - 40 Minutes

    11.00 P4 = Period Four - 40 Minutes

    11.50 P5 = Period Five - 40 Minutes

    12.40 P6 = Period Six - 40 Minutes

    13.20 LB = Last Bell - (School Over)

    Holiday Dates

    16 SEPTEMBER Jewish New Year Ro ha ana

    26 SEPTEMBER Jom Kipur

    26 OCTOBER Eid al-Adha

    27 OCTOBER Eid al-Adha

    28 OCTOBER

    Eid al-Adha

    25 NOVEMBER National Day of Bosnia and

    Herzegovina

    25 DECEMBER Roman Catholic Christmas

    1 JANUARY New year

    2 JANUARY New year

    07 JANUARY Orthodox Christmas

    1 MARCH Day of Independence of Bosnia and

    Herzegovina

    31 MARCH Catholic Easter

    05 APRIL Orthodox Easter

    1 MAY International Labor day

    2 MAY International Labor day

    Schneider Electric SR2B121BD Zelio Compact PLC Module

    With the SR2B121BD Zelio Compact PLC Module, you can optimize your installation

    and programming expenditure and lower the costs of your application. The software ZELIO

    LOGIC soft 2 makes programming possible in ladder diagram or FBD (graphic functional

    module language). With programming in ladder diagram a program can be written with basic

    functions, basic function components and derived functional modules as well as with contacts,

    coils and variables.

    The contacts, coils and variables can be commentated, the graphics can be provided

    with free text The programming language FBD makes possible a graphic programming and

    use of pre-defined functional modules This language offers 24 pre-programmed functions

    such as meter, timer, clock, determination of trigger levels, pulse generator, time programs,

    multiplexes, etc.

  • 10

    Technical data

    Operating voltage 24 Vdc

    Type SR2B121BD

    Dimensions (W x H x D) 71.2 x 90 x 59.5 mm

    Protection type IP20

    Digital inputs 8

    Power backup type 10 years

    Expandable No

    Certification CE, UL, CSA, GL,

    Analogue outputs 0

    Max. continuous current 250 V/AC/8 A

    Analogue inputs 4*

    Clock Yes

    Ambient temperature -20 up to 55 C

    Interference suppression According to European Economic Community

    89/336 EN 61131-2 (Zone B) EN 61000-6-2,-3,-4

    Digital outputs 4 relays

    Mounting Profile rail 35 mm

    Display Yes

  • 11

    Wiring System

    Once hardware is designed cabinet box is use to connect PLC with school bell and motion

    detected alarm model. A basic wiring diagram is as shown in Figure. The PLC supplied with

    DC power 24V and then I/O card supplied with DC 24V. The common for input card is

    24VDC. S1 which is On/Off button,S2 which is motion detector and S3 which is Reset

    button. Wiring system is constructed using Xtrilius 8 speaker cable for speaker.

    Using a smart relay means that ordinary switches (with open or closed positions) can be used

    in place of two position switches. The switches are identified as S1 and S2 in the wiring

    diagram above. S1 and S2 are connected to inputs I1 and I2 on the smart relay. The

    operating principle is as follows: Each time the status of inputs I1 and I2 changes, the status

    of output Q1 also changes which controls the lamp L1.

  • 12

    Software

    How to Choose PLC

    Firstly we need to create new program.

    Then we need to choose our model which is SR2B121BD.

  • 13

    This step shows selection of extentions.No need to do anything.Just click next.

    Next step is choosing program.We have to section which are Ladder Logic (LD) and Function

    Block Diagram (FBD) programming.I programmed my project using FBD.

  • 14

    Function Block Diagram PLC

    FBD mode allows graphic programming based on the use of predefined function blocks.In

    FBD programming, there are three types of windows:

    The edit window,

    The supervision window,

    Edit Window

    FBD programs are created in the edit window. This window can be accessed from the

    Mode Edit menu or by using the Edit button in the toolbar. The edit window is made up of three zones:

    The wiring sheet, where the functions that make up the program are inserted,

    The Inputs zone on the left of the wiring sheet where the inputs are positioned,

    The Outputs zone on the right of the wiring sheet where the outputs are positioned.

    The inputs/outputs are specific to the type of smart relay and extensions chosen by the user.

    The program in the edit window corresponds to the program that is:

    Compiled,

    Transferred into the smart relay,

    Compared to the contents of the smart relay,

    Used in simulation mode,

    Used in supervision mode.

    The following figure shows an example of a part of an edit window in FBD language:

  • 15

    Description of Elements

    The following table lists the different elements of the edit window:

    Number Description

    1 Function block input zone.

    2 Connection between two function blocks.

    3 Function bar.

    4 Function block.

    5 Wiring sheet.

    6 Function block number.

    7 Output function block zone.

    Supervision/Monitoring Window

    The supervision/monitoring window is a subset of the edit window. .

    It can be accessed from:

    Simulation:Mode/Simulation menu or using the simulation button on the toolbar

    Monitoring:Mode/Monitoring menu or using the simulation button on the toolbar

    Function Block Diagram Application

    I1 is on/off button of alarm.I2 is motion detector.I3 is reset button of alarm.When i press the

    I1 button, alarm requires to detect a person in order to be active.When a person pass through

    motion detecter nearly 1 mt, alarm becomes active and indicator light activates by a motion

    detecter.Then at the same time audio signal alternates 2s ON, 1s OFF for 1 minute.After when

    we realized the alarm, we can press I3 button in order to reset alarm.

    Conclusion

    This part summarized the concept of this project. Background part shows some basic

    properties of Zelio PLC like function, construction, operation, application etc. Hardware

    part explains very useful method of PLC application in the field. Also in this part was

    construction of the model, wiring system, how to choose PLC using Zelio Soft 2 program

    and how to simulate etc. In Software part, developed application is presented using FBD.

  • 16

    Appendix A

  • 17

  • 18

    Appendix B

    Typical Boolean Instruction or Statement List

    Logical functions

  • 19

    TIME PROG (Daily, weekly, yearly programmer)

    Description

    The Daily, weekly, yearly programmer validates the time ranges when actions can be

    executed.

    This function allows a maximum of 51 events to be defined, which are used to control its

    output.

    Outputs

    Output: this is the programmer validation output.

    When one of the cycles that has been set up as a parameter is reached, the output is active (the

    output remains active for the entire duration of this cycle.)

    Parameters

    In the Programming Software

    A cycle is defined by:

    The type of action: ON or OFF,

    The time at which it will take effect: Hour / Minute,

    The activation mode.

    Cycles can be activated in different ways:

    Annual: Trigger of an event once per year.

    In this case, the month and day must be configured.

    Monthly: Trigger of an event once per month.

    In this case only the day must be configured.

    Date: Trigger of a single event on a specific date.

    In this case, the day, month and year must be configured.

  • 20

    TIMER Li (Cyclic Timing)

    Description

    The Cyclic timing function generates pulses (flashes) on the input rising edge.The duration of

    the pulse and the duration between each pulse can be set.

    Inputs/Outputs

    The function uses a Discrete Command input.

    The function provides:

    A Discrete-type Output,

    A copy of the setpoint for the pulse duration (1),

    The current value of the duration of the output active state (1),

    A copy of the setpoint for the duration between two pulses (1),

    The current value of the duration for which the output is in the inactive state (1),

    A copy of the setpoint (1):

    o For the number of flashes,

    o Or for the duration of the flash.

    The current value (1):

    o Of the number of flashes since the first pulse,

    o Or of the duration of flashes since the first pulse.

    (1) these integer values are displayed in Simulation and Monitoring mode.

    If the Command input is inactive, the Output is inactive and the current values are set to 0.

    Latching

    To ensure latching after a power failure in the smart relays, check the Latching box in the

    parameters window.

    Continuous flashing

    The figure below illustrates function operation with continuous flashing:

  • 21

    Number of Flashes

    The figure below illustrates function operation with a defined number of flashes:

    Duration of flashes

    The figure below illustrates function operation with predefined flash duration:

    TIMER B/H (Time out)

    Description

    The Timer B/H function creates a pulse on the output of the rising edge of the input.

    Processing of the Command input depends on two types of functions:

    Function B : regardless of the duration of the command pulse, the output is active for a duration that has been set,

    Function H : the output is inactive at the end of a set time or on the falling edge of the command.

    Activation of the Reset input allows the output to be deactivated.

  • 22

    Inputs/Outputs

    The function uses:

    A discrete Command input,

    A discrete Reset input; this input is inactive if it is not connected.

    The function provides:

    A Discrete-type Output,

    A copy of the setpoint for the pulse duration (1),

    The current value of the pulse (1).

    (1) these integer values are displayed in Simulation and Monitoring mode.

    Latching

    To ensure latching after a power failure in the smart relays, you should check the Latching

    box in the parameters window.

    Function B

    The following figure illustrates operation with Function B set up:

    Function H

    The following figure illustrates operation with Function H set up:

  • 23

    Discrete (DISCR) Inputs

    The Discrete (DISCR) Input is available for all smart relay types. The Discrete inputs can be

    arranged at any smart relay input.

    Type of Discrete Inputs

    The type of Discrete input can be selected from the Parameters window. This is then

    displayed in the edit and supervision windows.

    Discrete (DISCR) Output

    The smart relays feature two types of Discrete outputs:

    Static outputs for certain smart relays supplied with DC voltage,

    Relay outputs for smart relays supplied with AC or DC voltage.

  • 24

    Types of Discrete Outputs

    The type of Discrete output can be selected from the Parameters window. This is then

    displayed in the edit and supervision windows. The selection is made using the output's

    inactive-state symbol.

  • 25

    References

    1. Automating Manufacturing Systems with PLCs B (Version 4.7,

    April 14, 2005) Hugh Jack.

    2. Programmable Logic Controllers Frank D. Petruzella 4th edition.

    3. PLC Beginner Guide 1999 Omron Asia Pasific PTE LTD.

    4. http://www.electro-tech-online.com/microcontrollers/30238-

    school-bell-controller-final-project-pic16f628a.html

    5. Ideas For Old School Bells

    http://www.ehow.com/list_5912312_ideas-old-school-

    bells.html#ixzz2RSalD5DE