Beruflich Dokumente
Kultur Dokumente
MN12-B2
CHAPTER-1
INTRODUCTION TO PIR SENSOR BASED POWER SAVER
Embedded systems have grown tremendously in recent years, not only in their popularity
but also in their complexity. Gadgets are increasingly becoming intelligent and autonomous.
Refrigerators, air-conditioners, automobiles, mobile phones etc are some of the common
examples of devices with built in intelligence. These devices function based on operating and
environmental parameters.
The intelligence of smart devices resides in embedded systems. An embedded system, in
general, in co-operates hardware, operating systems, low-level software binding the operating
system and peripheral devices, and communication software to enable the device to perform the
pre-defined functions. An embedded system performs a single, well-defined task, is tightly
constrained, is reactive and computes results in real time.
Let us take a detailed look at these features of embedded systems:
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
1.3 APPLICATIONS
Embedded software is present in almost every electronic device you use today. There is
embedded software inside your watch, cellular phone, automobile, thermostats, industrial control
equipment and scientific and medical equipment. Defence services use embedded software to
guide missiles and detect aircrafts communication satellites, medical instruments and deep space
probes would have been nearly impossible without these systems. Embedded systems cover such
as broad range of products that generalization is difficult.
Here are some broad categories:
2
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
Embedded
System
Software
Hardware
ALP
C
VB
Processor
Peripherals
memory
Etc.,
Peripherals:
Processor:
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
The PIR sensors also senses the temperature of the room. If the room
temperature is high then the Fans will be switched on else it will be off. This sensation of
temperature will be done by using thermistor. This thermistor is placed in the PIR sensor. It
senses the temperature and swich on the fan. Thermistor reads the temperature value to the ADC.
Then it coverts the analog signal to digital signal.
The operation of the appliances (light or fan) will be done by using the
driver circuit. Depending upon the recognisation by the PIR sensor the driver circuit will switch
on and off the fan and light. The buzzer is used to indicate us that whether the fans and light are
on or off.
4
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
BLOCK DIAGRAM
5
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
CHAPTER 2
MICROCONTROLLER AT89S52
2.1 A BRIEF HISTORY OF 8051
In 1981, Intel Corporation introduced an 8 bit microcontroller called 8051. This
microcontroller had 128 bytes of RAM, 4K bytes of chip ROM, two timers, one serial port, and
four ports all on a single chip. At the time it was also referred as A SYSTEM ON A CHIP
AT89S52:
The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8K bytes of
in-system programmable Flash memory. The device is manufactured using Atmels high-density
nonvolatile memory technology and is compatible with the industry-standard 80C51 instruction
set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or
by a conventional nonvolatile memory pro-grammer. By combining a versatile 8-bit CPU with
in-system programmable Flash on a monolithic chip, the Atmel AT89S52 is a powerful
microcontroller, which provides a highly flexible and cost-effective solution to many, embedded
control applications. The AT89S52 provides the following standard features: 8K bytes of Flash,
256 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters,
a six-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and
clock circuitry. In addition, the AT89S52 is designed with static logic for operation down to zero
frequency and supports two software selectable power saving modes. The Idle Mode stops the
CPU while allowing the RAM, timer/counters, serial port, and interrupt system to continue
functioning. The Power-down mode saves the RAM con-tents but freezes the oscillator, disabling
all other chip functions until the next interrupt
6
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
7
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
The 8051 is the name of a big family of microcontrollers. The device which we are going to use
along this tutorial is the 'AT89S52' which is a typical 8051 microcontroller manufactured by
Atmel. Note that this part doesn't aim to explain the functioning of the different components of
a 89S52 microcontroller, but rather to give you a general idea of the organization of the chip and
the available features, which shall be explained in detail along this tutorial.
The block diagram provided by Atmel in their datasheet showing the architecture the 89S52
device can seem very complicated, and since we are going to use the C high level language to
program
it,
simpler
architecture
can
be
represented
as
the
figure
1.2.A.
This figures shows the main features and components that the designer can interact with. You can
notice that the 89S52 has 4 different ports, each one having 8 Input/output lines providing a total
of 32 I/O lines. Those ports can be used to output DATA and orders do other devices, or to read
the state of a sensor, or a switch. Most of the ports of the 89S52 have 'dual function' meaning that
they can be used for two different functions: the fist one is to perform input/output operations
and the second one is used to implement special features of the microcontroller like counting
external pulses, interrupting the execution of the program according to external events,
performing serial data transfer or connecting the chip to a computer to update the software.
2.2 NECESSITY OF MICROCONTROLLERS:
Microprocessors brought the concept of programmable devices and made many
applications of intelligent equipment. Most applications, which do not need large amount of data
and program memory, tended to be costly.
The microprocessor system had to satisfy the data and program requirements so,
sufficient RAM and ROM are used to satisfy most applications .The peripheral control
equipment also had to be satisfied. Therefore, almost all-peripheral chips were used in the
design. Because of these additional peripherals cost will be comparatively high.
An example:
8085 chip needs:
8
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
An Address latch for separating address from multiplex address and data.32-KB RAM and
32-KB ROM to be able to satisfy most applications. As also Timer / Counter, Parallel
programmable port, Serial port, and Interrupt controller are needed for its efficient applications.
In comparison a typical Micro controller 8051 chip has all that the 8051 board has except
a reduced memory as follows.
4K bytes of ROM as compared to 32-KB, 128 Bytes of RAM as compared to 32-KB.
Bulky:
On comparing a board full of chips (Microprocessors) with one chip with all components
in it (Microcontroller).
Debugging:
Lots of Microprocessor circuitry and program to debug. In Micro controller there is no
Microprocessor circuitry to debug.
Slower Development time: As we have observed Microprocessors need a lot of debugging at
board level and at program level, where as, Micro controller do not have the excessive circuitry
and the built-in peripheral chips are easier to program for operation.
So peripheral devices like Timer/Counter, Parallel programmable port, Serial
Communication Port, Interrupt controller and so on, which were most often used were integrated
with the Microprocessor to present the Micro controller .RAM and ROM also were integrated in
the same chip. The ROM size was anything from 256 bytes to 32Kb or more. RAM was
optimized to minimum of 64 bytes to 256 bytes or more.
Microprocessor has following instructions to perform:
1. Reading instructions or data from program memory ROM.
2. Interpreting the instruction and executing it.
3. Microprocessor Program is a collection of instructions stored in a Nonvolatile memory.
4. Read Data from I/O device
9
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
5. Process the input read, as per the instructions read in program memory.
6. Read or write data to Data memory.
7. Write data to I/O device and output the result of processing to O/P device.
2.3 INTRODUCTION TO AT89S52
The system requirements and control specifications clearly rule out the use of 16, 32 or 64
bit micro controllers or microprocessors. Systems using these may be earlier to implement due to
large number of internal features. They are also faster and more reliable but, the above
application is satisfactorily served by 8-bit micro controller. Using an inexpensive 8-bit
Microcontroller will doom the 32-bit product failure in any competitive market place. Coming to
the question of why to use 89S52 of all the 8-bit Microcontroller available in the market the main
answer would be because it has 8kB Flash and 256 bytes of data RAM32 I/O lines, three 16-bit
timer/counters, a Eight-vector two-level interrupt architecture, a full duplex serial port, on-chip
oscillator, and clock circuitry.
In addition, the AT89S52 is designed with static logic for operation down to zero frequency and
supports two software selectable power saving modes. The Idle Mode stops the CPU while
allowing the RAM, timer/counters, serial port, and interrupt system to continue functioning. The
Power Down Mode saves the RAM contents but freezes the oscillator, disabling all other chip
functions until the next hardware reset. The Flash program memory supports both parallel
programming and in Serial In-System Programming (ISP). The 89S52 is also In-Application
Programmable (IAP), allowing the Flash program memory to be reconfigured even while the
application is running.
By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89S52 is
a powerful microcomputer which provides a highly flexible and cost effective solution to many
embedded control applications.
2.4 FEATURES
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
11
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
Port 0
12
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can sink eight
TTL inputs. When 1s are written to port 0 pins, the pins can be used as highimpedance
inputs.Port 0 can also be configured to be the multiplexed loworder address/data bus during
accesses to external program and data memory. In this mode, P0 has internal pullups. Port 0 also
receives the code bytes during Flash programming and outputs the code bytes during program
verification.
External pullups are required during program verification.
Port 1
Port 1 is an 8-bit bidirectional I/O port with internal pullups. The Port 1 output buffers can
sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the
internal pullups and can be used as inputs. As inputs,Port 1 pins that are externally being pulled
low will source current (IIL) because of the internal pullups. In addition, P1.0 and P1.1 can be
configured to be the timer/counter 2 external count input (P1.0/T2) and the timer/counter 2
trigger input (P1.1/T2EX), respectively, as shown in the following table. Port 1 also receives the
low-order address bytes during Flash programming and verification.
Table 2.1 : Alternate functions of port 1
Port 2
13
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
Port 2 is an 8-bit bidirectional I/O port with internal pullups.The Port 2 output buffers can
sink/source four TTL inputs.When 1s are written to Port 2 pins, they are pulled high by
the internal pullups and can be used as inputs. As inputs, Port 2 pins that are externally being
pulled low will source current (IIL) because of the internal pullups. Port 2 emits the high-order
address byte during fetches from external program memory and during accesses to external data
memory that use 16-bit addresses (MOVX @ DPTR). In this application, Port 2 uses strong
internal pull-ups when emitting 1s. During accesses to external data memory that use 8-bit
addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2
also receives the high-order address bits and some control signals during Flash programming and
verification.
Port 3
Port 3 is an 8-bit bidirectional I/O port with internal pullups.The Port 3 output buffers can
sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high by the
internal pullups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled
low will source current (IIL) because of the pullups. Port 3 also serves the functions of various
special features of the AT89S52, as shown in the following table. Port 3 also receives some
control signals for Flash programming and verification.
Table 2.2 : Alternate functions of port 2
RST
14
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
Reset input. A high on this pin for two machine cycles while the oscillator is running resets the
device. This pin drives High for 96 oscillator periods after the Watchdog times out. The DISRTO
bit in SFR AUXR (address 8EH) can be used to disable this feature. In the default state of bit
DISRTO, the RESET HIGH out feature is enabled. ALE/PROG Address Latch Enable (ALE) is
an output pulse for latching the low byte of the address during accesses to external memory. This
pin is also the program pulse input (PROG) during Flash programming. In normal operation,
ALE is emitted at a constant rate of 1/6 the oscillator frequency and may be used for external
timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to
external data memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location
8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the
pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in
external execution mode.
PSEN
Program Store Enable (PSEN) is the read strobe to external program memory. When the
AT89S52 is executing code from external program memory, PSEN is activated twice each
machine cycle, except that two PSEN activations are skipped during each access to external data
memory.
EA/VPP
External Access Enable. EA must be strapped to GND in order to enable the device to fetch code
from external program memory locations starting at 0000H up to FFFFH. Note, however, that if
lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC
for internal program executions. This pin also receives the 12-volt programming enable voltage
(VPP) during Flash programming.
XTAL1
Input to the inverting oscillator amplifier and input to the
internal clock operating circuit.
XTAL2
15
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
16
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
17
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
a) Code memory
Code memory is the memory that holds the actual 8052 programs that is to be run. This memory
is limited to 64K. Code memory may be found on-chip or off-chip. It is possible to have 8K of
code memory on-chip and 60K off chip memory simultaneously. If only off-chip memory is
available then there can be 64K of off chip ROM. This is controlled by pin provided as EA
b) Internal RAM
The 8052 have a bank of 256 bytes of internal RAM. The internal RAM is found on-chip.
So it is the fastest Ram available. And also it is most flexible in terms of reading and writing.
Internal Ram is volatile, so when 8051 is reset, this memory is cleared. 256 bytes of internal
memory are subdivided. The first 32 bytes are divided into 4 register banks. Each bank contains
8 registers. Internal RAM also contains 256 bits, which are addressed from 20h to 2Fh. These
bits are bit addressed i.e. each individual bit of a byte can be addressed by the user. They are
numbered 00h to FFh. The user may make use of these variables with commands such as SETB
and CLR.
Special Function registered memory:
Special function registers are the areas of memory that control specific functionality of
the 8052 micro controller.
a) Accumulator (0E0h) As its name suggests, it is used to accumulate the results of large no of
instructions. It can hold 8 bit values.
b) B registers (0F0h)
The B register is very similar to accumulator. It may hold 8-bit value. The b register is only used
by MUL AB and DIV AB instructions. In MUL AB the higher byte of the product gets stored in
B register. In div AB the quotient gets stored in B with the remainder in A.
c) Stack pointer (81h)
The stack pointer holds 8-bit value. This is used to indicate where the next value to be removed
from the stack should be taken from. When a value is to be pushed onto the stack, the 8052 first
18
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
store the value of SP and then store the value at the resulting memory location. When a value is
to be popped from the stack, the 8052 returns the value from the memory location indicated by
SP and then decrements the value of SP.
d) Data pointer
The SFRs DPL and DPH work together work together to represent a 16-bit value called the data
pointer. The data pointer is used in operations regarding external RAM and some instructions
code memory. It is a 16-bit SFR and also an addressable SFR.
e) Program counter
The program counter is a 16 bit register, which contains the 2 byte address, which tells the 8052
where the next instruction to execute to be found in memory. When the 8052 is initialized PC
starts at 0000h. And is incremented each time an instruction is executes. It is not addressable
SFR.
f) PCON (power control, 87h)
The power control SFR is used to control the 8051s power control modes. Certain operation
modes of the 8051 allow the 8051 to go into a type of sleep mode which consumes much lee
power.
19
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
20
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
This is a port latch3. Each bit of this SFR corresponds to one of the pins on a micro
controller. Any data to be outputted to port 0 is first written on P0 register. For e.g., bit 0 of port 0
is pin P3.0, bit 7 is pin P3.7. Writing a value of 1 to a bit of this SFR will send a high level on the
corresponding I/O pin whereas a value of 0 will bring it to low level.
o) IE (interrupt enable, 0A8h):
The Interrupt Enable SFR is used to enable and disable specific interrupts. The low 7 bits
of the SFR are used to enable/disable the specific interrupts, where the MSB bit is used to enable
or disable all the interrupts. Thus, if the high bit of IE is 0 all interrupts are disabled regardless of
whether an individual interrupt is enabled by setting a lower bit.
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
e.g., if we configure all interrupts as low priority other than serial interrupt. The serial interrupt
always interrupts the system, even if another interrupt is currently executing. However, if a serial
interrupt is executing no other interrupt will be able to interrupt the serial interrupt routine since
the serial interrupt routine has the highest priority.
22
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
CHAPTER3
DESCRIPTION OF HARDWARE COMPONENTS
3.1 POWER SUPPLY
The power supplies are designed to convert high voltage AC mains electricity to a
suitable low voltage supply for electronics circuits and other devices. A power supply can by
broken down into a series of blocks, each of which performs a particular function. A d.c power
supply which maintains the output voltage constant irrespective of a.c mains fluctuations or load
variations is known as Regulated D.C Power Supply
For example a 5V regulated power supply system as shown below:
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
Transformers convert AC electricity from one voltage to another with little loss of power.
Transformers work only with AC and this is one of the reasons why mains electricity is AC.
Step-up transformers increase in output voltage, step-down transformers decrease in output
voltage. Most power supplies use a step-down transformer to reduce the dangerously high mains
voltage to a safer low voltage. The input coil is called the primary and the output coil is called
the secondary. There is no electrical connection between the two coils; instead they are linked by
an alternating magnetic field created in the soft-iron core of the transformer. The two lines in the
middle of the circuit symbol represent the core.
power out is (almost) equal to the power in. Note that as voltage is stepped down current is
stepped up. The ratio of the number of turns on each coil, called the turns ratio, determines the
ratio of the voltages. A step-down transformer has a large number of turns on its primary (input)
coil which is connected to the high voltage mains supply, and a small number of turns on its
secondary (output) coil to give a low output voltage.
Fig 9 : Diagram of transformer
24
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
Vp
Np
primary
number
(input)
of
turns
on
voltage
primary
coil
Half wave
Full wave
Bridge
Number of diodes
1
PIV of diodes
Vm
Vdc,at
Vm/
0.318Vm
2Vm
2Vm/
0.636Vm
Vm
2Vm/
0.636Vm
25
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
no-load
Ripple factor
1.21
0.482
0.482
2f
2f
0.406
0.812
0.812
0.287
0.693
0.812
Ripple
Frequency
Rectification
Efficiency
Transformer
Utilization
Factor(TUF)
RMS voltage Vrms
Vm/2
Vm/2
Vm/2
Full-wave Rectifier:
From the above comparison we came to know that full wave bridge rectifier as more advantages
than the other two rectifiers. So, in our project we are using full wave bridge rectifier circuit.
Bridge Rectifier: A bridge rectifier makes use of four diodes in a bridge arrangement to achieve
full-wave rectification. This is a widely used configuration, both with individual diodes wired as
shown and with single component bridges where the diode bridge is wired internally.
A bridge rectifier makes use of four diodes in a bridge arrangement as shown in fig(a)
to achieve full-wave rectification. This is a widely used configuration, both with individual
diodes wired as shown and with single component bridges where the diode bridge is wired
internally.
26
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
27
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
section filter,
multiple section filter etc. which make use of both the properties mentioned in (a) and (b) above.
Two cases of capacitor filter, one applied on half wave rectifier and another with full wave
rectifier.
28
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
Filtering is performed by a large value electrolytic capacitor connected across the DC supply to
act as a reservoir, supplying current to the output when the varying DC voltage from the rectifier
is falling. The capacitor charges quickly near the peak of the varying DC, and then discharges as
it supplies current to the output. Filtering significantly increases the average DC voltage to
almost the peak value (1.4 RMS value).
To calculate the value of capacitor(C),
C = *3*f*r*Rl
Where,
f = supply frequency,
r = ripple factor,
Rl = load resistance
Note: In our circuit we are using 1000F. Hence large value of capacitor is placed to reduce
ripples and to improve the DC component.
3.1.4 Regulator:
Voltage regulator ICs is available with fixed (typically 5, 12 and 15V) or variable output
voltages. The maximum current they can pass also rates them. Negative voltage regulators are
available, mainly for use in dual supplies. Most regulators include some automatic protection
from excessive current ('overload protection') and overheating ('thermal protection'). Many of
the fixed voltage regulator ICs have 3 leads and look like power transistors, such as the 7805
+5V 1A regulator shown on the right. The LM7805 is simple to use. You simply connect the
positive lead of your unregulated DC power supply (anything from 9VDC to 24VDC) to the
Input pin, connect the negative lead to the Common pin and then when you turn on the power,
you get a 5 volt supply from the output pin.
29
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
30
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
31
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
32
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
33
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
34
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
These stats are for the PIR sensor in the Adafruit shop which is very much like the Parallax one .
Nearly all PIRs will have slightly different specifications, although they all pretty much work the
same. If there's a datasheet, you'll want to refer to it
Size: Rectangular
Price: $10.00 at the Adafruit shop
Output: Digital pulse high (3V) when triggered (motion detected) digital low when idle
(no motion detected). Pulse lengths are determined by resistors and capacitors on the
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
3.2.5 Lenses
PIR sensors are rather generic and for the most part vary only in price and sensitivity. Most of
the real magic happens with the optics. This is a pretty good idea for manufacturing: the PIR
sensor and circuitry is fixed and costs a few dollars. The lens costs only a few cents and can
change the breadth, range, sensing pattern, very easily.
In the diagram up top, the lens is just a piece of plastic, but that means that the detection area is
just two rectangles. Usually we'd like to have a detection area that is much larger. To do that, we
use a simple lens such as those found in a camera: they condenses a large area (such as a
landscape) into a small one (on film or a CCD sensor). For reasons that will be apparent soon, we
would like to make the PIR lenses small and thin and moldable from cheap plastic, even though
it may add distortion. For this reason the sensors are actually Fresnel lenses :
3.2.6 Testing PIR
Once you have your PIR wired up its a good idea to do a simple test to verify that it works the
way you expect. This test is also good for range testing. Simply connect 3-4 alkaline batteries
(make sure you have more than 3.5VDC out but less than 6V by checking with your multimeter!)
and connect ground to the - pin on your PIR. Power goes to the + pin. Then connect a basic red
LED (red LEDs have lower forward voltages than green or blue so they work better with only
the 3.3v output) and a 220 resistor (any value from 100 to 1.0K will do fine) to the out pin
as shown. Of course, the LED and resistor can swap locations as long as the LED is oriented
connection and connects between out and ground.
Now when the PIR detects motion, the output pin will go "high" to 3.3V and light up the
LED!
Once you have the breadboard wired up, insert batteries and wait 30-60 seconds for the PIR to
'stabilize'. During that time the LED may blink a little. Wait until the LED is off and then move
around in front of it, waving a hand, etc, to see the LED light up!
36
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
series is available packaged in hermetic TO-46 transistor packages, while the LM35C, LM35CA,
and LM35D are also available in the plastic TO-92 transistor package. The LM35D sensor is also
available in an 8-lead surface mount small outline package and a plastic TO-220 packag
3.3.2 LM35 Sensor Circuit Schematic
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
National Semiconductor
On Semiconductor
Texas Instruments
Fairchild Semiconductor
STMicroelectronics
Jameco Electronics
Analog Devices
39
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
current. The same 1 A of leakage current will cause an error in the LM34s output of only
0.05F (or 0.03K after scaling).
Low cost and high accuracy are maintained by performing trimming and calibration procedures
at the wafer level. The device may be operated with either single or dual supplies. With less than
70 A of current drain, the LM34 sensor has very little self-heating (less than 0.2F in still air),
and comes in a TO-46 metal can package, a SO-8 small outline package and a TO-92 plastic
package.
The LM35/LM34 is a versatile device which may be used for a wide variety of applications,
including oven controllers and remote temperature sensing. The device is easy to use (there are
only three terminals) and will be within 0.02F of a surface to which it is either glued or
cemented. The TO-46 package allows the user to solder the sensor to a metal surface, but in
doing so, the GND pin will be at the same potential as that metal. For applications where a
steady reading is desired despite small changes in temperature, the user can solder the TO-46
package to a thermal mass. Conversely, the thermal time constant may be decreased to speed up
response time by soldering the sensor to a small heat fin.
3.4: RELAY:
A relay is an electrically operated switch. Many relays use an electromagnet to operate a
switching mechanism, but other operating principles are also used. Relays find applications
where it is necessary to control a circuit by a low-power signal, or where several circuits must be
controlled by one signal. The first relays were used in long distance telegraph circuits, repeating
the signal coming in from one circuit and re-transmitting it to another. Relays found extensive
use in telephone exchanges and early computers to perform logical operations. A type of relay
that can handle the high power required to directly drive an electric motor is called a contactor.
Solid-state relays control power circuits with no moving parts, instead using a semiconductor
device triggered by light to perform switching. Relays with calibrated operating characteristics
and sometimes multiple operating coils are used to protect electrical circuits from overload or
faults; in modern electric power systems these functions are performed by digital instruments
still called "protection relays".
40
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
When an electric current is passed through the coil, the resulting magnetic field attracts the
armature and the consequent movement of the movable contact or contacts either makes or
breaks a connection with a fixed contact. If the set of contacts was closed when the relay was
De-energized, then the movement opens the contacts and breaks the connection, and vice versa if
the contacts were open. When the current to the coil is switched off, the armature is returned by a
force, approximately half as strong as the magnetic force, to its relaxed position. Usually this
force is provided by a spring, but gravity is also used commonly in industrial motor starters.
Most relays are manufactured to operate quickly. In a low voltage application, this is to reduce
noise. In a high voltage or high current application, this is to reduce arcing.
If the coil is energized with DC, a diode is frequently installed across the coil, to dissipate the
energy from the collapsing magnetic field at deactivation, which would otherwise generate a
voltage spike dangerous to circuit components. Some automotive relays already include a diode
inside the relay case. Alternatively a contact protection network, consisting of a capacitor and
resistor in series, may absorb the surge. If the coil is designed to be energized with AC, a small
copper ring can be crimped to the end of the solenoid. This "shading ring" creates a small out-ofphase current, which increases the minimum pull on the armature during the AC cycle.
By analogy with the functions of the original electromagnetic device, a solid-state relay is made
with a thyristor or other solid-state switching device. To achieve electrical isolation an opt
coupler can be used which is a light-emitting diode (LED) coupled with a photo transistor.
3.4.2 Types
Latching relay
42
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
low contact resistance, or for high-speed counting and timing applications where the mercury
eliminates contact bounce. Mercury wetted relays are position-sensitive and must be mounted
vertically to work properly. Because of the toxicity and expense of liquid mercury, these relays
are rarely specified for new equipment. See also mercury switch.
Polarized relay
A polarized relay placed the armature between the poles of a permanent magnet to increase
sensitivity. Polarized relays were used in middle 20th Century telephone exchanges to detect
faint pulses and correct telegraphic distortion. The poles were on screws, so a technician could
first adjust them for maximum sensitivity and then apply a bias spring to set the critical current
that would operate the relay.
Machine tool relay
A machine tool relay is a type standardized for industrial control of machine tools, transfer
machines, and other sequential control. They are characterized by a large number of contacts
(sometimes extendable in the field) which are easily converted from normally-open to normallyclosed status, easily replaceable coils, and a form factor that allows compactly installing many
relays in a control panel. Although such relays once were the backbone of automation in such
industries as automobile assembly, the programmable logic controller (PLC) mostly displaced
the machine tool relay from sequential control applications.
Contactor relay
A contactor is a very heavy-duty relay used for switching electric motors and lighting loads.
Continuous current ratings for common contactors range from 10 amps to several hundred amps.
High-current contacts are made with alloys containing silver. The unavoidable arcing causes the
contacts to oxidize; however, silver oxide is still a good conductor. Such devices are often used
for motor starters. A motor starter is a contactor with overload protection devices attached. The
overload sensing devices are a form of heat operated relay where a coil heats a bi-metal strip, or
where a solder pot melts, releasing a spring to operate auxiliary contacts. These auxiliary
contacts are in series with the coil. If the overload senses excess current in the load, the coil is
44
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
de-energized. Contactor relays can be extremely loud to operate, making them unfit for use
where noise is a chief concern.
Solid-state relay
45
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
46
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
environment as the motor, a useful though crude compensation for motor ambient temperature is
provided.
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
Normally-closed (NC) contacts disconnect the circuit when the relay is activated; the circuit is
connected when the relay is inactive. It is also called a Form B contact or "break" contact.
Change-over (CO), or double-throw (DT), contacts control two circuits: one normally-open
contact and one normally-closed contact with a common terminal. It is also called a Form C
contact or "transfer" contact ("break before make"). If this type of contact utilizesmake before
break" functionality, then it is called a Form D contact.
The following designations are commonly encountered:
SPST Single Pole Single Throw. These have two terminals which can be connected or
disconnected. Including two for the coil, such a relay has four terminals in total. It is ambiguous
whether the pole is normally open or normally closed. The terminology "SPNO" and "SPNC" is
sometimes used to resolve the ambiguity.
SPDT Single Pole Double Throw. A common terminal connects to either of two others.
Including two for the coil, such a relay has five terminals in total.
DPST Double Pole Single Throw. These have two pairs of terminals. Equivalent to two SPST
switches or relays actuated by a single coil. Including two for the coil, such a relay has six
terminals in total. The poles may be Form A or Form B (or one of each).
DPDT Double Pole Double Throw. These have two rows of change-over terminals. Equivalent
to two SPDT switches or relays actuated by a single coil. Such a relay has eight terminals,
including the coil.
The "S" or "D" may be replaced with a number, indicating multiple switches connected to a
single actuator. For example 4PDT indicates a four pole double throw relay (with 14 terminals).
3.4.3 Applications:
Relays are used to and for:
Control a high-voltage circuit with a low-voltage signal, as in some types of modems or audio
amplifiers,
48
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
49
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
Time delay functions. Relays can be modified to delay opening or delay closing a set of contacts.
A very short (a fraction of a second) delay would use a copper disk between the armature and
moving blade assembly. Current flowing in the disk maintains magnetic field for a short time,
lengthening release time. For a slightly longer (up to a minute) delay, a dashpot is used. A
dashpot is a piston filled with fluid that is allowed to escape slowly. The time period can be
varied by increasing or decreasing the flow rate. For longer time periods, a mechanical
clockwork timer is installed.
Relay application considerations:
Fig 3.21 A relay with two coils and many sets of contacts
A large relay with two coils and many sets of contacts, used in an old telephone switching
system.
Several 30-contact relays in "Connector" circuits in mid 20th century 1XB switch and
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
Coil current
assembly
Assembly Some relays feature a sticker that keeps the enclosure sealed to allow PCB
Relays can switch AC and DC, transistors can only switch DC.
51
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
second.
Relays use more power due to the current flowing through their coil.
Relays require more current than many ICs can provide, so a low power transistor may be
needed to switch the current for the relay's coil.
CHAPTER 4
SOFTWARE DESCRIPTION
4.1 PROGRAMMING FOR 8051 MICROCONTROLLER
52
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
definitions of the 80C51 registers. This file is included in your project and will be assembled
together with the compiled output of your C program.
4.1.1 EMBEDDED C COMPILER
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
We can compile, with assemble and link our embedded application a single step.
Optionally, the compiler may be run directly from the command line, allowing you to
compile, assemble and link using one command. This enables the compiler to be integrated into
third party development environments, such as Microchip's MPLAB IDE.
Simulator
Simulator is a machine that simulates an environment for the purpose of training.
Compiler
A compiler is a program that reads a program in one language, the source language and translates
into an equivalent program in another language, the target
Language
The translation process should also report the presence of errors in the source program.
Software
Keil compiler is software used where the machine language code is written and compiled. After
compilation, the machine source code is converted into hex code which is to be dumped into the
microcontroller for further processing. Keil compiler also supports C language code.
Steps To Write a C Program In Keil And Compile It
After installation, an icon will be created with the name Keil Vision3. Just drag this
icon onto the desktop so that it becomes easy whenever you try to write programs in keil.
54
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
A page opens with different options in it showing the project workspace at the leftmost
corner side, output window in the bottom and an ash coloured space for the program to be
written.
A small window opens showing the options like new project, import project, open project
etc. Click on New project.
A small window with the title bar Create new project opens. The window asks the user
to give the project name with which it should be created and the destination location. The
project can be created in any of the drives available. You can create a new folder and then a
new file or can create directly a new file.
After the file is saved in the given destination location, a window opens where a list of
vendors will be displayed and you have to select the device for the target you have created.
The most widely used vendor is Atmel. So click on Atmel and now the family of
microcontrollers manufactured by Atmel opens. You can select any one of the
microcontrollers according to the requirement.
When you click on any one of the microcontrollers, the features of that particular
microcontroller will be displayed on the right side of the page. The most appropriate
microcontroller with which most of the projects can be implemented is the AT89C51. Click
on this microcontroller and have a look at its features. Now click on OK to select this
microcontroller.
A small window opens asking whether to copy the startup code into the file you have
created just now. Just click on No to proceed further.
Now you can see the TARGET and SOURCE GROUP created in the project workspace.
Now click on File and in that New. A new page opens and you can start writing
program in it.
55
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
After the program is completed, save it with any name but with the .asm extension. Save
the program in the file you have created earlier.
You can notice that after you save the program, the predefined keywords will be
highlighted in bold letters.
Now add this file to the target by giving a right click on the source group. A list of
options open and in that select Add files to the source group. Check for this file where you
have saved and add it.
Right click on the target and select the first option Options for target. A window opens
with different options like device, target, output etc. First click on target.
Since the set frequency of the microcontroller is 11.0592 MHz to interface with the PC,
just enter this frequency value in the Xtal (MHz) text area and put a tick on the Use on-chip
ROM. This is because the program what we write here in the keil will later be dumped into
the microcontroller and will be stored in the inbuilt ROM in the microcontroller.
Now click the option Output and give any name to the hex file to be created in the
Name of executable text area and put a tick to the Create HEX file option present in the
same window. The hex file can be created in any of the drives. You can change the folder by
clicking on Select folder for Objects.
Now to check whether the program you have written is errorless or not, click on the icon
exactly below the Open file icon which is nothing but Build Target icon. You can even use
the shortcut key F7 to compile the program written.
To check for the output, there are several windows like serial window, memory window,
project window etc. Depending on the program you have written, select the appropriate
window to see the output by entering into debug mode.
Click on this icon and now click on the option View and select the appropriate window
to check for the output.
56
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
After this is done, click the icon debug again to come out of the debug mode.
The hex file created as shown earlier will be burned into the microcontroller ROM with
the help of software called FLASH.
Steps
Create a Project File
To create a new project file select from the Vision menu Project New Project. This
opens a standard Windows dialog that asks you for the new project file name.
We suggest that you use a separate folder for each project. You can simply use the icon
Create New Folder in this dialog to get a new empty folder. Then select this folder and enter the
file name for the new project, i.e. Project1. Vision creates a new project file with the name
PROJECT1.UV2 which contains a default target and file group name. You can see these names
in the Project Workspace Files.
Select a Device
When you create a new project Vision asks you to select a CPU for your project. The
Select Device dialog box shows the Vision device database. Just select the microcontroller you
use. We are using for our examples the Philips 80C51RD+ controller. This selection sets
necessary tool options for the 80C51RD+ device and simplifies in this way the tool
configuration.
57
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
Create New Source Files
You may create a new source file with the menu option File New. This opens an empty
editor window where you can enter your source code. Vision enables the C color syntax
highlighting when you save your file with the dialog File Save As under a filename with the
extension *.C. We are saving our example file under the name MAIN.C.
The STARTUP.A51 file is the startup code for the most 8051 CPU variants. The startup
code clears the data memory and initializes hardware and reentrant stack pointers. In addition,
some 8051 derivatives require a CPU initialization code that needs to match the configuration of
your hardware design. For example, the Philips 8051RD+ offers you on-chip xdata RAM that
should be enabled in the startup code. Since you need to modify that file to match your target
hardware, you should copy the STARTUP.A51 file from the folder C:\KEIL\C51\LIB to your
project folder.
Group Project Files
59
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
File group allow you to organize large projects. For the CPU startup code and other
system configuration files you may create a own file group in the Project Components,
Environment, Books dialog box. Use the New (Insert) button to create a file group named
System Files. In the project window you may drag and drop the STARTUP.A51 file to this new
file group.
60
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
Vision lets you set options for your target hardware. The dialog Options for Target
opens via the toolbar icon or via the Project - Options for Target menu item. In the Target tab you
specify all relevant parameters of your target hardware and the on-chip components of the device
you have selected. The following the settings for our example are shown.
Typical, the tool settings under Options Target are all you need to start a new
application. You may translate all source files and line the application with a click on the Build
Target toolbar icon. When you build an application with syntax errors, Vision will display
errors and warning messages in the Output Window Build page. A double click on a message
line opens the source file on the correct location in a Vision editor window.
61
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
62
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
4.3 FLASH
FLASH is a PC tool for programming flash based microcontrollers from NXP using a
serial protocol while in the target hardware.
Features
use
Read the device signature
Read any section of Flash and save as an Intel Hex File
63
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
Reprogram the Boot Vector and Status Byte with the help of confirmation features that
home page
Ability to use high-speed serial communications on devices that support it. Flash Magic
calculates the highest baud rate that both the device and your PC can use and switches to
access.
Able to send commands to place the device in Boot ROM mode, with support for
command line interfaces. The installation includes an example project for the Keil and
Resonance 8051 compilers that show how to build support for this feature into
applications.
Able to play any Wave file when finished programming.
Built in automated version checker - helps ensure you always have the latest version.
Powerful, flexible Just In Time Code feature. Write your own JIT Modules to generate
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
Displays information about the selected Hex File, including the creation and modification
dates, flash memory used, percentage of the current device used.
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
66
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
What is the main difference between the dotted PCB and layout PCB?
In dotted PCB board only dots are available. According to our requirement we can place
or insert the components in those holes and attach the components with wires and soldering lid.
In this dotted PCB we can make the circuit as out wish but it is very hard to design. There are so
many difficulties are there. Those are connecting the proper pins, avoiding shot connections and
etc. Coming to the layout PCB this is simple to design. First we select the our circuit and by
using different PCB designing softwares, design the layout of the circuit and by itching process
preparing the copper layout of our circuit and solder the components in the correct places. It is
simple to design, take less time to design, no shortages, looking nice and perfect.
Up to now we have discussed about types of PCBs and difference between the types. Now we
can discuss about PCB designing software. There are so many PCB designing softwares
available. Some are Express PCB, eagle PCB, PCB Elegance, free PCB, open circuit
design,zenith PCB and Proteus etc. Apart from remaining Proteus is different. Proteus is design
suit and PCB layout designing software. In Proteus we can design any circuit and simulate the
circuit and make PCB layout for that circuit.
Introduction to Proteus:
Proteus professional is a software combination of ISIS schematic capture program and ARES
PCB layout program. This is a powerful and integrated development environment. Tools in this
67
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
suit are very easy to use and these tools are very useful in education and professional PCB
designing. As professional PCB designing software with integrated space based auto router, it
provides features such as fully featured schematic capture, highly configurable design rules,
interactive SPICE circuit simulator, extensive support for power planes, industry standard
CADCAM & ODB++ output and integrated 3D viewer.
Up to know we have discussed about the basics and software description. Now we are
entering into the designing section. Run the ISIS professional program by clicking the icon on
the desktop, then this splash screen will appear.
Next, a work space with interface buttons for designing circuit will appear as
shown in figure below. Note that there is a blue rectangular line in the workspace; make sure that
whole circuit is designed inside the rectangular space.
68
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
69
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
CHAPTER 5
SOURCE CODE
#include<reg52.h>
sbit pir1=P2^7;
sbit pir2=P2^6;
sbit pir3=P2^5;
sbit pir4=P2^4;
sbit relay1=P3^7;
//bulb
sbit relay2=P3^6;
//fan
sbit temp=P1^0;
sbit led=P2^0;
void delay(unsigned int time)
// delay function
{
unsigned int i,j;
for(i=0;i<time;i++)
for(j=0;j<1275;j++);
}
void main()
{
pir1=pir2=pir3=pir4=0;
led=relay1=relay2=0;
70
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
while(1)
{
led=1;
delay(100);
led=0;
delay(100);
led=1;
delay(100);
led=0;
delay(100);
if(pir1==1)
{
relay1=1;
led=1;
}
else if(pir2==1)
{
relay1=1;
led=1;
}
else if(pir3==1)
71
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
{
relay1=1;
led=1;
}
else if(pir4==1)
{
relay1=1;
led=1;
}
else if(temp==1)
{
relay2=1;
led=1;
}
else
{
relay1=relay2=0;
led=0;
}
}
}
72
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
CONCLUSION
The project PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND
CONFERENCE HALL has been successfully completed and tested with integration of the
features of every hardware component for its development. Presence of every block has been
reasoned out and placed carefully thus contributing to the best working of the unit.
The project is built using very simple and easily available components making it
lightweight and portable. This helps for power saving and decreasing manual work purpose in
important areas.
We believe that our step is towards complete automation for different electrical loads in home and
industries.
Finally we conclude that this project application gives very good features and there is huge scope
for further research and development
73
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
74
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
75
Department of ECE
VMTW
PIR SENSOR BASED POWER SAVER FOR AUDITORIUM AND CONFERENCE HALL
MN12-B2
76
Department of ECE
VMTW