Você está na página 1de 48

PASSWORD PROTECTED DOOR LOCK SYSTEM

A PROJECT REPORT
Submitted by
RITU BAGLA (08-TIB-1138) NEHA DUDEJA (08-TIB-1128) KANIKA MEHTA (08-TIB-1123) MANISHA PRAJAPATI (08-TIB-1126) PRIYANKA NARANG (08-TIB-)

Submitted in the partial fulfillment of the requirements for the award of degree of

BACHELOR OF TECHNOLOGY
IN

ELECTRONICS AND COMMUNICATION

The Technological Institute of Textile and Sciences, Bhiwani


1

MAHARISHI DAYANAND UNIVERSITY, ROHTAK


(2008-2012) Department of Electronics and Communication

CERTIFICATE OF APPROVAL
The foregoing project work report entitled .PASSWORD PROTECTED DOOR LOCK..,is a hereby approved as a creditable work and has been presented in a satisfactory manner to warrant its acceptance as prerequisite to the degree for which it has been submitted.

It is understood that by this approval, the undersigned do not necessarily endorse any conclusion drawn or opinion expressed therein, but approve the project work for the purpose for which it is submitted.

(Internal (External Examiner)

Examiner)

Mr. KAMAL SARDANA

(Head of the Department)

The Technological Institute of Textile and Sciences, Bhiwani


CERTIFICATE

This is to certify that the work presented in the project report entitled .PASSWORD PROTECTED DOOR LOCK .. in the partial fulfillment of the requirement for the award of Degree of Bachelor of Technology in Electronics and Communication of The Technological Institute of Textile and Sciences, Bhiwani is an authentic work carried out under my supervision and guidance.

To the best of my knowledge ,the content of this project work not form a basis for the award of any previous Degree to any one else.
3

Date:

Mrs. Priyanka Singh < Project Guide>

Mr. S.K. JHA < Project Coordinator>.

Mr. KAMAL SARDANA < Head of the Department>

Acknowledgement
Knowledge is an experience gained in life. It is the choicest possession,which should not be shelved but should be happily shared with others. In this regard I am extremely fortunate in having (name of guide with designation and address)as my project guide .It was he ,who provided proper direction in the completion of this project work. I have often been guilty of encroaching upon the privacy of this home but not even once I was disappointed .His willingness to share his experience and spontaneous suggestion on any problem encourage me tremendously to achieve my goal .I am sure his directive will show me the light in future also.

I am very much thankful to Sh. KAMAL SARDANA, HOD , ECE dept for his encouragement ,valuable suggestion and moral support provided by him.

At the juncture, I feel at the deepest of my heart to acknowledge the encouragement and blessing of my mother and sister. Last but not the least, words can hardly express my heartfelt gratitude towards my project coordinator Sh. S .K JHA --------, who stood by me and helped in every way possible during the completion of this project.

RITU BAGLA (08TIB1138) NEHA DUDEJA (08TIB1128) KANIKA MEHTA (08TIB1123) MANISHA PRAJAPATI (08TIB1126) PRIYANKA NARANG (08TIB112)

TABLE OF CONTENTS:
CHAPTER NO. 1. 2. 3. 4. 5. 6. 6.1 6.2 TITLE CANDIDATE DECLARATION CERTIFICATE ACKNOWLEDGEMENT ABSTRACT BLOCK DIAGRAM COMPONENT DESCRIPTION MICROCONTROLLER(8051) POWER SUPPLY 1 2 3 6 5 6-41 7-8 9-11 5 PAGE NO.

6.3 6.5 6.6 6.7 6.10 6.11 6.12 7. 7.1 7.2 8. 9. 10. SUMMARY

LED CAPACITOR RESISTOR RELAY PUSH BUTTON SWITCHES 7432 IC SL100 MAKING OF PROJECT PCB DESIGNING PROCEDURE FOR MAKING PROJECT WORKING OF PROJECT 51-52 53-54 REFERENCES 37-38

12-17 22-23 24-25 26-30 35-36

39-41

43-45 46-50

55

ABSTRACT:The project here is all about Microcontroller Based access control door opener with latest electronics technology & microcontroller.

