You are on page 1of 26

Auto Intensity Control of Street Lights

By Usama saghar and Waseem Afzal


Department of computer engineering
Circuit analysis

usamasaghar@gmail.com

DATE:
ABSTRACT:
Street lights are controlled manually in olden days.
These days automation of street lights has emerged. But one can observe that
there is no need of high intensity in peak hours i.e. when there is no traffic and
even in early mornings. By reducing the intensity in these times, energy can be
saved to some extent.

There are many methods to save the power like Switching the street light on
detecting vehicle , Street light controlling using LDR and relays etc.

This paper aims at designing and executing the advanced development in


embedded systems for
energy saving of street 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 street 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 roads.
this paper gives the best solution for electrical power wastage. Also the manual
operation of the lighting system
is completely eliminated. In this paper the two sensors are used which are
Light Dependent Resistor LDR
sensor to indicate a day/night time and the photoelectric sensors to detect the
movement on the street. the
microcontroller PIC16F877A is used as brain to control the street light
system, where the programming
language used for developing the software to the microcontroller is C-language.
Finally, the system has been
successfully designed and implemented as prototype system.

INTRODUCTION:
The proposed circuits controls street light intensity by calculating the peak
hours. Two circuits are shown in this article, one explaining the street light control
using ATmega8 and second explains street light controlling using PIC microcontroller.
Most commonly found street lights are HID or High Intensity Discharge lamps, which
consume a lot of power. In order to save energy, the circuits are designed with high
intensity LEDs in place of HID lamps.

Automatic Street Light Control System Using Microcontroller MUSTAFA SAAD,


ABDALHALIM FARIJ, AHAMED SALAH and ABDALROOF ABDALJALIL Department of
Control Engineering College of Electronic Technology/ Baniwalid Baniwalid- Libya
LIBYA mustafasaad9@yahoo.com Abstract: - This paper aims at designing and
executing the advanced development in embedded systems for energy saving of
street 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
street 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 roads. this
paper gives the best solution for electrical power wastage. Also the manual
operation of the lighting system is completely eliminated. In this paper the two
sensors are used which are Light Dependent Resistor LDR sensor to indicate a
day/night time and the photoelectric sensors to detect the movement on the street.
the microcontroller PIC16F877A is used as brain to control the street light
system, where the programming language used for developing the software to the
microcontroller is C-language. Finally, the system has been successfully designed and
implemented as prototype system. Key-Words: - Street light, LDR, photoelectric
sensor, microcontroller, energy saving and circuit design.

The idea of designing a new system for the streetlight that do not consume
huge amount of electricity and illuminate large areas with the highest intensity
of light is concerning each engineer working in this field. Providing street
lighting is one of the most important and expensive responsibilities of a city.
Lighting can account for 10–38% of the total energy bill in typical cities
worldwide.

Street lighting is a particularly critical concern for public authorities in developing


countries because of its strategic importance for economic and social stability.
Inefficient lighting wastes significant financial resources every year, and poor
lighting creates unsafe conditions. Energy efficient technologies and design
mechanism can reduce cost of the street lighting drastically. Manual control is
prone to errors and leads to energy wastages and manually dimming during mid
night is impracticable. Also, dynamically tracking the light level is manually
impracticable. The current trend is the introduction of automation and remote
management solutions to control street lighting.

automatic street light intensity control and road safety module using embedded
system [4], automatic street light control system [5], Intelligent Street Lighting
System Using Gsm [6], energy consumption saving solutions based on intelligent
street lighting control system [7] and A Novel Design of an Automatic Lighting
Control System for a Wireless Sensor Network with Increased Sensor Lifetime
and Reduced Sensor Numbers[8]. In this paper two kinds of sensors will be used
which are light sensor and photoelectric sensor. The light sensor will detect
darkness to activate the ON/OFF switch, so the streetlights will be ready to turn on
and the photoelectric sensor will detect movement to activate the streetlights.
LDR, which varies according to the amount of light falling on its surface, this gives an
inductions for whether it is a day-night time, the photoelectric sensors are placed on
the side of the road, which can be controlled by microcontroller PIC16f877A. The
photoelectric will be activated only on the night time. If any object crosses the
photoelectric beam, a particular light will be automatically ON. By using this as a
basic principle, the intelligent system can be designed for the perfect usage of
streetlights in any place.

BLOCK DIAGRAM OF STREET LIGHT SYSTEM


Auto Intensity Control of Street Lights using
ATmega8
Circuit Principle
The main principle of this project is to Control the intensity of street lights
using PWM.Peak hours of a particular area are calculated and accordingly PWM
signal is adjusted by microcontroller to increase or decrease the intensity of street
lights.

These peak hours can be calculated by considering parameters like traffic density,
time, light intensity of the environment.

Auto Intensity Control of Street Lights Circuit Diagram


Circuit components
 ATmega8 micro controller

 DS1307 IC

 Light Dependent Resistor

 LED array.

 LCD display

