Intelligent LED light controller using AVR using atmega

Intelligent LED light controller using AVR

Now a days LED light bulbs are becoming more and more popular because they have several advantages. Some of their advantages are listed below
·         Their energy (electrical) consumption is much more less
·         Their luminance is more
·         Their intensity can be varied
·         Their life time is more

Intelligent LED light controller using AVR

So if LED lights are used in place of conventional lights we can save much more electrical energy that leads to saving of conventional energy sources like coal, petrol, diesel etc. Also the light intensity of LED can be varied as per ambient light. That is one more plus point in saving electrical energy. We can set the light intensity to required level and get dual advantage of having exact amount of luminous and saving of energy.
So here I am presenting a demonstration of varying LED light intensity as per change in ambient room light using AVR micro-controller. Like, when room light is maximum (during day time) no need of LED light so LED is off but as ambient room light decreases the LED light intensity starts increasing. LED light will be fully ON when room light is very low.
I have used LDR as light sensor. It senses ambient room light and gives signal to AVR micro-controller. Micro-controller determines this room light and varies intensity of LED light accordingly using PWM method.
Circuit diagram:
Connections: –
·         LDR is connected between Vcc and Gnd with fixed value 10 K resistor as shown. 10 K resistor provides bias to LDR
·         The LDR junction output is fed to ADC0 input pin of AVR micro controller
·         Two LEDs are connected to PORTD pins PD0 and PD1 through current limiting resistors. They indicate max and min LED intensity
·         The PWM output pin PB3 is fed to base of Darlington amplifier through 250E current limiting resistor
·         Darlington amplifier is made up of two NPN type 2N2222 transistors. It is used to increase the output current of micro-controller
·         A 10 V white LED bulb is connected at the output of Darlington amplifier as shown
·         A 16 MHz crystal with two 22 pf capacitors is connected to crystal input pins

Schematic intelligent LED light

Operation: –
·         During day time when room light is enough the LDR resistance is low. So its output voltage is less. It is converted in to digital value by built in ADC of AVR micro controller
·         This digital output is also very low. So LED light bulb is off. Its indicated by GREEN led
·         In the evening as room light decreases the LDR resistance increases that leads to increase in its output voltage
·         The micro controller start increasing width of pulse fed to LED light bulb. So its intensity gradually increases
·         Finally at night when no room light LED bulb intensity reaches to maximum. It is indicated by RED LED

Software Program & Further Advancement

Software program:

The operation of the circuit depends upon the program downloaded in to micro controller. The program is written in C language in AVR studio software. It is compiled using AVR simulator available with AVR studio. When program is compiled the HEX file is created. This HEX file is loaded into ATMega16  micro-controller using any suitable AVR programmer. Here is the complete program given with necessary comments.

Further advancement:

Multiple LDR sensors are placed in different places of big room or in different rooms that controls different LED light bulbs placed at different places in room or different rooms.

A separate standalone unit can be made that can be placed at any remote location. The unit includes solar panel, battery, battery charging circuit, LED light bulb, LDR sensors and LED light controller circuit.

Read more: Intelligent LED light controller using AVR

Leave a Comment

Your email address will not be published. Required fields are marked *