The major blocks of our system are as follows:(1) Power Supply: - We will need a +5V/500mA power supply for our project. For this purpose we will use a step down transformer to convert 220VAC/50Hz into 12VAC. The out of transformer is rectified through bridge rectifier using diode 1N4001. Linear voltage regulator IC LM7805

(2)

is used to provide a stable regulated +5V supply for microcontroller and other parts in the project. Microcontroller AT89S51:- ATMEL make microcontroller AT89S51 is the main controller being used in this project due to its easy availability and low cost. The function of microcontroller will be to monitor the presence of smart card in its socket & read the information from it. The information colleted from the smart card will be displayed on a LCD display.

BLOCK DIAGRAM

COMPONENTS DESCRIPTION MICROCONTROLLER AT89C51

Architecture of 8051 family:-

The figure 1 above shows the basic architecture of 8051 family of microcontroller.

Features Compatible with MCS-51 Products 4K Bytes of In-System Reprogrammable Flash Memory Endurance: 1,000 Write/Erase Cycles Fully Static Operation: 0 Hz to 24 MHz Three-Level Program Memory Lock 128 x 8-Bit Internal RAM 32 Programmable I/O Lines Two 16-Bit Timer/Counters Six Interrupt Sources Programmable Serial Channel Low Power Idle and Power Down Modes

Description

The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash Programmable and Erasable Read Only Memory (PEROM). The device is manufactured using Atmels high density nonvolatile memory technology
9

and is compatible with the industry standard MCS-51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly flexible and cost effective solution to many embedded control applications. The AT89C51 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, five vector two-level interrupt architecture, a full duplex serial port, and on-chip oscillator and clock circuitry. In addition, the AT89C51 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The Power down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.

Pin Description VCC GND Port 0 Port 0 is an 8-bit open drain bidirectional I/O port. As an output port each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance inputs. Port 0 may also be configured to be the multiplexed low order address/data bus during accesses to external program and data memory. In
10

Supply voltage. Ground.

this mode P0 has internal pull-ups. Port 0 also receives the code bytes during Flash programming, and outputs the code bytes during program verification.

11

12

Port 1 Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 1 also receives the low-order address bytes during Flash programming and verification.

Port 2 Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 3 Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups.

13

RST Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. ALE/PROG Address Latch Enable output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. PSEN Program Store Enable is the read strobe to external program memory. Port Pin Alternate Functions P3.0 RXD (serial input port) P3.1 TXD (serial output port) P3.2 INT0 (external interrupt 0) P3.3 INT1 (external interrupt 1) P3.4 T0 (timer 0 external input) P3.5 T1 (timer 1 external input) P3.6 WR (external data memory write strobe) P3.7 RD (external data memory read strobe)
14

EA/VPP External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. XTAL1 Input to the inverting oscillator amplifier and input to the internal clock

operating circuit. XTAL2 Output from the inverting oscillator amplifier.

Oscillator Characteristics XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 1. Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in figure below.

15

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 functions registers remain unchanged during this mode. The idle mode can be terminated by any enabled. Power down Mode 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. POWER SUPPLY In alternating current the electron flow is alternate, i.e. the electron flow increases to maximum in one direction, decreases back to zero. It then increases in the other direction and then decreases to zero again. Direct current flows in one direction only. Rectifier converts alternating current to flow in one direction only. When the anode of the diode is positive with respect to its cathode, it is forward biased, allowing current to flow. But when its anode is negative with respect to the
16

cathode, it is reverse biased and does not allow current to flow. This unidirectional property of the diode is useful for rectification. A single diode arranged back-toback might allow the electrons to flow during positive half cycles only and suppress the negative half cycles. Double diodes arranged back-to-back might act as full wave rectifiers as they may allow the electron flow during both positive and negative half cycles. Four diodes can be arranged to make a full wave bridge rectifier. Different types of filter circuits are used to smooth out the pulsations in amplitude of the output voltage from a rectifier. The property of capacitor to oppose any change in the voltage applied across them by storing energy in the electric field of the capacitor and of inductors to oppose any change in the current flowing through them by storing energy in the magnetic field of coil may be utilized. To remove pulsation of the direct current obtained from the rectifier, different types of combination of capacitor, inductors and resistors may be also be used to increase to action of filtering. NEED OF POWER SUPPLY Perhaps all of you are aware that a power supply is a primary requirement for the Test Bench of a home experimenters mini lab. A battery eliminator can eliminate or replace the batteries of solid-state electronic equipment and the equipment thus can be operated by 230v A.C. mains instead of the batteries or dry cells. Nowadays, the use of commercial battery eliminator or power supply unit has become increasingly popular as power source for household appliances like transreceivers, record player, cassette players, digital clock etc. 6.2 LIGHT EMITTING DIODES :

