You are on page 1of 3

INTERNATIONAL JOURNAL FOR RESEARCH & DEVELOPMENT IN Volume-7,Issue-5, (May-17)

TECHNOLOGY ISSN (O) :- 2349-3585

Automatic Street Light using LDR and PIR sensor using PIC
Microcontroller
__________________________________________________________________________________________

Department of Electrical and Electronics Engineering, SRM University, India

Abstract: Generally, street lights are switched on for the wastages and manually dimming during midnight is
whole night and during the day they are switched off. But impracticable. Also, dynamically tracking the light level is
during the night time there is no need of street lights if there manually impracticable. The current trend is the introduction
is no traffic. Saving of this energy is very important factor of automation and remote management solutions to control
these days as the resources are getting degraded day by day. street lighting .There are various numbers of control strategy
Alternatives for natural resources are very less and our next and methods in controlling the street light system such as
generation may face a lot of problem because of them. This design and implementation of automatic traffic controller,
circuit makes use of a PIR sensor, which is basically an design and fabrication of automatic street light control system,
infrared sensor which detects motion. By using this sensor, automatic street light intensity control and road safety module
we can make sure that electricity is not wasted unnecessarily. using embedded system , automatic street light control system,
The circuit is designed in such a way that, it is witched off In this paper two kinds of sensors will be used which are light
during the day time and gets automatically switched on as sensor and photoelectric sensor. The light sensor will detect
soon as it gets dark. When no movement is sensed by the PIR darkness to activate the ON/OFF switch, so the streetlights
sensor, the lights work at minimum intensity. As soon as will be ready to turn on and the photoelectric sensor will
vehicle movement is detected by the sensor, the lights start detect movement to activate the streetlights. LDR, which
working at maximum intensity. After a few seconds, it varies according to the amount of light falling on its surface,
returns to low intensity. this gives an inductions for whether it is a day-night time, the
Keywords: sensors, LDR, PIR, PIC Microcontroller LDRs are placed on the side of the road, which can be
1.Introduction controlled by microcontroller PIC16f877A. The LDR will be
The idea of designing a new system for the streetlight that do activated only on the night time. If any object crosses the PIR
not consume huge amount of electricity and illuminate large Sensor, a particular light will be automatically ON For its full
areas with the highest intensity of light is concerning each intensity. By using this as a basic principle, the intelligent
engineer working in this field [1]. Providing street lighting is system can be designed for the perfect usage of streetlights in
one of the most important and expensive responsibilities of a any place. The block diagram of street light system consists of
city. Lighting can account for 1038% of the total energy bill microcontroller, LDR, and PIR sensor. By using the LDR we
in typical cities worldwide. Street lighting is a particularly can operate the lights, i.e. when the light is available, then it
critical concern for public authorities in developing countries will be in the OFF state and when it is dark the light will be in
because of its strategic importance for economic and social ON state, it means LDR is inversely proportional to light.
stability. Inefficient lighting wastes significant financial When the light falls on the LDR it sends the commands to the
resources every year, and poor lighting creates unsafe microcontroller that it should be in the OFF state then it switch
conditions. Energy efficient technologies and design OFF the light, the PIR sensor will be used to detect the
mechanism can reduce cost of the street lighting drastically. presence of an object and when an object passes the PIR
Manual control is prone to errors and leads to Energy sensor, The intensity of the light again becomes at 100% for

24
All rights reserved by www.ijrdt.org
Paper Title:- Automatic Street Light using LDR and PIR sensor using PIC Microcontroller

the next 10 seconds. PIR sensor senses vehicle movement, the led output goes to
2.System Block Diagram maximum. It stays high for a few seconds and then returns to a
low intensity state. This is achieved by using a PWM which is
internally present in the microcontroller.
4.Circuit Diagram
LCD1
LM016L

1
LDR1
TORCH_LDR
RV1

VDD
VSS

VEE

RW
RS

D0
D1
D2
D3
D4
D5
D6
D7
50%

E
R1

1
2
3

4
5
6

7
8
9
10
11
12
13
14
10k
10k
+5v

C1
U1
13 33
OSC1/CLKIN RB0/INT
14 34
22pf OSC2/CLKOUT RB1
35
RB2
2 36 +12v
RA0/AN0 RB3/PGM
X1 3
RA1/AN1 RB4
37
CRYSTAL 4 38
RA2/AN2/VREF-/CVREF RB5
5 39
RA3/AN3/VREF+ RB6/PGC
6 40
RA4/T0CKI/C1OUT RB7/PGD
C2 7
RA5/AN4/SS/C2OUT
RC0/T1OSO/T1CKI
15 D1
8 16 LED-YELLOW
RE0/AN5/RD RC1/T1OSI/CCP2
9 17
RE1/AN6/WR RC2/CCP1
10 18
22pf RE2/AN7/CS RC3/SCK/SCL
23
RC4/SDI/SDA
1 24
MCLR/Vpp/THV RC5/SDO
25
RC6/TX/CK
26
RC7/RX/DT
R2 Q1
19 BD139
RD0/PSP0
20 1k
RD1/PSP1
R5 21
RD2/PSP2
22
RD3/PSP3
27 +5v
10k RD4/PSP4
28
RD5/PSP5
+5v 29
RD6/PSP6
30
RD7/PSP7
PIC16F877A

R3
10k

Figure 1 Block Diagram


R4
The Block Diagram shown in Figure 1 consists of the 10k

