NLS (NIGHT LIGHT SAVER) 2011 ECE, MIT MANDSAUR Page 1 CHAPTER: 1 INTRODUCTION – Engineering is not only a theoretical study but it is a implementation of all we study for creating something new and making things more easy and useful through practical study. It is an art which can be gained with systematic study, observation and practice. In the college curriculum we usually get the theoretical knowledge of industries, and a little bit of implementation knowledge that how it is works? But how can we prove our practical knowledge to increase the productivity or efficiency of the industry? Just imagine a light which automatically turns ON and OFF at a particular time. It obviously suits the daily routine of a person such that he/she doesn’t need to take care of the light. This also saves electricity, and hence is known as NLS (Night Light Saver). This microcontroller based project is very useful especially for personal use. The saver turns a night light on and off with preset time. The design features low cost, easy installation, no battery backup and no EMI. The microcontroller used is AT89C2051. The AT89C2051 uses external oscillator generated by Schmitt trigger gate CD4093, ~680kHz. Reference frequency was derived from 50Hz main line. If main line has failed, functioning LED will blink at high rate. Since there is no battery backup, thus repressing the button is then needed. Fig 1: Microcontroller based NLS
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
NLS (NIGHT LIGHT SAVER) 2011
E C E , M I T M A N D S A U R
Page 1
CHAPTER: 1
INTRODUCTION –
Engineering is not only a theoretical study but it is a implementation of all we study for creating
something new and making things more easy and useful through practical study. It is an art
which can be gained with systematic study, observation and practice. In the college curriculum
we usually get the theoretical knowledge of industries, and a little bit of implementation
knowledge that how it is works? But how can we prove our practical knowledge to increase the
productivity or efficiency of the industry?
Just imagine a light which automatically turns ON and
OFF at a particular time. It obviously suits the daily routine of a person such that he/she doesn’t
need to take care of the light. This also saves electricity, and hence is known as NLS (Night
Light Saver). This microcontroller based project is very useful especially for personal use.
The saver turns a night light on and off with preset time. The design features low
cost, easy installation, no battery backup and no EMI. The microcontroller used is AT89C2051.
The AT89C2051 uses external oscillator generated by Schmitt trigger gate CD4093, ~680kHz.
Reference frequency was derived from 50Hz main line. If main line has failed, functioning LED
will blink at high rate. Since there is no battery backup, thus repressing the button is then
needed.
Fig 1: Microcontroller based NLS
NLS (NIGHT LIGHT SAVER) 2011
E C E , M I T M A N D S A U R
Page 2
CHAPTER: 2
CIRCUIT DIAGRAM –
Fig 1: Circuit Diagram of NLS
Explanation of the circuit operation for each part is as follows:
1) R1 and C1 form a simple current limiting AC source. D1 and D2 converts AC to DC with C2
performing a reservoir. D3 limits voltage across the circuit to ~5V.
2) External oscillator: A reliable Schmitt gate oscillator with R8 and C5 produces clock approx.
680 kHz. One machine cycle is ~18us.
3) 89C2051 circuits: C4, 33uF and R4, 10k forms a reset circuit that need time for raising logic
at least two machines cycle. S1 is a momentary button for setting time to 18:00 by pulling P3.0
to logic low. The functioning LED is connected to P3.7. Q2 is a small Triac MAC97A6, and is
derived by Q1, PNP transistor sinking through P1.7.
4) Reference frequency: R3 and C3 integrate a 50Hz main frequency and unwanted transients
producing triangle-like waveform which is fed to U2 Schmitt gate. The output pin4 is clean 50Hz
square wave tied to int0.
NLS (NIGHT LIGHT SAVER) 2011
E C E , M I T M A N D S A U R
Page 3
CHAPTER: 3
COMPONENTS LISTING AND DESCRIPTION –
The components used in this project are as following:
C1 0.44 uF 250Vac AC capacitor
C2 330 uF 25V electrolytic capacitor
C3 1uF 16V nonpolar polyester capacitor
C4 33uF 16V electrolytic capacitor
C5 50pF disceramic capacitor
R1 50Ohm 1/4W resistor
R2 1M 1/4W
R3,R4,R8 10k 1/4W
R5 220Ohm 1/4W
R6,R7 1k 1/4W
D1,D2 1N4007 rectifying diode
D3 zener diode 5.1V 1/2W
D4 small LED
Q1 2N2907 PNP transistor
Q2 MAC97A6 triac
U1 AT89C2051 Flash Microcontroller
U2 CD4093 schmitt nand gate
T1 Transformer
NLS (NIGHT LIGHT SAVER) 2011
E C E , M I T M A N D S A U R
Page 4
Capacitor :
Fig 1: Different types of capacitors: From left: multilayer ceramic, ceramic disc, multilayer polyester film,
tubular ceramic, polystyrene, metalized polyester film, aluminum electrolytic. Major scale divisions are in
centimeters.
A capacitor (formerly known as condenser) is a device for storing electric charge. The forms of
practical capacitors vary widely, but all contain at least two conductors separated by a non-
conductor. Capacitors used as parts of electrical systems, for example, consist of metal foils
separated by a layer of insulating film.
A capacitor is a passive electronic component consisting of a pair
of conductors separated by a dielectric (insulator). When there is a potential difference (voltage)
across the conductors, a static electric field develops across the dielectric, causing positive
charge to collect on one plate and negative charge on the other plate. Energy is stored in the
electrostatic field. An ideal capacitor is characterized by a single constant value, capacitance,
measured in farads. This is the ratio of the electric charge on each conductor to the potential
v) www.scribd.com/doc/44970819/Night-Light-Saver-V5-0 vi) www.howcircuits.com/at89c2051-night-light-saver.html vii) www.next.gr/microcontrollers/at89c2051-4051/Night-Light-Saver-II- viii) Minor Project Report by Hitesh Vijayvargiya and Kundan Rathore (Year 2007-08)