report on intelligent energy conservation system

58
THAKRAL COLLEGE OF TECHNOLOGY ACKNOWLEDGEMENT It is a privilege to express our deep sense of gratitude to our guide Mr. Amit Shrivastav, Department of Electrical & electronics Engineering, TCT, Bhopal, M.P. for his constant encouragement, valuable guidance and benevolent help, which was of greatest support to bring this work in its present shape. This work is the result of inspiration, support, guidance, motivation, cooperation and facilities that were extended to us at their best at all levels. The discussion with them regarding various issues of our project has been very beneficial and gave us a new direction of thinking. All these discussions have indeed played a vital role in progress of our work at many critical points during my endeavor. We are highly indebted to Mr. AMIT SHRIVASTAV, Head, Department of Electrical & Electronics Engineering, TCT, Bhopal for providing us all the necessary facilities and guidance. - 1 -

Upload: vyomesh-upadhyay

Post on 19-Jan-2015

4.846 views

Category:

Technology


3 download

DESCRIPTION

 

TRANSCRIPT

Page 1: report on intelligent energy conservation system

THAKRAL COLLEGE OF TECHNOLOGY

ACKNOWLEDGEMENT

It is a privilege to express our deep sense of gratitude to our guide Mr. Amit

Shrivastav, Department of Electrical & electronics Engineering, TCT, Bhopal, M.P.

for his constant encouragement, valuable guidance and benevolent help, which was of

greatest support to bring this work in its present shape. This work is the result of

inspiration, support, guidance, motivation, cooperation and facilities that were

extended to us at their best at all levels. The discussion with them regarding various

issues of our project has been very beneficial and gave us a new direction of thinking.

All these discussions have indeed played a vital role in progress of our work at many

critical points during my endeavor.

We are highly indebted to Mr. AMIT SHRIVASTAV, Head, Department of Electrical

& Electronics Engineering, TCT, Bhopal for providing us all the necessary facilities

and guidance.

We are thankful to our faculties for their valuable lectures in

Microcontroller , Energy conservation & management, switch gear and

EDC etc. which helped us in designing this project. We would also like

to acknowledge ones, who, from behind the scenes have contributed

their ideas and energies.

VYOMESH UPADHYAY 0126EX101066

- 1 -

Page 2: report on intelligent energy conservation system

ABSTRACT

Intelligent Energy Saving System can be used in places like where lighting is

very important. The libraries will be well illuminated with many lamps. When people

are not present at a reading place the lighting can be made OFF and when they are

present, the lighting made ON. All these can be done through by Dimming circuit and

PIR sensor.

If a person entering to the monitored area, the PIR sensors activates and sense

the person, gives to the micro controller. The Infrared energy emitted from the living

body is focused by a Fresnel lens segment. Then only the PIR sensor activates. After

sensing the person LDR checks the light intensity of the monitored area, whether it

is bright or dark. Depending on the LDR output, the lamp may be ON / OFF by using

Dimmer circuit.

By using this system we can adjust the speed of Fan according to the room

temperature measured by Thermostat, which is connected to the micro controller.

To display the room temperature of PIR mode operation we are using the LCD

display.

- 2 -

Page 3: report on intelligent energy conservation system

INDEX

1. INTRODUCTION

1.1 Objective of the Project

1.2 Block Diagram

1.3 Pinciple Of Operation

1.4 System Features

1.5 Equipments

2. DESCRIPTION OF THE PROJECT

2.1 Block Diagram Description

2.2 Schematic Diagrams

2.3 Schematic Explanation

3. HARDWARE DESCRIPTION

3.1 Microcontroller (ATMEGA 8A)

3.2 Passive Infrared Sensor

3.3 Light Dependent Resistor

3.4 LM 324

3.5 ULN 2003

3.6 Potentiometer

3.7 LM 7805

4. SOWFTWARE DESCRIPTION

4.1 Source Code

5. RESULT

6. CONCLUSION AND FUTURE DIRECTIONS

BIBLIOGRAPHY

- 3 -

Page 4: report on intelligent energy conservation system

LIST OF FIGURES

1. Block Diagram

2. Schematic Diagram

3. Architecture 0f atmega8bA

4. Pin Diagram of atmega8bA

5. Operation of PIR Diagram

6. Operation of LDR Diagram

7. Operation of LM 324 Diagram

8. Operation of ULN 2003 Diagram

9. Operation of Potentiometer Diagram

10.Operation of LM 7805 Diagram

- 4 -

Page 5: report on intelligent energy conservation system

INTRODUCTION

Intelligent Energy Saving System, the aim of the project is to save the

energy. In this project we are using various sensors, controlling and display.

However, in this project work the basic signal processing of various

parameters which are temperature, LDR, for measuring various parameters values,

various sensors are used and the output of these sensors are converted to control the

parameters. The control circuit is designed using micro-controller. The outputs of all

the two parameters are fed to micro-controller. This relay energizes and de-energizes

automatically according to the condition of the parameter.

1.1 OBJECTIVE OF THE PROJECT: -

The aim of the project is to save the energy or power, used in places like

libraries where lighting is very important for the people who come to read books. So,

the libraries will be well illuminated with many lamps.

At the same time when people are not present at a particular reading place the

lighting can be made off by using relay and when people come to that area, according

to the LDR lighting can be made sufficiently brighter.

- 5 -

Page 6: report on intelligent energy conservation system

1.2 PRINCIPLE OF OPERATION

Consider a particular table in the library, which is connected with our

experimental kit .When a person entering into that place the PIR sensor absorbs the

black body radiation emitted by that person and activates it. The LCD display will