A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator lamps in many devices and are increasingly used for other lighting. Introduced as a practical electronic component in 1962, early LEDs emitted lowintensity red light, but modern versions are available across the visible, ultraviolet, and infrared wavelengths, with very high brightness.

17

When a light-emitting diode is forward-biased (switched on), electrons are able to recombine with electron holes within the device, releasing energy in the form of photons. This effect is called electroluminescence and the color of the light (corresponding to the energy of the photon) is determined by the energy gap of the semiconductor. LEDs are often small in area (less than 1 mm2), and integrated optical components may be used to shape its radiation pattern. LEDs present many advantages over incandescent light sources including lower energy consumption, longer lifetime, improved robustness, smaller size, and faster switching. LEDs powerful enough for room lighting are relatively expensive and require more precise current and heat management than compact fluorescent lamp sources of comparable output. Light-emitting diodes are used in applications as diverse as replacements for aviation lighting, automotive lighting (in particular brake lamps, turn signals, and indicators) as well as in traffic signals. LEDs have allowed new text, video displays, and sensors to be developed, while their high switching rates are also useful in advanced communications technology. Infrared LEDs are also used in the remote control units of many commercial products including televisions, DVD players, and other domestic appliances.

18

Parts of LED The LED consists of a chip of semiconducting material doped with impurities to create a p-n junction. As in other diodes, current flows easily from the p-side, or anode, to the n-side, or cathode, but not in the reverse direction. Charge-carriers electrons and holes flow into the junction from electrodes with different voltages. When an electron meets a hole, it falls into a lower energy level, and releases energy in the form of a photon. The wavelength of the light emitted, and thus its color depends on the band gap energy of the materials forming the p-n junction. In silicon or germanium diodes, the electrons and holes recombine by a non-radiative transition, which produces no optical emission, because these are indirect band gap materials. The materials used for the LED have a direct band gap with energies corresponding to near-infrared, visible, or near-ultraviolet light.

19

LED development began with infrared and red devices made with gallium arsenide. Advances in materials science have enabled making devices with evershorter wavelengths, emitting light in a variety of colors. LEDs are usually built on an n-type substrate, with an electrode attached to the ptype layer deposited on its surface. P-type substrates, while less common, occur as well. Many commercial LEDs, especially GaN/InGaN, also use sapphire substrate. Most materials used for LED production have very high refractive indices. This means that much light will be reflected back into the material at the material/air surface interface. Thus, light extraction in LEDs is an important aspect of LED production, subject to much research and development.

Fig.4.2 Inner workings of an LED

20

Fig.4.3 I-V Diagram for an LED Practical use : The first commercial LEDs were commonly used as replacements for incandescent and neon indicator lamps, and in seven-segment displays.first in expensive equipment such as laboratory and electronics test equipment, then later in such appliances as TVs, radios, telephones, calculators, and even watches (see list of signal uses). These red LEDs were bright enough only for use as indicators, as the light output was not enough to illuminate an area. Readouts in calculators were so small that plastic lenses were built over each digit to make them legible. Later, other colors grew widely available and also appeared in appliances and equipment. As LED materials technology grew more advanced, light output rose, while maintaining efficiency and reliability at acceptable levels. The invention and development of the high-power white-light LED led to use for illumination, which is fast replacing incandescent and fluorescent lighting.[21][22] (see list of illumination applications). Most LEDs were made in the very common 5 mm T1 and 3 mm T1 packages, but with rising power output, it has grown increasingly necessary to shed excess heat to maintain reliability, so more complex packages have been adapted for efficient heat dissipation. Packages for state-of-the-art high-power LEDs bear little resemblance to early LEDs.
21