Circuit Design
The auto intensity control of street lights circuit is simple but it requires more
coding part. This circuit consists of Atmega8 controller, DS1307, LDR, Relay and LEDs.

LDR:

LDR is used for calculating the light intensity of the environment .The light
dependent resistor is connected to ADC1 (PC1) pin of the micro controller. The
analog light value is converted to digital value using ADC.

LDR CIRCUIT
RTC:

Current time is calculated using RTC. Real time clock has 8 pins out of which
SCL and SDA are connected to PC5 and PC4  pins respectively. SCL is serial clock while
SDA is serial data RTC is I2C compatible, where I2C means inter integrated circuit.
One bit of data is transmitted on data bus for each clock cycle.

Data can be transferred between devices, using only two bi-directional buses. Each
device can act as a slave or master. The slave devices will have one address and
these devices can be accessed using this address.

PHOTO ELECTRIC SENSOR


To detect the movement in the street, the photoelectric sensors have
been used in this paper, where emitter and receiver are in one unit as shown.

Light from the emitter strikes the target and the reflected light is diffused from the
surface at all angles. If the receiver receives enough reflected light the output will
switch states. When no light is reflected back to the receiver the output returns to
its original state. In diffuse scanning the emitter is placed perpendicular to the
target. The receiver will be at some angle in order to receive some of the
scattered (diffuse) reflection. The photoelectric sensor specifications are illustrated
in Table 1.
LCD:

LCD is the display used for displaying time which is read from RTC IC.
Interfacing of LCD in 4-bit mode is shown in circuit diagram. D4-D7 pins of LCD are
connected to PD0-PD3 pins of microcontroller.

RS pin of LCD is connected to PD4 pin of micro controller. RW and Enable pins are
connected to PD5 and PD6 pins of controller.

LED array is number of high power LEDs connected in series. It is connected to PWM
pin of the microcontroller.
OFF STATE

ON STATE
I2C Protocol:
I2c is a communication protocol invented by Philips Company. This is well
suited for communication between integrated circuits and peripherals. This uses two
lines to transfer data.

 Serial Data – SDA


 Serial Clock – SCL.

1. This can connect up to 128 devices using two wires. Each device connected
will have an address. The device which initiates the data transfer is called
Master.
2. Every device will have 7 bit address.
3.  Master initially sends the START bit on the data line.
4. Then it sends the address of the device with which wants to communicate and
the mode of operation i.e. read or write.
5. The slave devices listen to the incoming data and checks if its address matches
to the received data. The device whose address matches send an
acknowledgement signal.
6. Then master starts transmitting or receiving the data from the slave.
7. After completion of the transmission, Master sends a STOP bit.
8. Data on SDA can be changed only if SCL pin is low.

Code is written in such a way that up to 2 am lights will glow with full intensity. From
then it slowly starts decreasing and finally it drops to zero in the morning.

ALGORITHM
Implementing the project by placing all

1. the required components in it.

The ESP8266 or Raspberry Pi are

programmed using software (Arduino

or Raspberry pi).

2. ESP8266 is programmed by initializing

some variables and serial begin

communication.

3. Set the Analog A0 pin and digital pins

D1, D7 as input port, digital

pinsD2,D3,D6 as output ports.

4. Consider two functions street1() and

street2() which represents each lane of

street light.

5. Call the street1() function and read the


analog input into a variable(s) and print

the same with delay of 1ms.

6. Intensity of the light that falls on LDR

Sensor is set by the threshold values of

300.

7. If the analog input value is greater than

or equal to 300 and digital input pin D7

is high(1) then digital pins D0,D6 are

made high by writing 1 to output ports

and introduce some delay (1ms).

8. Else write digital pins D0,D6 low(0) .

Call street2() function ,read the analog

input into a variable(s) and print the

same with delay of 1ms.

9. If the analog input value is greater than


or equal to 300 and digital input pin D1 is high(1) then digital pins D2,D3 are

made high by writing 1 to output ports

and introduce some delay (1ms).

10.Else write digital pins D2, D3 as low(0) .

Consider a loop if the digital pin D7 is

high(1) the street1() function is called or

D1is high(2) then street2() function is

called.

11.The changes in the value can be

observed in the Firebase, which in turn

is also reflected in MOBILE APP.

BLOCK DIAGRAM
DISCUSSION:

How Auto Intensity Control of Street Lights Circuit Works?

1. Initially power the circuit.


2. Time is displayed on the LCD display.
3. Place the LDR in darkness as the street lights switches on only when there is
no light on LDR.
4. Now check the time if the time is between 9 pm to 2 am street light glows
with full intensity.
5. From 2 pm intensity of the lights slowly starts decreasing and finally in early
morning it glows with least intensity. When the light is sensed by the LDR lights
are switched off automatically.

LIMITATION OF THE CIRCUIT

 Even though energy is saved if there are any vehicles after fixed time,
intensity of the light is low.
 Maximum energy cannot be saved.

Auto Intensity Control of Street Lights using a PIC


Microcontroller