displays the “PIR ON”.

After some time delay the light will glows for some time by using the Dimmer

circuit and with the help of LDR sensor it checks the room lightening , and it takes the

condition when the light is sufficient the lamp will be in OFF state and when light is

insufficient the lamp will be in ON state.

When a person is leaving that place, the PIR sensor will activate again and

firstly the Fan will be OFF and after some time delay the lamp also will be OFF.. And

the main supply power will be switched OFF.

- 6 -

Page 7: report on intelligent energy conservation system

1.3 BLOCK DIAGRAM:

1.

- 7 -

MICROCONTROMICROCONTROLLERLLER

ATMEGA 8AATMEGA 8A

MICROCONTROMICROCONTROLLERLLER

ATMEGA 8AATMEGA 8A

PIR PIR MOTION MOTION SENSORSENSOR

PIR PIR MOTION MOTION SENSORSENSOR

LDR LDR CIRCUITCIRCUIT

LDR LDR CIRCUITCIRCUIT

FANFANLOADLOADFANFAN

LOADLOAD

POWER SUPPLYPOWER SUPPLY

RELAYRELAYRELAYRELAY

RELAYRELAYRELAYRELAY

LAMP LAMP LOADLOADLAMP LAMP LOADLOAD

Page 8: report on intelligent energy conservation system

4 System Features:

Easy operation

Convenient

Affordable

Required Skills:

Understanding of Micro controller

Embedded C Programming

Understanding Interfacing Techniques

Knowledge on Sensors

Design and Fabrication of PCB

Project phase: -

Schematic design and drawing of PCB

Design and Interfacing Circuits for Micro controller

Preparation of PCB

Assembling and Testing of Interfacing Circuits

Code for the Application

Debugging and Testing

Project Report

- 8 -

Page 9: report on intelligent energy conservation system

1.4 EQUIPMENTS: -

Printed Circuit Board

Micro controller à atmega8A

5V, 12V Dc Power supply

IR sensor à Passive Infrared Sensor

LDR à Light Dependent Resistor

Relay 12V

LM324

IC 7805

ULN 2003

Potentiometer

Lamp

Fan

- 9 -

Page 10: report on intelligent energy conservation system

DESCRIPTION OF THE PROJECT

2.1 BLOCK DIAGRAM EXPLANATION: -

PIR SENSOR: - A PIR detector is a motion detector that senses the heat emitted by a

living body. These are often fitted to security lights so that they will switch on

automatically if approached. They are very effective in enhancing home security

systems.

The sensor is passive because, instead of emitting a beam of light or

microwave energy that must be interrupted by a passing person in order to “sense”

that person, the PIR is simply sensitive to the infrared energy emitted by every living

thing. When an intruder walks into the detector’s field of vision, the detector “sees” a

sharp increase in infrared energy.

LDR: - LDR’s or Light Dependent Resistors are very useful especially in

light/dark sensor circuits. These help in automatically switching ON /OFF the street

lights and etc., normally the resistance of an LDR is very high, sometimes as very

high as 1000000 ohms, but when they are illuminated with light, resistance drop

dramatically. Electronic opto sensors are the devices that alter their electrical

characteristics, in the presence of visible or invisible light. The best-known devices of

these types are the light dependent resistor (LDR), the photo diode and the

phototransistors.

- 10 -

Page 11: report on intelligent energy conservation system

RELAYA relay is an electrically operated switch. Many relays use an electromagnet to

operate switching operation mechanically.

It is 5 terminal device consisting of 1 coil.

When coil is enerzised then a slit is moves from one point to another point

LM324

LM324 is a 14pin IC consisting of four independent operational amplifiers (op-amps) compensated in a single package. Op-amps are high gain electronic voltage amplifier with differential input and, usually, a single-ended output. The output voltage is many times higher than the voltage difference between input terminals of an op-amp.

These op-amps are operated by a single power supply LM324 and need for a dual supply is eliminated. They can be used as amplifiers, comparators, oscillators, rectifiers etc. The conventional op-amp applications can be more easily implemented with LM324.

POTENTIOMETER

The humble potentiometer (or pot, as it is more commonly known) is a simple electro-mechanical transducer. It converts rotary or linear motion from the operator into a change of resistance, and this change is (or can be) used to control anything from the volume of a hi-fi system to the direction of a huge container ship.

The pot as we know it was originally known as a rheostat (or reostat in some texts) - essentially a variable wirewound resistor. The array of different types is now quite astonishing, and it can be very difficult for the beginner (in particular) to work out which type is suitable for a given task. The fact that quite a few different pot types can all be used for the same task makes the job that much harder - freedom of choice is at best confusing when you don't know what the choices actually are, or why you should make them. This article is not about to cover every aspect of pots, but is an introduction to the subject. For anyone wanting to know more, visit manufacturers' web sites, and have a look at the specifications and available types.

The very first variable resistors were either a block of carbon (or some other resistive material) with a sliding contact, or a box full of carbon granules, with a threaded screw to compress the granules. More compression leads to lower resistance, and vice versa. These are rare in modern equipment, so we shall limit ourselves to the more common types

- 11 -

Page 12: report on intelligent energy conservation system

IC 7805

IC 7805 is a 5v voltage regulator that restricts the voltage output to 5v. It is a member of 78xx series of fixed linear voltage regulator ICs.Genraly it is used for the protection of ICs and other electronic elements because it works on under 5v. if supply is more than 5v so it can harm to the microcontroller.

ULN 2003