6.3

CAPACITOR :

A capacitor (formerly known as condenser) is a passivetwo-terminalelectrical component used to store energy in an electric field. The forms of practical capacitors vary widely, but all contain at least two electrical conductors separated by a dielectric (insulator); for example, one common construction consists of metal foils separated by a thin layer of insulating film. Capacitors are widely used as parts of electrical circuits in many common electrical devices. When there is a potential difference (voltage) across the conductors, a static electric field develops across the dielectric, causing positive charge to collect on one plate and negative charge on the other plate. Energy is stored in the electrostatic field. An ideal capacitor is characterized by a single constant value, capacitance, measured in farads. This is the ratio of the electric charge on each conductor to the potential difference between them. The capacitance is greatest when there is a narrow separation between large areas of conductor, hence capacitor conductors are often called "plates," referring to an early means of construction. In practice, the dielectric between the plates passes a small amount of leakage current and also has an electric field strength limit, resulting in a breakdown voltage, while the conductors and leads introduce an undesired inductance and resistance. Capacitors are widely used in electronic circuits for blocking direct current while allowing alternating current to pass, in filter networks, for smoothing the output of power supplies, in the resonant circuits that tune radios to particular frequencies and for many other purposes.

22

Fig.5.1 A typical electrolytic capacitor

6.4

RESISTOR:

A linear resistor is a linear, passivetwo-terminalelectrical component that implements electrical resistance as a circuit element. The current through a resistor is in direct proportion to the voltage across the resistor's terminals. Thus, the ratio of the voltage applied across a resistor's terminals to the intensity of current through the circuit is called resistance. This relation is represented by Ohm's law:

Resistors are common elements of electrical networks and electronic circuits and are ubiquitous in most electronic equipment. Practical resistors can be made of
23

various compounds and films, as well as resistance wire (wire made of a highresistivity alloy, such as nickel-chrome). Resistors are also implemented within integrated circuits, particularly analog devices, and can also be integrated into hybrid and printed circuits. The electrical functionality of a resistor is specified by its resistance: common commercial resistors are manufactured over a range of more than nine orders of magnitude. When specifying that resistance in an electronic design, the required precision of the resistance may require attention to the manufacturing tolerance of the chosen resistor, according to its specific application. The temperature coefficient of the resistance may also be of concern in some precision applications. Practical resistors are also specified as having a maximum power rating which must exceed the anticipated power dissipation of that resistor in a particular circuit: this is mainly of concern in power electronics applications. Resistors with higher power ratings are physically larger and may require heat sinks. In a high-voltage circuit, attention must sometimes be paid to the rated maximum working voltage of the resistor. Practical resistors have a series inductance and a small parallel capacitance; these specifications can be important in high-frequency applications. In a low-noise amplifier or pre-amp, the noise characteristics of a resistor may be an issue. The unwanted inductance, excess noise, and temperature coefficient are mainly dependent on the technology used in manufacturing the resistor. They are not normally specified individually for a particular family of resistors manufactured using a particular technology.[1] A family of discrete resistors is also characterized according to its form factor, that is, the size of the device and the position of its leads (or terminals) which is relevant in the practical manufacturing of circuits using them.
24

The ohm (symbol: ) is the SI unit of electrical resistance, named after Georg Simon Ohm. An ohm is equivalent to a volt per ampere. Since resistors are specified and manufactured over a very large range of values, the derived units of milliohm (1 m = 103 ), kilohm (1 k = 103 ), and megohm (1 M = 106 ) are also in common usage. The reciprocal of resistance R is called conductance G = 1/R and is measured in Siemens (SI unit), sometimes referred to as a mho. Hence, Siemens is the reciprocal of an ohm: S = 1. Although the concept of conductance is often used in circuit analysis, practical resistors are always specified in terms of their resistance (ohms) rather than conductance. 6.5 RELAY :

