Project
Project
Project
INTRODUCTION
Automatic Street Light Control System is a simple and powerful concept, which uses
transistor as a switch to switch ON and OFF the street light automatically. By using
this system manual works are removed. It automatically switches ON lights when
the sunlight goes below the visible region of our eyes. It automatically switches OFF
lights under illumination by sunlight. This is done by a sensor called Light
Dependant Resistor (LDR) which senses the light actually like our eyes.
By using this system energy consumption is also reduced because now a days the
manually operated street lights are not switched off properly even the sunlight
comes and also not switched on earlier before sunset. In sunny and rainy days, ON
time and OFF time differ significantly which is one of the major disadvantage of
using timer circuits or manual operation.
This project exploits the working of a transistor in saturation region and cut-off
region to switch ON and switch OFF the lights at appropriate time with the help of
an electromagnetically operated switch.
Apart from supporting works toward better future, smart city technologies allow
improvement in the area of response and maintenance where failures or
breakdowns within the deployment area is almost real time detectable, allowing
immediate response from the respective person.
Street lighting is one of the important parts of a citys infrastructure where the
main function is to illuminate the citys street during the dark hours of the day.
1 | Page
There are several factors that should be considered for the design of road lighting
systems, such as a safety night for members of the public and other road users,
provide public lighting at a cost effective, reduce crime and reduce its impact on the
environment.
Generally, street light is switched on for the whole night and during the day the
street light is switched off but during the night time, street light are not necessary if
there is no traffic user. Saving of this energy consumption is a very important factor
these days as energy resources get reduced day by day. Alternatives for natural
resources are very less and our next generations may face lots of problems because
of lack of these natural resources.
C.Bhuvaneshwari et al [2] have analyzed the street light with auto tracking
system by which one can increase the conversion efficiency of the solar power
generation. Here, the sun tracking sensor is the sensing device which senses the
position of the sun time to time and gives the output to the amplifier based on light
density of the sun. Sun tracking sensor is LDR, amplifier unit is used to amplify the
2 | Page
LDR signals which converts low level signals to high level signals and the output is
given to comparator. The LM324 IC is used as an amplifier. Comparator compares
the signals and gives the command to AT89C51 microcontroller.
Manuel Burgos Payan et al[5] have described in detail about how the
replacement of sodium vapour lamps or high pressure mercury vapor lamps with led
lamps can save a lot of electrical energy in existing Street light lamp of Spain. This
paper contains detailed analysis of power consumption by different types of lamps,
features of these lamps and energy saved by replacing each type of lamp.
Distribution of the various types of lamps in Spain has been studied and estimation
of total energy cost saving by replacing them with LED lamps has been projected.
The major areas of focus are illumination technology and the benefits of using
reflectors for directing the light beam at proper location
From this literature survey, the methods each one has implemented and used is
simple and easy to understand. These papers and journals has given many ideas to
3 | Page
further implement a much efficient system and make things automated. The
presentations are simple and clean with all the necessary information needed for a
basic learner or reader.
LDRs are light dependent devices whose resistance is decreased when light falls on
them and that is increased in the dark. During day time when resistance of LDR is
low, the microcontroller will detect logic 0 and when there is not sufficient light
resistance of LDR is high, the microcontroller will detect logic 1.
So, the program for the microcontroller must be written in such a way that it will
check logic of IR sensor when microcontroller detects logic 1 from LDR and when
microcontroller detects logic 0 from LDR then keep the street light off without
checking the logic of IR sensor.
The IR transmitter is placed directly in line of sight with IR receiver, so that the IR
receiver continuously receives infrared rays. Once the IR receiver receives infrared
rays, the microcontroller will detect Logic 0. If the infrared rays are blocked by some
means, the microcontroller will detect logic 1.
So, the program for the microcontroller must be written in such a way that it will
turn ON the LEDs, which means here the street lamp, when it detects Logic 1 from
IR sensor and it will turn OFF the LEDs, when it detects Logic 0 from IR sensor.
4 | Page
Consider the two IR sensors i.e. IR Transmitter and IR Receiver are placed on the
either side of the road. As per the circuit diagram, the IR receivers are connected to
the PORT0 and the LEDs are connected to the PORT2 of the microcontroller.
If the car blocks the first IR sensor, the first three LEDs are turned ON by the
microcontroller. As the car moves forward and blocks the second IR sensor, the
corresponding next three LEDs will be turned ON and the first LED of the previous
set is turned OFF. The process continues this way for all the IR Sensors and LEDs.
1.4 METHODOLOGY
The principle behind the working of the project lies in the functioning of LDR and IR
Sensor.
LDRs are light dependent devices whose resistance is decreased when light falls on
them and that is increased in the dark. We use this property to keep the LEDs off
during day when there is sufficient light.
In Transmissive IR Sensor, the IR transmitter and receiver are placed facing each
other so that IR receiver always detects IR Rays emitted by the IR Transmitter.
If there is an obstacle between the IR Transmitter and Receiver, the IR Rays are
blocked by the obstacle and the IR Receiver stops detecting the IR Rays.
This can be configured to turn ON or OFF the LEDs (or street lights) with the help of
microcontroller.
5 | Page
2. ARDUINO
2.1Overview
Arduino Uno is a microcontroller board based on the ATmega328P . It has 14 digital
input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16
MHz quartz crystal, a USB connection, a power jack, an ICSP header and a reset
button. It contains everything needed to support the microcontroller; simply connect
it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to
get started. You can tinker with your UNO without worrying too much about doing
something wrong, worst case scenario you can replace the chip for a few dollars and
start over again.
Technical specs
Microcontroller ATmega328P
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limit) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
PWM Digital I/O Pins 6
Analog Input Pins 6
DC Current per I/O Pin 20 mA
DC Current for 3.3V Pin 50 mA
32 KB (ATmega328P)
Flash Memory
of which 0.5 KB used by bootloader
SRAM 2 KB (ATmega328P)
EEPROM 1 KB (ATmega328P)
Clock Speed 16 MHz
6 | Page
LED_BUILTIN 13
Length 68.6 mm
Width 53.4 mm
Weight 25 g
Schematics
Programming
7 | Page
The Arduino/Genuino Uno can be programmed with the (Arduino Software (IDE)). Select
"Arduino/Genuino Uno from the Tools > Board menu (according to the microcontroller on your
board). For details, see the reference and tutorials.
The ATmega328 on the Arduino/Genuino Uno comes preprogrammed with a bootloader that
allows you to upload new code to it without the use of an external hardware programmer. It
communicates using the original STK500 protocol (reference, C header files).
You can also bypass the bootloader and program the microcontroller through the ICSP (In-
Circuit Serial Programming) header using Arduino ISP or similar; see these instructions for
details.
The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is available in the
Arduino repository. The ATmega16U2/8U2 is loaded with a DFU bootloader, which can be
activated by:
On Rev1 boards: connecting the solder jumper on the back of the board (near the map
of Italy) and then rese ing the 8U2.
On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to
ground, making it easier to put into DFU mode.
You can then use Atmel's FLIP software (Windows) or the DFU programmer (Mac OS
X and Linux) to load a new firmware. Or you can use the ISP header with an external
programmer (overwriting the DFU bootloader). See this user-contributed tutorial for more
information.
Power
The Arduino/Genuino Uno board can be powered via the USB connection or with an
external power supply. The power source is selected automatically.
External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or
battery. The adapter can be connected by plugging a 2.1mm center-positive plug
into the board's power jack. Leads from a battery can be inserted in the GND and
Vin pin headers of the POWER connector.
The board can operate on an external supply from 6 to 20 volts. If supplied with less
than 7V, however, the 5V pin may supply less than five volts and the board may
become unstable. If using more than 12V, the voltage regulator may overheat and
damage the board. The recommended range is 7 to 12 volts.
8 | Page
The power pins are as follows:
Vin. The input voltage to the Arduino/Genuino board when it's using an
external power source (as opposed to 5 volts from the USB connection or other
regulated power source). You can supply voltage through this pin, or, if supplying
voltage via the power jack, access it through this pin.
5V.This pin outputs a regulated 5V from the regulator on the board. The board
can be supplied with power either from the DC power jack (7 - 12V), the USB
connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or
3.3V pins bypasses the regulator, and can damage your board. We don't advise it.
3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current
draw is 50 mA.
IOREF. This pin on the Arduino/Genuino board provides the voltage reference
with which the microcontroller operates. A properly configured shield can read the
IOREF pin voltage and select the appropriate power source or enable voltage
translators on the outputs to work with the 5V or 3.3V.
Memory
The ATmega328 has 32 KB (with 0.5 KB occupied by the bootloader). It also has 2 KB of SRAM
and 1 KB of EEPROM (which can be read and written with the EEPROM library).
See the mapping between Arduino pins and ATmega328P ports. The mapping for
the Atmega8, 168, and 328 is identical.
Each of the 14 digital pins on the Uno can be used as an input or output,
using pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5 volts.
Each pin can provide or receive 20 mA as recommended operating condition and
has an internal pull-up resistor (disconnected by default) of 20-50k ohm. A
9 | Page
maximum of 40mA is the value that must not be exceeded on any I/O pin to avoid
permanent damage to the microcontroller.
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial
data. These pins are connected to the corresponding pins of the ATmega8U2 USB-to-
TTL Serial chip.
PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite()
function.
LED: 13. There is a built-in LED driven by digital pin 13. When the pin is HIGH
value, the LED is on, when the pin is LOW, it's off.
TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the
Wire library.
The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits
of resolution (i.e. 1024 different values). By default they measure from ground to 5
volts, though is it possible to change the upper end of their range using the AREF
pin and the analogReference() function.
There are a couple of other pins on the board:
AREF. Reference voltage for the analog inputs. Used with analogReference().
Reset. Bring this line LOW to reset the microcontroller. Typically used to add a
reset button to shields which block the one on the board.
Communication
10 | P a g e
Arduino/Genuino Uno has a number of facilities for communicating with a computer,
another Arduino/Genuino board, or other microcontrollers. The ATmega328 provides
UART TTL (5V) serial communication, which is available on digital pins 0 (RX) and 1
(TX). An ATmega16U2 on the board channels this serial communication over USB
and appears as a virtual com port to software on the computer. The 16U2 firmware
uses the standard USB COM drivers, and no external driver is needed. However, on
Windows, a .inf file is required. The Arduino Software (IDE) includes a serial monitor
which allows simple textual data to be sent to and from the board. The RX and TX
LEDs on the board will flash when data is being transmitted via the USB-to-serial
chip and USB connection to the computer (but not for serial communication on pins
0 and 1).
A SoftwareSerial library allows serial communication on any of the Uno's digital pins.
The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino
Software (IDE) includes a Wire library to simplify use of the I2C bus; see
the documentation for details. For SPI communication, use the SPI library.
This setup has other implications. When the Uno is connected to either a computer
running Mac OS X or Linux, it resets each time a connection is made to it from
software (via USB). For the following half-second or so, the bootloader is running on
the Uno. While it is programmed to ignore malformed data (i.e. anything besides an
upload of new code), it will intercept the first few bytes of data sent to the board
after a connection is opened. If a sketch running on the board receives one-time
configuration or other data when it first starts, make sure that the software with
which it communicates waits a second after opening the connection and before
sending this data.
11 | P a g e
The Uno board contains a trace that can be cut to disable the auto-reset. The pads
on either side of the trace can be soldered together to re-enable it. It's labeled
"RESET-EN". You may also be able to disable the auto-reset by connecting a 110
ohm resistor from 5V to the reset line; see this forum thread for details.
2.2 MICROCONTROLLER
Microcontroller is a single chip micro computer made through VLSI fabrication. A
microcontroller also called an embedded controller because the microcontroller and
its support circuits are often built into, or embedded in, the devices they control. A
microcontroller is available in different word lengths like microprocessors
(4bit,8bit,16bit,32bit,64bit and 128 bit microcontrollers are available today).
Microcontroller Chip
You can find microcontrollers in all kinds of electronic devices these days. Any
device that measures, stores, controls, calculates, or displays information must
have a microcontroller chip inside. The largest single use for microcontrollers is in
automobile industry (microcontrollers widely used for controlling engines and power
controls in automobiles). You can also find microcontrollers inside keyboards,
mouse, modems, printers, and other peripherals. In test equipments,
microcontrollers make it easy to add features such as the ability to store
measurements, to create and store user routines, and to display messages and
waveforms. Consumer products that use microcontrollers include digital
camcorders, optical players, LCD/LED display units, etc.
12 | P a g e
ii. Random Access Memory)(RAM)
iii. Read Only Memory(ROM)
iv. Input/output ports
v. Timers and Counters
vi. Interrupt Controls
vii. Analog to digital converters
viii. Digital analog converters
ix. Serial interfacing ports
x. Oscillatory circuits
3) Most of the pins in the microcontroller chip can be made programmable by the
user.
2.3Microcontroller structure
The basic structure and block diagram of a microcontroller is shown in the fig .
Microcontroller Structure
13 | P a g e
CPU
CPU is the brain of a microcontroller .CPU is responsible for fetching the instruction,
decodes it, then finally executed. CPU connects every part of a microcontroller into
a single system. The primary function of CPU is fetching and decoding instructions.
Instruction fetched from program memory must be decoded by the CPU.
Memory
Parallel input/output ports are mainly used to drive/interface various devices such
as LCDS, LEDS, printers, memories, etc to a microcontroller .
Serial ports
Serial ports provide various serial interfaces between microcontroller and other
peripherals like parallel ports.
Timers/counters
ADC converters are used for converting the analog signal to digital form. The input
signal in this converter should be in analog form (e.g. sensor output) and the output
from this unit is in digital form. The digital output can be use for various digital
applications (e.g. measurement devices).
DAC perform reversal operation of ADC conversion.DAC convert the digital signal
into analog format. It usually used for controlling analog devices like DC motors,
various drives, etc.
14 | P a g e
Interrupt control
The interrupt control used for providing interrupt (delay) for a working program .The
interrupt may be external (activated by using interrupt pin) or internal (by using
interrupt instruction during programming).
Some microcontrollers used only for some special applications (e.g. space systems
and robotics) these controllers containing additional ports to perform such special
operations. This considered as special functioning block.
2.4 ATMEGA328
GND : Ground.
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for
each bit). The Port B output buffers have symmetrical drive characteristics with both
high sink and source capability. As inputs, Port B pins that are externally pulled low
will source current if the pull-up resistors are activated. The Port B pins are tri-stated
when a reset condition becomes active, even if the clock is not running. Depending
on the clock selection fuse settings, PB6 can be used as input to the inverting
Oscillator amplifier and input to the internal clock operating circuit. Depending on
15 | P a g e
the clock selection fuse settings, PB7 can be used as output from the inverting
Oscillator amplifier. If the Internal Calibrated RC Oscillator is used as chip clock
source, PB[7:6] is used as TOSC[2:1] input for the Asynchronous Timer/Counter2 if
the AS2 bit in ASSR is set.
Port C (PC[5:0])
Port C is a 7-bit bi-directional I/O port with internal pull-up resistors (selected for
each bit). The PC[5:0] output buffers have symmetrical drive characteristics with
both high sink and source capability. As inputs, Port C pins that are externally pulled
low will source current if the pull-up resistors are activated. The Port C pins are tri-
stated when a reset condition becomes active, even if the clock is not running.
PC6/RESET
If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the
electrical characteristics of PC6 differ from those of the other pins of Port C. If the
RSTDISBL Fuse is unprogrammed, PC6 is used as a Reset input. A low level on this
pin for longer than the minimum pulse length will generate a Reset, even if the
clock is not running. Shorter pulses are not guaranteed to generate a Reset.
Port D (PD[7:0]) Port D is an 8-bit bi-directional I/O port with internal pull-up
resistors (selected for each bit). The Port D output buffers have symmetrical drive
characteristics with both high sink and source capability. As inputs, Port D pins that
are externally pulled low will source current if the pull-up resistors are activated.
The Port D pins are tri-stated when a reset condition becomes active, even if the
clock is not running.
AVCC
AVCC is the supply voltage pin for the A/D Converter, PC[3:0], and PE[3:2]. It should
be externally connected to VCC, even if the ADC is not used. If the ADC is used, it
should be connected to VCC through a low-pass filter. Note that PC[6:4] use digital
supply voltage, VCC.
AREF
In the TQFP and VFQFN package, ADC[7:6] serve as analog inputs to the A/D
converter. These pins are powered from the analog supply and serve as 10-bit ADC
channels.
16 | P a g e
3. LDR
A Light Dependent Resistor (LDR) or a photo resistor is a device whose resistivity is
a function of the incident electromagnetic radiation. Hence, they are light sensitive
devices. They are also called as photo conductors, photo conductive cells or simply
photocells. They are made up of semiconductor materials having high resistance.
There are many different symbols used to indicate a LDR, one of the most
commonly used symbol is shown in the figure below. The arrow indicates light falling
on it.
3.1Working Principle of LDR
Photo conductivity is an optical phenomenon in which the materials conductivity is
increased when light is absorbed by the material. A light dependent resistor works
on the principle of photo conductivity. When light falls i.e. when the photons fall on
the device, the electrons in the valence band of the semiconductor material are
excited to the conduction band. These photons in the incident light should have
energy greater than the band gap of the semiconductor material to make the
17 | P a g e
electrons jump from the valence band to the conduction band. Hence when light
having enough energy strikes on the device, more and more electrons are excited to
the conduction band which results in large number of charge carriers. The result of
this process is more and more current starts flowing through the device when the
circuit is closed and hence it is said that the resistance of the device has been
decreased. This is the most common working principle of LDR .
3.2Characteristics of LDR
LDRs are light dependent devices whose resistance is decreased when light falls on
them and that is increased in the dark. When a light dependent resistor is kept in
dark, its resistance is very high. This resistance is called as dark resistance. It can
be as high as 1012 and if the device is allowed to absorb light its resistance will
be decreased drastically. If a constant voltage is applied to it and intensity of light is
increased the current starts increasing. Figure below shows resistance vs.
illumination curve for a particular LDR.
Photocells or LDRs are non linear devices. There sensitivity varies with the
wavelength of light incident on them. Some photocells might not at all response to a
certain range of wavelengths. Based on the material used different cells have
different spectral response curves.
18 | P a g e
phenomenon is called as resistance recovery rate. This property is used in audio
compressors. Also, LDRs are less sensitive than photo diodes and photo transistor.
(A photo diode and a photocell (LDR) are not the same, a photo-diode is a p-n
junction semiconductor device that converts light to electricity, whereas a photocell
is a passive device, there is no p-n junction in this nor it converts light to
electricity).
Types of Light Dependent Resistors: Based on the materials used they are classified
as:
3.3Construction of a Photocell
The structure of a light dependent resistor consists of a light sensitive material
which is deposited on an insulating substrate such as ceramic. The material is
deposited in zigzag pattern in order to obtain the desired resistance and power
rating. This zigzag area separates the metal deposited areas into two regions. Then
the ohmic contacts are made on the either sides of the area. The resistances of
these contacts should be as less as possible to make sure that the resistance mainly
changes due to the effect of light only. Materials normally used are cadmium
sulphide, cadmium selenide, indium antimonide and cadmium sulphonide. The use
of lead and cadmium is avoided as they are harmful to the environment .
19 | P a g e
3.4Recovery rate
When an LDR is brought from a certain illuminating level into total darkness, the
resister does not increase immediately to the dark value. The recovery rate is
specified in k ohm/second and for current LDR types it is more than 200k
ohm/second . The recovery rate is much greater in the reverse direction , e.g. going
from darkness to illumination level of 300 lux , it takes less than 10ms to reach a
resistance which corresponds with a light level of 400 lux . A LDR may be connected
either way round and no special precaution are required when soldering.
3.5Applications of LDR
LDRs have low cost and simple structure. They are often used as light sensors.
They are used when there is a need to detect absences or presences of light like in
a camera light meter. Used in street lamps, alarm clock, burglar alarm circuits, light
intensity meters, for counting the packages moving on a conveyor belt, etc.
20 | P a g e
KEY LDR / PHOTORESISTOR
SPECIFICATIONS
PARAMETER DETAILS
Max power This is the maximum power the device is able to dissipate
dissipation within a given temperature range. Derating may be applicable
above a certain temperature.
21 | P a g e
A typical light dependent resistor, LDR / photoresistor specification may be:
EXAMPLE PHOTORESISTOR
SPECIFICATIONS
22 | P a g e
4. IR SENSOR
Infrared technology addresses a wide variety of wireless applications. The main
areas are sensing and remote controls. In the electromagnetic spectrum, the
infrared portion is divided into three regions: near infrared region, mid infrared
region and far infrared region.
The wavelengths of these regions and their applications are shown below.
The frequency range of infrared is higher than microwave and lesser than visible
light.
For optical sensing and optical communication, photo optics technologies are used
in the near infrared region as the light is less complex than RF when implemented
as a source of signal. Optical wireless communication is done with IR data
transmission for short range applications.
An infrared sensor is an electronic device, that emits in order to sense some aspects
of the surroundings. An IR sensor can measure the heat of an object as well as
detects the motion. These types of sensors measures only infrared radiation, rather
than emitting it that is called as a passive IR sensor. Usually in the infrared
spectrum, all the objects radiate some form of thermal radiations. These types of
radiations are invisible to our eyes, that can be detected by an infrared sensor. The
emitter is simply an IR LED (Light Emitting Diode) and the detector is simply an IR
photodiode which is sensitive to IR light of the same wavelength as that emitted by
the IR LED. When IR light falls on the photodiode, the resistances and these output
voltages, change in proportion to the magnitude of the IR light received.
23 | P a g e
4.1.1 ACTIVE INFRARED SENSORS
Active infrared sensors employ both infrared source and infrared detectors. They
operate by transmitting energy from either a light emitting diode (LED) or a laser
diode. A LED is used for a non-imaging active IR detector, and a laser diode is used
for an imaging active IR detector.
In this types of IR sensors, the LED or laser diode illuminates the target, and the
reflected energy is focused onto a detector. Photoelectric cells, Photodiode or
phototransistors are generally used as detectors. The measured data is then
processed using various signal-processing algorithms to extract the desired
information.
Active IR detectors provide count, presence, speed, and occupancy data in both
night and day operation. The laser diode type can also be used for target
classification because it provides target profile and shape data.
Reflectance Sensors
This type of sensors house both an IR source and an IR detector in a single housing
in such a way that light from emitter LED bounces off an external object and is
reflected into a detector. Amount of light reflected into the detector depends upon
the reflectivity of the surface.
24 | P a g e
This principle is used in intrusion detection, object detection (measure the presence
of an object in the sensors FOV), barcode decoding, and surface feature detection
(detecting features painted, taped, or otherwise marked onto the floor), wall
tracking (detecting distance from the wall), etc.
It can also be used to scan a defined area; the transmitter emits a beam of light into
the scan zone, the reflected light is used to detect a change in the reflected light
thereby scanning the desired zone.
4.2 IR TRANSMITTER
Infrared Transmitter is a light emitting diode (LED) which emits infrared radiations.
Hence, they are called IR LEDs. Even though an IR LED looks like a normal LED, the
radiation emitted by it is invisible to the human eye.The picture of a typical Infrared
LED is shown below.
25 | P a g e
There are different types of infrared transmitters depending on their wavelengths,
output power and response time.
4.3 IR RECEIVER
Infrared receivers are also called as infrared sensors as they detect the radiation
from an IR transmitter. IR receivers come in the form of photodiodes and
phototransistors. Infrared Photodiodes are different from normal photo diodes as
they detect only infrared radiation. The picture of a typical IR receiver or a
photodiode is shown below.
26 | P a g e
Different types of IR receivers exist based on the wavelength, voltage, package, etc.
When used in an infrared transmitter receiver combination, the wavelength of the
receiver should match with that of the transmitter.
IR LED emits infrared light. The Photodiode detects the infrared light. An IC Op
Amp is used as a voltage comparator. The potentiometer is used to calibrate the
output of the sensor according to the requirement.
When the light emitted by the IR LED is incident on the photodiode after hitting an
object, the resistance of the photodiode falls down from a huge value. One of the
27 | P a g e
input of the op amp is at threshold value set by the potentiometer. The other input
to the op-amp is from the photodiodes series resistor. When the incident radiation
is more on the photodiode, the voltage drop across the series resistor will be high.
In the IC, both the threshold voltage and the voltage across the series resistor are
compared. If the voltage across the resistor series to photodiode is greater than that
of the threshold voltage, the output of the IC Op Amp is high. As the output of the
IC is connected to an LED, it lightens up. The threshold voltage can be adjusted by
adjusting the potentiometer depending on the environmental conditions.
The positioning of the IR LED and the IR Receiver is an important factor. When the IR
LED is held directly in front of the IR receiver, this setup is called Direct Incidence. In
this case, almost the entire radiation from the IR LED will fall on the IR receiver.
Hence there is a line of sight communication between the infrared transmitter and
the receiver. If an object falls in this line, it obstructs the radiation from reaching the
receiver either by reflecting the radiation or absorbing the radiation.
5. TRANSISTORS
As one of the significant semiconductor devices, transistor has found use in
enormous electronic applications such as embedded systems, digital circuits and
control systems. In both digital and analog domains transistors are extensively used
for different application usage like amplification, logic operations, switching and so
on. This article mainly concentrates and gives a brief explanation of transistor
application as a switch.
The Bipolar Junction Transistor or simply BJT is a three layer, three terminal and two
junction semiconductor device. Almost in many of the applications these transistors
are used for two basic functions such as switching and amplification.
The name bipolar indicates that two types of charge carriers are involved in the
working of a BJT. These two charge carriers are holes and electrons where holes are
positive charge carriers and electrons are negative charge carriers.
28 | P a g e
The transistor has three regions, namely base, emitter and collector. The emitter is
a heavily doped terminal and emits electrons into the base. Base terminal is lightly
doped and passes the emitter-injected electrons on to the collector. The collector
terminal is intermediately doped and collects electrons from base. This collector is
large as compared with other two regions so it dissipates more heat.
BJTs are of two types NPN and PNP, both functioning is same but differ in terms of
biasing and power supply polarity. In PNP transistor, between two P- type materials
N- type material is sandwiched whereas in case of NPN transistor P- type material
sandwiched between two N- type materials. These two transistors can be configured
into different types like common emitter, common collector and common base
configurations.
Active Mode
In this mode transistor is generally used as a current amplifier. In active mode, two
junctions are differently biased that means emitter-base junction is forward biased
whereas collector-base junction is reverse biased. In this mode current flows
between emitter and collector and amount of current flow is proportional to the
base current.
Cutoff Mode
In this mode, both collector base junction and emitter base junction are reverse
biased. This in turn not allows the current to flow from collector to emitter when the
29 | P a g e
base-emitter voltage is low. In this mode device is completely switched off as the
result the current flowing through the device is zero.
Saturation Mode
In this mode of operation, both the emitter base and collector base junctions are
forward biased. Current flows freely from collector to emitter when the base-emitter
voltage is high. In this mode device is fully switched ON.
The below figure shows the output characteristics of a BJT Transistor. In the below
figure cutoff region has the operating conditions as zero collector output current,
zero base input current and maximum collector voltage. These parameters causes a
large depletion layer which further doesnt allow current to flow through the
transistor. Therefore, the transistor is completely in OFF condition.
30 | P a g e
Similarly, in the saturation region, a transistor is biased in such a way that
maximum base current is applied that results maximum collector current and
minimum collector-emitter voltage. This causes the depletion layer to become small
and to allow maximum current flow through the transistor. Therefore, the transistor
is fully in ON condition.
Hence, from the above discussion, we can say that transistors can be made to work
as ON/OFF solid state switch by operating transistor in cutoff and saturation regions.
This type of switching application is used for controlling motors, lamp loads,
solenoids, etc.
31 | P a g e
5.2TRANSISTOR AS AN AMPLIFIER
32 | P a g e
5.3TRANSISTOR AS A SWITCH
A transistor is used for switching operation for opening or closing of a circuit. This
type solid state switching offers significant reliability and lower cost as compared
with conventional relays. Both NPN and PNP transistors can be used as switches.
Some of the applications use a power transistor as switching device, at that time it
may necessary to use another signal level transistor to drive the high power
transistor.
PNP transistor works same as NPN for a switching operation, but the current flows
from the base. This type of switching is used for negative ground configurations. For
the PNP transistor, the base terminal is always negatively biased with respect to the
emitter. In this switching, base current flows when the base voltage is more
negative. Simply a low voltage or more negative voltage makes transistor to short
circuit otherwise it will be open circuited or high impedance state.
33 | P a g e
In this connection, load is connected to the transistor switching output with a
reference point. When the transistor is turned ON, current flows from the source
through transistor to the load and finally to the ground.
34 | P a g e
6. IMPLEMENTATION
35 | P a g e
36 | P a g e
37 | P a g e
6.3 PROGRAM
For simulation we have used Proteus 8 and Arduino software (integrated
development environment). We have used Arduino for the following purpose:
38 | P a g e
Then in Void Setup() , we define mode of pin as input or output.
digitalWrite(LED1, HIGH);
digitalWrite(LED2, HIGH);
digitalWrite(LED3, HIGH);
progarm
39 | P a g e
int sensorPin = A0;
int sensorValue = 0;
int LED1 = 8;
int LED2 = 9;
int isObstaclePin1 = 2;
int isObstaclePin2 = 3;
int isObstaclePin3 = 4;
int isObstaclePin4 = 5;
int isObstaclePin5 = 6;
int isObstaclePin6 = 7;
void setup() {
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);
pinMode(LED3, OUTPUT);
pinMode(LED4, OUTPUT);
pinMode(LED5, OUTPUT);
pinMode(LED6, OUTPUT);
40 | P a g e
pinMode(isObstaclePin1, INPUT);
pinMode(isObstaclePin2, INPUT);
pinMode(isObstaclePin3, INPUT);
pinMode(isObstaclePin4, INPUT);
pinMode(isObstaclePin5, INPUT);
pinMode(isObstaclePin6, INPUT);
Serial.begin(9600);
digitalWrite(LED1,LOW);
digitalWrite(LED2,LOW);
digitalWrite(LED3,LOW);
digitalWrite(LED4,LOW);
digitalWrite(LED5,LOW);
digitalWrite(LED6,LOW);
void loop() {
sensorValue = analogRead(sensorPin);
Serial.println(sensorValue);
delay(10);
if(sensorValue>=700)
isObstacle1= digitalRead(isObstaclePin1);
if (isObstacle1 ==1)
digitalWrite(LED1, HIGH);
digitalWrite(LED2, HIGH);
digitalWrite(LED3, HIGH);
41 | P a g e
}
else
{ if(isObstacle1==0)
{digitalWrite(LED1, LOW);}
isObstacle2 = digitalRead(isObstaclePin2);
if (isObstacle2 ==1)
digitalWrite(LED2, HIGH);
digitalWrite(LED3, HIGH);
digitalWrite(LED4, HIGH);
else
{digitalWrite(LED2, LOW);}
isObstacle3= digitalRead(isObstaclePin3);
if (isObstacle3 ==1)
digitalWrite(LED3, HIGH);
digitalWrite(LED4, HIGH);
digitalWrite(LED5, HIGH);
else
{digitalWrite(LED3, LOW);}
42 | P a g e
}
isObstacle4 = digitalRead(isObstaclePin4);
if (isObstacle4 ==1)
digitalWrite(LED4, HIGH);
digitalWrite(LED5, HIGH);
digitalWrite(LED6, HIGH);
else
{digitalWrite(LED4, LOW);}
isObstacle5 = digitalRead(isObstaclePin5);
if (isObstacle5 ==1)
digitalWrite(LED5, HIGH);
digitalWrite(LED6, HIGH);
else
{digitalWrite(LED5, LOW);}
isObstacle6 = digitalRead(isObstaclePin6);
if (isObstacle6 ==1)
43 | P a g e
digitalWrite(LED6, HIGH);
else
{digitalWrite(LED6, LOW);}
else{digitalWrite(LED1, LOW);
digitalWrite(LED2, LOW);
digitalWrite(LED3, LOW);
digitalWrite(LED4, LOW);
digitalWrite(LED5, LOW);
digitalWrite(LED6, LOW);}
delay(200);
6.4 SIMULATION
Now we opened Proteus 8 for simulation
First click on isis icon and then search for following elements.
I. Arduino Uno R3
II. Switch
III. Resistor
IV. Led Yellow
V. Torch LDR
44 | P a g e
IR Sensor library is not available in proteus so we have used switch in place of IR
Sensor. Because switch also gives 0 and 1.
After that we opened our program in Arduino software IDE and verify it by clicking
on tick mark in left upper corner. Then copy the location of hex file as given below.
Th
en double click on arduino uno in proteus and paste the file location(copied above)
in program file. Then run the simulation by clicking on leftmost button in left bottom
corner.
45 | P a g e
WHEN AMOUNT LIGHT INTENSITY IS LESS THAN CERTAIN VALUE
46 | P a g e
6.5HARDWARE IMPEMENTATION (PROTOTYPE)
We have used breadboard for the connection.
We first took IR LED and place it in the breadboard then use the jumper wire to
ground the cathode (small terminal) of IR LED and connect the anode(long
terminal) with one of resistor(330 ohm) terminal and connect other terminal of the
resistor to the power(+5 V).
We took Photodiode place it exactly opposite to the IR LED in such a way that both
IR LED and Photodiode face exactly opposite to each other.
47 | P a g e
After that Anode of White LED is connected to the 330 ohm Resistor and cathode is
grounded.
48 | P a g e
Now we took jumper wire to connect collector terminal of the transistor to digital
pin 2 of Arduino and other terminal of 330 ohm Resistor (which is connected to LED)
is conneted to digital pin 3 by jumper wire.
For the LDR circuit , one the LDR terminal is grounded and other terminal is
connected to the 1 Kohm Resistor which is conneted to +5V . Then the terminal of
LDR which is connected to the resistance is connected to the analog pinA0 of
Arduino by jumper wire .
49 | P a g e
7.RESULT AND CONCLUSION
Finally get the result what we wanted.
i. During night when there is vehicle on the road: few LED ahead of vehicle
glow.
ii. During night when there is no vehicle on the road: no LEDs glow.
50 | P a g e
CONCLUSION
In this paper Smart street lighting system is described that integrates new
technologies offering ease of maintenance and energy savings. The proposed
system is appropriate for street lighting in remote as well as urban areas where
traffic is low at times. Since this is a sensor based system, so it is self controlled and
automated system. The system works solely in the darkness, avoiding waste of
energy throughout sunlight hours when the resistance across LDR is low and
microcontroller does not allow LEDs to glow. Sensors enable the system to operate
solely when necessary. System employs highly economical LEDs replacing the
conventional bulbs to ensure correct illumination and assure energy savings.
51 | P a g e
REFERENCES
[1]. M.Abhishek, Syed ajram shah, K.Chetan, K,Arun Kumar, Design and
implementation of traffic flow based street light control system with effective
utilization of solar energy, International journal of Science Engineering and Advance
Technology, IJSEAT, Vol 3, Issue 9, September -2015
[4]. Development of Zigbee based Street Light Control System S.H. Jeong, S.B.
Choi, H.S. Ryoo, D.K. Kim Korea Electro technology Research Institute 142440178X /
062006 IEEE
[5] Manuel Burgos Payan, Fanscisco Javier Correa Moreno and Jesus Manuel
Riquelme Santos, Improving the Energy Efficiency of Street Lighting. A Case in
South of Spain, 9th International Conference on European Energy Market EEM, pp1-8,
2012.
[6] www.enegineersgarage.com
[7] www.elprocus.com
[8] www.electronicshub.com
[9] https://en.wikipedia.org
[10] www.youtube.com
52 | P a g e