SLS11
SLS11
SLS11
ABSTRACT
This project is aiming the switching the street lights using time delay function. The
switching of the light is controlled by a time delay function that control switching on and off
times of led’s present in the light, in the course of the time setting, for every time delay,
number of led’s switching on and off changes.
At evenings slowly, the intensity of street light gets increased with increase in number
of LED’s, once the complete darkness is occupied the street light gets fully intensified by
glowing of total number of LED’s. Morning when the sunlight slowly increases the intensity
of street light slowly decreases and gets completely turned off.
This system is better than any other system as intensity of light is controlled by time
setting. And this system does not need any sensors.
CHAPTER-1
The Tiny AVR microcontroller is very small in size and used in many simple applications
Mega AVR microcontroller is very famous due to a large number of integrated
components, good memory, and used in modern to multiple applications
The Xmega AVR microcontroller is applied in difficult applications, which require high
speed and huge program memory.
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
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, PB7...6 is
used as TOSC2.
Port C (PC5...PC0):
Port C is a 7-bit bi-directional I/O port with internal pull-up resistors (selected for
each bit). The Port C 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 (PD7.PD0):
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.
RESET:
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.
AVCC:
AVCC is the supply voltage pin for the A/D Converter, Port C (3..0), and ADC (7..6).
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 Port C (5.4) use digital
supply voltage, VCC.
In the TQFP and QFN/MLF package, ADC7.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.
1.3: FEATURES
High-performance, Low-power AVR® 8-bit Microcontroller
Advanced RISC Architecture
– 130 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
High Endurance Non-volatile Memory segments
– 8K Bytes of In-System Self-programmable Flash program memory
– 512 Bytes EEPROM
– 1K Byte Internal SRAM
– Write/Erase Cycles: 10,000 Flash/100,000 EEPROM
– Data retention: 20 years at 85°C/100 years at 25°C
– Optional Boot Code Section with Independent Lock Bits
The AVR core combines a rich instruction set with 32 general purpose working
registers. All the32 registers are directly connected to the Arithmetic Logic Unit (ALU),
allowing two independent registers to be accessed in one single instruction executed in one
clock cycle. The resulting architecture is more code efficient while achieving throughputs up
to ten times faster than conventional CISC microcontrollers.
The ATmega8 provides the following features: 8K bytes of In-System Programmable
Flash with Read-While-Write capabilities, 512 bytes of EEPROM, 1K byte of SRAM, 23
general purpose I/O lines, 32 general purpose working registers, three flexible
Timer/Counters with compare modes, internal and external interrupts, a serial programmable
USART, a byte oriented Two wire Interface, a 6-channel ADC (eight channels in TQFP and
CHAPTER -2
2.1: INTRODUCTION
Light emitting diodes are the most commonly used semiconductor devices among all
the semiconductor devices available today. Light emitting diodes emit either visible light or
invisible infrared light when forward biased. The led’s which emit invisible infrared lights are
used for remote controls. Alight emitting diode is an optical semiconductor device that emits
light when voltage is applied. In other words led is an optical semiconductor device that
converts electrical energy into light energy.
When light emitting diode (LED) is forward biased, free electron in the conduction
band recombine with the holes in the valence band and releases energy in the form of light.
The process of emission of light in response to the strong electric field or flow of current is
called electro luminance.
A normal p-n junction diode allows the current only in one direction. It also allows
when it is forward biased and doesn’t allow the current when it I reverse biased. Thus normal
p-n junction diode operates in only forward biased condition.
Like normal p-n junction diodes led’s also operate in only forward biased condition. To
create an LED an n-type material should be connected to the negative terminal of the battery
and p type material should be connected to the positive terminal of the battery.In other words
the n type material should be negatively charged and p type material should be positively
charged.
Pushed towards the active region .When free electrons from n-side and holes from p-side
recombine with the opposite charge carriers (free electrons with holesor holes with free
electrons) in active region a visible or invisible light is emitted by the active region.
P- type semiconductor and n type semiconductor and depletion layer. The p type
semiconductor and n type semiconductor are separated by the depletion layer.
When trivalent impurities are added to the intrinsic or pure semiconductor, a p type
semiconductor is formed.
In p type semiconductor holes are majority charge carriers and free electrons are
minority charge carriers. Thus holes carry most of the electric current in p type
semiconductor.
In n type semiconductor free electrons are majority carriers and holes are the minority
charge carriers. Thus free electrons carry most of the electric current in an n type
semiconductor.
Depletion region is a region present between n type and p type semiconductor where
no mobile charge carriers (free electrons and holes) are present. This region acts as a barrier
to the electric current. It opposes the flow of electrons from n type semiconductor and flow of
holes from p type semiconductor.
To overcome the barrier of depletion layer, we need to apply a voltage which is greater
than the barrier potential of the depletion layer.If the applied voltage is greater than the
barrier potential of the depletion layer the electric current starts flowing.
One of the major characteristics of led is its color.Initially led colors were very
restricted. For the first years only red LEDs are available.However as semiconductor
processes were improved and new research was undertaken to investigate new materials for
LED, different colors available.
CHAPTER-3
WORKING OF LED
When the valence electrons left the parent atom, they leave an empty space in the
valence shell at which valence electrons left. This empty space in the valence shell is called
hole.
the energy loses of free electron or intensity of emitted light depends upon the forbidden gap
or energy gap between conduction band or valence band. The free electrons in the conduction
band do not stay for long period. After a short period, the free electrons lose energy in the
form of light and recombine with the holes in the valence band. Each recombination of
charge carrier will emit some light energy.
The safe forward voltage a rating of most LEDs is from 1V to 3 V and forward
current ratings is from 200mA to 100mA. If the voltage applied to LED is in between 1V to
3V, LED works perfectly because the current flow for the applied voltage is in the operating
range. However, if the voltage applied to LED is increased to a value greater than 3 volts.
The depletion region in the LED breaks down and the electric current suddenly rises. This
sudden rise in current may destroy the device .To avoid this we need to place a resistor (R) in
series with the LED. The resistor (R) must be placed in between voltage source (V) and
LED.
the resistor placed between LED and voltage source is called current limiting resistor. This
Resistor restricts extra current which may destroy the LED. Thus, current limiting resistor
protects LED from damage. The current flowing through the LED is mathematically written
as
Light emitting diodes consumes low amount of energy. Led’s are very cheap and
readily available. Led’s are light in weight. Smaller in size. Led’s have no longer life time.
Led’s operate very fast. They can be turned on and off in very less time. Led’s do not contain
toxic material like mercury which is used in fluorescent lamps. But led’s need more power to
operate than normal p-n junction diode. Other disadvantage is, luminous efficiency of led’s
is low.
Traffic signals
Burglar alarm system
Calculators
Millimeters
CHAPTER 4
In this project the street light will be the combination of led lights. The number of led
lights in the street light depends upon the size of the light. Led lights are randomly connected
in the light. This gives the uniform distribution of light. This in turn gives the uniform change
in the intensity.
Here the intensity of street light is increased by increasing the number of led lights that are
glowing.
4.3: WORKING
NOTE: Here the working was explained with the help of four led lights. Working depends
upon the time setting.
The hardware connection of the project was shown below. It shows the connection of
led lights to their corresponding port numbers.
4.3: CONNECTIONS:
Time setting:
5:00 PM___LED 1
6:00 PM___LED 2
7:00 PM___LED 3
8:00 PM___LED 4
9:00 PM to 5:00 AM ___ FOUR LED’S glow ( street light is completely turned on)
6:00 AM ___LED 3
8:00 AM to 5:00 PM ___ FOUR LED’S turned off ( street light is completely turned off)
Therefore the light is turned on and off depending upon the time setting.
CHAPTER 5
#include<stdio.h>
#include<conio.h>
main()
DDRB=0b00001111;
While(1)
PORTB=0b00000001;
_delay_ms(5000);
PORTB=0b00000011;
_delay_ms(5000);
PORTB=0b00000111;
_delay_ms(5000);
PORTB=0b00001111;
_delay_ms(5000);
PORTB=0b00000111;
_delay_ms(5000);
PORTB=0b00000011;
_delay_ms(5000);
PORTB=0b00000001;
_delay_ms(5000);
PORTB=0b000000;
_delay_ms(5000);
}}
CHAPTER 6
INSTALLATION OF SOFTWARE
Step3: After the above screen a new window will be opened where we need to select
the new project option
Step 4: After the new project click next and then click on AVR GCC option and then
type the name of the project and then click next
Step 5:After the above step select AVR SIMULATOR and select ATMEGA8 and
then click finish
Step 6: After the above step we will get a new window where the code for the
program is writtren.
Step 7: After the above step, go to Build and click on Build. After clicking on build it
will generate warnings which are neglected. Again click on build and run the
program.
This will generate hex file of the code. Use that Hex file to run your microcontroller.
CHAPTER 7
7.1: ADVANTAGES
Led lights consume low amount of energy. Therefore the over all power consumption is less.
Fast response:
The on and off times of led lights are very less. Therefore they respond very fast.
Automatic control:
The light switched on and off automatically depending upon the program code.
Led lights are cheaper. And can be repaired or replaced with low cost.
7.2: DISADVANTAGES
Complexity in programming:
This designing requires more number of lines of program code. The number of lines increases
with increase in number of led lights.
Here more number of led lights are required for more intensity of light.
Low flexibility:
Switching of light does not vary with the light conditions of the surroundings.
Low intensity:
The intensity of led lights is very low. Therefore the intensity of light is less.
7.3APPLICATIONS
As discussed this program can be used for road or street light controlling. By setting
different time delays different lights can be switched on and off.
CMRCET-B. Tech 24 EEE DEPARTMENT
STREET LIGHT SWITCHING
2. DOMESTIC APPLIENCES:
The same switching technique can be used in the domestic appliances. For different type of
uses different type of LEDs can be used.
3. PARTY DECORATIONS:
By setting small time delay this switching can be used for flashing the lights.
CHAPTER 8
CONCLUSION
The automatic street light switching using LEDs has been implemented using time
delay function. It is cost effective system. Due to this principle of time delay function the
problem of manual switching the STREET LIGHTS or LIGHTS can be automatically
controlled. In this project Switching of LEDs only depend on time but not on surrounding
light conditions.
CHAPTER 9
REFERENCES
BOOKS:
Robotics Demystified
Electric Drives
Websites:
www.epanorama.com
www.robotics.com
www.automation.com