A relay is an electrically operated switch. Many relays use an electromagnet to operate a switching mechanism mechanically, but other operating principles are also used. Relays are used where it is necessary to control a circuit by a low-power signal (with complete electrical isolation between control and controlled circuits), or where several circuits must be controlled by one signal. The first relays were used in long distance telegraph circuits, repeating the signal coming in from one circuit and re-transmitting it to another. Relays were used extensively in telephone exchanges and early computers to perform logical operations. A type of relay that can handle the high power required to directly control an electric motor is called a contactor. Solid-state relays control power circuits with no moving parts, instead using a semiconductor device to perform switching. Relays with calibrated operating characteristics and sometimes multiple operating coils are used to protect electrical circuits from overload or faults; in modern

25

electric power systems these functions are performed by digital instruments still called "protective relays".

Fig. 7.1 A simple electromechanical Relay

The following designations are commonly encountered:

SPST Single Pole Single Throw. These have two terminals which can be connected or disconnected. Including two for the coil, such a relay has four
26

terminals in total. It is ambiguous whether the pole is normally open or normally closed. The terminology "SPNO" and "SPNC" is sometimes used to resolve the ambiguity.

SPDT Single Pole Double Throw. A common terminal connects to either of two others. Including two for the coil, such a relay has five terminals in total.

DPST Double Pole Single Throw. These have two pairs of terminals. Equivalent to two SPST switches or relays actuated by a single coil. Including two for the coil, such a relay has six terminals in total. The poles may be Form A or Form B (or one of each).

DPDT Double Pole Double Throw. These have two rows of change-over terminals. Equivalent to two SPDT switches or relays actuated by a single coil. Such a relay has eight terminals, including the coil.

The "S" or "D" may be replaced with a number, indicating multiple switches connected to a single actuator. For example 4PDT indicates a four pole double throw relay (with 14 terminals). Applications: Relays are used to and for: Amplify a digital signal, switching a large amount of power with a small operating power. Some special cases are: A telegraph relay, repeating a weak signal received at the end of a long wire

Controlling a high-voltage circuit with a low-voltage signal, as in some types of modems or audio amplifiers,
27

Controlling a high-current circuit with a low-current signal, as in the startersolenoid of an automobile,

Detect and isolate faults on transmission and distribution lines by opening and closing circuit breakers (protection relays),

PUSH BUTTON SWITCH: A push-button (also spelled pushbutton) (press-button in the UK) or simply button is a simple switch mechanism for controlling some aspect of a machine or a process. Buttons are typically made out of hard material, usually plastic or metal. The surface is usually flat or shaped to accommodate the human finger or hand, so as to be easily depressed or pushed. Buttons are most often biased switches, though even many un-biased buttons (due to their physical nature) require a spring to return to their un-pushed state. Different people use different terms for the "pushing" of the button, such as press, depress, mash, and punch.

DC MOTOR Like all electric motors or generators, torque is produced by the principle of Lorentz force, which states that any current-carrying conductor placed within an
28

external magnetic field experiences a torque or force known as Lorentz force. Advantages of a brushed DC motor include low initial cost, high reliability, and simple control of motor speed. Disadvantages are high maintenance and low lifespan for high intensity uses. Maintenance involves regularly replacing the brushes and springs which carry the electric current, as well as cleaning or replacing the commutator. These components are necessary for transferring electrical power from outside the motor to the spinning wire windings of the rotor inside the motor.

PCB DESIGNING : A printed circuit board, or PCB, is used to mechanically support and electrically connect electronic components using conductive pathways, tracks or signal traces etched from copper sheets laminated onto a non-conductive substrate. It is also referred to as printed wiring board (PWB) or etched wiring board. A PCB populated with electronic components is a printed circuit assembly (PCA), also known as a printed circuit board assembly (PCBA). Printed circuit boards are used in virtually all but the simplest commercially produced electronic devices.

29

PCBs are inexpensive, and can be highly reliable. They require much more layout effort and higher initial cost than either wire wrap or point-to-point construction, but are much cheaper and faster for high-volume production; the production and soldering of PCBs can be done by totally automated equipment.

