Professional Documents
Culture Documents
Pritha Dawn
Aarish Shahab
Madhukar Singh
Surajit Mondal
Pooja Roychoudhury
ROOM LIGHT AND
TEMPERATURE CONTROL
USING MICROCONTROLLER
ABSTRACT
Project overview:
The project is divided into four main parts-
1. Light control the lights in the room are
switched on when the ambient light intensity
drops below a predetermined level.
2. Temperature control the fan is switched on
when the room temperature rises above a
specified level.
3. Infrared sensor circuit there are 2 IR
transmitter-receiver pairs on either side of the
door. The microcontroller uses this circuit to
count the number of persons in the room.
When the number of persons in the room is
zero, the lights and fans are switched off.
4. Microcontroller programming The
appropriate program has to burned into the
microcontroller so that it controls the devices in
the desired manner.
Chapter-2
PROGRAMMING
FLOW CHART:
Explanation:
As the light intensity on the LDR decreases , its resistance
increases and consequently , the voltage at pin 2 of the opamp
changes.
Temperature control:
Devices used:
LM35DT temperature sensor:
Features
Calibrated directly in Celsius (Centigrade)
Linear + 10.0 mV/C scale factor
0.5C accuracy guaranteeable (at +25C)
Rated for full 55 to +150C range
Suitable for remote applications
Low cost due to wafer-level trimming
Operates from 4 to 30 volts
nLess than 60 A current drain
Low self-heating, 0.08C in still air
Nonlinearity only 14C typical
Low impedance output, 0.1 W for 1 mA load
ADC0804:
Visitor counter:
Devices used:
555 timer: The 555 Timer IC is an integrated circuit (chip) used in a
variety of timer, pulse generation and oscillator applications. The 555
timer has 3 modes of operation. In the transmitter circuit,the 555 is
used in the astable mode.
In the astable mode, the frequency of the pulse stream depends on the
values of R1, R2 and C:
[7]
In the monostable mode, the 555 timer acts as a one-shot pulse
generator. The pulse begins when the 555 timer receives a signal at the
trigger input that falls below a third of the voltage supply. The width of
the output pulse is determined by the time constant of an RC network,
which consists of a capacitor (C) and a resistor (R). The output pulse
ends when the charge on the C equals 2/3 of the supply voltage. The
output pulse width can be lengthened or shortened to the need of the
specific application by adjusting the values of R and C.[6]
The output pulse width of time t, which is the time it takes to charge C to
2/3 of the supply voltage, is given by
IR receiver circuit:
There are 2 IR transmitter-receiver pairs, one pair on either side
of the door. When a person enters the room the signal from the
first pair is interrupted first and then the second one. But when
someone leaves the room the process is reversed. In this way,
microcontroller senses whether the person is entering or
leaving the room.
When a person enters the room , a register in the
microcontroller is incremented by one. When a person leaves
the room,the register is decremented by one. In this way , the
microcontroller keeps track of the number of persons in the
room at any given instant.
Microcontroller Circuit:
Microcontroller AT89C52.
= 45 khz.
however, the square wave frequency,as seen on the CRO turns out
to be around 40 khz. this is sufficient for our purpose as the
receiver circuit responds to this frequency.
(diagram of the photosensor circuit)
In the photosensor circuit , we can change the sensitivity of the
circuit, i.e.the level of light intensity to which it responds by
changing the 22k preset.
For temperature sensor circuit:
Digital Output From ADC converter
Temperature(in C) Output from LM35(in Digital
mV) Output(ADC)
19 320 00010011
21 340 00010101
22 350 00010110
24 370 00011000
25 380 00011001
27 400 00011011