Vous êtes sur la page 1sur 20

AUTOMATIC STREET

LIGHT CONTROLLING
BASED ON VEHICLE
MOVEMENT

09-Nov-15

Automatic Street Light Controlling Based on Vehicle Movement

The University Of Faisalabad

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

School of Electrical Engineering, University of Faisalabad.

Page 2

Automatic Street Light Controlling Based on Vehicle Movement

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.

School of Electrical Engineering, University of Faisalabad.

Page 3

Automatic Street Light Controlling Based on Vehicle Movement

TABLE OF CONTENTS
CHAPTERS

PAGE

ACKNOWLEDGEMENTS ...

TABLE OF CONTENTS ..

ABSTRACT ......

INTRODUCTION ............

METHODOLOGY .......

EXPERIMENTAL WORK ..

Light Sensor .....

Arduino Programming Tool .....

Creating Program in Arduino...

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

School of Electrical Engineering, University of Faisalabad.

Page 4

Automatic Street Light Controlling Based on Vehicle Movement

ABSTRACTS:
This paper aims at designing and executing the advanced development in embedded
systems 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.

School of Electrical Engineering, University of Faisalabad.

Page 5

Automatic Street Light Controlling Based on Vehicle Movement

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.

School of Electrical Engineering, University of Faisalabad.

Page 6

Automatic Street Light Controlling Based on Vehicle Movement

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.

School of Electrical Engineering, University of Faisalabad.

Page 7

Automatic Street Light Controlling Based on Vehicle Movement

Figure1: Design Strategy.

III. EXPERIMENTAL WORK:


It is clear from figure1 that this design is consisted of some main branches including
Light Sensor, resistors LEDs 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
School of Electrical Engineering, University of Faisalabad.

Page 8

Automatic Street Light Controlling Based on Vehicle Movement

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

School of Electrical Engineering, University of Faisalabad.

Page 9

Automatic Street Light Controlling Based on Vehicle Movement

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.

School of Electrical Engineering, University of Faisalabad.

Page 10

Automatic Street Light Controlling Based on Vehicle Movement

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.

School of Electrical Engineering, University of Faisalabad.

Page 11

Automatic Street Light Controlling Based on Vehicle Movement

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 of
the 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.

School of Electrical Engineering, University of Faisalabad.

Page 12

Automatic Street Light Controlling Based on Vehicle Movement

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.

School of Electrical Engineering, University of Faisalabad.

Page 13

Automatic Street Light Controlling Based on Vehicle Movement

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.

School of Electrical Engineering, University of Faisalabad.

Page 14

Automatic Street Light Controlling Based on Vehicle Movement

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<12;n++)
void setup()
{ pinMode(LED1,OUTPUT);
pinMode(LED2,OUTPUT);
pinMode(LED3,OUTPUT);
pinMode(LED4,OUTPUT);
pinMode(LED5,OUTPUT);
pinMode(LED6,OUTPUT);
pinMode(LED7,OUTPUT);
School of Electrical Engineering, University of Faisalabad.

Page 15

Automatic Street Light Controlling Based on Vehicle Movement

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(value1<=800)
{
delay(100);
digitalWrite(LED1,1);
delay(200);
digitalWrite(LED2,1);
delay(300);
digitalWrite(LED3,1);
}
if(value1>800)
{

delay(500);
digitalWrite(LED1,0);
delay(500);
digitalWrite(LED2,0);
delay(500);
digitalWrite(LED3,0);

}
if(value2<=800)
{

delay(100);
digitalWrite(LED4,1);
delay(200);

School of Electrical Engineering, University of Faisalabad.

Page 16

Automatic Street Light Controlling Based on Vehicle Movement

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(value3<=800)
{

delay(100);
digitalWrite(LED8,1);
delay(200);
digitalWrite(LED10,1);
delay(300);
digitalWrite(LED12,1);

}
if(value3>800)
{ delay(500);
digitalWrite(LED8,0);
delay(500);
digitalWrite(LED10,0);
delay(500);
digitalWrite(LED12,0);
}}

School of Electrical Engineering, University of Faisalabad.

Page 17

Automatic Street Light Controlling Based on Vehicle Movement

Figure 10: Arduino Programming.

Figure 11:Arduino Programming.

IV. RESULTS AND SIMULATIONS:


Before Running the Simulation:

School of Electrical Engineering, University of Faisalabad.

Page 18

Automatic Street Light Controlling Based on Vehicle Movement

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.

School of Electrical Engineering, University of Faisalabad.

Page 19

Automatic Street Light Controlling Based on Vehicle Movement

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)

School of Electrical Engineering, University of Faisalabad.

Page 20

Vous aimerez peut-être aussi