Materials : A PCB as a design on a computer (left) and realized as a board assembly populated with components (right). The board is double sided, with through-hole plating, green solder resist, and white silkscreen printing. Both surface mount and throughhole components have been used. A PCB in a computer mouse. The Component Side (left) and the printed side (right). The Component Side of a PCB in a computer mouse; some examples for common components and their reference designations on the silk screen. Conducting layers are typically made of thin copper foil. Insulating layers dielectricare typically laminated together with epoxy resinprepreg. The board is typically coated with a solder mask that is green in color. Other colors that are normally available are blue, black, white and red. There are quite a few different dielectrics that can be chosen to provide different insulating values depending on the requirements of the circuit. Some of these dielectrics are polytetrafluoroethylene (Teflon), FR-4, FR-1, CEM-1 or CEM-3.

30

Patterning (etching) The vast majority of printed circuit boards are made by bonding a layer of copper over the entire substrate, sometimes on both sides, (creating a "blank PCB") then removing unwanted copper after applying a temporary mask (e.g. by etching), leaving only the desired copper traces. A few PCBs are made by adding traces to the bare substrate (or a substrate with a very thin layer of copper) usually by a complex process of multiple electroplating steps. The PCB manufacturing method primarily depends on whether it is for production volume or sample/prototype quantities. Double-sided boards or multi-layer boards use plated-through holes to connect traces on either side of the substrate. Drilling Holes through a PCB are typically drilled with small-diameter drill bits made of solid coated tungsten carbide. Coated tungsten carbide is recommended since many board materials are very abrasive and drilling must be high RPM and high feed to be cost effective. Drill bits must also remain sharp to not mar or tear the traces. Drilling with high-speed-steel is simply not feasible since the drill bits will dull quickly and thus tear the copper and ruin the boards. The drilling is performed by automateddrilling machines with placement controlled by a drill tape or drill file. These computer-generated files are also called numerically controlled drill (NCD) files or "Excellon files". The drill file describes the location and size of each drilled hole. These holes are often filled with annular rings (hollow rivets) to create vias. Vias allow the electrical and thermal connection of conductors on opposite sides of the PCB. Printed circuit assembly

31

PCB with test connection pads After the printed circuit board (PCB) is completed, electronic components must be attached to form a functional printed circuit assembly, or PCA (sometimes called a "printed circuit board assembly" PCBA). In through-hole construction, component leads are inserted in holes. In surface-mount construction, the components are placed on pads or lands on the outer surfaces of the PCB. In both kinds of construction, component leads are electrically and mechanically fixed to the board with a molten metal solder.

PROCEDURE FOR MAKING PROJECT : Building project in the proper manner is really an art, something which must be practiced and learned through trial and error, it is not all that difficult. The main thing is to remember to take each step slowly and carefully according to the instructions giving making since that everything at it should be before proceeding further. Tools: The electronics workbench is an actual place of work with comfortably & conveniently & should be supplied with compliment of those tools must often use in
32

project building. Probably the most important device is a soldering tool. Other tool which should be at the electronic work bench includes a pair of needle nose pliers, diagonal wire cutter, a small knife, an assortment of screw driver, nut driver, few nuts & bolts, electrical tape, plucker etc. Diagonal wire cutter will be used to cut away any excess lead length from copper side of P.C.B. 7 to cut section of the board after the circuit is complete. The needle nose pliers are most often using to bend wire leads & wrap them in order to form a strong mechanical connection.

Mounting and soldering: Soldering is process of joining together two metallic parts. It is actually a process of function which an alloy, the solder, with a comparatively low melting point penetrates the surface of the metal being joined & makes a firm joint between them on cooling & solidifying. in

THE SOLDERING KIT:

(1)Soldering iron: As soldering is a process of joining together two metallic parts, the instrument, which is used, for doing this job is known as soldering Iron. Thus it is
33

meant for melting the solder and to setup the metal parts being joined. Soldering Iron is rated according to their wattage, which varies from 10- 200 watts.

(2)Solder: The raw material used for soldering is solder. It is composition of lead & tin. The good quality solder (a type of flexible naked wire) is 60% Tin +40% Lead which will melt between 180 degree to 200 degree C temperature.