1.SEVEN DARLINGTONS PER PACKAGE OUTPUT CURRENT 500mA PER DRIVER2.(600mA PEAK) .OUTPUT VOLTAGE 50V INTEGRATED SUPPRESSION DIODES FOR3.INDUCTIVE LOADS OUTPUTS CAN BE PARALLELED FOR4.HIGHER CURRENT .TTL/CMOS/PMOS/DTL COMPATIBLE INPUTS INPUTS PINNED OPPOSITE OUTPUTS TOSIMPLIFY LAYOUT

LOADIn this intelligent energy saving system we are using two loads, lamp and Fan.

According to the light intensity of the particular room or cabin the LDR will senses,

depending on the LDR output the lamp will be ON/OFF. This system is only

applicable for lamps and not applicable for tube lights, because the starting voltage of

the tube lights is high compared to lamps.

- 12 -

Page 13: report on intelligent energy conservation system

.2 SCHEMATIC DIAGRAM: -

- 13 -

Page 14: report on intelligent energy conservation system

HARDWARE DESCRIPTION

MICROCONTROLLER-ATMEGA-8A

Features• High-performance, Low-power Atmel®AVR® 8-bit Microcontroller• Advanced RISC Architecture– 130 Powerful Instructions – Most Single-clock Cycle Execution– 32 x 8 General Purpose Working Registers– Fully Static Operation– Up to 16MIPS Throughput at 16MHz– On-chip 2-cycle Multiplier• High Endurance Non-volatile Memory segments– 8KBytes of In-System Self-programmable Flash program memory– 512Bytes EEPROM– 1KByte Internal SRAM– Write/Erase Cycles: 10,000 Flash/100,000 EEPROM– Data retention: 20 years at 85C/100 years at 25C(1)

– Optional Boot Code Section with Independent Lock Bits• In-System Programming by On-chip Boot Program• True Read-While-Write Operation– Programming Lock for Software Security• Atmel QTouch® library support– Capacitive touch buttons, sliders and wheels– Atmel QTouch and QMatrix acquisition– Up to 64 sense channels• Peripheral Features– Two 8-bit Timer/Counters with Separate Prescaler, one Compare Mode– One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture Mode– Real Time Counter with Separate Oscillator– Three PWM Channels– 8-channel ADC in TQFP and QFN/MLF package• Eight Channels 10-bit Accuracy– 6-channel ADC in PDIP package• Six Channels 10-bit Accuracy– Byte-oriented Two-wire Serial Interface– Programmable Serial USART– Master/Slave SPI Serial Interface– Programmable Watchdog Timer with Separate On-chip Oscillator– On-chip Analog Comparator• Special Microcontroller Features– Power-on Reset and Programmable Brown-out Detection

- 14 -

Page 15: report on intelligent energy conservation system

– Internal Calibrated RC Oscillator– External and Internal Interrupt Sources– Five Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, and Standby• I/O and Packages– 23 Programmable I/O Lines– 28-lead PDIP, 32-lead TQFP, and 32-pad QFN/MLF• Operating Voltages– 2.7 - 5.5V– 0 - 16MHz• Power Consumption at 4MHz, 3V, 25C– Active: 3.6mA– Idle Mode: 1.0mA

PIN DIAGRAM

- 15 -

Page 16: report on intelligent energy conservation system

ARCHITECTURE

- 16 -

Page 17: report on intelligent energy conservation system

3.2 PASSIVE INFRARED SENSOR (PIR): -

A PIR detector is a motion detector that senses the heat emitted by a living

body. These are often fitted to security lights so that they will switch on automatically

if approached. They are very effective in enhancing home security systems.

The sensor is passive because, instead of emitting a beam of light or

microwave energy that must be interrupted by a passing person in order to “sense”

that person, the PIR is simply sensitive to the infrared energy emitted by every living

thing. When an intruder walks into the detector’s field of vision, the detector “sees” a

sharp increase in infrared energy.

A PIR sensor light is designed to turn on when a person approaches, but will

not react to a person standing still. The lights are designed this way. A moving person

exhibits a sudden change in infrared energy, but a slower change is emitted by a

motionless body. Slower changes are also caused by gradual fluctuations in the

temperature of the environment. If the light were sensitive to these slower changes, it

would react to the sidewalk cooling off at night, instead of the motion of a burglar.

If you have a PIR light, you may notice that it is more sensitive on cold days

than on warm days. This is because the difference in temperature between the ambient

air and the human body is greater on cold days, making the rise in temperature easier

for the sensor to detect. This has drawbacks, though; if the sensor is too sensitive, it

will pick up things you don’t want it to such as the movement of small animals.

Passive infrared sensor is an electronic device, which measures infrared light

radiating from objects in its field of view. PIRs are often used in the construction of

PIR-based motion detectors. Apparent motion is detected when an infrared source

with one

temperature, such as a human, passes in front of an infrared source with another

temperature, such as a wall.

- 17 -

Page 18: report on intelligent energy conservation system

All objects emit what is known as black body radiation. This energy is

invisible to the human eye but can be detected by electronic devices designed for such

a purpose. The term 'Passive' in this instance means the PIR does not emit energy of

any type but merely accepts incoming infrared radiation.

Infrared radiation enters through the front of the sensor, known as the sensor

face. At the core of a PIR is a solid state sensor or set of sensors, made from

approximately 1/4 inches square of natural or artificial pyroelectric materials, usually

in the form of a thin film, out of gallium nitride (GaN), caesium nitrate (CsNO3),

polyvinyl fluorides, derivatives of phenylpyrazine, and cobalt phthalocyanine. (See

pyroelectric crystals.) Lithium tantalate (LiTaO3) is a crystal exhibiting both

