Documente Academic
Documente Profesional
Documente Cultură
CHAPTER 1
INTRODUCTION 1 PROJECT INTRODUCTION
1.1 Why automation? Earlier, we are looking into the face of future when we talk about automated devices, which could do anything of instigation of a controller, but today it has become a reality. 1. An automated device can replace good amount of human working force, moreover humans are more prone to error and in intensive conditions the probability of error increases. Whereas an automated device can work with diligence, versatility and with almost zero error. 2. This is why this project looks into construction and implementation of a system involving hardware to control a variety of electric and electronic instrumentation. Next IC is used for 7 segment display. Since four seven segments display are used Therefore the require four7447 ICs in our project. 1.2 What is home/office automation?
Home/office automation is control of any or all electrical devices in our home/office.
Home/office is one of the most exciting developments in technology for home that has come along in decades. There are hundreds of products available that allow au control over the devices automatically, either by remote; or even by voice command! 1.3 What can be automated? Virtually anything in the home/office that is powered by electricity can be automated and controlled. We can control our electrical devices with wireless devices like phones from far distance. We can control the light automatically according to our needs. We can turn our room lights on automatic when we enter the room. Possibilities are only limited by our imagination!
1.5 Why not other device? In the age of automation many other devices like microprocessor or microcontroller, infrared devices, voice command control devices etc. are used for the automation purposes, but they have certain limitation which are described below:The use of microprocessors or controllers involves complexities like microprocessors operating voltages; interrupt servicing, poling, memory access mechanism and extensive soldering. Moreover, if we use micro-controller or a microprocessor we cant change the working as and when desired the problem being, while using them we have to handwrite the code into ROM chips and in case we need to amend we have to burn a new ROM code to replace previous codes. And this has to be done on every single time we need add something new. An infrared control can work for a device up-to a specified range of distance after it cannot be used foe controlling the devices. A voice controlled device works on a single voice and cannot be used by any other parson and have certain range of working.
OPTO COUPLER
A simple circuit with an opto-isolator. When switch S1 is closed, LED D1 lights, which trigger phototransistor Q1, which pulls the output pin low. This circuit, thus, acts as a NOT gate.
CHAPTER 3
DEPARTMENT OF ELECTRONICS & COMMUNICATION HARYANA COLLEGE OF TECHNOLOGY & MANAGEMENT 3
MINOR PROJECT REPORT: AUTOMATIC ROOM LIGHT CONTROLLER COMPONENT LIST & DISCRIPTION
In this project we used some basic electronics components like resistors, capacitors and some IC like 7805, ULN2004 and microcontroller AT89S52. There detailed description is given below
1 2 3 4 5 6 7 8 9 10 11 12 13 14
\
Microcontroller 89C52 Relay drivers IC ULN2004/ULN2804 Two opto-coupler Frequency generator of 11.0592 Two 1-phase transformer rating of 12v/500ma 3- PNP and 2 NPN transistors Voltage regulator 7805 Two relay Two LED Capacitors of 10pf PCB 6 register of 2.2 k ohm, 10 register of 1 k ohm 2 resistors of 330 ohm Four diode connecting wires
1. ZENER DIODE A zener diode is specially designed junction diode, which can operate continuously without being damaged in the region of reverse break down voltage. One of the most important applications of zener diode is the design of voltage power supply. The zener diode is joined in reverse bias to dc through a resistance R of suitable value.
PRINCIPLE OF OPERATION
A photodiode is a p-n junction or p-i-n structure. When light with sufficient photon energy strikes a semiconductor, photons can be absorbed, resulting in generation of a mobile electron and electron hole. If the absorption occurs in the junction's depletion region, these carriers are swept from the junction by the built-in field of the depletion region, producing a photocurrent. Photodiodes can be used in either zero bias or reverse bias. In zero bias, light falling on, leading to a current in the forward the diode causes a voltage to develop across the device bias direction. This is called the photovoltaic effect, and is the basis for solar cells in fact, a solar cell is just a large number of big, cheap photodiodes. Diodes usually have extremely high resistance when reverse biased. This resistance is reduced when light of an appropriate frequency shines on the junction. Hence, a reverse biased diode can be used as a detector by monitoring the current running through it. Circuits based on this effect are more sensitive to light than ones based on the photovoltaic effect. Avalanche photodiodes have a similar structure, however they are operated with much higher reverse bias. This allows each photo-generated carrier to be multiplied by DEPARTMENT OF ELECTRONICS & COMMUNICATION HARYANA COLLEGE OF TECHNOLOGY & MANAGEMENT 6
The material used to make a photodiode is critical to defining its properties, because only photons with sufficient energy to excite an electron across the material's bandgap will produce significant photocurrents. Material Silicon Germanium Indium gallium arsenide Lead sulfide Wavelength range (nm) 1901100 8001700 8002600 <1000-3500
Materials commonly used to produce photodiodes: Because of their greater bandgap, siliconbased photodiodes generate less noise than germanium-based photodiodes, but germanium photodiodes must be used for wavelengths longer than approximately 1 m 3.3. LIGHT EMITTING DIODE (LED) When a junction diode is forward biased, energy is release at the junction due to recombination of electrons and holes. In case of silicon and germanium diodes, the energy released is in infrared region. In the junction diode made of gallium arsenate or indium phosphate. The energy is released in visible region. Such a junction diode is called a light emitting diode or LED.
Fig.3.3.: L.E.D
Light emitting diode (LED) is basically a P-N junction semiconductor diode particularly designed to visible light. There are infrared emitting LEDs which emit visible light. The LEDs which emit visible light. as shown in fig 3.5 The diameter of the base is less than a quarter of an inch. The actual diameter varies somewhat with different makes. The common circuit symbols for the LED are shown in fig. It is similar to the conventional rectifier diode symbol with two arrows pointing out. There are two leads one for anode and other for cathode. The main requirements for a suitable LED material are:1) 2) 3) It must have on energy gap of appropriate width. Both P and N types must exist, preferably with low resistivity. Efficient radioactive pathways must be present.
Generally, energy gaps greater than or equal to about 2 are required. Commercial LED materials: Gallium arsenide (Ga As) doped with Si Gallium Phosphide (Gap) doped with N & Bi Gallium arsenide Phosphide (Ga As1-x Px) Gallium aluminum arsenide (Gax Al1-x As) LED CONSTRUCTION To reduce reflection losses in LEDs there are two obvious ways:DEPARTMENT OF ELECTRONICS & COMMUNICATION HARYANA COLLEGE OF TECHNOLOGY & MANAGEMENT 8
3.4. RESISTORS
The resistor is an electrical device whose primary function is to introduce resistance to the flow of electric current. The magnitude of opposition to the flow of current is called the resistance of the resistor. A larger resistance value indicates a greater opposition to current flow. The resistance is measured in ohms. An ohm is the resistance that arises when a current of one ampere is passed through a resistor subjected to one volt across its terminals. The various uses of resistors include setting biases, controlling gain, fixing time constants, matching and loading circuits, voltage division, and heat generation. The following sections discuss resistor characteristics and various resistor types.
A resistance with resistance having current I flowing through it will have a voltage drop across it IR . The first rings give the first digit. The second ring gives the second digit. The third ring indicates the number of zeroes to be placed after the digits. The fourth ring gives tolerance (gold 5%, silver 10%, No colour 20%).
RESISTOR TYPES
Resistors can be broadly categorized as fixed, variable, and special-purpose. Each of these resistor types is discussed in detail with typical ranges of their characteristics.
FIXED RESISTORS
The fixed resistors are those whose value cannot be varied after manufacture. Fixed resistors are classified into: composition resistors, wire-wound resistors, and metal-film resistors. Outlines the characteristics of some typical fixed resistors.
Fig. 3.7: Color Coding DEPARTMENT OF ELECTRONICS & COMMUNICATION HARYANA COLLEGE OF TECHNOLOGY & MANAGEMENT 11
ELECTROLYTIC CAPACITORS
An electrolytic capacitor contains two aluminum electrodes. Between the electrodes, absorbent gauze soaks up electrolyte (borax, phosphate, or carbonate) to provide the required electrolysis that produces an oxide film (a molecular thin layer of aluminum oxide) at the positive electrode when DC voltage is applied. The oxide film acts as an insulator and forms a capacitance between the positive aluminum electrode and the electrolyte in the gauze separator. The negative aluminum electrode simply provides a connection to the electrolyte. Usually the metal itself can act as the negative terminal of the capacitor.
2.6. TRANSFORMER
The transformer was invented by Michael Faraday in 1831 to enable him to demonstrate the phenomenon of electro-magnetic induction. In a transformer, two coils of wire are wound on opposite sides of a metal core. A device that transfers electrical energy from one electric circuit to another, without changing the frequency, by the principles of ectromagnetic induction. The energy transfer usually takes place with a change of voltage. An electrical device consisting of a magnetic core and one or more windings, used to change the voltage of an AC circuit from one value to another or to isolate portions of the circuits from others.
Fig. 3.9: Basic Transformer This is a very useful device, indeed. With it, we can easily multiply or divide voltage and current in AC circuits. Indeed, the transformer has made long-distance transmission of electric power a practical reality, as AC voltage can be stepped up and current stepped down for reduced wire resistance power losses along power lines connecting generating stations with loads. At either end (both the generator and at the loads), voltage levels are reduced by transformers for safer operation and less expensive equipment. A transformer that increases voltage from primary to secondary (more secondary winding turns than primary winding turns) is called a step-up transformer. Conversely, a transformer designed to do just the opposite is called a step-down transformer.
This is a step-down transformer, as evidenced by the high turn count of the primary winding and the low turn count of the secondary. As a step-down unit, this transformer converts high-voltage, DEPARTMENT OF ELECTRONICS & COMMUNICATION HARYANA COLLEGE OF TECHNOLOGY & MANAGEMENT 14
Specifications of Tactile Switches are: Rating: DC 12V 50mA Operating Force: 16030 or 25050gf Travel: 0.30.15mm
CHARACTERISTICS
Vo- The regulated output voltage is fixed at a value which is specified by manufactures and it is indicated by the IC number. Vin- The unregulated input must be at least 2v more than regulated out put voltage. Io max- The output current on the load may vary from zero to maximum out put current and to protect it from thermal breakdown heat sinks are used. Thermal Shut Down-There is internal temperature sensors which turn OFF the IC when it becomes too hot. The IC again starts working when it is cooling up to given specified levee.
Figure No. 3.14:Optocoupler DEPARTMENT OF ELECTRONICS & COMMUNICATION HARYANA COLLEGE OF TECHNOLOGY & MANAGEMENT 17
BLOCK DIAGRAM
DEPARTMENT OF ELECTRONICS & COMMUNICATION HARYANA COLLEGE OF TECHNOLOGY & MANAGEMENT 18
MINOR PROJECT REPORT: AUTOMATIC ROOM LIGHT CONTROLLER 4.3 THE MICRO-CONTROLLER
In our day to day life the role of microcontroller has been immense. They are used in variety of applications ranging from home appliances, FAX machines, Video games, Cameras, Exercise equipments, Cellular phones, Musical instruments to Computers, Engine control, aeronautics, security system, etc.
Intel allows other manufacturers to and markets any version of 8051 depending upon the speed and on-chip ROM. There are more then 50 companies like ST, TI, SIEMENS, WINBONDS etc. marketing micro-controller base on Intel-8051.
ARCHITECTURE OF 8051
DEPARTMENT OF ELECTRONICS & COMMUNICATION HARYANA COLLEGE OF TECHNOLOGY & MANAGEMENT 21
PIN DIAGRAM
Prot 3 pins (10 - 17) i/o pins Contains internal pull-ups. Alternate function to provide signal such as interrupts.
PSEN (pin 29 ) Program store enable Active low input. Used while accessing external memory Connected to OE pin of external ROM.
ALE -- (pin 30 ) Address latch enable Active high. Used for de-multiplexing the address & data by connecting G pin of the 74LS373.
RESET ( pin 9) Active high input. Terminates all activities of microcontroller. Set PC to 0000h. Requires minimum 2 machine cycles.
Fig. 4.4 Crystal Osc. XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier that can be configured for use as an on-chip oscillator. Either a quartz crystal or ceramic resonator may be DEPARTMENT OF ELECTRONICS & COMMUNICATION HARYANA COLLEGE OF TECHNOLOGY & MANAGEMENT 24
Program Memory:If the EA pin is connected to GND, all program fetches are directed to external memory. On the AT89S51, if EA is connected to VCC, program fetches to addresses 0000H through FFFH are directed to internal memory and fetches to addresses 1000H through FFFFH are directed to external memory.
Data Memory:The AT89S51 implements 128 bytes of on-chip RAM. The 128 bytes are accessible via direct and indirect addressing modes. Stack operations are examples of indirect addressing, so the 128 bytes of data RAM are available as stack space.
DATA MEMORY
CPU RAGISTER
ACC B PSW SP DPTE : Accumulator. : B register : Program Status Word : Stack pointer : Data pointer
INTERRUPT CONTROL
IE : Interrupt Enable
I/O PORTS
P0 P1 P2 P3 : port 0 : port 1 : port 2 : port 3
TIMERS
TMOD TCON TH0 TL0 TH1 TL1 : timer mode : timer control : timer 0 high byte : timer 0 low byte : timer 1 high byte : timer 1 low byte
SERIAL I/O
SCON SBUF : Serial port control. : Serial data register
OTHERS
- PCON : Power control and misc.
CY
AC
F0
RSI
RS0
OV
-----
CY AC F0 RS1 RS0 OV P
: : : : : : :
CARRY FLAG AUXILIARY CARRY FLAG FLAG 0 (AVAILABLE FOR USER) REGISTER SELECT 1 REGISTER SELECT 0 AIRTHIMATIC OVERFLOW FLAG ACCUMMULATOR PARITY FLAG
The Program Status Word (PSW) contains several status bits that reflect the current state of the CPU. The PSW, shown in Figure 10, resides in the SFR space. It contains the Carry bit, the Auxiliary Carry (for BCD operations), the two register bank select bits, the Overflow flag, a Parity bit, and two user-definable status flags. The Carry bit, other than serving the function of a Carry bit in arithmetic operations, also serves as the Accumulator for a number of Boolean operations. The bits RS0 and RS1 are used to select one of the four register banks. A number of instructions refer to these RAM locations as R0 through R7. The selection of which of the four is being referred to is made on the basis of the RS0 and RS1 at execution time. The Parity bit reflects the number of 1s in the Accumulator: P = 1 if the Accumulator contains an odd number of 1s, and P = 0 if the Accumulator contains an even number of 1s. Thus the number of 1s in the Accumulator plus P is always even. Two bits in the PSW are uncommitted and may be used as general purpose status flags.
INTERRUPTS
MODES OF OPERATION
Microcontroller 8051 has two modes of operations. IDLE MODE POWER-DOWN MODE
IDLE MODE
In idle mode, the CPU puts itself to sleep while all the on-chip peripherals remain active. The mode is invoked by software. The content of the on-chip RAM and all the special function registers remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset. Note that when idle mode is terminated by a hardware reset, the device normally resumes pro-gram execution from where it left off, up to two machine cycles before the internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when idle mode is terminated by a reset, the instruction following the one that invokes idle mode should not write to a port pin or to external memory.
POWER-DOWN MPODE
In the Power-down mode, the oscillator is stopped, and the instruction that invokes Power-down is the last instruction executed. The on-chip RAM and Special Function Registers retain their values until the Power-down mode is terminated. Exit from Power-down mode can be initiated DEPARTMENT OF ELECTRONICS & COMMUNICATION HARYANA COLLEGE OF TECHNOLOGY & MANAGEMENT 31
CONDUCTOR SHAPES
Sharp corners and acute angle bends should be avoided. DEPARTMENT OF ELECTRONICS & COMMUNICATION HARYANA COLLEGE OF TECHNOLOGY & MANAGEMENT 33
CHAPTER 6: SOFTWARE
#include<reg51.h> #define lcd P0 sbit en=P1^0; sbit rs=P1^1; sbit opt1=P1^4; sbit opt2=P1^5; sbit relay1=P1^2; sbit relay2=P1^3; void delay(unsigned int); void lcdcmd(unsigned char); void lcddata(unsigned char); DEPARTMENT OF ELECTRONICS & COMMUNICATION HARYANA COLLEGE OF TECHNOLOGY & MANAGEMENT 35
lcddata(48+b); delay(2000);
lcddata(48+a); delay(2000); } void lcdcmd(unsigned char value) { lcd=value; rs=0; en=1; delay(5); en=0; delay(10); } void lcddata(unsigned char value) { lcd=value; rs=1; en=1; delay(5); en=0; delay(10); } DEPARTMENT OF ELECTRONICS & COMMUNICATION HARYANA COLLEGE OF TECHNOLOGY & MANAGEMENT 38
With more use of more practical sensors and microcontroller this project is quit reliable.
FASTER RESPONSE:In this project we use microcontroller with the response time in terms of microseconds. So this projects is has faster response.
CHEAPER:With large production coming up the production cost of electric goods has decreased dramatically.
APPLICABLE TO SMALL AS WELL AS LARGER LEVELS:It can be used as a counter for people by using LASER and LDR, coupling as sensors or at a lover level by using an optocoupler .
SMALL POWER REQUIREMENT:It consumes less power approximate 12v and also eliminates the danger of electric shock.
HUMAN INRTFACING:Human interfacing is possible by using LCD and LED (seven segments).
CONCLUSION
Controlling devices using switches are common. From a few decades controlling devices using remote control switches like infrared remote control switch, wireless remote control switches, light activated switches are becoming popular. But these technologies have their own limitations. Laser beams are harmful to mankind. Some technologies like IR remote control are used for short distance applications. In such case if we have system which does not require any radiations or which is not harmful, long remote control switch!! Automatic room light controller works very well for counting the number of persons entering in the room. It also controls the light of the room and displays the person entered on seven segments (LED) which are used as display unit. The sensors used here are optocouplers .this project is much beneficial for room light control and visitors counting.
REFERENCES
WEB REFRENCES [1] http://www.discovercircuits.com/list.htm [2] http://www.Datasheetcatalog.com [3] www.electrofriends.com [4] http://www.electronicsforu.com/electronicsforu/top100/top100electronics.asp [5] http://www.geocities.com/iecmaster/circuits_tel/cir_tel002.html [6] http://home.maine.rr.com/randylinscott/project.htm
APPENDIX DATASHEET
ATMEL