PIC16F877a Microcontroller, and LDR sensor and a PIR


Figure 3 Circuit Diagram
sensor. The LDR and The PIR sensor act as the eye of the
In the circuit diagram above the LCD pins D4, D5, D6, D7 are
system and the Microcontroller is the brain of the system
connected to the RB2, RB3, RB4, RB5 pins of the
where all the processing and decisions are made. A clock is
PIC16F877a microcontroller. Pins RS and E are connected to
internally present inside the Microcontroller and for those
RB0 and RB1 respectively. RW is grounded. The Vss pin of
Microcontrollers like the PIC16F877a not having an internal
the LCD is connected and the pin Vdd is connected to the
clock an external crystal oscillator circuit is present. An LED
regulated +5v supply. Vee is connected to the variable resistor.
strip simulates the street lights. The Light Dependent Resistor
The RC2 pi is connected to the LED array which acts as an
(LDR) measures whether it is day or night and the Passive
street light. The PIR sensor and the button are connected to the
Infrared sensor (PIR) detects the movement. The combination
RD ports of the PIC Microcontroller. An external clock is used
of both the LDR and the PIR sensors make the system more
to provide to provide external frequency as the circuit as a
efficient. To power the circuit an external power supply of 5V
whole requires more frequency than that provided by the
is required and this circuit converts the 220V AC supply to a
Microcontroller. The main supply to the Microcontroller is
supply suitable for the Microcontroller.
given to the port number 1 MCLR/Vpp/THV.
3.Proposed Working
4.1Hardware Used
The proposed system consists of PIC16F877a microcontroller,
The main Hardware used are the PIC16F877a Microcontroller,
LDR and PIR sensor. This system controls the street lights
the LDR sensor and the PIR sensor. These components are
using light dependent resistor and PIR sensor. Street lights are
easily available in the market at a very low cost
switched on depending on the intensity of the Sun light on
4.1.1PIC16F877a Microcontroller
LDR. If the intensity of Sunlight on light dependent resistor is
A microcontroller is a computer control system on a single
low, its resistance value is high. This value increases and
chip. It has many electronic circuits built into it, which can
becomes high when it is completely in dark. This resistance
decode written instructions and convert them to electrical
value decides when the street lights are required to switch ON.
signals. The microcontroller will then step through these
After sunset, due to the action of LDR, the led are switched
instructions and execute them one by one. As an example of
on. These led initially work at a low intensity. Whenever the
this a microcontroller we can use it to controller the lighting of

25
ISSN:-2349-3585 |www.ijrdt.org
Paper Title:- Automatic Street Light using LDR and PIR sensor using PIC Microcontroller

a street by using the exact procedures. Microcontrollers are 5.Conclusion


now changing electronic designs. Instead of hard wiring a In this paper we discussed how the PIC microcontroller along
number of logic gates together to perform some function we with the LDR and PIR sensor can be used to reduce the
now use instructions to wire the gates electronically. The list consumption of power as the load on the power plants is
of these instructions given to the microcontroller is called a already very high all over the world. The proposed system
program [2]. reduces the power consumption at night and saves the
4.1.2 LDR Sensor electricity which can be used in various industries and the
Two cadmium sulphide (cds) photoconductive cells with system has the potential to reduce the power cuts and power
spectral responses similar to that of the human eye. The cell shortages faced almost everywhere in the industry.
resistance falls with increasing light intensity. Applications References
include smoke detection, automatic lighting control, batch [1]Y. Wu, C. Shi, X. Zhang and W. Yang. 2010. Design of
counting and burglar alarm systems. The sensitivity of a photo new intelligent street light control system. 8th IEEE
detector is the relationship between the light falling on the International Conference Control Automation ICCA 2010, pp.
device and the resulting output signal. In the case of a 14231427.
photocell, one is dealing with the relationship between the [2] Microchip PIC16F87Xa Data Sheet.
incident light and the corresponding resistance of the cell [3]. [3] https://www.electrical4u.com/light-dependent-resistor-ldr-
4.1.3 PIR Sensor working-principle-of-ldr/.
PIR sensors allow you to sense motion, almost always used to [4]https://en.wikipedia.org/wiki/Passive_infrared_sensor.
detect whether a human has moved in or out of the sensors [5] mikroC PRO for PIC user manual.
range. They are small, inexpensive, low-power, easy to use
and don't wear out. For that reason they are commonly found
in appliances and gadgets used in homes or businesses. They
are often referred to as PIR, "Passive Infrared", "Pyroelectric",
or "IR motion" sensors. PIRs are basically made of a
Pyroelectric sensor which is a round metal can with a
rectangular crystal in the center, which can detect levels of
infrared radiation. Everything emits some low level radiation,
and the hotter something is, the more radiation it emits. The
sensor in a motion detector is actually split in two halves. The
reason for that is that we are looking to detect motion (change)
not average IR levels. The two halves are wired up so that they
cancel each other out. If one half sees more or less IR
radiation than the other, the output will swing high or low [4].
4.2 Softwares Used
The mikroC PRO IDE is used to program the PIC
Microcontroller. The mikroC PRO for PIC is a powerful,
feature-rich development tool for PIC microcontrollers. It is
designed to provide the programmer with the easiest possible
solution to developing applications for embedded systems,
without compromising performance or control [5].

26
ISSN:-2349-3585 |www.ijrdt.org

You might also like