piezoelectric and pyroelectric properties.

The sensor is often manufactured as part of an integrated circuit and may

consist of one (1), two (2) or four (4) 'pixels' of equal areas of the pyroelectric

material. Pairs of the sensor pixels may be wired as opposite inputs to a differential

amplifier. In such a configuration, the PIR measurements cancel each other so that the

average temperature of the field of view is removed from the electrical signal; an

increase of IR energy across the entire sensor is self-cancelling and will not trigger the

device. This allows the device to resist false indications of change in the event of

being exposed to flashes of light or field-wide illumination. (Continuous bright light

could still saturate the sensor materials and render the sensor unable to register further

information.)

At the same time, this differential arrangement minimizes common-mode

interference; this allows the device to resist triggering due to nearby electric fields.

However, a differential pair of sensors cannot measure temperature in that

configuration and therefore this configuration is specialized for motion detectors.

In a PIR-based motion detector, the PIR sensor is typically mounted on a

printed circuit board, which also contains the necessary electronics required to

interpret the signals from the chip. The complete circuit is contained in a housing,

which is then mounted in a location where the sensor can view the area to be

- 18 -

Page 19: report on intelligent energy conservation system

monitored. Infrared energy is able to reach the sensor through the window because the

plastic used is transparent to infrared radiation (but only translucent to visible light).

This plastic sheet prevents the introduction of dust and insects, which could obscure

the sensor's field of view.

OPERATION OF PIR SENSOR:

A few mechanisms have been used to focus the distant infrared energy onto

the sensor surface. The window may have Fresnel lenses molded into it. Alternatively,

sometimes PIR sensors are used with plastic segmented parabolic mirrors to focus the

infrared energy; when mirrors are used, the plastic window cover has no Fresnel

lenses molded into it. A filtering window (or lens) may be used to limit the

wavelengths to 8-14 micrometers, which is most sensitive to human infrared radiation

(9.4 micrometers being the strongest).

The PIR device can be thought of as a kind of infrared ‘camera’, which

remembers the amount of infrared energy focused on its surface. Once power is

applied to the PIR the electronics in the PIR shortly settle into a quiescent state and

energize a small relay. This relay controls a set of electrical contacts, which are

usually connected to the detection input of an alarm control panel. If the amount of

infrared energy focused on the sensor changes within a configured time period, the

device will switch the state of the alarm output relay. The alarm output relay is

typically a "normally closed (NC)" relay; also know as a "Form B" relay.

A person entering the monitored area is detected when the infrared energy

emitted from the intruder's body is focused by a Fresnel lens or a mirror segment and

overlaps a section on the chip, which had previously been looking at some much

cooler part of the protected area. That portion of the chip is now much warmer than

when the intruder wasn't there. As the intruder moves, so does the hot spot on the

surface of the chip. This moving hot spot causes the electronics connected to the chip

to de-energize the relay, operating its contacts, thereby activating the detection input

on the alarm control panel. Conversely, if an intruder were to try to defeat a PIR

perhaps

- 19 -

Page 20: report on intelligent energy conservation system

By holding some sort of thermal shield between himself and the PIR, a corresponding

'cold' spot moving across the face of the chip will also cause the relay to de-energize

unless the thermal shield has the same temperature as the objects behind it.

Manufacturers recommend careful placement of their products to prevent false

alarms. They suggest mounting the PIRs in such a way that the PIR cannot 'see' out of

a window. Although the wavelength of infrared radiation to which the chips are

sensitive does not penetrate glass very well, a strong infrared source (a vehicle

headlight, sunlight reflecting from a vehicle window) can overload the chip with

enough infrared energy to fool the electronics and cause a false (non-intruder caused)

alarm. A person moving on the other side of the glass however would not be 'seen' by

the PIR.

They also recommended that the PIR not be placed in such a position that an

HVAC vent would blow hot or cold air onto the surface of the plastic, which covers

the housing's window. Although air has very low emissivity (emits very small

- 20 -

Page 21: report on intelligent energy conservation system

amounts of infrared energy), the air blowing on the plastic window cover could

change the plastic's temperature enough to, once again, fool the electronics.

PIRs come in many configurations for a wide variety of applications. The

most common used in home security systems has numerous Fresnel lenses or mirror

segments and has an effective range of about thirty feet. Some larger PIRs are made

with single segment mirrors and can sense changes in infrared energy over one

hundred feet away from the PIR. There are also PIRs designed with reversible

orientation mirrors, which allow either broad coverage (110° wide) or very narrow

'curtain' coverage.

PIRs can have more than one internal sensing element so that, with the

appropriate electronics and Fresnel lens, it can detect direction. Left to right, right to

left, up or down and provide an appropriate output signal.

3.3 LIGHT DEPENDENT RESISTOR: -

LDRs or Light Dependent Resistors are very useful especially in light/dark

sensor circuits. Normally the resistance of an LDR is very high, sometimes as high as

1000 000 ohms, but when they are illuminated with light resistance drops

dramatically.

Electronic opto sensors are the devices that alter their electrical characteristics,

in the presences of visible or invisible light. The best-known devices of this type are

the light dependent resistor (LDR), the photo diode and the phototransistors.

Light dependent resistor as the name suggests depends on light for the

variation of resistance.

LDR are made by depositing a film of cadmium sulphide or cadmium selenide

on a substrate of ceramic containing no or very few free electrons when not

illuminated. The film is deposited in a zig zag fashion in the form of a strip. The

longer the strip the more the value of resistance.

- 21 -

Page 22: report on intelligent energy conservation system