(3)Fluxes: When the points to solder are heated, an oxide film forms. This must be removed at once so that solder may get to the surface of the metal parts. This is done by applying chemical substance called Flux, which boils under the heat of the iron remove the oxide formation and enable the metal to receive the solder.

(4)Blades or knife: To clean the surface & leads of components to be soldered is done by this common instrument.

(5)Sand paper: The oxide formation may attack at the tip of your soldering iron & create the problem. To prevent this, clean the tip with the help of sand paper time to time or
34

you may use blade for doing this job. Apart from all these tools, the working bench for soldering also includes desoldering pump, wink wire (used for desoldering purpose), file etc.

How to solder: Mount components at their appropriate place; bend the leads slightly outwards to prevent them from falling out when the board is turned over for soldering. No cut the leads so that you may solder them easily. Apply a small amount of flux at these components leads with the help of a screwdriver. Now fix the bit or iron with a small amount of solder and flow freely at the point and the P.C.B copper track at the same time. A good solder joint will appear smooth & shiny. If all appear well, you may continue to the next solder connections. Tips for good soldering: 1. Use right type of soldering iron. A small efficient soldering iron (about 10-25 watts with 1/8 or 1/4 inch tip) is ideal for this work. 2. Keep the hot tip of the soldering iron on a piece of metal so that excess heat is dissipated. 3. Make sure that connection to the soldered is clean. Wax frayed insulation and other substances cause poor soldering connection. Clean the leads, wires, tags etc. before soldering.

35

4. Use just enough solder to cover the lead to be soldered. Excess solder can cause a short circuit.
5.

Use sufficient heat. This is the essence of good soldering. Apply enough heat to the component lead. You are not using enough heat, if the solder barely melts and forms a round ball of rough flaky solder. A good solder joint will look smooth, shining and spread type. The difference between good & bad soldering is just a few seconds extra with a hot iron applied firmly.

Precautions: 1. Mount the components at the appropriate places before soldering. Follow the circuit description and components details, leads identification etc. Do not start soldering before making it confirm that all the components are mounted at the right place. 2. 3. 4. 5. Do not use a spread solder on the board, it may cause short circuit. Do not sit under the fan while soldering. Position the board so that gravity tends to keep the solder where you want it. Do not over heat the components at the board. Excess heat may damage the components or board. 6. The board should not vibrate while soldering otherwise you have a dry or a cold joint.
36

7. 8.

Do not put the kit under or over voltage source. Be sure about the voltage either dc or ac while operating the gadget. Do spare the bare ends of the components leads otherwise it may short circuit with the other components. To prevent this use sleeves at the component leads or use sleeved wire for connections.

9.

Do not use old dark color solder. It may give dry joint. Be sure that all the joints are clean and well shiny.

10. Do make loose wire connections especially with cell holder, speaker, probes etc. Put knots while connections to the circuit board, otherwise it may get loose. CIRCUIT DIAGRAM

37

38

CODING

