REPORT (Automatic Sreet Light Controlling Based on Vehicle Movement)

Embed Size (px)

Citation preview

  • 8/17/2019 REPORT (Automatic Sreet Light Controlling Based on Vehicle Movement)

    1/20

     

     AUTOMATIC STREET

    LIGHT CONTROLLING

    BASED ON VEHICLE

    MOVEMENT

    09-Nov-15

  • 8/17/2019 REPORT (Automatic Sreet Light Controlling Based on Vehicle Movement)

    2/20

    Automatic Street Light Controlling Based on Vehicle Movement

    School of Electrical Engineering, University of Faisalabad. Page 2

    The University Of aisalabad

     AUTOMATIC STREET LIGHT CONTROLLING

    BASED ON VEHICLE MOVEMENT 

    Group Leader:  ARBAB ASLAM 

    Group Members:

     Arbab Aslam BEE-FA12-001

    M. Hamza Kaleem BEE-FA13-046

     Amanullah Mukhtar BEE-FA12-096

  • 8/17/2019 REPORT (Automatic Sreet Light Controlling Based on Vehicle Movement)

    3/20

    Automatic Street Light Controlling Based on Vehicle Movement

    School of Electrical Engineering, University of Faisalabad. Page 3

    ACKNOWLEDGEMENTS

    We bow our head before Allah Almighty, the Omnipotent, the Merciful, the most

    Beneficent, the Answerer to the prayers and the sovereign whose blessings and

    exaltations flourished our thoughts, enlightened our heart, thrived our ambitions and

    enabled us to contribute sincerely to the sacred wealth of knowledge. Our all praise for

    the greatest reformer of the world, Hazrat Muhammad (PBUH), whose name enlightens

    our heart and who is forever a tower of knowledge and guidance of humanity. 

    We feel honored to express our profound sense of gratitude to our supervisor Engr.

    Haroon (Lecturer, School of Electrical Engineering, University of Faisalabad)  for

    his kind supervision, affectionate behavior and marvelous guidance throughout the

    research work. His invaluable help of constructive comments and suggestions throughout

    the proteus work have contributed to the success of this research. We owe our deepest

    gratitude to him for his much concern, sincere advice, unforgettable guidance, and kind

     behavior. We are very grateful to him for his moral support, nice cooperation,

    encouragement and technical knowledge regarding this topic which helped us a lot in this

    research work. 

     No acknowledgement would ever adequately express our obligation to our Parents for

    their indispensable and indivisible love that remained assisted and encouraged us. Their

    affection, motivation, sacrifices and endless prayers serve as a tonic for us. Thanks to

    Allah for bestowing us with true and loving Friends who encouraged and pacified us

    during tough hours of research. 

    Arbab Aslam.

  • 8/17/2019 REPORT (Automatic Sreet Light Controlling Based on Vehicle Movement)

    4/20

    Automatic Street Light Controlling Based on Vehicle Movement

    School of Electrical Engineering, University of Faisalabad. Page 4

    TABLE OF CONTENTS

    CHAPTERS PAGE

    ACKNOWLEDGEME NTS ………………………………………………... 3

    TABLE OF CONTENTS …………………………………………………. . 4

    ABSTRACT ……………………………………………………………...... 5

    INTRODUCTION .………….…………...……………………………....... 6

    METHODOLOGY …………….………………………………………...... 7EXPERIMENTAL WORK ………………….……………………………. 8

    Light Sensor …………………………………………...……….. 8

    Arduino Programming Tool …………..……………………... 8

    Creating Program in Arduino……..………………………………. 9

    Compilation ……………………………………………………… . 10

    Software…………………………………………………………... 10

    Labs center Proteus 8.1……………..…………………………... 10

    CIRCUIT COMPONENTS AND ………………….……………………… 12

    ASSEMBLY

    Coding of Arduino Using Arduino Software ……………………...... 15

    RESULT AND PROGRAMMING-CHARTS…………………………..  18

    CONNCLUSION ……………………………………………………….. 18

    REFERENCES ………………………………………………………….. 20

  • 8/17/2019 REPORT (Automatic Sreet Light Controlling Based on Vehicle Movement)

    5/20

    Automatic Street Light Controlling Based on Vehicle Movement

    School of Electrical Engineering, University of Faisalabad. Page 5

    ABSTRACTS: 

    This paper aims at designing and executing the advanced development in embeddedsystems for energy saving of lights. Nowadays, human has become too busy, and is

    unable to find time even to switch the lights wherever not necessary. The present system

    is like the lights will be switched on in the evening before the sun sets and they are

    switched off the next day morning after there is sufficient light on the outside. The

    system switches on the street light ahead of the vehicle and switches off the trailing lights

    simultaneously. In order to detect movement of vehicles, sensors are used. The system

    automatically puts on the lights that are ahead of the vehicle detected and as soon as the

    vehicle moves ahead, the trailing lights are switched off. This is better than the existing

    system where the street lights are kept on always unlike this system where the street

    lights are put on only when movement of vehicle is detected which helps in saving lot of

    energy. This paper gives the best solution for electrical power wastage. Also the manual

    operation of the lighting system is completely eliminated.

  • 8/17/2019 REPORT (Automatic Sreet Light Controlling Based on Vehicle Movement)

    6/20

    Automatic Street Light Controlling Based on Vehicle Movement

    School of Electrical Engineering, University of Faisalabad. Page 6

     AUTOMATIC STREET LIGHT CONTROLLING

    BASED ON VEHICLE MOVEMENT 

    I. INTRODUCTION:

    By saving Electrical energy will directly reflected to saving money so it is very necessary

    to under stood ghost unit or amount which we are paying without using the appliances

    and without the energy namely electricity no nation can survive. In this industrial world it

     becomes as oxygen.

    The main epitome of the scrutiny is to espy the adoption and reception of energy saving

    campaign initiated by PEPCO. 

    This proposed system utilizes the latest technology for the sources of light as LED Lamps

    instead of generally used street lamps such as High Pressure Sodium Lamps, etc. The

    LED technology is preferred as it offers several advantages over other traditional

    technologies like energy saving due to high current luminous efficiency, low

    maintenance cost, high color rendering index, rapid start up speed, long working life etc.

    This project based on the Microprocessor Based ARDUINO which we used for the

    control of the street Lights. Arduino is an open-source prototyping platform based on

    easy-to-use hardware and software's. An Arduino UNO can run different Programs more

    than 10 thousand times. This project is designed to detect vehicle movement by using

    light sensor on highways to switch ON only a block of street lights before of vehicles and

    to switch OFF the behind lights to save energy consumption. This is achieved by sensing

    an approaching vehicle and then switches ON a block of street lights ahead of the vehicle

    As the vehicle passes by, the trailing lights switch OFF automatically. Thus, we save a lot

    of energy.

  • 8/17/2019 REPORT (Automatic Sreet Light Controlling Based on Vehicle Movement)

    7/20

    Automatic Street Light Controlling Based on Vehicle Movement

    School of Electrical Engineering, University of Faisalabad. Page 7

    II. METHODOLOGY:

    This project is designed to detect vehicle movement by using light sensor on highways to

    switch ON only a block of street lights before of vehicles and to switch OFF the behind

    lights to save energy consumption. 

    This is achieved by sensing an approaching vehicle

    and then switches ON a block of street lights ahead of the vehicle. As the vehicle passes

     by, the trailing lights switch OFF automatically. Thus, we save a lot of energy. 9v Dc

     power supply given to the ARDUINO through Battery. we can also use 12v Dc adapter.

    We have three inputs, those are LDRs(Light depending resister) and three Outputs those

    are 3led steeps for lights..

    LDR1 Sensors is connected to the Arduino inputs PortA5.

    LDR 2 sensor is connect to the input pin A3.

    LDR 3 is connected to the pin A1.

    On the digital side of Arduino For Output we have connected 3 leds to pins 1,2,3 for

    LDR1.and for LDR2 we use pins no 4,5,6.

    For output of LDR3 we connect 3 leds t0 pin 8,10,12.

  • 8/17/2019 REPORT (Automatic Sreet Light Controlling Based on Vehicle Movement)

    8/20

    Automatic Street Light Controlling Based on Vehicle Movement

    School of Electrical Engineering, University of Faisalabad. Page 8

    Figure1: Design Strategy.

    III. EXPERIMENTAL WORK:

    It is clear from figure1 that this design is consisted of some main branches including

    Light Sensor, resistors LED’s and most important part of this circuit is Arduino that

    controls the input signal reference to control the output.

    Light sensor:

    When the strength of the light falling on LDR increases the LDR resistance decreases and

    if the strength of the light falling on LDR decreased resistance increased. Resistance of

    LDR decrease with increase in intensity of light and vice-versa.

    Arduino Programming Tool:

    Arduino is a powerful, feature rich development

    tool for Atmega328p Microcontroller. It is designed to provide the customer with the

    easiest possible solution for developing application for embedded system, without

    compromising performance or control.

    Arduino is an open-source prototyping platform based on easy-to-use hardware and

    software. Arduino boards are able to read inputs - light on a sensor, a finger on a button,

    or a Twitter message - and turn it into an output - activating a motor, turning on an LED,

     publishing something online. You can tell your board what to do by sending a set of

    instructions to the microcontroller on the board. To do so you use the Arduino programming language (based on Wiring), and the Arduino Software (IDE),  based on

    Processing. 

    Inexpensive  - Arduino boards are relatively inexpensive compared to other

    microcontroller platforms. The least expensive version of the Arduino module can be

    assembled by hand, and even the pre-assembled Arduino modules cost less than $50

    https://www.arduino.cc/en/Main/Productshttps://www.arduino.cc/en/Reference/HomePagehttps://www.arduino.cc/en/Reference/HomePagehttp://wiring.org.co/https://www.arduino.cc/en/Main/Softwarehttps://processing.org/https://processing.org/https://www.arduino.cc/en/Main/Softwarehttp://wiring.org.co/https://www.arduino.cc/en/Reference/HomePagehttps://www.arduino.cc/en/Reference/HomePagehttps://www.arduino.cc/en/Main/Products

  • 8/17/2019 REPORT (Automatic Sreet Light Controlling Based on Vehicle Movement)

    9/20

    Automatic Street Light Controlling Based on Vehicle Movement

    School of Electrical Engineering, University of Faisalabad. Page 9

    Cross-platform  - The Arduino Software (IDE) runs on Windows, Macintosh OSX,

    and Linux operating systems. Most microcontroller systems are limited to Windows.

    Simple, clear programming environment - The Arduino Software (IDE) is easy-to-

    use for beginners, yet flexible enough for advanced users to take advantage of as well.

    For teachers, it's conveniently based on the Processing programming environment, so

    students learning to program in that environment will be familiar with how the Arduino

    IDE works.

    Open source and extensible software  - The Arduino software is published as open

    source tools, available for extension by experienced programmers. The language can be

    expanded through C++ libraries, and people wanting to understand the technical details

    can make the leap from Arduino to the AVR C programming language on which it's

     based. Similarly, you can add AVR-C code directly into your Arduino programs if you

    want to.

    Creating Program In Arduino: 

    A step by step approach

    1.  Opening Arduino Software:

    Figure 2: Opening software.

  • 8/17/2019 REPORT (Automatic Sreet Light Controlling Based on Vehicle Movement)

    10/20

    Automatic Street Light Controlling Based on Vehicle Movement

    School of Electrical Engineering, University of Faisalabad. Page 10

    Compilation:

    When we have written a code then following work I have been done.

    Figure 3: Compilation.

    Software:

    In this project device is used named as AEDUINO which is

     programmable and is the main part of our project. This device cannot be used without

     programming, so for this purpose we used Arduino software which is capable of

    embedding our desired programming in microcontroller. And the other Software used in

    our project is Labscenter Proteus Demonstration 8.1.

    Labscenter Proteus Professional 8.1:

    The Proteus Design Suite is wholly unique in offering the ability to co-simulate both high

    and low level micro-controller code in the context of a mixed-mode SPICE circuit

    simulation. With this Virtual System Modeling facility, you can transform your product

    design cycle, reaping huge rewards in terms of reduced time to market and lower costs of

    development.

  • 8/17/2019 REPORT (Automatic Sreet Light Controlling Based on Vehicle Movement)

    11/20

    Automatic Street Light Controlling Based on Vehicle Movement

    School of Electrical Engineering, University of Faisalabad. Page 11

    If one person designs both the hardware and the software then that person benefits as the

    hardware design may be changed just as easily as the software design. In larger

    organizations where the two roles are separated, the software designers can begin work as

    soon as the schematic is completed; there is no need for them to wait until a physical

     prototype exists.

    Figure 4: Proteus.

    1.Overview:

    Start the program by click the ISIS Professional icon in Start Menu.

    Figure 5: Overview.

  • 8/17/2019 REPORT (Automatic Sreet Light Controlling Based on Vehicle Movement)

    12/20

    Automatic Street Light Controlling Based on Vehicle Movement

    School of Electrical Engineering, University of Faisalabad. Page 12

    2. Circuit Construction & Assembly: Prior to circuit construction, user must first identify the necessary components required in the

    circuit. For our Project the required components are:

    i.  Arduino Uno R3

    ii.  LED

    iii. 

    Resistor

    iv.  LDR

    v.  Power Supply Terminals / Grounding.

    a. Selecting Components in Proteus:To select any component, we click the button labeled “PICK” on the left toolbar of

    Proteus VSM. The devices can then be searched and selected by giving the appropriate

    name in the search box.

    Figure 6: Selecting Components.

    b. Component parameter setting: 

    After selecting the component from the library, we can define the various parameters ofthe devices by right clicking on the device and selecting “EDIT PROPERTIES”. The

    various default device parameters can be changed and new parameters can be defined in

    the “other properties” section.

  • 8/17/2019 REPORT (Automatic Sreet Light Controlling Based on Vehicle Movement)

    13/20

    Automatic Street Light Controlling Based on Vehicle Movement

    School of Electrical Engineering, University of Faisalabad. Page 13

    Figure 7: Component parameter setting.

    c. Arduino parameter setting: The Arduino property panel can be similarly obtained by right clicking the Arduino and

    selecting “Edit Component”. The PIC parameters like Oscillator frequency, program

    configuration word and other properties should be appropriately supplied. The program

    code in hex file should be loaded in the program file section.

    The programming file in .hex file which is written in MikroC for our desired function is

    loaded in the program file section.

  • 8/17/2019 REPORT (Automatic Sreet Light Controlling Based on Vehicle Movement)

    14/20

    Automatic Street Light Controlling Based on Vehicle Movement

    School of Electrical Engineering, University of Faisalabad. Page 14

    Figure 8: Arduino Properties.

    2. Simulation:After defining all the various parameters in the Arduino and the other components and

    also loading the hex file in the controller, we can start the simulation by clicking the

    PLAY button on the bottom panel of the Proteus VSM.

    Figure 9: simulation.

  • 8/17/2019 REPORT (Automatic Sreet Light Controlling Based on Vehicle Movement)

    15/20

    Automatic Street Light Controlling Based on Vehicle Movement

    School of Electrical Engineering, University of Faisalabad. Page 15

    Coding of Program Using Arduino Software:

    // initializing of variables

    int LDR1=A5;

    int LDR2=A3;

    int LDR3=A1;

    //int LDR4=A0;

    int value1=0;

    int value2=0;

    int value3=0;

    //int value4=0;

    int n=0;

    int LED1=1;

    int LED2=2;

    int LED3=3;

    int LED4=4;

    int LED5=5;

    int LED6=6;

    int LED7=7;

    int LED8=8;

    int LED9=9;

    int LED10=10;

    int LED12=12;

    //for(int n=0;n

  • 8/17/2019 REPORT (Automatic Sreet Light Controlling Based on Vehicle Movement)

    16/20

    Automatic Street Light Controlling Based on Vehicle Movement

    School of Electrical Engineering, University of Faisalabad. Page 16

     pinMode(LED8,OUTPUT);

     pinMode(LED9,OUTPUT);

     pinMode(LED10,OUTPUT);

     pinMode(LED12,OUTPUT);

    }

    void loop(){

    value1=analogRead(LDR1);

    value2=analogRead(LDR2);

    value3=analogRead(LDR3);

    //value4=analogRead(LDR4);

    if(value1800)

    { delay(500);

    digitalWrite(LED1,0);

    delay(500);

    digitalWrite(LED2,0);

    delay(500);

    digitalWrite(LED3,0);

    }

    if(value2

  • 8/17/2019 REPORT (Automatic Sreet Light Controlling Based on Vehicle Movement)

    17/20

    Automatic Street Light Controlling Based on Vehicle Movement

    School of Electrical Engineering, University of Faisalabad. Page 17

    digitalWrite(LED5,1);

    delay(300);

    digitalWrite(LED6,1);

    }

    if(value2>800)

    {

    delay(500);

    digitalWrite(LED4,0);

    delay(500);

    digitalWrite(LED5,0);

    delay(500);

    digitalWrite(LED6,0);

    }

    if(value3800)

    { delay(500);

    digitalWrite(LED8,0);

    delay(500);

    digitalWrite(LED10,0);

    delay(500);

    digitalWrite(LED12,0);

    } }

  • 8/17/2019 REPORT (Automatic Sreet Light Controlling Based on Vehicle Movement)

    18/20

    Automatic Street Light Controlling Based on Vehicle Movement

    School of Electrical Engineering, University of Faisalabad. Page 18

    Figure 10: Arduino Programming.

    Figure 11:Arduino Programming.

    IV. RESULTS AND SIMULATIONS: 

    Before Running the Simulation:

  • 8/17/2019 REPORT (Automatic Sreet Light Controlling Based on Vehicle Movement)

    19/20

    Automatic Street Light Controlling Based on Vehicle Movement

    School of Electrical Engineering, University of Faisalabad. Page 19

    I connect the components and run the simulation and now result are accurate and

    according to requirement. The screen shoot are attached.

    Figure 12: Off Condition.

    After run the Simulation:

    Figure 13: Turn on Condition.

    V. CONCLUSION:

    In coming days, this will prove a great boon to the world, since it will save a lot of

    electricity of power plants that gets wasted in illuminating the street lights. As the

    conventional sources are depleting very fast, then it`s time to think of alternatives.

  • 8/17/2019 REPORT (Automatic Sreet Light Controlling Based on Vehicle Movement)

    20/20

    Automatic Street Light Controlling Based on Vehicle Movement

    School of Electrical Engineering, University of Faisalabad. Page 20

    VI. REFERENCES:

    1. “Shahzad Ali, Nashid Anjum”, “Electricity Crisis in Pakistan: Reception &  Adoption of Energy Saving Campaign Messages by PEPCO”, 

    (http://www.bzu.edu.pk/PJSS/Vol32No12012/Final_PJSS-32-1-14.pdf ) 

    2. “Rebekah Yozell-Epstein”,  “Economic Energy and User Needs Analysis  of

    Intelligent Lighting Systems”, 

    (http://best.berkeley.edu/research/smartLighting/support/yozell-epstein_MS.pdf ) 

    http://www.bzu.edu.pk/PJSS/Vol32No12012/Final_PJSS-32-1-14.pdfhttp://www.bzu.edu.pk/PJSS/Vol32No12012/Final_PJSS-32-1-14.pdfhttp://www.bzu.edu.pk/PJSS/Vol32No12012/Final_PJSS-32-1-14.pdfhttp://best.berkeley.edu/research/smartLighting/support/yozell-epstein_MS.pdfhttp://best.berkeley.edu/research/smartLighting/support/yozell-epstein_MS.pdfhttp://best.berkeley.edu/research/smartLighting/support/yozell-epstein_MS.pdfhttp://best.berkeley.edu/research/smartLighting/support/yozell-epstein_MS.pdfhttp://www.bzu.edu.pk/PJSS/Vol32No12012/Final_PJSS-32-1-14.pdf