When light falls on the strip, the resistance decreases. In the absence of light

the resistance can be in the order of 10K ohm to 15K ohm and is called the dark

resistance.

Depending on the exposure of light the resistance can fall down to value of

500 ohms. The power ratings are usually smaller and are in the range 50mw to .5w.

Though very sensitive to light, the switching time is very high and hence cannot be

used for high frequency applications. They are used in chopper amplifiers.

Light dependent resistors are available as discs 0.5cm to 2.5cm. The resistance

rises to several Mega ohms under dark conditions.

The below figure shoes that when the torch is turned on, the resistance of the

LDR falls, allowing current to pass through it is shown in figure.

The basic construction and symbol for LDR are shown in above figures

respectively. The device consists of a pair of metal film contacts. Separated by a

snakelike track of cadmium sulphide film, designed to provide the maximum possible

contact area with the two metal films. The structure is housed in a clear plastic or

resin case, to provide free access to external light. Practical LDRs are available in

variety of sizes and packages styles, the most popular size having a face diameter of

roughly 10mm. practical LDR is shown in below figure.

- 22 -

Page 23: report on intelligent energy conservation system

Spectral response:

The resistors are only light dependent over a limited range of wavelengths.

LDRs have their maximum response at about 680nm.

Temperature dependency:

Electrons can be excited not only by photons but also by thermal agitation.

The dark resistance is therefore not infinite at normal temperatures. It increases with

the ambient temperature coefficient is, however, very small and can be neglected.

Recovery rate:

When an LDR is brought from a certain illuminating level into total darkness,

the resistance does not increase immediately to the dark value. The recovery rate is

specified in k ohm/second and for current LDR types it is more than 200k

ohm/second. The recovery rate is much greater in the reverse direction, e.g. going

from darkness to illumination level of 300 lux, it takes less than 10ms to reach a

resistance which corresponds with a light level of 400 lux.

LDRs are sensitive, inexpensive, and readily available devices. They have

good power and voltage handling capabilities, similar to those of a conventional

resistor. Their only siginificant defect is that they are fairly low acting, taking tens or

hundreds of LDR include light and dark-activated switches and alarms, light beam

- 23 -

Page 24: report on intelligent energy conservation system

alarms and reflective smoke alarms etc. A LDR may be connected either way round

and no special precautions are required when soldering.

Darkness: Maximum resistance, about 1Mohm.

Very bright light: Minimum resistance, about 100 ohm.

The LDR is a variable resistor whose resistance decreases with the increase in

light intensity. Two cadmium sulphide (cds) photoconductive cells with spectral

response similar to that of the human eye. The cell resistance falls with increasing

light intensity.

LDR Circuit Diagram: -

Features:

High reliability

Light weight

Wide spectral response

Wide ambient temperature range

- 24 -

Page 25: report on intelligent energy conservation system

Applications:

Smoke detection

Automatic lighting control

Burglar alarm systems

Camera (electronic shutter)

Strobe (color temperature reading)

LM324

LM324 is a 14pin IC consisting of four independent operational amplifiers (op-amps) compensated in a single package. Op-amps are high gain electronic voltage amplifier with differential input and, usually, a single-ended output. The output voltage is many times higher than the voltage difference between input terminals of an op-amp.

These op-amps are operated by a single power supply LM324 and need for a dual supply is eliminated. They can be used as amplifiers, comparators, oscillators, rectifiers etc. The conventional op-amp applications can be more easily implemented with LM324.

Pin Diagram:

- 25 -

Page 26: report on intelligent energy conservation system

Pin Description:

 Pin No

 Function  Name

1 Output of 1st comparator Output 12 Inverting input of 1st comparator Input 1-3 Non-inverting input of 1st comparator Input 1+4 Supply voltage; 5V (up to 32V) Vcc5 Non-inverting input of 2nd comparator Input 2+6 Inverting input of 2nd comparator Input 2-7 Output of 2nd comparator Output 28 Output of 3rd comparator Output 39 Inverting input of 3rd comparator Input 3-

10 Non-inverting input of 3rd comparator Input 3+11 Ground (0V) Ground12 Non-inverting input of 4th comparator Input 4+13 Inverting input of 4th comparator Input 4-14 Output of 4th comparator Output 4

POTENTIOMETER

Introduction

The humble potentiometer (or pot, as it is more commonly known) is a simple electro-mechanical transducer. It converts rotary or linear motion from the operator into a change of resistance, and this change is (or can be) used to control anything from the volume of a hi-fi system to the direction of a huge container ship.

The pot as we know it was originally known as a rheostat (or reostat in some texts) - essentially a variable wirewound resistor. The array of different types is now quite astonishing, and it can be very difficult for the beginner (in particular) to work out which type is suitable for a given task. The fact that quite a few different pot types can all be used for the same task makes the job that much harder - freedom of choice is at best confusing when you don't know what the choices actually are, or why you should make them. This article is not about to cover every aspect of pots, but is an introduction to the subject. For anyone wanting to know more, visit manufacturers' web sites, and have a look at the specifications and available types.

The very first variable resistors were either a block of carbon (or some other resistive material) with a sliding contact, or a box full of carbon granules, with a threaded screw to compress the granules. More compression leads to lower resistance, and vice versa. These are rare in modern equipment, so we shall limit ourselves to the more common types

- 26 -

Page 27: report on intelligent energy conservation system

Basic Pots and Knobs

It is worthwhile to have a look at a few of the common pot types that are available. Figure 1 shows an array of conventional pots - both PCB and panel mounting.

Figure 1 - Some Examples of Pots

