Submitted by ARJUN B (ECU102/11) GARGI V PILLAI (ECU102/28) LINCY GRACE ALEXANDER (ECU102/37) NITHIN ELDHO ABRAHAM (ECU102/44) SOJA SASI (ECU102/56)
in partial fulfillment for the award of the degree of Bachelor of Technology in ELECTRONICS AND COMMUNICATION ENGINEERING of COCHIN UNIVERSITY OF SCIENCE AND TECHNOLOGY
DEPARTMENT OF ELECTRONICS ENGINEERING MODEL ENGINEERING COLLEGE COCHIN 682 021 MARCH 2013
Dr.Jayasree V.K. Mrs. Anjana Devi Mrs. Shaija P J Mr. Nidhin Varghese Head of Department Project Coordinator Project Guide Project Guide
i
ACKNOWLEDGEMENT
We thank the Lord Almighty for the blessing He has bestowed on us for the successful completion of our mini project with full output. We are grateful to Dr. Prof. V.P.Devassia, Principal, Govt. Model Engineering College, Thrikkakara for providing us with the best facilities and atmosphere for our project development and realization. We express our heartfelt thanks to Mrs. J ayasree V K, HOD, Department of Electronics and Communication. She has offered us infallible support and timely advice and was pivotal in the completion of our mini project. We wholeheartedly thank our staff advisor Mrs. Anjana Devi for guiding us through each step of our project and for enabling us to realize our full potential by this project. We are profoundly indebted to our project coordinators Mr. Nidhin Varghese and Mrs. Shaija P.J . for their innumerable acts of timely advice, encouragement and help. We wish to express our deep sense of gratitude for their able guidance and useful suggestions, which helped us in the timely completion of our project. We are also greatly indebted to all our project lab staff who helped us make this project a grand success. Finally yet importantly, we would like to express our heartfelt thanks to our seniors and friends who were ready with a positive comment all the time, whether it was an off-hand comment to encourage us or a constructive piece of criticism.
ii
ABSTRACT
In this era, energy is the need of the hour and our project is a measure to increase the energy efficiency in our lives. Our project is specifically applicable to libraries and office cubicles where lighting and cooling mechanisms like fan, A/Cs are employed for the comfortable reading or working environment respectively. In our project we have taken a library for demonstration. Here we monitor for human activity around each reading table; we also monitor the amount of sunlight entering the room and based on the above conditions we decide to turn on/off lights. We also regulate the fan speed based on the temperature conditions in the room. Another highlight of our project is the counter that increments or decrements according to the number of people entering or leaving the room respectively. As a result, if there is no one in the room all lights and fans will be turned off automatically. A very practical application of the counter would be at our homes itself. We are all busy people and in the run to office/schools/colleges we tend to forget about switching off lights and fans before we leave. By this system such tensions can be avoided while reducing your electricity bill by a grand amount.
iii
TABLE OF CONTENTS ACKNOWLEDGEMENT i ABSTRACT ii LIST OF FIGURES vi LIST OF TABLES vii LIST OF SYMBOLS viii 1. INTRODUCTION 1.1 Principle of Operation 1 1.2 Block Diagram 2 2. HARDWARE SECTION 2.1 PIR 4 2.2 Light Dependent Resistor 5 2.3 Optocoupler 6 2.3.1 Features of Optocoupler 7 2.3.2 Applications 7 2.4 Triac Driver 8 2.4.1 Applications 8 2.4.2 Features 9 2.5 Temperature Sensor 9 2.5.1 Features 9 2.6 Loads 9 iv
2.7 Microcontrollers 10 2.7.1 PIC 16F887 10 2.7.1.1 Features 10 2.7.2 PIC 16F877 12 3. CIRCUIT DIAGRAMS AND EXPLANATIONS 3.1 Power Supply 14 3.1.1 Step down transformer 14 3.1.2 Rectifier Unit 15 3.1.3 Design 15 3.1.4 Input Filter 17 3.1.5 Regulator unit 17 3.2 Zero Crossing Detector 18 3.2.1 Design 19 3.3 Light Dependent Resistor 20 3.3.1 Features 21 3.3.2 Applications 21 3.3.3 Design conditions 21 3.4 Triac Section 22 3.5 MonostableMultivibrator 23 3.6 Full Circuits 24
v
4. SOLDERING AND PCB LAYOUTS 4.1 Soldering 26 4.1.1 Solder 26 4.1.2 Soldering flux 26 4.1.3 Soldering tools 27 4.1.3.1 Soldering Iron 27 4.1.3.2 Soldering Station 27 4.1.4 Preparing the soldering iron 27 4.1.5 Making soldering join 27 4.2 Desoldering 28 4.2.1 Using desoldering pump 28 4.2.2 Using solder remover wick (copper braid) 28 5. SOFTWARE 5.1 Flowchart for transmitter receiver section 29 5.2 Flowchart for zcd section 30 6. RESULTS AND CONCLUSIONS 6.1 Future Scope 31 6.2 References and Links 6.3 Textbooks referred APPENDIX A1: PCB LAYOUTS A2: DATASHEETS A3: COST OF COMPONENTS vi
LIST OF FIGURES Fig 1.1: Block diagram for the lighting section 2 Fig 1.2: Block diagram for temperature regulated fan section 3 Fig 2.1: Working of the PIR 5 Fig 2.2: Diagram of LDR 6 Fig 2.3: Pin diagram of Optocoupler 8 Fig 2.4:Pin diagram of PIC16F887 10 Fig 2.5:Pin diagram of PIC16F877 13 Fig 3.1: Power supply circuit 14 Fig 3.2: Basic 50/60Hz Zero Crossing Detector 18 Fig 3.3: Waveform of zcd circuit 19 Fig 3.4: Light Dependent Resistor 20 Fig 3.5: Dimmer circuit 22 Fig 3.6 MonostableMultivibrator 23 Fig 3.7 Full Circuit 1 25 Fig 3.7 Full Circuit 2 26 Fig 5.1 Flow chart for transmitter receiver section 29 Fig 5.2 Flow chart for zcd section 30 Fig A1.1 PCB layout for the PIR-transmitter section Fig A1.2 PCB layout for the fan regulation section Fig A1.3 PCB layout for power supply section
LIST OF SYMBOLS IC-Integrated Circuit PCB-Printed Circuit Board R: Resistor C: Capacitor D: Diode GND: Ground Vcc: Supply Voltage V: Voltage Hz: Hertz : Ohms F: Micro Farad pF: Pico Farad
Model Engineering College Intelligent Energy Saving System 1 Department of Electronics Engineering Chapter 1 INTRODUCTION The aim of the project is to save 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 Dimmer and when people come to that area, according to the LDR lighting, can be made sufficiently brighter. By using this system, we can also adjust the speed of the Fan according to the room temperature using Thermostat and Dimmer. 1.1Principle of Operation Consider a particular table in the library, which is connected with our experimental kit. When a person enters the library the counter implemented by the transmitter- receiver section increments and the LDR-PIR section becomes active. Only if the counter value is greater than one will the lights/fan be switched ON. The PIR sensor absorbs the black body radiation emitted by that person and activates it. After some time delay the light will glow for some time by using the Dimmer circuit and with the help of LDR sensor it checks the room lightening; it takes on the condition that when the light is sufficient the lamp will be in OFF state and when light is insufficient the lamp will be in ON state that is if there is enough sunlight in the room then the light will not be switched on else they will be turned on. With the help of Thermostat sensor the room temperature is measured and the speed of the Fan is regulated according to the temperature of Thermostat. The input from the mains is given to a zero crossing detector circuit which gives the instants at which the signal crosses zero point. This is given to the PIC which gives the output to the triac section and in this way the fan speed is regulated. When a person leaves our particular area of concern, the PIR sensor will activate again and firstly the Fan will be switched OFF and after some time delay the lamp Model Engineering College Intelligent Energy Saving System 2 Department of Electronics Engineering also will be turned OFF. When the counter value is equal to zero the supply to the entire room is cut off. 1.2 Block Diagrams The whole circuitry is divided into 3 units: 1. Counter using IR Transmitter and Receiver 2. Light sensitive and Human Presence sensitive Lighting circuit 3. Temperature Regulated Fan
Fig 1.1: Block diagram for the lighting section
Model Engineering College Intelligent Energy Saving System 3 Department of Electronics Engineering
Fig 1.2: Block diagram for temperature regulated fan section
Model Engineering College Intelligent Energy Saving System 4 Department of Electronics Engineering Chapter 2 HARDWARE SECTION
2.1 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 detectors 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. 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 Model Engineering College Intelligent Energy Saving System 5 Department of Electronics Engineering 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.
Fig 2.1: Working of the PI R
2.2 Light DependentResistor LDRs 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 drops 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. Model Engineering College Intelligent Energy Saving System 6 Department of Electronics Engineering LDRs are sensitive, inexpensive, and readily available devices. They have good power and voltage handling capabilities, similar to those of aconventional resistor. Theironly significant defect is that they are fairly low acting, taking tens or hundreds of LDR include light and dark-activated switches and alarms, light beam alarms and reflective smoke alarms etc. A LDR may be connected either way round and no special precautions are required when soldering. 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 are used here. The cell resistance falls with increasing light intensity.
Fig 2.2: Diagram of LDR 2.3 Optocoupler Opto coupler is a device that uses a short optical transmission path to transfer a signal between elements of a circuit, typically a transmitter and a receiver, while keeping them electrically isolated since the signal goes from an electrical signal to an optical signal back to an electrical signal, electrical contact along the path is broken. A common implementation involves a LED and a phototransistor, separated so that light may travel across a barrier but electrical current may not. When an electrical signal is applied to the input of the opto-isolator, its LED lights, its light sensor then activates,and a corresponding electrical signal is generated at the output. Unlike a transformer, the opto-isolator allows for DC coupling and generally provides significant protection from serious overvoltage conditions in one circuit Model Engineering College Intelligent Energy Saving System 7 Department of Electronics Engineering affecting the other. With a photodiode as the detector, the output current is proportional to the amount of incident light supplied by the emitter. The diode can be used in a photovoltaic mode or a photoconductive mode. In photovoltaic mode, the diode acts like a current source in parallel with a forward- biased diode. The optical path may be air or a dielectric waveguide. The transmitting and receiving elements of an optical isolator may be contained within a single compact module, for mounting, for example, on a circuit board; in this case, the module is often called an optoisolator. The photosensor may be a photocell, phototransistor, or an optically triggered SCR or Triac.
2.3.1 Features of Optocoupler Interfaces with common logic families Input-output coupling capacitance <0.5 Pf Industry Standard Dual-in line 6-pin package 5300 VRMS isolation test voltage 2.3.2 Applications AC mains detection Reed relay driving Switch mode power supply feedback Telephone ring detection Logic ground isolation Logic coupling with high frequency noise rejection
Model Engineering College Intelligent Energy Saving System 8 Department of Electronics Engineering
Fig 2.3:Pin diagram of Optocoupler
2.4 Triac Driver These devices consist of aAlGaAs infrared emitting diode optically coupled to a monolithic silicon detector performing the function of a zero voltage crossing bilateral triac driver. They are designed for use with a triac in the interface of logic systems to equipment powered from 230 VAC lines, such as teletypewriters, CRTs, solid-state relays, industrial controls, printers, motors, solenoids and consumer appliances, etc.
2.4.1 Applications Solenoid/valve controls Lighting controls Static power switches AC motor drives Temperature controls E.M. contactors AC motor starters Solid-state relays
Model Engineering College Intelligent Energy Saving System 9 Department of Electronics Engineering 2.4.2 Features Simplifies logic control of 230 VAC power Zero voltage crossing
2.5 Temperature sensor In this project we are making use DS 1820 temperature sensor, its a non-contact digital type temperature transducer suitable for measuring room temperature. The word thermistor is an acronym for thermal resistor, i.e., a temperature sensitive resistor. It is used to detect very small changes in temperature. The variation in temperature is reflected through appreciable variation of the resistance of the device. 2.5.1 Features
Temperature measurements require no external components Measures temperatures from -55C to +125C in 0.5C increments. Temperature is read as a 9-bit value (2-byte transfer) Wide power supply range (2.7V to 5.5V) Converts temperature to digital word in less than 1 second Thermostatic settings are user definable and nonvolatile Data is read from/written via a 2-wire serial interface (open drain I/O lines) Applications include thermostatic controls, industrial systems, consumer products, Thermometers, or any thermal sensitive system 8-pin DIP or SO package (150mil and 208mil)
2.6 Loads 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 Model Engineering College Intelligent Energy Saving System 10 Department of Electronics Engineering applicable for lamps and not applicable for tube lights, because the starting voltage of the tube lights is high compared to lamps. By using Thermostat and Dimmer we can adjust the speed of the Fan according to the changes of the room temperature.
2.7 Microcontrollers Here two microcontrollers have been used- PIC16F887 and PIC16F877. For the zero crossing detector that is for regulating fan we use 16F877and the other mc for the transmitter section. These have been chosen based on the number of ports. Two PICs have been used as one PIC would not be able to control and check conditions continuously for both light and fan. 2.7.1 PIC 16F887
Fig 2.4:Pin diagram of PI C16F887 2.7.1.1 Features RISC architecture o Only 35 instructions to learn o All single-cycle instructions except branches
Model Engineering College Intelligent Energy Saving System 11 Department of Electronics Engineering Operating frequency 0-20 MHz
Precision internal oscillator o Factory calibrated o Software selectable frequency range of 8MHz to 31KHz
Power supply voltage 2.0-5.5V o Consumption: 220uA (2.0V, 4MHz), 11uA (2.0 V, 32 KHz) 50nA (stand-by mode)
Power-Saving Sleep Mode
Brown-out Reset (BOR) with software control option 35 input/output pins
o High current source/sink for direct LED drive o software and individually programmable pull-up resistor o Interrupt-on-Change pin
8K ROM memory in FLASH technology o Chip can be reprogrammed up to 100.000 times
In-Circuit Serial Programming Option o Chip can be programmed even embedded in the target device
256 bytes EEPROM memory o Data can be written more than 1.000.000 times
368 bytes RAM memory
A/D converter: o 14-channels o 10-bit resolution
3 independent timers/counters
Watch-dog timer
Model Engineering College Intelligent Energy Saving System 12 Department of Electronics Engineering Analogue comparator module with o Two analogue comparators o Fixed voltage reference (0.6V) o Programmable on-chip voltage reference
PWM output steering control
Enhanced USART module o Supports RS-485, RS-232 and LIN2.0 o Auto-Baud Detect
Master Synchronous Serial Port (MSSP) o supports SPI and I2C mode
2.7.2 PIC 16F877 Parameter Name Value Program Memory Type Flash Program Memory (KB) 14 CPU Speed (MIPS) 5 RAM Bytes 368 Data EEPROM (bytes) 256 Digital Communication Peripherals 1-A/E/USART, 1- MSSP(SPI/I2C) Capture/Compare/PWM Peripherals 2 CCP Timers 2 x 8-bit, 1 x 16-bit ADC 8 ch, 10-bit Temperature Range (C) -40 to 85 Operating Voltage Range (V) 2 to 5.5 Pin Count 40
Table 2.1: Parameters of PI C16F877
Model Engineering College Intelligent Energy Saving System 13 Department of Electronics Engineering
Fig 2.5:Pin diagram of PI C16F877
Model Engineering College Intelligent Energy Saving System 14 Department of Electronics Engineering
Chapter 3 CIRCUIT DIAGRAMS AND EXPLANATIONS 3.1 Power Supply 3.1.1 Step down transformer: The step-down transformer is used to step down the supply voltage of 230v ac from mains to lower values, as the various ICs used in this project require reduced voltages. The transformer consists of primary and secondary coils. To reduce or step down the voltage, the transformer is designed to contain less number of turns in its secondary core. The outputs from the secondary coil which is center tapped are the ac values of 0v, 12v and 12v. The conversion of these ac values to dc values to dc values is done using the full wave rectifier unit.
Fig 3.1: Power supply circuit
Model Engineering College Intelligent Energy Saving System 15 Department of Electronics Engineering
Table 3.1 Regulator pins 3.1.2 Rectifier Unit: A diode bridge is an arrangement of four diodes connected in a bridge circuit. That provides the polarity of output voltage of any polarity of the input voltage. When used in its most common application, for conversion of alternating current (A.C) input into direct current (D.C) output, it is known as a bridge rectifier. The diagram describes a diode-bridge design known as a full wave rectifier. This design can be used to rectify single phase A.C. when no transformer center tap is available. A bridge rectifier makesuse of four diodes in a bridge arrangement to achieve full wave rectification. This is widely used configuration, both with individual diodes wired as shown and with single component bridges where the diode bridge is wired internally. For both positive and negative swings of the transformer, there is a forward path through the diode bridge. Both conduction paths cause current to flow in the same direction through the load resister, accomplishing full-wave rectification. While one set of diodes is forward biased, the other set is reverse biased and effectively eliminated from the circuit. 3.1.3 Design
Voltage requirement: 5V, 12V 7805 V REGULATOR SPECIFICATION Pin No Function Name 1 Input voltage (5V-18V) Input 2 Ground (0V) Ground 3 Regulated output; 5V (4.8V-5.2V) Output Model Engineering College Intelligent Energy Saving System 16 Department of Electronics Engineering Current requirement: 500mA Transformer selection: Select 230V/1A:24V transformer ( bridge) Primary winding/secondary winding : N1/N2=V1/V2 N1/N2=230/24=115/12 ie: turn ratio =115/12 Design of capacitors
The converted dc is not pure dc due to the presence of some ac ripples.So in order to avoid it we use the filters. The first capacitor is used for filtering the output of the rectifier. C1 should be high enough to get minimum ripple voltage.
Ripple voltage =Idc/2fc ;Idc=50mA,f=100Hz Ripple voltage is taken as 48 Therefore C1=470uF
The 470f capacitor serves as a "reservoir" which maintains a reasonable input voltage to the 7805 throughout the entire cycle of the ac line voltage. The two rectifier diodes keep recharging the reservoir capacitor on alternate half-cycles of the line voltage, and the capacitor is quite capable of sustaining any reasonable load in between charging pulses.
The 0.1f capacitors serve to help keep the power supply output voltage constant when load conditions change. The electrolytic capacitor smoothes out any long-term or low frequency variations.
Selection of regulator IC
Here se use LM7805 IC to get regulated output of 5V. It delivers upto 1.5A of current. The internal current-limiting and thermal-shutdown features of these regulators essentially make them immune to overload.
Model Engineering College Intelligent Energy Saving System 17 Department of Electronics Engineering
3.1.4Input Filter: - Capacitors are used as filters. The ripples from the dc voltages are removed and pure dc voltage is obtained. The primary action performed by capacitor is charging and discharging. It charges in positive half cycle of the ac voltage and it will discharge in negative half cycle. So it allows only ac voltage and does not allow the dc voltage. This filter is fixed before the regulator. Capacitors used here are of the value 1000uF.
3.1.5Regulator unit: - Regulator regulates the output voltage to a specific value. The output voltage is maintained irrespective of the fluctuations in the input dc voltage. Whenever there are any ac voltage fluctuations, the dc voltage also changes, and to avoid this regulators are used.Regulators used in this application are7805 which provides 5v dc and 7812 which provides 12v dc.
Model Engineering College Intelligent Energy Saving System 18 Department of Electronics Engineering
3.2 Zero Crosssing Detector
Fig 3.2: Basic 50Hz Zero Crossing Detector
A zero crossing detector literally detects the transition of a signal waveform from positive and negative, ideally providing a narrow pulse that coincides exactly with the zero voltage condition. At first glance, this would appear to be an easy enough task, but in fact it is quite complex, especially where high frequencies are involved. In this instance, even 1 kHz starts to present a real challenge if extreme accuracy is needed. The not so humble comparator plays a vital role - without it, most precision zero crossing detectors would not work, and we'd be without digital audio, PWM and a multitude of other applications taken for granted. The zero crossing detector as used for the dimmer ramp generator. The comparator function is handled by transistorQ1 - very basic, but adequate for the job. The circuit is also sensitive to level, and for acceptable performance the AC waveform needs to Model Engineering College Intelligent Energy Saving System 19 Department of Electronics Engineering be of reasonably high amplitude. 12-15V AC is typical. If the voltage is too low, the pulse width will increase. R1 is there to ensure that the voltage falls to zero - stray capacitance is sufficient to stop the circuit from working without it.
Fig 3.3: Waveform of zcd circuit 3.2.1 Design Vcc-IcRc-Vce-LEDdrop=0 12-10mA*Rc-0.9-0.7=0 10.4=10Rc R3~1k Vcc get splited as 8V and 4V Vcc-IbRb-Vbe=0 7.3=0.5mA*Rb R2=Rb~10k
Model Engineering College Intelligent Energy Saving System 20 Department of Electronics Engineering 3.3 Light Dependent Resistor We exploit the following two features of the LDR in this circuit. Darkness: Maximum resistance, about 1Mohm. Very bright light: Minimum resistance, about 100 ohm.
Fig 3.4: Light Dependent Resistor The LDR circuit was designed by keeping in mind the above concept. The value of the LDR when exposed to light and in darkness were measured and based on that a reference value was taken. Based on these voltage levels a voltage divider section was designed. When there is enough reading light in the room, the resistance of the LDR will be minimum and the voltage across 10k resistor will be increased causing the output of comparator to be Vsat. The transistor will not conduct and thereby the light will not be turned on. On the other hand when it is dark in the room, the resistance is very high and +Vsat will be the output of the comparator. This causes the transistor to conduct and we get full 5 V across the ldr output which is given to PIC microcontroller.
3.3.1 Features: High reliability Light weight Model Engineering College Intelligent Energy Saving System 21 Department of Electronics Engineering Wide spectral response Wide ambient temperature range
3.3.2 Applications: Smoke detection Automatic lighting control Burglar alarm systems Camera (electronic shutter) Strobe (color temperature reading)
3.3.3 Design conditions V(-)=12R/(R+RL) Assume R=10k ohm At 10 lux(poorly illuminated) Rl = 10M ohm, V(-)~ 0V At 1000 lux(sunlight) Rl = 400 ohm, V(-)= 11.5V At 300 lux(normal effect) Rl = 5K ohm, V(-)= 8V~ 6V 500 lux Rl = 1K, V(-)=11V V(+)can vary from about 8V ~ 11.5 V. Using a voltage divider network assume R1=R2. Using a potentiometer at minimum resistance position, Vp=6V At maximum resistance position, Vp=11.5V V(Rp+R2)/(R1+R2+R3)=Vp Assume R1=R2 Vp=V(Rp+R1)/(2R1+Rp) Use Rp 10k pot, R1=470 ohm Maximum output current of 741C op amp=20m A Minimum dc current gain=110 Minimum base current for transistor BC107=2micro A. R=20mA/2microA =10 k ohms
Model Engineering College Intelligent Energy Saving System 22 Department of Electronics Engineering 3.4 Triac Section
Fig 3.5: Dimmer circuit Dimmers are devices used to vary the brightness of a light. By decreasing or increasing the RMS voltage and hence the mean power to the lamp it is possible to vary the intensity of the light output. Although variable-voltage devices are used for various purposes, the term dimmer is generally reserved for those intended to control lighting. Modern dimmers are built from silicon-controlled rectifiers (SCR) instead of potentiometers or variable resistors because they have higher efficiency. A variable resistor would dissipate power by heat (efficiency as low as 0.5). By switching on and off, theoretically a dimmer does not heat up (efficiency close to 1.0). Thyristor (and briefly, thyratrom) dimmers were introduced to solve some of these problems. Because they use switching techniques instead of potential division there is almost no wasted power, dimming can be almost instantaneous and is easily controlled by remote electronics.
Model Engineering College Intelligent Energy Saving System 23 Department of Electronics Engineering 3.5 MonostableMultivibrator
Fig 3.6 MonostableMultivibrator
The monostablemultivibrator is used to increase the hold time for our output. During the time after the first condition is tested and the time till next condition is checked there is a time delay. During this time delay the output will not be high and we will get a blinking output. To hold this value constant we use this monostablemultivibrator. It is designed for the discharging section of the capacitor. Initially the capacitor will charge up to Vcc and then it will discharge. However we are so designing for the capacitor such that the by the time the capacitor reaches half way discharging the next input will arrive. In this way we get a high output till the next input arrives.
Model Engineering College Intelligent Energy Saving System 24 Department of Electronics Engineering 3.6 FULL CIRCUITS
Fig 3.7 Full Circuit 1
Model Engineering College Intelligent Energy Saving System 25 Department of Electronics Engineering
Fig 3.8 Full Circuit 2
Model Engineering College Intelligent Energy Saving System 26 Department of Electronics Engineering Chapter 4 SOLDERING AND PCB LAYOUTS
4.1 Soldering Soldering is the process of joining two or more dissimilar metals by melting another metal having low melting points.
4.1.1 Solder Solder is an alloy of tin and lead, typically 60% tin and 40% lead. It melts at a temperature of about . Coating a surface with solder is called tinning because of the tin content of solder. Lead is poisonous and you should always wash your hand after using solder. Solder for electronics use contains tiny cores of flux inside the main flux. The flux is corrosive and it cleans the metal surfaces as the solder melts. This is why we melt solder on the joint , not on iron tip. The best size of solder for electronics circuit boards is 22SWG.For plugs, component holders and other larger joints you may prefer to use 18 SWG solder.
4.1.2 Soldering flux In order to make the surface accept the solder readily the components terminal should be free from oxides and other obstructing films. Soldering flux cleans the oxides from the surface of the metal. The leads should be cleaned chemically or by scrapping using a blade or knife. Small amount of lead should be coated on the portion of the lead and the bit of the soldering iron. This process is known as TINNING. Zinc Chloride, Ammonium Chloride, Rosin are the most commonly used fluxes. These are available in petroleum jelly as paste flux. The residue which remains after the soldering may be washed out with more water accompanied by brushing.
Model Engineering College Intelligent Energy Saving System 27 Department of Electronics Engineering
4.1.3 Soldering tools
4.1.3.1 Soldering Iron: It is a tool used to melt the solder and apply at the joints in the circuit. It operates in 230V main supply. The normal power ratings of the soldering iron are 10W, 25W, 35W, 65W, and 125W.The iron bit at the top of it gets heated up within a few minutes.10W and 25W soldering irons are sufficient for light duty works.
4.1.3.2 Soldering Station: The soldering station consists of a handheld hot air blow gun and the base station comprising of air flow and temperature controls to the hot air blow gun. Tip temperature is maintained by feedback control loops. Soldering guns usually have a trigger switch which controls the AC power.
4.1.4 Preparing the soldering iron Place the soldering iron in its stand and plug in. The iron will take a few minutes to reach its operating temperature of about 673K. Dampen the sponge in the stand. The best way to do it is to lift it out the stand and hold it under a cold tap for a moment, then squeeze to remove excess water. It should be damp, not dripping wet. Wait a few minutes for the iron to warm up. Check if it is ready by trying to melt a little solder on the tip. Wipe the tip of the iron on the damp sponge. This will clean the tip. Melt a little solder on the tip of the iron. This is called tinning and it will help the heat to flow from irons tip to the joint. It only needs to be done when you plug in the iron, and occasionally while soldering if you need to wipe the dip clean on the sponge.
4.1.5 Making soldering joints Hold the soldering iron like a pen, near the base of the handle. Remember to never touch the hot element or tip. Model Engineering College Intelligent Energy Saving System 28 Department of Electronics Engineering Touch the soldering iron onto the joint to be made. Make sure it touches both the component leads and the track. Hold the tip there for a few seconds. Feed a little solder on the joint. It should flow smoothly on the lead and track to form a volcano shape. Remove the solder, then the iron, while keeping the joint still. Allow the joint a few seconds to cool before you move the circuit board. Inspect the joint carefully. It should look shiny and have a volcano shape. If not, you will have to reheat it and feed in a little solder. This time ensure that both the lead and track are heated fully before applying solder.
4.2 Desoldering It is the removal of the solder from previously soldered joint. There are two ways to remove the joint:
4.2.1 Using desoldering pump De-solder pump is a commonly used device for this purpose. When the solder melts by the action of the soldering iron, the trigger on the de-solder pump should be activated to create a vacuum. This vacuum pulls the solder into the tube.
4.2.2 Using solder remover wick (copper braid) The end of the wick and the tip of soldering iron are joint together. As the solder melts, most of it flows onto the wick, away from the joint. Remove the wick and then the soldering iron.
Model Engineering College Intelligent Energy Saving System 29 Department of Electronics Engineering Chapter 5 SOFTWARE
Fig 5.1 Flow chart for transmitter receiver section
Model Engineering College Intelligent Energy Saving System 30 Department of Electronics Engineering
Fig 5.2 Flow chart for zcd section
Model Engineering College Intelligent Energy Saving System 31 Department of Electronics Engineering
Chapter 6 RESULTS AND DISCUSSIONS
Intelligent Energy Saving System is not limited for any particular application, it can be used anywhere like in 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 our project we have catered this exclusively for libraries but it can be extended to office cubicles and homes to make it more energy efficient. The best part is that no longer will your forgetfulness to turn off the light/fan etc be a headache because of the counter section monitoring the condition whether a human is there or not within the room.
6.1 Future Scope
In our project we connected all the sensors to micro controller through wires. This can be developed wireless such that we can place different sensors in different places. This sensor will activate the micro controller with the signals instead ofwires. We can also use the counter section to control the flow of people in and out and to prevent the place from being crowded we can close the doors after count has reached a certain number or maybe a alert bell to the security to allow people only to leave and not enter. Also this is very much applicable at homes and other places. If human presence is not detected the power will not be given to that section and a handsome amount can be saved on the electricity bills.
Model Engineering College Intelligent Energy Saving System 32 Department of Electronics Engineering REFERENCES AND LINKS
[1] The Circuits Today website. http://www.circuitstoday.com [2] (2002) The IEEE website. [Online]. Available:http://www.ieee.org/ [3] The Mikroelectronika Website. http://www.mikroe.com [4] Electronicsforu magazine website http:// www.electronicsforu.com [5] The Wikipedia Foundation website http://www.wikipedia.com [6] Proteus Tutorials http://allaboutlearningandearning.blogspot.in/2011/07/proteus- tutorial.html [7] Eagle tutorials http://dmi.uib.es/~jguerrero/labSistemes/eagle_tut.pdf [8] Datasheets http://www.microchip.com
Textbooks referred
[1] Banett Cox & OCull , Embedded C and the Microchip PIC , Thomson Learning, I edition 1979 [2] Applied Electronics , Khanna Publications , C K Mithal , 10th edition
APPENDIX
APPENDIX A1 PCB LAYOUTS The circuit diagrams were initially drawn in Proteus and output was obtained. Then the PCB layout was drawn in Eagle for the various boards. The 3 boards include a board to control the lights, another to regulate the fan speed and the third is the power supply board.
Fig: A1.1 PCB layout for the PI R-transmitter section
Fig:A1.2 PCB layout for the fan regulation section