Automatic Street Light Control
Automatic Street Light Control
Automatic Street Light Control
The purpose of this project to design a system that controls the intensity of an LED light
source by using a microcontroller which controls the light intensity and ON/OFF based on the
ambient light present in the surrounding.
The motivation for this project is the rampant waste of energy in todays world on account
of lighting, be it indoor or outdoor in spite of the fact that we are causing a lot of pollution
and also depleting the natural non-renewable energy sources to get that power. Our goal is to
design a system that at first utilises the least of electrical energy among the light emitting
sources and then to give a feedback control to the light so that it will turn ON only when
required automatically. This will reduce human effort as well as eliminate use of manpower
to manually turn ON & OFF the lights in large light installations like streetlights thereby
reducing the cost of operation of the lights as well.
Most of the outdoor/indoor lights in India are HID (High Intensity Discharge) Lamps
used for outdoor lighting like streetlights, floodlights etc. and CFL (Compact Fluorescent
Lamp) used for domestic lightings which give out approximately 60 lumens/watt and 40
lumens/watt respectively. In our project we are using very efficient SMD LEDs which give
out approximately 100 lumens/watt, thereby giving an increased energy efficiency of 50%.
The LEDs have a self-life of more than 50,000 hours in rated condition which is almost five
times the self-life of most of other sources of lights currently used thus giving an economic
edge over than the other conventional sources of light.
In addition to that, a microcontroller is also used that takes reading from a LDR(Light
Dependent Resister) sensor which senses the ambient lighting of the surrounding and
accordingly controls both the ON/OFF function as well as the intensity control of the LED
light attached to it. The microcontroller also does the work of dimming the Light
automatically at a predefined time thereby giving an energy conservation of around
25% - 35% depending upon the amount of time the light remains in the dimmed condition
and the value of dimming as specified by the user.
ABBREVIATIONS :
Abbreviations
HID
LED
CFL
LDR
SMD
MOS
SMPS
OpAmp
MOSFET
RTC
AT
PIR
IR
C
P
I2C
USB
ADC
DAC
PWM
Full Form
High Intensity Discharge
Light Emitting Diode
Compact Fluorescent Light
Light Dependent Resistor
Surface Mounted Device
Mosfet
Switch Mode Power Supply
Operational Amplifier
Metal Oxide Semiconductor Field Effect Transistor
Real Time Clock
Atmel
Passive Infra-Red
Infra-Red
Micro Controller
Micro Processor
Serial Port
Universal Serial Bus
Analog to Digital Converter
Digital to Analog Converter
Pulse Width Modulation
LIST OF FIGURES
FIGURE
Page
2.2. LDR.................................................................................................................
11
11
11
13
13
2.7. Resistor............................................................................................................
14
14
15
15
2.11. DIODE...........................................................................................................
16
17
18
18
18
20
21
22
23
24
25
26
27
30
LIST OF TABLES
TABLE
1. PARTS LIST......................................................................................................
Page
34
2. Cost of components...........................................................................................
35
CONTENTS
Chapter - 1
Introduction
1.1
Introduction..........................................................................................................
1.2
Motivation............................................................................................................
1.3
Literature Survey.................................................................................................
1.4
Technical Objective.............................................................................................
1.5
Global Context.........................................................................................
1.5.2
Economic Context....................................................................................
1.5.3
Environmental Context............................................................................
1.5.4
Social Context..........................................................................................
1.6
Description...............................................................................................
1.6.2
Distinction................................................................................................
1.6.3
Evaluation................................................................................................
1.7
Chapter 2
System Design
2.1
Embedded System................................................................................................
2.2
2.3
Description of Components................................................................................
2.4
LDR...................................................................................................................
2.4.1
Recovery Rate........................................................................................
2.5
Power Supply....................................................................................................
2.6
Voltage Regulator..............................................................................................
2.7
Resistor.............................................................................................................
2.8
Capacitor...........................................................................................................
2.9
Diode.................................................................................................................
2.10
LED...................................................................................................................
2.11
Connector..........................................................................................................
2.11.1
2.12
ATMEGA328....................................................................................................
2.12.1
Pin Configuration.................................................................................
2.12.2
Pin Description.....................................................................................
Chapter 3
System Modelling
3.1
Circuit Diagram.................................................................................................
3.2
3.3
3.4
Introduction..........................................................................................
3.4.2
Duty Cycle...........................................................................................
3.4.3
PWM Resolution..................................................................................
3.5
Flow Chart.........................................................................................................
3.6
Chapter 4
Analysis & Evaluation
4.1
Advantages.........................................................................................................
4.2
Precautions.........................................................................................................
4.3
Area of Application............................................................................................
4.4
Summary............................................................................................................
4.5
Chapter 5
Conclusion & Future work
5.1
Conclusion.........................................................................................................
5.2
Future Work.......................................................................................................
Chapter 6
Reference...........................................................................................................
Chapter 7
7.1
Parts List............................................................................................................
7.2
Cost of Components...........................................................................................
Appendices
Chapter -1
INTRODUCTION
1.1
Introduction
Most of the natural energy resources that we depend upon today like coal, natural gas,
petroleum etc. are predicted to be depleted completely by 2075. Hence there is an alarming
situation ahead of us and a daunting task to conserve these natural resources as much as
possible. This can be done in two ways, either by finding alternative sources to supply the
power or by reducing energy consumption of present sources. This project hereby supports
the second statement.
Automatic 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 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.
A light dependent sensor is interfaced to the AtmelATMega 328 microcontroller it is used
to track the sun light and when the sensors goes dark the led will be made on and
when the sensor founds light the led will be made OFF.
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.
Automatic Streetlight needs no manual operation of switching ON and OFF. The system
itself detects whether there is need for light or not. When darkness rises to a certain value
then automatically streetlight is switched ON and when there is other source of light, the
street light gets OFF. The extent of darkness at which the street light to be switched on can
also be tailored using the potentiometer provided in the circuit.
1.2
Motivation
The motivation of this project came from the observation of the rampant energy wastage
due to gross negligence of human. The lights comprise a major portion of energy
requirements in todays domestic and corporate environment including the public amenities
like streetlights etc.
While some most of these lighting systems are controlled manually, some have started
using timers, especially streetlights to control the ON and OFF of the lights, but still lies a big
problem in subtropical region like India where there is a large difference in sunrise and sunset
time from winter to summer, therefore using only a timer in such conditions is useless.
Therefore we thought of using a Light Sensor and a C to do it all for us automatically.
1.3
Literature Survey
The design for a smart traffic control system is one the most recent trend nowadays.
Various systems have been proposed in the literature. Many techniques like SCADA & PLC,
RFID, IR sensor & microcontroller, smart phones (Bluetooth, WIMAX, and WIFI), smart
Cameras, Data acquisitions stations & inductive coils, Singposting systems, weather stations,
Tele-Vigilance system and Smart-Signal (Systematic Monitoring of arterial road traffic
signals) have been used. SCADA and PLC has been used to design smart traffic control
system in [8].
This system is used to measure the traffic density by counting the number of vehicles in
each lane and their weight then park in automated in parking or diverge them accordingly.
RFID has been used to design intelligent traffic lights in [9]. This system provides quality of
service to Emergency vehicles and improves the accuracy of Automatic Traffic Light
Violation Detection system as well as helps to trace out the stolen vehicles using RFID. IR
sensors and microcontroller has been used to design Intelligent Traffic Light and Density
Control in [10]. This system somehow reduces the possibility of traffic jams caused by traffic
lights. Smart phones have been used to design an Efficient Real-Time Traffic Sign
Recognition System for Intelligent Vehicles [11].
The traffic sign recognition system is one kind of driving assistance system (DAS) which
is used to automatically inform the driver the traffic sign information by a head up display
(HUD), monitor, or speaker device. Smart Cameras have been used to design Vehicles
tracking and classification using traffic zones in a hybrid scheme for intersection traffic
management in [12]. Data acquisitions stations & inductive coils, Singposting systems,
weather stations, Tele-Vigilance system has been given in Wireless Sensor Network-based
system for measuring and monitoring road traffic [13].
Data acquisitions stations have been used to get the data from stations and inductive coils
has been used to detect the presence of vehicles on the roads. Singposting systems have been
designed to give all information about what is happening along the road. They are made of
digital panels and are connected to the central control with the help of optical fibre cables.
Weather stations have been designed to prevent risky situations. In this system sensors are
equipped with barometers, hygrometers and thermometers. Tele Vigilance system has been
used to monitor the roads with the help of cameras deployed along the road and the
emergency services are activated in a few minutes. Smart Signal has been used to design
Systematic monitoring of Arterial road traffic signals in [14]. This system has been used to
collect and archive event-based traffic signal data simultaneously at multiple intersections.
Using the event-based traffic data, SMART-SIGNAL can generate time-dependent
performance measures for both individual intersections and arterials including intersection
queue length and arterial travel time.
1.4
Technical Objective
To reduce the energy consumption of the luminaries by using LED instead of other
conventional sources.
To further minimise the energy consumption by making an automatic control system
that controls the ON and OFF and Dimming of the light.
To eliminate power loss due to human error.
To reduce human effort.
The main consideration in the present field technologies are Automation, Power
consumption and cost effectiveness. Automation is intended to reduce man power with the
help of intelligent systems. Power saving is the main consideration forever as the source of
the power(Thermal, Hydro etc.,)are getting diminished due to various reasons.
The main aim of the project is Automatic street power saving system with LDR; this is to
save the power. We want to save power automatically instead of doing manual. So its easy to
make cost effectiveness. This saved power can be used in some other cases. So in villages,
towns etc we can design intelligent systems for the usage of street lights.
1.5
The world we are living in today relies a great deal on the natural resources to fulfil its
energy requirements. The extraction of these natural resources from both renewable as well
as non-renewable sources takes a lot of capital. Thus as the cost of energy is growing day by
day, it is now of paramount requirement to save the expenditure on the energy by saving it as
much and wherever possible. Using LEDs gives two advantages over other conventional light
sources 1. It gives more lumens per watt than other light sources, so fewer watts are
consumed to gain the required illumination, eventually saving money. 2. It has a much longer
self-life so the capital spent on LED luminaries will not require further investment.
The use of smart LEDs will conserve enough power per year in a country like India that
would be sufficient to light all the houses in India those who do not have a light at their
home. This type of systems are specially needed to run on off grid energy supplies like solar
power and hydel power from flowing canals or rivers as these type of light installations
consume very less energy and therefore are sustainable by the energy supplied by the
renewable sources. This system will on a whole reduce the burden on the government to
spend more on energy which will conserve more of the taxpayers money which can be
further utilised for the betterment of the society.
1.6
1.6.1 Description
Street lights are the major requirement in todays life of transportation for safety purposes
and avoiding accidents during night. Despite that in todays busy life no one bothers to switch
it off/on when not required. The project introduced here gives solution to this by eliminating
manpower and reducing power consumption. This requires three basic components i.e. LDR,
Sensors and microcontroller. During daytime there is no requirement of street lights so the
LDR keeps the street light off until the light level is low or the frequency of light is low, the
resistance of the LDR is high. Thus the street lights do not glow.
As soon as the light level goes high or if light falling on the device is of high enough
frequency, photons absorbed by the semiconductor give bound electrons enough energy to
jump into the conduction band. The resulting free electron (and its hole partner) conduct
electricity, thereby lowering resistance. Now the circuitry goes in on condition and starts
working.
1.6.2 Distinction
This system demonstrates the usage of the LEDs (light emitting diodes) as the light
source and its variable intensity control, according to the requirement. LEDs consume less
power and its life time is very high, as compared to the conventional HID lamps.
Most important and interesting feature is that LED intensity can be controlled according
to the requirement during non-peak hours which is not feasible in HID lamps. Moreover, a
light sensing device LDR (Light Dependent Resistance) is used to sense the light, whose
resistance reduces drastically in the day light to disable the control power to the LEDs.
A cluster of LEDs are used to form a street light. The Arduino contains programmable
instructions which controls the intensity of lights based on the PWM (Pulse width
modulation) signals generated.
1.6.3 Evaluation
Needs no manual operation for switching ON and OFF. When there is a need of light it
automatically switches ON. When darkness rises to a certain level then sensor circuit gets
activated and switches ON and when there is other source of light i.e. daytime, the street light
gets OFF. The sensitiveness of the street light is also adjusted.
By employing this circuit, energy consumption can be reduced considerably as the light
switches ON or OFF automatically in appropriate time. Moreover, errors which occur due to
manual operation also can be eliminated completely. The Automatic street light controller
unit fabrication is cost-effective with good sensitivity and high reproducibility. Moreover, the
construction of the circuit is also simple so that it can be done easily as it involves locally
available components. The circuit is designed in such a way that the extent of darkness at
which the light has to switch ON or OFF also can be tailored whenever it is needed. It can be
used for other purposes like garden lighting, balcony lighting etc.
1.7
Organisation of Thesis
Chapter - 2
System Design
2.1
EMBEDDED SYSTEM
Embedded systems are designed to do some specific task, rather than be a general-
purpose computer for multiple tasks. Some also have real time performance constraints that
must be met, for reason such as safety and usability; others may have low or no performance
requirements, allowing the system hardware to be simplified to reduce costs.
An embedded system is not always a separate block - very often it is physically built-in to
the device it is controlling. The software written for embedded systems is often called
firmware, and is stored in read-only memory or flash convector chips rather than a disk drive.
It often runs with limited computer hardware resources: small or no keyboard, screen, and
little memory.
Wireless communication has become an important feature for commercial products and a
popular research topic within the last ten years. There are now more mobile phone
subscriptions than wired-line subscriptions. Lately, one area of commercial interest has been
low-cost, low-power, and short-distance wireless communication used for \personal wireless
networks." Technology advancements are providing smaller and more cost effective devices
for integrating computational processing, wireless communication, and a host of other
functionalities. These embedded communications devices will be integrated into applications
ranging from homeland security to industry automation and monitoring. They will also
enable custom tailored engineering solutions, creating a revolutionary way of disseminating
and processing information. With new technologies and devices come new business
activities, and the need for employees in these technological areas. Engineers who have
knowledge of embedded systems and wireless communications will be in high demand.
Unfortunately, there are few adorable environments available for development and classroom
use, so students often do not learn about these technologies during hands-on lab exercises.
The communication mediums were twisted pair, optical fibre, infrared, and generally wireless
radio.
A combination of hardware and software which together form a component of
a larger machine is known as embedded system.
2.2
2.3
DESCRIPTION OF COMPONENTS
In this project the list of hardware components used are given below:
LDR (Light dependent resistor)
Power supply
Voltage regulator
ATmega328 Microcontroller
10
Capacitor
Resistor
Diode
LED (Light emitting diode)
Mosfet
Connector
2.4
LDRs or Light dependent resistors are very useful especially in light/dark sensor circuits.
Normally the resistance of an LDR is very high, sometimes as high as 1000000 ohms, but
when they are illuminated with light resistance drops dramatically. Electronic onto sensors
are the devices that alter their electrical characteristics, in the presences of visible or invisible
light. The best-known devices of this type are the light dependent resistor (LDR), the photo
diode and the phototransistors.
Light dependent resistors as the name suggests depend on light for the variation of
resistance.
Depending on the exposure of light the resistance can fall down to value of 500 ohms.
The power ratings are usually smaller and are in the range 50mW to 0.5W. Though very
sensitive to light, the switching time is very high and hence cannot be used for high
frequency applications. They are used in chopper amplifiers. Light dependent resistors are
available as disc 0.5cm to 2.5cm. The resistance rises to several Mega ohms under dark
conditions.
11
The below figure shows that when the torch is turned on, the resistance of the LDR falls,
allowing current to pass through it is shown in figure.
The basic construction and symbol for LDR are shown in above figures respectively. The
device consists of a pair of metal film contacts separated by a snakelike track of cadmium
sulphide film, designed to provide the maximum possible contact area with the two metal
films. The structure is housed in a clear plastic or resin case, to provide free access to external
light. Practical LDRs are available in variety of sizes and packages styles, the most popular
size having a face diameter of roughly 10mm. practical LDR is shown in below figure.
12
When an LDR is brought from a certain illuminating level into total darkness, the
resistance does not increase immediately to the dark value. The recovery rate is specified
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 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 precautions are required when
soldering.
Darkness: Maximum resistance, about 1 Mohm.
Very bright light: Minimum resistance, about 100 ohm.
The LDR is a variable resistor whose resistance decreases with the increase in light
intensity. Two cadmium sulphide (cds) photoconductive cells with spectral response similar
to that of the human eye. The cell resistance falls with increasing light intensity. Some of its
features:
2.5
High reliability.
Light weight.
Wide spectral response.
Wide ambient temperature range.
POWER SUPPLY
The 12V adapter is connected to the power jack to give the power supply to the relay.
Another 220V power supply connected to the load. To make a 5V Dc regulated power supply
we connected a voltage regulator which give the power supply to the ATmega8
microcontroller and peripheral items. In the ATmega8 microcontroller the VCC pin is 7th and
GND pin is 8th. Two led is also interface to show the status of the power. The 12V adapter
image shown in below figure.
13
2.6
VOLTAGE REGULATOR
Usually, we start with an unregulated power supply ranging from 9volt to 12volt DC. To
make a 5volt power supply, IC 7805 voltage regulator as shown in figure has been used.
The IC7805 is simple to use. Simply connect the positive lead form unregulated DC
power supply (anything from 9VDC to 12VDC) to the input pin, connect the negative lead to
the common pin and then turn on the power, a 5 volt supply from the output pin will be
gotten.
2.7
RESISTOR
A resistor is a passive two-terminal electrical component that implements electrical
resistance as a circuit element. Resistors act to reduce current flow, and, at the same time, act
14
to lower voltage levels within circuits. The current through a resistor is in direct proportion to
the voltage across the resistor's terminals. This relationship is represented by Ohm's law:
I = V/R
where I is the current through the conductor in units of amperes, V is the potential
difference measured across the conductor in units of volts, and R is the resistance of the
conductor in units of ohms (symbol: ).
The ratio of the voltage applied across a resistor's terminals to the intensity of current in
the circuit is called its resistance, and this can be assumed to be a constant (independent of
the voltage) for ordinary resistors working within their ratings.
Resistors are common elements of electrical networks and electronic circuits and are
ubiquitous in electronic equipment. Practical resistors can be composed of various
compounds and films, as well as resistance wires (wire made of a high-resistivity alloy, such
as nickel-chrome). Resistors are also implemented within integrated circuits, particularly
analog devices, and can also be integrated into hybrid and printed circuits.
The electrical functionality of a resistor is specified by its resistance: common
commercial resistors are manufactured over a range of more than nine orders of magnitude.
When specifying that resistance in an electronic design, the required precision of the
resistance may require attention to the manufacturing tolerance of the chosen resistor,
according to its specific application. The temperature coefficient of the resistance may also be
of concern in some precision applications. Practical resistors are also specified as having a
maximum power rating which must exceed the anticipated power dissipation of that resistor
15
2.8
CAPACITOR
A capacitor (originally known as a condenser) is a passive two-terminal electrical
component used to store energy electrically in an electric field. The forms of practical
capacitors vary widely, but all contain at least two electrical conductors (plates) separated by
a dielectric (i.e., insulator). The conductors can be thin films of metal, aluminum foil or disks,
etc. The 'non-conducting' dielectric acts to increase the capacitor's charge capacity. A
dielectric can be glass, ceramic, plastic film, air, paper, mica, etc. Capacitors are widely used
as parts of electrical circuits in many common electrical devices. Unlike a resistor, a capacitor
does not dissipate energy. Instead, a capacitor stores energy in the form of an electrostatic
field between its plates.
When there is a potential difference across the conductors (e.g., when a capacitor is
attached across a battery), an electric field develops across the dielectric, causing positive
charge (+Q) to collect on one plate and negative charge (-Q) to collect on the other plate. If a
battery has been attached to a capacitor for a sufficient amount of time, no current can flow
through the capacitor.
However, if an accelerating or alternating voltage is applied across the leads of the capacitor, a
displacement current can flow.
An ideal capacitor is characterized by a single constant value for its capacitance.
Capacitance is expressed as the ratio of the electric charge (Q) on each conductor to the
16
potential difference (V) between them. The capacitance is greater when there is a narrower
separation between conductors and when the conductors have a larger surface area. In
practice, the dielectric between the plates passes a small amount of leakage current and also
has an electric field strength limit, known as the breakdown voltage. The conductors and
leads introduce an under sired inductance and resistance.
Capacitors which have a value of one Farad or more tend to have a solid dielectric and as
One Farad is such a large unit to use, prefixes are used instead in electronic formulas with
capacitor values given in micro-Farads (F), nano-Farads (nF) and the pico-Farads (pF).
2.9
DIODE
A diode is a simple electrical device that allows the flow of current only in one direction.
So it can be said to act somewhat like a switch. A specific arrangement of diodes can convert
AC to pulsating DC, hence it is sometimes also called as a rectifier. It is derived from "di-ode
" which means a device having two electrodes. The symbol of a p-n junction diode is shown
below, the arrowhead points in the direction of conventional current flow. The p-n junction is
a basic building block in any semiconductor device. It is formed by joining a p type (intrinsic
semiconductor doped with a trivalent impurity) and n type semiconductor (intrinsic
semiconductor doped with a pentavalent impurity) together with a special fabrication
technique such that a p-n junction is formed. Hence it is a device with two elements, the ptype forms anode and the n-type forms the cathode. These terminals are brought out to make
the external connections.
The n side will have large number of electrons and very few holes (due to thermal
excitation) whereas the p side will have high concentration of holes and very few electrons.
Due to this a process called diffusion takes place. In this process free electrons from the n
side will diffuse (spread) into the p side and combine with holes present there, leaving a
17
positive immobile (not moveable) ion in the n side. Hence few atoms on the p side are
converted into negative ions. Similarly few atoms on the n-side will get converted to positive
ions. Due to this large number of positive ions and negative ions will accumulate on the nside and p-side respectively. This region so formed is called as depletion region. Due to the
presence of these positive and negative ions a static electric field called as "barrier potential"
is created across the p-n junction of the diode. It is called as "barrier potential" because it acts
as a barrier and opposes the flow of positive and negative ions across the junction.
2.11 CONNECTOR
Connectors are used to join subsections of circuits together. Usually, a connector is used
where it may be desirable to disconnect the subsections at some future time: power inputs,
peripheral connections, or boards which may need to be replaced. There are different types of
connectors, in this project we used few of them.
2.11.1 Pin Header Connector
Pin header connectors comprise several different means of connection. Generally, one
side is a series of pins which are soldered to a PCB, and they can either be at a right-angle to
the PCB surface (usually called straight) or parallel to the boards surface (confusingly
18
referred to as right-angle pins). Such connectors come in a variety of pitches, and may have
any number of individual rows of pins.
The most commonly seen pin headers are .1" single or double row connectors. These
come in male and female versions, and are the connectors used to connect PCB boards and
shields together.
The Atmel 8-bit AVR RISC-based microcontroller combines 32 KB ISP flash memory
with read-while-write capabilities, 1 KB EEPROM, 2 KB SRAM, 23 general purpose I/O
lines, 32 general purpose working registers, three flexible timer/counters with compare
modes, internal and external interrupts, serial programmable USART, a byte-oriented 2-wire
serial interface, SPI serial port, 6-channel 10-bit A/D converter (8 channels in TQFP
and QFN/MLF packages), programmable watchdog timer with internal oscillator, and five
19
software selectable power saving modes. The device operates between 1.8-5.5 volts. The
device achieves throughputs approaching 1 MIPS per MHz.
High-performance, Low-power AVR 8-bit Microcontroller
Advanced RISC Architecture
131 Powerful Instructions Most Single-clock Cycle Execution
32 x 8 General Purpose Working Registers
Fully Static Operation
Up to 16 MIPS Throughput at 16 MHz
On-chip 2-cycle Multiplier
Nonvolatile Program and Data Memories
32K Bytes of In-System Self-Programmable Flash
Endurance: 10,000 Write/Erase Cycles
Optional Boot Code Section with Independent Lock Bits
In-System Programming by On-chip Boot Program
True Read-While-Write Operation
1024 Bytes EEPROM
Endurance: 100,000 Write/Erase Cycles
2K Byte Internal SRAM
Peripheral Features
Two 8-bit Timer/Counters with Separate Prescalers and Compare
Modes
One 16-bit Timer/Counter with Separate Prescaler, Compare Mode,and
Capture Mode
Real Time Counter with Separate Oscillator
Four PWM Channels
20
2.12.2
Pin Descriptions
Chapter 3
21
SYSTEM MODELLING
3.1
This is the total circuit diagram sketching. We will define/ discuss this in three parts:
Part 1: Power input circuit.
Part 2: Operation in LDR and Microcontroller.
Part 3: Controlling LED intensity with Mosfet and PWM.
In this section we came to know that how the parts connected and how they work. The
three most important sections will describe through this process. In this circuit diagram we
used different electronics parts. They are following: Resistors, Transistor, Capacitors, voltage
regulator, LDR, LED, power supply, microcontroller and Mosfet.
3.2
22
In the beginning of making this project we collect our entire component as we make a list.
In this power supply section 220v AC passes through a step down transformer to get 24v AC.
A bridge rectifier with four 1N4007 diodes is responsible for getting 24v DC from 24v AC.
Capacitor C1(2200F) is connected with the input terminal of IC LM7812 and C2(0.1F)
is connected with input of IC LM7805. C3(1F) is connected parallel to C1 and C2. R1
resistor 1K connected in series with a LED which indicate the power supply.
The 24v DC is converted to 12v DC by regulator LM7812 and given to Mosfet. Again
12v DC is converted into 5v DC by regulator LM7805 and given to microcontroller.
Capacitor C4 is used for short circuit protection to microcontroller. The regulated 5V DC
supply connected with LDR and ATmega8 microcontroller.
3.3
its resistivity decrease, and when darkness around the LDR resistivity increases. LDR is
connected to 5v pin and other end is connected to A0 pin which is an analog to digital
converter.
23
When light falls on LDR its resistance decreases. Thus the voltage across pin A0 increases. So
the analog signal from LDR is converted to digital equivalent of the order 0-255 for voltage 0-5v
and given to microcontroller. It is then compared with the lower and higher limit specified in the
program of microcontroller.
According to the equivalent signal the microcontroller generates PWM signals at pin D7
which is given to the gate of Mosfet. That is for value less than lower limit it generates a PWM
signal with modulation index 100% and for value more than upper limit it generates a modulation
index of 0%.
3.4
3.4.1 Introduction
To control the brightness of an LED we can vary the power which is sent to the LED, for
example using a potentiometer (variable resistor), the more power the LED receives the
brighter it is, the less power it receives the dimmer it is. Microcontrollers are digital, meaning
they only have two power states, on and off. Although it is possible to supply a varying
24
power from a microcontroller (using a Digital to Analogue Convertor (DAC)) this usually
requires an additional chip. PWM provides the ability to simulate varying levels of power
by oscillating the output from the microcontroller.
If, over a short duration of time, we turn the LED on for 50% and off for 50%, the LED
will appear half as bright since the total light output over the time duration is only half as
much as 100% on. The important factor here is the duration, if we turn the light on and off
too slowly the viewer will see the flashing of the LED not a constant light output which
appears dimmer. The pulsing width (in this case 50%) is the important factor here. By
varying (or modulating) the pulsing width we can effectively control the light output from
the LED, hence the term PWM or Pulse Width Modulation.
When using PWM its important to consider how slowly we can flash the LED so that
the viewer does not perceive the oscillation. The eyes inability to see rapid oscillations of
light is caused by our persistence of vision which means, in very simple terms, we see the
light as on even after it has turned off. This technique is how televisions display a seemingly
moving picture which is actually made up of a number of different still frames displayed one
after the other very rapidly. The minimum speed of an LED oscillating which can be seen by
25
the human eye varies from person to person. However, for the purposes of this article, we will
use a minimum speed of 50Hz.
The accuracy with which we can control the duty-cycle is known as the PWM
resolution. The higher our PWM resolution is, the more levels of brightness we can display.
However, since the duty-cycle is fixed at 50Hz more resolution requires finer timing from
the microcontroller. The faster the microcontroller, the smaller durations it can time. Another
26
limiting factor is the code execution, the microcontroller must not only time the interrupt
which causes the pulse generation, but also run the code which controls the LED output,
which must complete before the next interrupt is called. In addition, you probably want your
microcontroller to be performing tasks other than LED PWM brightness control, so there has
to be some spare execution time between interrupts to do all of the other more general
processing tasks.
With PWM control of LEDs the primary advantage of higher PWM resolutions is that it
results in a smaller difference between off and the lowest possible brightness from the LED.
For example if our duty-cycle is 20,000 microseconds (50Hz) and our resolution is only
10,000 microseconds, the difference between off and the lowest possible brightness will be
50% of the total possible brightness. At a resolution of 2,000 microseconds the difference
would be 10% and so on. Overall the PWM resolution dictates the number of brightness
levels we can support between completely off (0%) and completely on (100%). Again, the
higher the resolution, the more timing accuracy and processing overhead is required.
Whilst it is perfectly possible to get PWM controls to work with LEDs using pure guess
work, calculating the desired optimum values makes more efficient use of the available
processor resources allowing you to both do more with the microcontroller and/or control
27
more LEDs simultaneously from the same chip. The same techniques shown here for LEDs
can also be used to control motors, analogue meter displays, incandescent light bulbs, etc.
3.5
Flow Chart
3.6
( off )
But as engineering students, it is our task to reduce human effort, so we took the time
consuming and tedious task of setting the max. and min. values from sensor to the
Microcomputer by this auto tune feature.
By auto tune feature, it also becomes easy to install the lights in any ambient lighting
conditions be it indoors or outdoors without manually putting in the ambient lighting
values.
28
Chapter 4
ANALYSIS & EVALUATION
4.1
Advantages :
Complete elimination of manpower.
Reduced energy costs
Sensor
29
LDRs are sensitive, inexpensive and readily available devices. They have good power
4.2
Precautions :
4.3
4.4
No
Area of Application :
It can be used in some clocks, alarms, and other electronic devices that are
dependent on sunlight.
We can use it outside of house, corridors or industry area, which helps to save
power.
It can be used as a street light.
In sea off-shore side we can use it as a dangerous sign.
SUMMARY
1. This project Automatic Street Management System is a costYes
effective, practical ecofriendly and the safest way to save energy. It clearly tackles the two problems that
world is facing today, saving of energy and also disposal of incandescent lamps, very
efficiently. According to statistical data we can save more that 40 % of electrical
energy that is now consumed by the highways.
2. Initial cost and maintenance can be the draw backs of this project. With the advances
in technology and good resource planning the cost of the project can be cut down and
also with the use of good equipment the maintenance can also be reduced in terms of
periodic checks. The LEDs have long life, emit cool light, donor have any toxic
material and can be used for fast switching. For these reasons our project presents far
more advantages which can over shadow the present limitations. Keeping in view the
long term benefits and the initial cost would Make
never be
a problem as the investment
Light
Level = 255
return time is very less.
3. The project has scope in various other applications
for providing lighting in
( on like
)
industries, campuses and parking lots of huge shopping malls. This can also be used
for surveillance in corporate campuses and industries.
START
30
4.5
find a solution to save power. In this project the first thing to do, is to prepare the inputs
and
STOP
outputs of the system to control the lights of the street. The prototype as shown in Fig. 4.1 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.
Chapter 5
CONCLUSION AND FUTURE WORK
5.1
Conclusion
This paper elaborates the design and construction of automatic light control system
circuit. Circuit works properly to turn lamp ON/OFF. LDR sensor is the main conditions in
working the circuit. If the 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 lights have 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.
Finally this control circuit can be used in various purposes.
31
5.2
Future work
1. The above project we can develop solar street light system with Automatic street light
controller. The system can be powered from a battery, which can be charged during
day time by harvesting the solar energy through a solar cell. The solar energy
harvested from sunlight can be stored, inverted from DC voltages to AC voltage using
sun tie converter.
2. The AC voltage can be stepped down rectified and using the circuit. The above
mentioned strategy will enable us to harvest solar energy in an effective way for the
operation of the circuit and for powering the street light also.
3. Pole damage detection with the addition of a suitable sensor.
4. With the added intelligence in the lamp, you can add further features to increase HID
lamp life, such as softer start-up and protection against re-igniting an already hot HID
lamp.
REFERENCE
[1] Jun Zheng and Abbas Jamalipour, Introduction to Wireless Sensor Networks, Book:
Wireless Sensor Networks: A Networking Perspective, Wiley-IEEE Press, 2009.
[2] https://www.sparkfun.com/products/242
[3] http://www.vegarobokit.com/index.php?route=product/product&product_id=407
[4] http://arduino.cc/en/Main/arduinoBoardDuemilanove
[5] Datasheet XBee/XBee-PRO OEM RF Modules. Product Manual v1.xAx - 802.15.4
Protocol, For OEM RF Module Part Numbers: XB24-...-001, XBP24-...-001.
[6] http://www.nowsms.com/faq/what-is-a-gsm-modem
[7] http://arduino.cc/en/Main/ArduinoEthernetShield
32
[8] Mohit Dev Srivastava, Prerna, Shubhendu Sachin, Sumedha Sharma, Utkarsh Tyagi,
Smart Traffic Control System using PLC and SCADA International Journal of Innovative
Research in Science, Engineering and Technology, Vol. 1, Issue 2, December 201
[9] Harpal Singh, Krishan Kumar, Harbans Kaur, Intelligent Traffic Lights Based on RFID,
International Journal of Computing & Business Research, Proceedings of I-Society 2012
[10] Ms Promila Sinhmar, Intelligent Traffic Light and Density Control using IR Sensors
and Microcontroller, International Journal of Advanced Technology & Engineering
Research (IJATER) ISSN NO: 2250-3536 VOLUME 2, ISSUE 2, MARCH 2012.
[11] Ching-Hao Lai, Chia-Chen Yu, An Efficient Real-Time Traffic Sign Recognition
System for Intelligent Vehicles with Smart Phones, 2010 International Conference on
Technologies and Applications of Artificial Intelligence
[12] Peyman Babaei, Vehicles tracking and classification using traffic zones in a hybrid
scheme for intersection traffic management by smart cameras, 2010 IEEE
[13] Ivn Corredor, Ana-B Garca, Jos-F Martnez Pedro Lpez, Wireless Sensor Networkbased system for measuring and monitoring road traffic, Wireless Sensor Network-based
system for measuring and monitoring road traffic 2008
[14] Henry X. Liu, Wenteng Ma, Heng Hu, Xinkai Wu and Guizhen Yu, SMART-SIGNAL:
Systematic Monitoring of Arterial Road Traffic Signals , Proceedings of the 11th
International IEEE Conference on Intelligent Transportation Systems Beijing, China, October
12-15, 2008
[15]The 8051 Microcontroller and Embedded systems by Muhammad Ali Mazidi and Janice
Gillispie Mazidi , Pearson Education.
[16]Electronic Devices and Circuit Theory, Boylestad.
[17]Sensors: Advancements in Modeling, Design Issues, Fabrication and Practical by Subhas
Chandra
[18]Handbook of Modern Sensors: Physics, Designs, and Applications by Jacob Fraden.
[19]The 8051 Microcontroller by Kenneth J. Ayala,
[20]Hand Book of Electronics by A.K. Maini.
[21]Digital Systems Principles and Application by Ronald Ltocci (Sixth Addition).
[22]Digital Design by Moris Mano (Second Addition),
33
Internet sources:
www.atmel.com,
www.beyondlogic.org,
www.wikipedia.org,
www.howstuffworks.com,
www.alldatasheets.com,
www.wikipedia.com.
http://www.electronics-tutorials.ws/io/io_5.html
http://www.kanda.com/blog/microcontrollers/avr-microcontrollers/avr-microcontroller/
http://www.circuitstoday.com/category/voltage-regulators
7.1
PARTS LIST
The name of parts used in this project are given below:
NAME OF
SPECIFICATION
QUANTITY
2200F
0.1F
10F
1K
220
1N4007
2835 LED chip
12mm
LM7805
LM7812
IRF 540 N-channel
ATMEL ATMEGA328
01
02
01
01
01
04
01
01
01
01
01
01
COMPONENTS
Capacitors
Resistors
Diodes
LDR
Voltage Regulator
Mosfet
Arduino UNO R3
Development Board
34
Transformer
7.2
230v AC 12v AC
01
Cost of components
The total cost of this project is given below:
Sl.
No.
Item
Cost
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
` 1500
`30
`400
`40
`125
`50
`50
`10
`20
`10
`10
`20
`10
`10
`40
`35
Total
`2360