COMPONENTS:

 IC1 PIC 16F877A


 IC2 DS 1307
 LCD1 16X2 Alphanumeric LCD display
 R1, R2 10 KΩ
 R3, R4 1 KΩ
 R5 10 KΩ
 R6 1 KΩ
 R7 10 KΩ
 R8, R9, R10 and R11 330 Ω
 R12 10 KΩ
 R13 10 KΩ POT

Component Description
PIC16F877A:

The microcontroller used in the circuit is a PIC16F877A. It is an 8 – bit


microcontroller that reads the voltage across LDR and also checks the time in Real
Time Clock IC. Based on the readings, the LEDs are switched on or off.

A microcontroller is a computer control system on a single chip. It has many


electronic circuits built into it, which can decode written instructions and convert
them to electrical signals. The microcontroller will then step through these
instructions and execute them one by one. As an example of this a
microcontroller we can use it to controller the lighting of a street by using the exact
procedures. Microcontrollers are now changing electronic designs. Instead of
hard wiring a number of logic gates together to perform some function we now use
instructions to wire the gates electronically. The list of these instructions given to the
microcontroller is called a program. There are different types of microcontroller,
this project focus only on the PIC16F877A Microcontroller where it's pins as
shown in Fig. 6.

FIGURE
DS1307:

It is a Real Time Clock IC. The communication between microcontroller and DS1307 is
via I2C protocol. It provides clock and calendar with details like seconds, minutes,
hours, day, date, month and year. Time can be set in either 12 hour mode or 24 hour
mode and there is an indication of AM/PM.

Working:

We use both LDR and RTC in the circuit for the following reason: if only LDR is used,
then there is no chance of saving any energy as the street lights will glow as soon as
the intensity of light on LDR decreases and when the intensity increases, the street
lights are turned off.
If only RTC is used, the street lights are turned on and off at preset time irrespective
of the outside lighting conditions. When the device is turned on, RTC starts with the
preset time in the code.

The microcontroller waits for the signal from LDR and when the intensity of light on
LDR decreases, the output of the microcontroller is activated and the street lights
start to glow. This event occurs only when the current time is in the range of preset
time i.e. only after 5PM.

The lights continue to glow at full intensity up to 3 AM. When the time reaches 3 AM,
the intensity of the street light gradually decreases and will turn off either at 6 AM or
when the light on LDR in increasing, whichever is first.

Hence, the auto intensity control of street lights is achieved with the above circuit
which has an LDR, an RTC, a PIC microcontroller and an LED array.

Alternative Circuit
The circuits shown above uses array of LEDs as street light in order to save power.
But the same circuit can also be used to fire a normal HID street lamp. The circuit for
auto intensity control of HID street light is as follows.

The above circuit shows only the interface to the street light and the rest of the
circuit is same. It consists of a relay, a high intensity discharge street light that is
connected to the mains supply and a diode.
The relay contact is made only when the intensity of light on the LDR is low and the
street light glows.

Auto Intensity Control of Street Lights Circuit


Advantages

 Power wastage can be reduced.


 Using LED array reduces the cost.
 Using of RTC and LDR produces accurate results.

CIRCUIT DIAGRAM:
DETAILS OF THIS CIRCUIT
1. Pins 13 & 14 of the PIC are connected to

the Oscillator circuit and Crystal which


consisting of 4 MHz crystal connected to
two 33 Pf capacitors.
2. Pin 1 is connected to VCC +5V through
10KΩ resistor, connected to reset bottom
for resetting the circuit.
3. Pin 5 is connected to the LDR Circuit.
4. Pins 16, 17, 18, and 19 connected to the
photoelectric sensors through 10KΩ
resistor.
5. Pins 29, 30 and33 connected to the lamp1,
lamp2 and lamp3, through 2.2KΩ resistance
and transistor and Relay.

RESULT

The project aims were to reduce the side effects of the current street lighting system,
and find a solution to save power. In this project the first thing to do, is to prepare
the inputs and outputs of the system to control the lights of the street. The
prototype as shown in Fig. 9 has been implemented and works as expected and will
prove to be very useful and will fulfill all the present constraints if implemented on a
large scale.
ACKNOWLEDGMENTS
I thank Engr. Tauheed-u-Rehman and lab engineer Engr. Ubaid-u-Rehman for help
with t-test and my lab partner for helping me conduct and understand this
project.

CONCLUSION
This paper elaborates the design and construction of automatic street control
system circuit. Circuit works properly to turn street lamp ON/OFF. After designing
the circuit which controls the light of the street as illustrated in the previous
sections. LDR sensor and the photoelectric sensors are the two main conditions
in working the circuit. If the two conditions have been satisfied the circuit will do
the desired work according to specific program. Each sensor controls the turning
ON or OFF the lighting column. The street lights has been successfully controlled
by microcontroller. With commands from the controller the lights will be ON in the
places of the movement when it's dark. furthermore the drawback of the street
light system using timer controller has been overcome, where the system
depends on photoelectric sensor. Finally this control circuit can be used in a long
roadways between the cities

You might also like