Note that these are not to scale, although the relative sizes are passably close. Apart from the different body shapes and sizes, there are also many "standard" mounting hole and shaft sizes. Probably the most common of all is the one in the centre of the picture. A panel mount, 25 millimetre (1") diameter pot. This uses a 10mm (3/8") mounting hole, and has a 6.35mm (1/4") shaft. These pots have been with us almost unchanged for 40 years or more.

The remainder show a few of the many variations available. The fluted shaft types are commonly referred to as "metric", but will accept a standard 1/4" knob - albeit with a little play (it is less than a perfect fit, but is acceptable if the grub screw is tight enough). Metric pots are also available in 16mm round and 25mm round formats.

Most rotary pots have 270 degrees of rotation from one extreme to the other. A "single turn" pot is therefore really only a 3/4 turn device, despite the name. There are some other rotary types with only 200 degrees or so, and some specialty types may have less than that again.

The standard schematic symbol for a pot is shown to the left (although some people insist on using zig-zag lines for resistors and pots, I don't and never have, so don't expect me to start now . A little later, we shall look at the many ways a standard pot may be wired, as well as some further explanations of the different "law" or taper used. Project 01 has been on this site for a long time now, and is a simple and effective way to create an almost logarithmic taper from a linear pot - but I am getting ahead of myself here.

First, we need to continue with the examination of the basic types (and you thought the above small sample was enough ) Well, as they say ... "You ain't seen nothin' yet!"

- 27 -

Page 28: report on intelligent energy conservation system

Knobs Before we look at other pot types, a quick sample of knobs. Yes, I know that everyone has seen knobs, but a dissertation on pots would be less than complete if I didn't include these.

Figure 2 - Some Examples of Knobs

Of these, only one deserves special mention - the one on the left. This is a multi turn vernier readout (analogue in this case) for a standard pot. Typically used with precision wirewound or conductive plastic pots, these used to be common on equipment where very accurate (and repeatable) settings were required. They are expensive, but in their day were almost indispensable. Now, a digital panel meter is cheaper, and considered much more "high tech" - such is progress, but at the expense of the "olde worlde" charm of a mechanical contrivance. And yes, you can still get them!

The remainder are perfectly ordinary knobs, and again, are but a very small sample of those available from a multiplicity of manufacturers. Most cheap knobs are plastic, but they are available with brass inserts, in solid aluminium (brushed, anodised, etc.), plastic innards with a thin aluminium outer shell or just an insert. You can even buy audiophool audiophile solid wood knobs, optionally coated with special lacquer that is designed to make you think the sound has improved (nudge-nudge, wink-wink ). The list is endless, but I shall end it here.

Putting Pot to Use

Well, that part is simple, isn't it? Judging from the number of e-mails I get asking about how to wire pots, the answer is obviously "no". Being 3 terminal devices (for a single gang), there are quite a few different ways that they can be wired. Connection to a single terminal is rather pointless, so at least that eliminates three "possibilities". At this point, a diagram is needed ...

- 28 -

Page 29: report on intelligent energy conservation system

Figure 6 - Potentiometer Terminals and Connections

As shown in Figure 6, a pot is usually wired using all three terminals, and I have used the same numbering scheme as in Figure 5. One terminal (1) is earthed (grounded) for use as a volume control - the most common usage. This allows the wiper to be turned all the way to zero signal for maximum attenuation. Note that if the earth terminal were to be left disconnected, all we have is a variable series resistance, whose effectiveness will be minimal in typical circuitry. This is still a common usage however, but for different reasons (see below).

Turning the shaft clockwise (CW - by convention, to move pin 2 physically closer to pin 3, and increase (for example) volume) will select a different point along the resistance element, and forms a voltage divider, so the attenuation of the signal is proportional to the rotation of the shaft. At the fully clockwise position, there is close to zero ohms in series with the signal, and the full resistance of the pot to earth. Attenuation at this setting is zero (assuming a zero or low impedance source - this is often overlooked!), and this is full volume (maximum signal level).

The source impedance should normally be no greater than 1/10th (0.1) of the pot's stated resistance. Further, the load resistance or impedance should be 10 times the pot's resistance to prevent the taper from being adversely affected. You may (of course) be deliberately loading the pot as described below, but the following stage must still present a high impedance unless its impedance has been included in your calculations.

The second form of connection is a variable resistor. Not usable as a volume control, but still extensively used for other applications. It is common (and preferable) to join two of the leads together - the wiper, and one end or the other. The actual connection depends on what you are trying to achieve, and since there are so many possibilities, I won't even try to explain them all. When used in this mode it is most commonly refererred to as a variable resistance or resistor - the word rheostat is somewhat dated (to put it mildly) and is not a term that I use in any of my articles.

To get an idea of the different configurations that are in common use, have a look at the ESP Projects pages, and those on other web sites. The number of possibilities is actually not that great, but people use different conventions as well. For example, in Australia, we use the term "anti-clockwise" or ACW. In the US, this is "counter-clockwise" or CCW. At least the term clockwise seems to be common to both

- 29 -

Page 30: report on intelligent energy conservation system

countries :-) Naturally enough, these are only two conventions, and I am unsure of the terminology in other countries - especially if they don't use English (and why would they, if they already have a language of their own).

As a completely irrelevant side issue, the Web is changing this quite quickly, as the majority of web sites are in English.

Figure 7 - Volume and Balance Controls

Figure 7 assumes the use of a log pot for volume. The balance control can be done in many different ways, with that shown being but one. Quite a lot of Japanese equipment uses a dual gang pot for balance, but the resistance element only goes for half the travel. When set in the centre position, there is no loss at all, and rotation in either direction attenuates the appropriate channel, but leaves the other unaffected. This is yet another type of custom pot, made for a specific purpose. I know of no manufacturer that sells such an item through the normal distribution channels, so home builders have to come up with different ways to achieve the same (or similar) things. The balance control as shown above (with the values shown) will give a response very similar to the more complex version described in the next section.

Changing the Law of a Pot

Using pots can be done in the conventional way, or you can get adventurous and achieve a lot more. A good example is the "Better Volume Control" shown in Project 01. The other ideas presented also show how you can make modifications to the way a pot behaves, just by adding a resistor (R). The "ideal" value by calculation is 22k for a 100k pot, and this gives a maximum deviation of +1.58 and -1.7dB from a real log curve. This is contrast to the original article, where 15k was suggested, and although the error is greater (+2.89dB and -1.12dB), the overall behaviour is almost ideal in listening tests.

- 30 -

Page 31: report on intelligent energy conservation system

Figure 8 - A Better Volume Control

Take a look at the balance control (below) as an example. The conventional balance control requires either a log/antilog pot (virtually impossible to obtain), or one of the special types commonly used in Japanese consumer hi-fi gear. About the only way you'll get one of those is to remove it from the equipment - again, they are virtually impossible to get from normal hobbyist suppliers.

Add a couple of resistors to a dual gang linear pot, and the problem is solved. Not only is the pot heavily "centre weighted", but will also maintain a relatively constant sound level as the balance is changed from full Left to full Right. The centre weighting means that for most of the pot's travel, the balance is shifted subtly, so it provides a very fine resolution around the central position - there is little requirement for only one channel (other than testing), but that is still available. In short, lots of benefits, and few drawbacks.

Figure 9- Centre Weighted Balance Control

Needless to say there are many other configurations that can be used, and this is but one. The resistor value (RL and RR) is fairly important - it really should be 35k for a 100k pot, but the error when using 33k is minimal (about 0.16 dB at centre position).

One of the goals of circuit design is to utilise available components. This is not necessary if you make 10,000 of something, since at these quantities special orders will cost little or no more than the normally available components. When you are making one for yourself (or perhaps two - one for a friend for example), specially

- 31 -

Page 32: report on intelligent energy conservation system

designed components are not an option due to the setup costs (this could easily be thousands of dollars / euro / pounds). Even in quantities of several hundred, available components are still (usually) cheaper.

The balance control above is an example of a dual log / reverse log pot, created with a standard dual gang pot and a couple of resistors ... and it works better than a commercial offering is likely to - even if you managed to find one.

For more information on this configuration, see Project 01. Note that as shown, the balance control here is not optimised for any significant impedance at the output, so its performance will change if you connect a volume control to the output.

Figure 10 - Creating an "S" Curve for Lighting

Another example of modifying a pot to make it do what you want is shown in the LX-800 Lighting Controller. The faders need an "S" curve, to compensate for the non-linear behaviour of lamps and our eye's sensitivity to light levels. This is also achieved with a couple of resistors across a normal linear pot.

If you don't like the shape (because of the lamps you use, for example), you can simply change the resistor values and modify the curve to suit your exact needs. Since even ordinary log pots are not actually logarithmic anyway, can you imagine getting a pot that would give you an S-Curve? Even worse, if you found that it was not suited to certain lamps, then you would be hard pressed to modify the law to get what you needed. In some cases it would be impossible.

IC 7805:- IC 7805 is a 5v voltage regulator that restricts the voltage output to 5v. It is a member of 78xx series of fixed linear voltage regulator ICs.Genraly it is used for the protection of ICs and other electronic elements because it works on under 5v. if supply is more than 5v so it can harm to the microcontroller.

- 32 -

Page 33: report on intelligent energy conservation system

Pin diagram:-

3.10 LOADS: -

ULN 2003

1.SEVEN DARLINGTONS PER PACKAGE OUTPUT CURRENT 500mA PER DRIVER2.(600mA PEAK) .OUTPUT VOLTAGE 50V INTEGRATED SUPPRESSION DIODES FOR3.INDUCTIVE LOADS OUTPUTS CAN BE PARALLELED FOR4.HIGHER CURRENT .TTL/CMOS/PMOS/DTL COMPATIBLE INPUTS INPUTS PINNED OPPOSITE OUTPUTS TOSIMPLIFY LAYOUT

- 33 -

FUNCTION NAMEPINNO1

2

3

INPUT VOLTAGE(5V-18V)

GROUND(0V)

RAGULATED OUTPUT VOLTAGE;5V(4.8V-5.2)

INPUT

GND

OUTPUT

Page 34: report on intelligent energy conservation system

- 34 -

Page 35: report on intelligent energy conservation system

- 35 -

Page 36: report on intelligent energy conservation system

RELAY

A relay is an electrically operated switch. Many relays use an electromagnet to

operate switching operation mechanically.

It is 5 terminal device consisting of 1 coil.

When coil is enerzised then a slit is moves from one point to another point

LOAD

In this intelligent energy saving system we are using two loads, lamp and Fan.

According to the light intensity of the particular room or cabin the LDR will senses,

depending on the LDR output the lamp will be ON/OFF. This system is only

applicable for lamps and not applicable for tube lights, because the starting voltage of

the tube lights is high compared to lamps.

- 36 -

Page 37: report on intelligent energy conservation system

4. SOFTWARE DESCRIPTION: -

EMBEDDED C CODE

#include <mega8.h>

#include <delay.h>

// Declare your global variables here

void pir();

void pir1();

void main(void)

{

// Declare your local variables here

// Input/Output Ports initialization

// Port B initialization

// Func7=Out Func6=Out Func5=Out Func4=Out Func3=Out Func2=Out Func1=Out

Func0=Out

// State7=0 State6=0 State5=0 State4=0 State3=0 State2=0 State1=0 State0=0

PORTB=0x00;

DDRB=0xFF;

// Port C initialization

// Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In

// State6=T State5=T State4=T State3=T State2=T State1=T State0=T

PORTC=0x00;

DDRC=0x00;

// Port D initialization

// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In

// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T

PORTD=0x00;

- 37 -

Page 38: report on intelligent energy conservation system

DDRD=0x00;

// Timer/Counter 0 initialization

// Clock source: System Clock

// Clock value: Timer 0 Stopped

TCCR0=0x00;

TCNT0=0x00;

// Timer/Counter 1 initialization

// Clock source: System Clock

// Clock value: Timer1 Stopped

// Mode: Normal top=0xFFFF

// OC1A output: Discon.

// OC1B output: Discon.

// Noise Canceler: Off

// Input Capture on Falling Edge

// Timer1 Overflow Interrupt: Off

// Input Capture Interrupt: Off

// Compare A Match Interrupt: Off

// Compare B Match Interrupt: Off

TCCR1A=0x00;

TCCR1B=0x00;

TCNT1H=0x00;

TCNT1L=0x00;

ICR1H=0x00;

ICR1L=0x00;

OCR1AH=0x00;

OCR1AL=0x00;

OCR1BH=0x00;

OCR1BL=0x00;

// Timer/Counter 2 initialization

// Clock source: System Clock

// Clock value: Timer2 Stopped

- 38 -

Page 39: report on intelligent energy conservation system

// Mode: Normal top=0xFF

// OC2 output: Disconnected

ASSR=0x00;

TCCR2=0x00;

TCNT2=0x00;

OCR2=0x00;

// External Interrupt(s) initialization

// INT0: Off

// INT1: Off

MCUCR=0x00;

// Timer(s)/Counter(s) Interrupt(s) initialization

TIMSK=0x00;

// USART initialization

// USART disabled

UCSRB=0x00;

// Analog Comparator initialization

// Analog Comparator: Off

// Analog Comparator Input Capture by Timer/Counter 1: Off

ACSR=0x80;

SFIOR=0x00;

// ADC initialization

// ADC disabled

ADCSRA=0x00;

// SPI initialization

// SPI disabled

SPCR=0x00;

// TWI initialization

- 39 -

Page 40: report on intelligent energy conservation system

// TWI disabled

TWCR=0x00;

while (1)

{

int i;

if(PINC.5==1)

{

pir();

}

else

{

pir1();

//PORTB.2=0;

//PORTB.3=0;

}

}

}

void pir()

{

if(PINC.4==0)

{

PORTB.2=1;

PORTB.3=1;

delay_ms(15000);

}

else

- 40 -

Page 41: report on intelligent energy conservation system

{

PORTB.2=0;

PORTB.3=1;

delay_ms(15000);

}

}

void pir1()

{

int i;

for(i=0;i<=1;i++)

{

if(PINC.5==1)

{

pir();

break;

}

else

{

delay_ms(100);

}

if(i==1)

{

PORTB.1=0;

PORTB.2=0;

delay_ms(15000);

}

}

}

- 41 -

Page 42: report on intelligent energy conservation system

CONCLUSION:

Intelligent Energy Saving System is not limited for any particular application,

it can be used any where in a process industries with little modifications in software

coding according to the requirements. This concept not only ensures that our work

will be usable in the future but also provides the flexibility to adapt and extend, as

needs change.

In this project work we have studied and implemented a complete working

model using a PIC microcontroller. The programming and interfering of PIC

microcontroller has been mastered during the implementation. This work includes the

study of energy saving system in many applications

FUTURE DIRECTIONS:

We except that our next generation will develop this energy saving system

with wire less network.

In our project we connected all the sensors to micro controller with the wires.

This can be developed with wire less such that we can place different sensors in

different places. This sensor will activate the micro controller with the signals instead

of using wires.

This system can also be applicable to various loads like pressure, force and

etc. by increasing the number of ports of the micro controller.

- 42 -

Page 43: report on intelligent energy conservation system

BIBLIOGRAPHY

BOOKS REFERRED:

1) Adler, R. B., A. C. Smith, and R. L. Longani: “Introduction to Semiconductor Physics,” vol. 1, p. 78, Semiconductor Electronics Education Comitee, John Wiley & Sons, Inc., New York ,1964.

2) Schade, O. H.: “Analysis of Rectifier Operation”, proc. IRE, vol.31, pp. 341-361, July, 1943.

3) Stout, M. B.: “Analysis of Rectifier Circuits”, Elec. Eng., vol. 54, September, 1935.

4) Jacob Millman Christos C. Halkias.: “Electronic Devices And Circuits”, Tata McGraw-Hill Publishing Company Ltd. Sep, 2003.

5) Jan Axelson: “Parallel Port Complete”, McGraw Hill Book Company, New York, 1989.

Journals Referred

1) Innovation: Magazine of Research & Technology,2000

2) Printed Circuit Design Online (Magazine).

3) Design Magazine.

4) Microcontroller solutions.

DATA SHEETS

1. PIR sensor dat sheet 2. LM 324 dat sheet 3. ULN 2003 dat sheet t 4. POT dat sheet 5. Microcontroller atmega 8A dat sheet 6. IC 7805 dat sheet

- 43 -

Page 44: report on intelligent energy conservation system

- 44 -