#include<AT89X52.h> sbit key1=P1^0; sbit key2=P1^1; sbit key3=P1^2; sbit key4=P1^3; sbit relay1=P3^6; sbit relay2=P3^7; bit key1flag; bit key2flag; bit key3flag; bit key4flag; unsigned char passwordarr[4]; unsigned char keycount; unsigned char irsensorflag; unsigned char keycountflag=1; unsigned int relaycount; unsigned char phonecount; unsigned char passwordcount; unsigned char passwordflag; unsigned char ircount; unsigned char irsensecount; void delay() { unsigned char i,j; for(i=0;i<60;i++) { for(j=0;j<120;j++) {}
39

}} void timer0() interrupt 1 { relaycount++; TF0=0; TH0=0x4b; TL0=0x0fd; if(relaycount==20) relay1=0; if(relaycount==220) relay2=1; if(relaycount==240) { key1flag=1; key2flag=1; key3flag=1; key4flag=1; relaycount=0; relay2=0; ET0=0; TR0=0; } } void timer1() interrupt 3 { phonecount++; TF1=0; TH1=0x4b; TL1=0x0fd; if(phonecount==150) { key1flag=1;
40

key2flag=1; key3flag=1; key4flag=1; phonesensor=0; buzzer=0; phonecount=0; ET1=0; TR1=0; }} void key1chk() { if(key1flag) { if(key1==0) { key1flag=0; keycount++; if(keycount==1) passwordarr[0]=1; if(keycount==2) passwordarr[1]=1; if(keycount==3) passwordarr[2]=1; if(keycount==4) passwordarr[3]=1; }}} void key2chk() { if(key2flag) { if(key2==0) { key2flag=0;
41

keycount++; if(keycount==1) passwordarr[0]=2; if(keycount==2) passwordarr[1]=2; if(keycount==3) passwordarr[2]=2; if(keycount==4) passwordarr[3]=2; }}} void key3chk() { if(key3flag) { if(key3==0) { key3flag=0; keycount++; if(keycount==1) passwordarr[0]=3; if(keycount==2) passwordarr[1]=3; if(keycount==3) passwordarr[2]=3; if(keycount==4) passwordarr[3]=3; }}} void key4chk() { if(key4flag) { if(key4==0) {
42

key4flag=0; keycount++; if(keycount==1) passwordarr[0]=4; if(keycount==2) passwordarr[1]=4; if(keycount==3) passwordarr[2]=4; if(keycount==4) passwordarr[3]=4; }}} void irchk() { if(!irsensor) irsensorflag=1; } void firesensorchk() { if(!firesensor) firesensorflag=1; } void rainsensorchk() { if(!rainsensor) rainsensorflag=1; } void securitychkopr() { while(1) { key1chk();
43

delay(); key2chk(); delay(); key3chk(); delay(); key4chk(); delay(); irchk(); delay(); firesensorchk(); delay(); rainsensorchk(); delay(); if(firesensorflag) break; if(rainsensorflag) break; if(irsensorflag) break; if(keycount>=4) { keycount=0; keycountflag=1; break; }}} void main() { key1flag=1; key2flag=1; key3flag=1; key4flag=1; TMOD=0x11; TF0=0;
44

TH0=0x4b; TL0=0x0fd; TF1=0; TH1=0x4b; TL1=0x0fd; EA=1; ET0=0; TR0=0; ET1=0; TR1=0; relay1=0; relay2=0; phonesensor=0; buzzer=0; firesensor=1; while(1) { securitychkopr(); if(firesensorflag) { firesensorflag=0; phonesensor=1; ET1=1; TR1=1; } if(rainsensorflag) { rainsensorflag=0; phonesensor=1; ET1=1; TR1=1; } if(keycountflag) {
45

if(!irsensorflag) { passwordcount++; if(passwordcount<=3) { if(passwordarr[0]==4 && passwordarr[1]==1 && passwordarr[2]==2 && passwordarr[3]==3) { keycountflag=0; passwordflag=1; relay1=1; ET0=1; TR0=1; } }}} if(irsensorflag) { if(!passwordflag) { irsensecount++; if(irsensecount==1) { irsensorflag=0; phonesensor=1; buzzer=1; ET1=1; TR1=1; }}}}}

46

WORKING The Microcontroller based door locker is an access control system(security system) that allows only authorised persons to access a restricted area. The system is fully controlled by 8 bit microcontroller AT89C51 which has 4K bytes of ROM. When the entered password equals the password stored in the memory then the motor rotates and the door is opened. If we enter a wrong password then LCD displays wrong password and wrong password is inserted continuously in that case lcd displays try again till wrong password is inserted four times after that it will display BETTER LUCK NEXT

47

TIME and the person cannot enter any more passwords after that till power supply is removed. 7. REFERENCES : Electronics For You magazine Internet Electronics Projects magazine

PROJECT DESCRIPTION The Microcontroller based door locker is an access control system(security system) that allows only authorised persons to access a restricted area. The system is fully controlled by 8 bit microcontroller AT89C51 which has 4K bytes of ROM. When the entered password equals the password stored in the memory then the motor rotates and the door is opened. If we enter a wrong password then LCD display for TRY AGAIN. And if we enter the wrong password for about 4 times then LCD display BETTER LUCK NEXT TIME and we can enter the other password only when battery will be removed.

48

Você também pode gostar