# Night Light Saver

Nov 26, 2014

## Documents

#### w resistor r2

NLS (NIGHT LIGHT SAVER) 2011

CHAPTER: 1INTRODUCTION 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 doesnt 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

ECE, MIT MANDSAUR

Page 1

NLS (NIGHT LIGHT SAVER) 2011

CHAPTER: 2CIRCUIT 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.ECE, MIT MANDSAUR Page 2

NLS (NIGHT LIGHT SAVER) 2011

CHAPTER: 3COMPONENTS 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

ECE, MIT MANDSAUR

Page 3

NLS (NIGHT LIGHT SAVER) 2011

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 nonconductor. 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 difference between them.

ECE, MIT MANDSAUR

Page 4

NLS (NIGHT LIGHT SAVER) 2011

Resistor :A resistor is a two-terminal passive electronic component which implements resistances a

circuit element. When a voltage V is applied across the terminals of a resistor, a current I will flow through the resistor in direct proportion to that voltage. Resistors are

common elements of electrical networks and electronic circuits and are ubiquitous in most electronic equipment. Practical resistors can be made of various compounds and films, as well as resistance wire (wire made of a highresistivity 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.Fig 2: Various types of Resistances

Rectifying Diode :Rectifier diodes are used in power supplies to convert alternating current (AC) to direct current (DC), a process called rectification. They are also used elsewhere in circuits where a large current must pass through the diode. All rectifier diodes are made from silicon and therefore have a forward voltage drop of 0.7V. The 1N4001 is suitable for most low voltage circuits with a current of less than 1A.Fig 3: Rectifying Diodes

ECE, MIT MANDSAUR

Page 5

NLS (NIGHT LIGHT SAVER) 2011

Zener

Diode:

A Zener

diode is

a

type

of diode that

permits current not only in the forward direction like a normal diode, but also in the reverse direction if the voltage is larger than the voltage known as "Zener knee voltage" or "Zener voltage". The device was named after Clarence Zener, who discovered this electrical property.Fig 4: Zener Diode

Light Emitting Diode : A light-emitting diode isa semiconductor light source. LEDs are used as indicator lamps in many devices and are increasingly used for other lighting. When forward biased (switched a light-emitting diode is on), electrons are able

to recombine with electron within the device, releasing energy in the form of photons. This effect is called electroluminescence and the color of the light

(corresponding to the energy of the photon) is determined by the energy gap of the semiconductor.Fig 5: LED

PNP Transistor : The PNP consists of a layer of Ndoped semiconductor between two layers of P-doped material. A small current leaving the base is amplified in the collector output. That is, a PNP transistor is "on" when its base is pulled low relative to the emitter. The majority current carriers in the PNP transistor are holes.Fig 6: PNP Transistor

ECE, MIT MANDSAUR

Page 6

NLS (NIGHT LIGHT SAVER) 2011

TRIAC : TRIAC, from Triode for Alternating Current, isa generalized tradename for an electronic component which can conduct current in either direction when it is triggered (turned on), and is formally called a bidirectional triode thyristor or bilateral triode thyristor. A TRIAC is approximately equivalent is to two anode

complementary

unilateral thyristors (one

triggered and another is cathode triggered SCR) joinedFig 7: TRIAC

in inverse parallel (paralleled but with the polarity reversed) and with their gates connected together. It can be triggered by either a positive or a negative voltage being applied to its gate electrode (with respect to A1, otherwise known as MT1). Once triggered, the device continues to conduct until the current through it drops below a certain threshold value, the holding current, such as at the end of a half-cycle of alternating current (AC) mains power. This makes the TRIAC a very convenient switch for AC circuits, allowing the control of very large power flows with milliampere-scale control currents. In addition, applying a trigger pulse at a controllable point in an AC cycle allows one to control the percentage of current that flows through the TRIAC to the load (phase control).

AT89C2051 Flash Microcontroller : TheAT89C2051 is a low-voltage, high-performance CMOS 8-bit microcomputer with 2K bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industrystandard MCS-51 instruction set. By combining aFig 8: AT89C2051 Flash Microcontroller

ECE, MIT MANDSAUR

Page 7

NLS (NIGHT LIGHT SAVER) 2011

versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C2051 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications.

Features Compatible with MCS-51 Products 2K Bytes of Reprogrammable Flash Memory Endurance: 1,000 Write/Erase Cycles 2.7V to 6V Operating Range Fully Static Operation: 0 Hz to 24 MHz Two-level Program Memory Lock 128 x 8-bit Internal RAM 15 Programmable I/O Lines Two 16-bit Timer/Counters Six Interrupt Sources Programmable Serial UART Channel Direct LED Drive Outputs On-chip Analog Comparator Low-power Idle and Power-down Modes Green (Pb/Halide-free) Packaging Option

ECE, MIT MANDSAUR

Page 8

NLS (NIGHT LIGHT SAVER) 2011

CD4093 Schmitt Nand Gate : The CD4093B consistsof four Schmitt-trigger circuits. Each circuit functions as a 2-input NAND gate with Schmitt-trigger action on both inputs. The gate switches at different points for positive and negative-going signals. The difference between the positive (VTa) and the negative voltage (VTb) is defined as hysteresis v

Related Documents See more >
##### NIGHT LIGHT - Amazon S3 LIGHT UP THE ROOM! Place your new...
Category: Documents
##### LED LED PIR Lighting - Energy Saver LED Bulkhead Light...
Category: Documents
##### OPERATION NIGHT LIGHT - Safer 2017-09-06آ  NIGHT LIGHT Jim...
Category: Documents
##### Night and low light 3
Category: Education
##### Quick ... energy saver Keep this switch set on energy saver....
Category: Documents
##### WELCOME KIT - Light the Night Walk ... fundraisers, raising....
Category: Documents