114421229 Project Report on Dtmf

Embed Size (px)

Citation preview

  • 7/29/2019 114421229 Project Report on Dtmf

    1/59

    DTMF Based Automatic Locking System

    Project Report

    1.

    INTRODUCTION

    Cell-phone is an ubiquitous device and so when it got combined with the digitaldoor lock technology; it is able to give us more secure, easy and comfortable door lock system. Now with digital door lock systems, it is easier to control thedoor movement of the vehicle. This new automated technology does not require a key to lock or unlock the door of the vehicle. This digital door entry system isin fact controlled by cell-phone which is actually performing the role of remotecontroller over here.Door lock device inside the vehicle is consisting anothercell-phone with an electronic circuit. The users cellphone transmitsDTMF (dualtone multiple frequency) [5] signals via air to another device of the system installed inside the vehicle. And so the door lock system can be operated from anypart of the word. Theworking of this digital door locking system [1] is very simple. You just have to use the cell phone you carry with yourself and you can control the lock from anywhere without any problem. It is a password based system.The owner has to enter the password on the cell phone for controlling the locking system.DTMF tones are input to decoder which sends the BCD code to 8051 microcontroller [3][4] .Buzzer system installed with it will be able to give owner th

    e information whether the door has been locked safely, like in case password hasbeen pressed wrong bymistake by owner. Nowadays theft cases are increasing everywhere and the key based locking system is no longer a safe option. It is quiteeasy to open the traditional key based doors either with duplicate keys or someother way. Therefore for safety of vehicles, this system can be installed.it issimple to install and cheap too. With this system, you will never be in tensionof leaving your house and vehicle out of your supervision. Not only this ,it also help us to move out of some really odd situations like you locked the door and left and in your absence your friends came back and then they will have to wait outside if they were not having key with themselves. Thus DTMF based locking system provides a greater sense of security to users. It is an user-friendly device and very easy to install. Undoubtedly there is scope for improvement and canbe made for enhanced safety purposes.

    1

  • 7/29/2019 114421229 Project Report on Dtmf

    2/59

    DTMF Based Automatic Locking System

    Project Report

    1.1 MOTIVATIONKeyless entry has been a luxury whose availability is confined primarily to vehicles. The cell phone security system takes this idea of keyless entry and transforms it into a convenient, versatile security system that utilizes cell phone technology and the landline telephone network. By taking advantage of caller identification and dual-tone multi-frequency signaling, the security systemhas the ability to introduce twolevels of security. The first level will be decoding thecalling partys identification information while the second level would consist ofthe user attempting apassword entry over the phone. By combining themobilityof this telecommunication medium with microcontrollers, the system achieves a secure, convenient, and automated form of security for a place of residence [2].

    1.2 DEFINITIONThe cell phone security system is the result of a fusion of a creative idea withan attempt to motivate change. Even though modern technology has allowed for the automation of many aspects of domestic lifestyles, from automatic motion sensing lights to automatic garage door openers, vehicle security has not seen much benefit from this revolution. Vehicle locking system has been a very manual routine with little effort to automate the process, at least in India. Entry into a vehicle is still primarily limited to a manual process which involves inserting a

    key into a bolt and physically moving the locking-mechanism. So to automatize the entire process we have introduced a DTMF controlled locking system in cars which will allow the users to operate the lock from a remote location.

    1.3 OBJECTIVEThe fundamental requirements for the cell phone security system remained fixed throughout the design process. The goal was to design a system which would allowthe user automated and convenient access to their car security system through acell phone network. The fundamental objectives of the system include: 1. Correctly decode the DTMF signals from the user. 2. Allow the user to automatically lock the entryway. 3. Allow the user to automatically unlock the entryway. 4. Allowthe user to reset password

    2

  • 7/29/2019 114421229 Project Report on Dtmf

    3/59

    DTMF Based Automatic Locking System

    Project Report

    1.4 LIMITATIONS OF THE PROJECTNo doubt DTMF based locking system ensures a greater extent of safety but this project bears some limitations like caller identification and mobile authentication. In case user is in no network coverage area he will have to move near his vehicle to lock his vehicle. Also due to limitation of memory user can not set password of large length (here it is limited to four digit only).All these limitations are can be easily removed at the expense of increased budget.

    1.5 ORGANISATION OF DOCUMENTATIONIn this project documentation we have initially put the definition and objectiveof the project as well as the design of the project which is followed by the implementation and testing phases. Finally the project has been concluded successfully and also the future enhancements of the project were given in thisDocumentation.

    3

  • 7/29/2019 114421229 Project Report on Dtmf

    4/59

    DTMF Based Automatic Locking System

    Project Report

    2.

    INTRODUCTION TO DTMF

    DTMF is the global standard for audible tones that represent the digits on a phone keypad with touch-tone land-line phones, pressing a key on the dial pad generates the correspondingDTMF tone for that key. The land-line phone system can then "listen" and decode that tone to determinewhich key was pressed enabling dialing. Mobile phone networks use digital signals instead of DTMF for direct dialing, but DTMF is still used over mobile phones to navigate automated systems suchas phone menus, and for secondary dialing, such as using a calling card. Each DTMF "tone" is actually two tones - a low-frequency tone and a high-frequency tone -combined. (Hence the name "dual tone multi-frequency".) Looking at the standard phone keypad as a grid, the low tone corresponds to the row, while the high tone corresponds to the column. Dual-tone multi-frequency signaling (DTMF) is used for telecommunication signaling over analog telephone lines in the voice-frequency band between telephone handsets and other communications devices and the switching center. The version of DTMF that is used in push-button telephones for tone dialing is known as Touch-Tone. It was developed by Western Electric and first used by the Bell System in commerce, using that name as a registered trademar

    k.Figure 1. DTMF keypad layout The DTMF keypad is laid out in a 44 matrix, with each row representing a low frequency, and each column representing a high frequency. Pressing a single key (such as 1 ) will send a sinusoidal tone for each ofthe two frequencies (697 and 1209 hertz (Hz)). The original keypads had levers inside, so each button activated two contacts. The multiple tones are the reasonfor calling the systemmultifrequency. These tones are then decoded by the switching center to determine which key was pressed. The frequency table corresponding to each key tone in a 4x4 keypad matrix is given below in table 1.

    4

  • 7/29/2019 114421229 Project Report on Dtmf

    5/59

    DTMF Based Automatic Locking System

    Project Report

    Table 1. DTMF keypad frequencies (with sound clips) The above table shows that each key corresponds to low row frequency and high column frequency. Thegraph below in figure 2 shows that resultant frequencywaveform of key 1 consists of 1209Hz and 69 Hz.

    Figure 2. (1209 Hz on 697 Hz to make the 1 tone)

    5

  • 7/29/2019 114421229 Project Report on Dtmf

    6/59

    DTMF Based Automatic Locking System

    Project Report

    3.3.1 INTRODUCTION

    ANALYSIS OF PROJECT

    After analyzing the requirements of the task to be performed, the next step is to analyze the problemand understand its context. The first activity in the phase is studying the existing system and other is to understand the requirements and domain of the new system. Both the methods are equally important but the firstsystem forms a basis of giving the functional specifications and then successful design of the proposed system. Understanding the properties and requirements of a new system is more difficult and requires creative thinking as well as understanding of existing system is also difficult. Improper understanding of presentsystem can lead to diversion from exact solution.

    3.2 HARDWARE REQUIREMENTS3.2.1 MT8870DE DTMF DECODER CIRCUITThe MT8870D/MT8870D-1 is a complete DTMF receiver integrating both the band split filter and digital decoder functions. The filter section uses switched capacitor techniques for high and low group filters; the decoder uses digital counting

    techniques to detect and decode all 16 DTMF tone-pairs into a 4-bit code. Internal functional block diagram of DTMF decoder is shown below in figure 3.

    Figure 3. Functional block diagram

    External component count is minimized by on chip provision of a differential input amplifier, clock oscillator and latched three-state bus interface. PIN description of MT8870DE is shown below in figure 4: 6

  • 7/29/2019 114421229 Project Report on Dtmf

    7/59

    DTMF Based Automatic Locking System

    Project Report

    Figure 4. Pin Diagram of MT8870DE

    Pin description of MT8870 IC is shown below in Table 2 below:

    7

  • 7/29/2019 114421229 Project Report on Dtmf

    8/59

    DTMF Based Automatic Locking System

    Project Report

    Table 2. Pin description of MT8870D IC

    Functional DescriptionThe MT8870D/MT8870D-1 monolithic DTMF receiver offers small size, low power consumption and high performance. Its architecture consists of a band split filter section, which separates the high and low group tones, followed by a digital counting section which verifies the frequency and duration ofthe received tones before passing the corresponding code to the output bus. Different steering arrangements may be used to select independently the guard timesfor tone present (t GTP) and tone absent (tGTP). This may be necessary to meetsystem specificationswhich place both accept and reject limits on both tone duration and interdigital pause. Guard time adjustment also allows the designer totailor system parameters such as talk off and noise immunity. Increasing tREC improves talk-off performance since it reduces the probability that tones simulated by speech will maintain signal condition long enough to be registered. Alternatively, a relatively short tREC with a long tDO would be appropriate for extremely noisy environmentswhere fast acquisition time and immunity to tonedrop-outsare required. Design information for guard time adjustment. Power-down and Inhibit Mode A logic high applied to pin 6 (PWDN)will power down the device to minimize the power consumption in a standby mode. It stops the oscillator and the functions of the filters. Inhibit mode is enabled by a logic high input to the pin

    5 (INH). It inhibits the detection of tones representing characters A,B, C, and D. The output code will remain the same as the previous detected code. Differential Input Configuration The input arrangement of the MT8870D/MT8870D-1 provides a differential-input operational amplifier as well as a bias source (VRef) which is used to bias the inputs at mid-rail. Provision is made for connection of afeedback resistor to the op-amp output (GS) for adjustment of gain. In a single-ended configuration, the input pins are connected with the op-amp connected forunity gain and VRef biasing the input at 1/2VDD..

    Crystal Oscillator The internal clock circuit is completed with the addition ofan external 3.579545 MHz crystal and is normally connected as shown in fig However, it is possible to configure several MT8870D/MT8870D-1 devices employing only

    a single oscillator crystal. The oscillator output of the first device in the chain is coupled through a 30 pF capacitor to the oscillator input (OSC1) of thenext device. Subsequent devices are connected in a similar fashion. Theproblemsassociated with unbalanced loading are not a concern with the arrangement shown, i.e., precision balancing capacitors are not required.

    8

  • 7/29/2019 114421229 Project Report on Dtmf

    9/59

    DTMF Based Automatic Locking System

    Project Report

    DATA SHEET OF MT8870D

    9

  • 7/29/2019 114421229 Project Report on Dtmf

    10/59

    DTMF Based Automatic Locking System Circuit diagram of DTMF decoder is depictedbelow in figure 5:

    Project Report

    Figure 5. Circuit diagram of DTMF decoder circuit

    An oscillator of 3.579MHz is connected across 7th and 8th pins of MT8870D IC which produces pulses to synchronize all the internal blocks of the IC.DTMF inputis fed via a capacitor to the op-amp circuit which on amplifying the signal sends it to the pre-filter and filter circuit and then to output of IC as aBCD code. The other functions of pins are described in Table 2 described above.

    10

  • 7/29/2019 114421229 Project Report on Dtmf

    11/59

    DTMF Based Automatic Locking System

    Project Report

    4.2.2 MICROCONTROLLER 8051 4.2.2(A) The IntroductionThe P89V51RD2 is a low-power, high-performanceCMOS 8-bit microcomputerwith 4Kbytes of Flash programmable and erasable read only memory (PEROM). Thedevice ismanufactured using Atmels highdensity nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set and pin-out. The on-chipFlash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flashon a monolithic chip, the P89V51RD2 is a powerful microcomputer which provides ahighly-flexible and costeffective solution tomany embedded control applications.

    4.2.2(B) 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 ProgramMemoryLock 128 x 8-bit Internal RAM 32 Programmable I/O Lines Two 16-bit Timer/Counters Six Interrupt Sources Programmable SerialChannel Low-power Idle and Power-down Modes The P89V51RD2 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, on-chip oscillator and clock circuitry. In addition, the P89V51RD2 is designed wit

    h static logic for operation down to zero frequency and supports two software selectable power savingmodes. The Idle Mode stops the CPU while allowing the RAM,timer/counters, serial port and interrupt system to continue functioning. The Power-down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset. The pin diagram of basic 8051microcontroller family has been shown in figure 6.Figure 6 - Pin diagram of 8051 microcontroller

    4.2.2(C) Pin ConfigurationVCC (PIN 40) Supply voltage (+5V DC) GND (PIN20) Ground Port 0 (PIN 39-32)

    11

  • 7/29/2019 114421229 Project Report on Dtmf

    12/59

    DTMF Based Automatic Locking System

    Project Report

    Port 0 is an 8-bit open-drain bi-directional 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 this mode P0 has internal pull-ups. Port 0 also receives the code bytesduring Flash programming, and outputs the codebytes during program verification. External pull-ups are required during program verification.

    Port 1 (PIN 1-8) Port 1 is an 8-bit bi-directional 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 usedas inputs. As inputs, Port 1 pins that are externally being pulled lowwill 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 (PIN 21-28) Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2output 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 2 emits the high-order address byte during fetches from external program memory and during accesses to external data me

    mory that uses 16-bit addresses (MOVX@DPTR). In this application, it uses strong internal pull-ups when emitting 1s. During accesses to external datamemory that uses 8-bit addresses (MOVX@ RI), Port 2 emits the contents of theP2 Special Function Register. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification. Port 3 (PIN 10-17) Port 3 is an 8-bit bi-directional 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. Port 3 also serves the functions of various special features of the AT89C51 as listed in table 3. Port 3 also receives some control signals for Flash programming and verification.Table 3 Various functions of pins of Port 3 of 8051 RST (PIN 9) Reset input. A h

    igh on this pin for two machines Cycles while the oscillator is running resets the device.

    ALE/PROG (PIN 30) Address Latch Enable output pulse for latching the low byte ofthe address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation ALE is emitted ata constant rate of 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped duringeach access to external Data Memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only duringa MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external executionmode.

    12

  • 7/29/2019 114421229 Project Report on Dtmf

    13/59

    DTMF Based Automatic Locking System

    Project Report

    PSEN (PIN 29) ProgramStore Enable is the read strobe to external program memory. When the AT89C51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that twoPSEN activations are skipped during each access to external data memory. EA/VPP (PIN 31) External AccessEnable.EA must be strapped toGND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, thatif lock bit 1 is programmed, EA will be internally latched on reset. EA shouldbe strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming, for parts thatrequire 12-volt VPP.XTAL1 (PIN 18) Input to the inverting oscillator amplifierand input to the internal clock operating circuit. XTAL2 (PIN 19) Output from the inverting oscillator amplifier.

    4.2.2(D) Basic hardware architectureThe internal hardware architecture for 8051 microcontroller family has been shown below with the help of a block diagram in figure 7.

    Figure 7 Block diagram of 8051 hardware architecture

    13

  • 7/29/2019 114421229 Project Report on Dtmf

    14/59

    DTMF Based Automatic Locking System

    Project Report

    4.2.2(D1) CPUAs its name suggests, this is a unit which monitors and controls all processes within the microcontroller and the user cannot affect its work. It consists of several smaller subunits, of which the most important are : Instruction decoder isa part of the electronics which recognizes program instructions and runs othercircuits on the basis of that. The abilities of this circuit are expressed in the "instruction set" which is different for each microcontroller family.Arithmetical Logical Unit (ALU) performs all mathematical and logical operations upon data. Accumulator is an SFR closely related to the operation of ALU. It is a kindof working desk used for storing all data uponwhich some operations should be executed (addition, shift etc.). It also stores the results ready for use in further processing. One of the SFRs, called the Status Register, is closely relatedto the accumulator, showing at any given time the "status" of a number stored inthe accumulator (the number is greater or less than zero etc.).

    4.2.2(D2) MemoryIt has different types of memory such as: Read Only Memory (ROM) ReadOnly Memory (ROM) is a type of memory used to permanently save the program being executed.

    The size of the program that can be written depends on the size of this memory.ROM can be built in the microcontroller or added as an external chip,which depends on the type of the microcontroller. Both options have some disadvantages. If ROM is added as an external chip, the microcontroller is cheaper and the program can be considerably longer. At the same time, a number of available pins arereduced as the microcontroller uses its own input/output ports for connection tothe chip. The internal ROM is usually smaller and more expensive, but leaves more pins available for connecting to peripheral environment. The size ofROM ranges from 512B to 64KB.Random Access Memory (RAM) Random Access Memory (RAM) is atype of memory used for temporary storing data and intermediate results createdand used during the operation of the microcontrollers. The content of this memory is cleared once the power supply is off. For example, if the programperformsan addition, it is necessary to have a register standing for what in everyday l

    ife is called the sum. For that purpose, oneof the registers in RAMis called the"sum" and used for storing results of addition. The size of RAM goes up to a few KBs. Electrically Erasable Programmable ROM(EEPROM) The EEPROM is a special type of memory not contained in all microcontrollers. Its contents may be changedduring program execution (similar to RAM), but remains permanently saved even after the loss of power (similar to ROM). It is often used to store values, created and used during operation (such as calibration values, codes, values to countup to etc.), which must be saved after turning the power supply off. Adisadvantage of this memory is that the process of programming is relatively slow. It ismeasured in milliseconds.

    14

  • 7/29/2019 114421229 Project Report on Dtmf

    15/59

    DTMF Based Automatic Locking System

    Project Report

    4.2.2(D3) RegistersAll information in themicrocontroller, from the program memory, the timer information, to the state on any of input or output pins, is stored in registers. Registers are like shelves in the bookshelf of processor memory. In an 8-bit processor, like the one we are using, the shelf can hold 8 books, where each book is aone bit binary number, a 0 or 1. Each shelf has an address so that the controller knows where to find it. Some registers, such as those in RAM, are for storinggeneral data. Others have specific functions like controlling the A/Dconverters or timers, or setting and getting values on the I/O pins. Registers in RAM canbe read or written. Other registers may be read-only or write-only. In fact, some specialized registers may have certain bits that are only to be read, and certain bits that are only to be written.

    4.2.2(D4) Special purpose registersSpecial function registers are part of RAM memory. Their purpose is predefined by the manufacturer and cannot be changed therefore. Since their bits are physically connected to particular circuits within the microcontroller, such as A/D converter, serial communication module etc., any change of their state directly affects the operation of the microcontroller or some of the circuits. For example,writing zero or one to the SFR controlling an input/output port causes the appro

    priate port pin to be configured as input or output. In other words, each bit ofthis register controls the function of one single pin.

    4.2.2(D5) TimersMost programs use these miniature electronic "stopwatches" in their operation. These are commonly 8- or 16-bit SFRs the contents of which are automatically incremented by each coming pulse. Once the register is completely loaded, an interrupt is generated. If these registers use an internal quartz oscillator as a clocksource, then it is possible to measure the time between two events (if the register value is T1 at the moment measurement has started, and T2 at the moment ithas finished, then the elapsed time is equal to the result of subtraction T2-T1). If the registers use pulses coming from external source, then such a timer isturned into a counter.

    4.2.2(D6) InterruptsIf microcontrollers are being used in different events, they must provide real time response. When some particular event occurs, an interrupt system signal themicroprocessor to discontinue processing the current instruction classificationand to begin an (ISR) interrupts service routine. The interrupts service routinewill perform required processing based on the source of the interrupt. Possibleinterrupt source are device dependent, and include events such as an internal timer overflow, a logic level change on an input such as from a button being pressed, completing an analog to digital conversion, and data from communication link. Where power consumption is important as we see in battery operated devices, interrupts may also wake a microcontroller froma low power sleep sate where theprocessor is halted until required to do something by a peripheral event. There

    are five interrupt sources for the 8051, whichmeans that they can recognize 5 different events that can interrupt regular program execution. Each interrupt canbe enabled or disabled by setting bits of the IE register. Likewise, the wholeinterrupt system can be disabled by clearing the EA bit of the same register.

    4.2.2(D7) Serial communication portsWhen a microcontroller communicates with outside world, it provides data in byte-sized chucks. This can work only if the cable is not too long, since long cablediminish and even distort signals. Furthermore an 8bite path is expensive. Forthese reasons, serial communication is used for transferring data between two sy

  • 7/29/2019 114421229 Project Report on Dtmf

    16/59

    stems located at distances of hundreds of feet to millions of miles apart. The fact that serial 15

  • 7/29/2019 114421229 Project Report on Dtmf

    17/59

    DTMF Based Automatic Locking System

    Project Report

    communication uses single data line instead of 8-bit data line of parallel communication not only makes it cheaper but also enables two computers located in twodifferent cities to communicate over telephone. For serial data communication to work the byte of data must be converted to serial bits using a parallel-in-serialout shift register; then it can be transmitted over a single data line. Thisalso means that on receiving end there must be a serial-in-parallel-out shift register to receive the serial data pack them into bytes

    4.2.2(E) Basic Circuit diagram of 8051 microcontroller:Shown below in figure 8 is the basic circuit diagram of AT89S52 microcontroller. It uses a crystal oscillator along with capacitors and power sources. The typical value of the circuit components has been listed on the next page.

    Figure 8. Basic circuit diagram of P89v51RD2

    16

  • 7/29/2019 114421229 Project Report on Dtmf

    18/59

    DTMF Based Automatic Locking System

    Project Report

    1. 2. 3. 4. 5. 6. 7.

    P89V51RD2 microcontroller IC +5 V dc power supply Crystal oscillator (11.0592 MHz) Electrolytic Capacitor (10uF) Resistor (8.2K) Ceramic capacitors (30pF) A push switch

    The circuit is connected as shown in the diagram. The 10uF capacitor connected to the RST pin is used to reset the microcontroller when the power in turned ON.After that for reset, the push switch is used. The crystal oscillator is connected to Pin 18 and 19 of the IC. Two ceramic capacitors of smaller values are usedto bypass the spikes of the oscillator to the ground and smoothing the input pulse to the microcontroller. Further, in order to use the internal memory of themicrocontroller IC as the main programming memory, the 31st pin is connected toVcc. The serial communication Pin 10 and 11 are used to program the microcontroller by sending the hexadecimal code of the desired program serially to the microcontroller. Special burner software are used to send the program usingPC and the connection between the PC and microcontroller is made using DB9 connector. Since the voltage level of DB9 connection is not at TTL level, so to make it compatible with the microcontroller, a special circuit is used as shown in the fig 3.The MAX232 IC changes the voltage level and acts as the main interfacing compone

    nt. The capacitors are used of typical values for biasing of the MAX232 IC.17

  • 7/29/2019 114421229 Project Report on Dtmf

    19/59

    DTMF Based Automatic Locking System

    Project Report

    4.2.3 L293DE Motor Driver CircuitL293D is a dual H-Bridge motor driver, so with one IC we can interface two dc motors which can be controlled in both in clockwise and anticlockwise direction and if you have motor with fix direction of motion. You can make use of all the four I/Os to connect up to four DC motors, L293Dhas output current of 600 mA andpeak output current of 1.2A per channel. Moreover for protection of circuit fromback EMF output diodes are included within the IC. The output supply (VCC2) hasa wide range from 4.5 to 36V, which has madeL293D a best choice for DC motor driver. PIN diagram of L293D is shown below in figure 9:

    Figure 9. L293D dual DC motor Driver As the Microcontroller ports are not powerful enough to drive DCmotors directly so we need some kind of drivers.A very easy and safe is to use popular L293D chip. It is a 16 pin chip with pin configuration shown above in the figure. This chip is designed to control two DCmotors.There are two input and two output pins for each motor. But here in our implemented circuit we are using one motor and other input and output pin is used for driving a buzzer ( when users password doesnt match with that of set password). A simple schematic for interfacing two DC motor using L293D shown below:

    18

  • 7/29/2019 114421229 Project Report on Dtmf

    20/59

    DTMF Based Automatic Locking System

    Project Report

    Figure 10. Schematic diagram of L293D DC motor driver

    L293D takes 6 volt to 32 volt as input and gives 5 volt as output pins .9th pinis an enable pin which is enabled every time we need to operate the motors. Dualdc motors are connected at the output pins to show the capability of the L293Ddriver.

    19

  • 7/29/2019 114421229 Project Report on Dtmf

    21/59

    DTMF Based Automatic Locking System

    Project Report

    4.2.4 Geared DCMotorIndustrial applications use dc motors because the speed-torque relationship canbe varied to almost any useful form -- for both dc motor and regeneration applications in either direction of rotation. Continuous operation of dc motors is commonly available over a speed range of 8:1. Infinite range (smooth control down to zero speed) for short durations or reduced load is also common. Dc motors areoften applied where they momentarily deliver three or more times their rated torque. In emergency situations, dc motors can supply over five times rated torquewithout stalling (power supply permitting).

    Figure 11. Basic diagram of DC motor

    Dynamic braking (dc motor-generated energy is fed to a resistor grid) or regenerative braking (dc motorgenerated energy is fed back into the dc motor supply) can be obtained with dcmotors on applications requiring quick stops, thus eliminating the need for, or reducing the size of, amechanical brake.

    20

  • 7/29/2019 114421229 Project Report on Dtmf

    22/59

    DTMF Based Automatic Locking System

    Project Report

    Dc motors feature a speed, which can be controlled smoothly down to zero, immediately followed by acceleration in the opposite direction -- without power circuit switching. And dc motors respond quickly to changes in control signals due tothe dc motor s high ratio of torque to inertia. DC Motor types: Wound-field dc motors are usually classified by shunt-wound, series-wound, and compound-wound. In addition to these, permanent-magnet and brushless dc motors are also available, normally as fractional-horsepower dc motors.Dc motors may be further classified for intermittent or continuous duty. Continuous-duty dc motors can run without an off period. DC Motors - Speed control: There are two ways to adjust the speed of a wound-field dcmotor. Combinations of the two are sometimes used to adjust the speed of a dc motor. DC Motor - Shunt-field control: Reel drives requirethis kind of control. The dc motor s material is wound on a reel at constant linear speed and constant strip tension, regardless of diameter. Control is obtained by weakening the shunt-field current of the dc motor to increase speed and toreduce output torque for a given armature current. Since the rating of a dc motor is determined by heating, the maximum permissible armature current is approximately constant over the speed range. This means that at rated current, the dc motor s output torque varies inversely with speed, and the dc motor has constanthorsepower capability over its speed range. DC Motors - Selection: Choosing a dc motor and associated equipment for a given application requires consideration of

    several factors. DC Motors - Speed range: If field control is to be used, and alarge speed range is required, the base speedmust be proportionately lower andthe motor size must be larger. If speed range is much over 3:1, armature voltagecontrol should be considered for at least part of the range. Very widedynamicspeed range can be obtained with armature voltage control. However, below about60% of base speed, themotor should be derated or used for only short periods. DC Motors - Speed variation with torque: Applications requiring constant speed atall torque demands should use a shunt-wound dc motor. If speed changewith loadmust be minimized, a dc motor regulator, such as one employing feedback from atachometer, must be used. When the dc motor speed must decrease as the load increases, compound or series-wound dc motors may be used. Or, a dc motor power supply with a drooping volt-ampere curve could beused with shunt-wound dcmotor. DCMotors - Reversing: This operation affects power supply and control, and may af

    fect the dc motor s brush adjustment, if the dc motor cannot be stopped for switching before reverse operation. In this case, compound and stabilizing dc motorwindings should not be used, and a suitable armature-voltage control system should supply power to the dc motor. DC Motors - Duty cycle: Direct currentmotors are seldom used on drives that run continuously at one speed and load. Motor sizeneeded may be determined by either the peak torque requirement or heating. DC Motors - Peak torque: The peak torque that a dcmotor delivers is limited by thatload at which damaging commutation begins. Dcmotor brush and commentator damage depends on sparking severity and duration. Therefore, the DC motors peak torquedepends on the duration and frequency of occurrence of the overload. Dc motor peak torque is often limited by the maximum current that the power supply can deliver. 21

  • 7/29/2019 114421229 Project Report on Dtmf

    23/59

    DTMF Based Automatic Locking System

    Project Report

    Dc motors can commutate greater loads at low speed without damage. NEMAstandards specify that machines powered by dc motors must deliver at least150%rated current for 1 min at any speed within rated range, but most dc motors do much better. DC Motors - Heating: Dc motor temperature is a function of ventilation and electrical/mechanical losses in the machine. Some dc motors feature losses, such as core, shunt-field, and brush-friction losses, which are independent of load, but vary with speed and excitation. The best method to predict a given dc motor soperating temperature is to use thermal capability curves available from the dcmotor manufacturer. If curves are not available, dc motor temperature can be estimated by the power-loss method. This method requires total losses versus loadcurve or an efficiency curve. For each portion of the duty cycle, power loss isobtained and multiplied by the duration of that portion of the cycle. The summation of these products divided by the total cycle time gives the dc motor s average power loss. The ratio of this value to the power loss at the motor rating ismultiplied by the dc motor s rated temperature rise to give the approximate temperature rise of the dcmotor when operated on that duty cycle. Selecting DC motors Sizing a DC motor to accurately meet a set of requirements can be a thanklesstask. Having to choose between brush-type or brushless motors can complicate the selection. Even experienced designers may sometimes overlook criticalmotor parameters and find problems after the system is up and running. In the worst case

    , starting over may be the only alternative. Experts, however, use an expedientprocedure to properly size and select dc motors. This procedure is based upon anaccurate definition of the target system parameters and designer experience. DCmotor parameters: Fortunately, several motor parameters are the same for both brush-type and brushless dc motors. One of these is motor constant; Km. It is important but widely overlooked. It is used during motor sizing because it is a figure of merit of the motor power-to-torque ratio. Kmis proportional to the ratioof peak torque, Tp, to peak power, Pp, at stall: Km= Tp/ P . K m is also proportional to the ratio of torque sensitivity, Kt, to motor terminal resistance, R m:Km= Kt/R m. After the required Km has been determined, a candidate motor with this value or greater is selected from a catalog. The motor is only a candidate atthis point because other factors must be determined. As the design selection progresses, some trade-offs typically take place. For example, the motormust also

    satisfy physical size and inertia requirements. Winding resistance is a major factor in motor selection because it seriously affects Km. Winding resistance andmotor current producepower loss in the formof heat and motor temperature rise(TPR). These losses are also referred to as I2R losses and directly degrade motor efficiency.

    22

  • 7/29/2019 114421229 Project Report on Dtmf

    24/59

    DTMF Based Automatic Locking System

    Project Report

    4.2.5 16x2 LCDLiquid crystal display (LCD) is used for the display of various instructions forthe user. It can display numeric values as well as alphabets and some special symbols. The LCD is termed as 16x2 because it has 2 rows and 16 columnsof display matrix. So at a time32 characters can be displayed on the LCD. Each positionhas its own address and initialization command. For anything to be displayed onthe LCD display, we need to send the initializing command and the ASCII value ofthat character to theLCD using a predefined function as discussed later.

    4.2.5(A) Pin configurationA 16x2 LCD contains 16 pins as shown in the figure. Each pin has its own function as given below: PIN 1 and 16:- These are used as the ground pins for the LCD.IN 2 and 15:- These are connected to Vcc to provide power to the LCD. PIN 3:- Connected to ground via 1k variable resistor. The resistor value can be varied tochange the brightness of the display. PIN 4:-RS pin. This pin is set to 0 duringsending command to theLCD and set to 1 during sending data to the LCD. PIN 5:- RWpin. This is connected to ground for reading and writing functions of the LCD.PIN 6:- Enable pin. A falling edge on this pin is used to send instructions andASCII values into theLCD. PIN 7 to 14 :- These are the data-pins that are connected to one of the ports of the microcontroller. These carry the data that is se

    nt from microcontroller to the LCD.The different initialization commands have been tabulated on the next page.

    Figure 12. LCD pin configuration and basic circuit connections

    23

  • 7/29/2019 114421229 Project Report on Dtmf

    25/59

    DTMF Based Automatic Locking System The first row of the LCD starts with the address 8xH where x stands for column number. Similarly the second is referred by theaddress CxH. The value x varies from 0 to F for 16 columns.

    Project Report

    4.2.5(B) Interfacing with 8051The connections are made as shown in fig 6. Then for the interfacing, predefinedfunctions are used. There are mainly 3 types of functions that are used in caseof LCD interfacing:1. Function for sending command to the LCD. 2. Function forsending alphabetical data and characters to the LCD. 3. Function for sending numeric value to the LCD.

    Table 4. Different initialization commands for LCD display

    The first function is used to send the initialization commands to the LCD. Thisis used to set the LCDdisplay and is not displayed on the screen.

    The function is as follows

    void lcdcmd (unsigned char value) { lcddata =value; rs = 0; rw = 0; en= 1; MSDelay(1); en = 0; return; / put the value on the pins // set to 0 for command input // strobe the enable pin // minimum delay of 1 ms

    }The second function is used for sending data that is to be displayed on the LCDscreen. The function remains the same but the rs pin is set to 1 instead of 0. 24

  • 7/29/2019 114421229 Project Report on Dtmf

    26/59

    DTMF Based Automatic Locking System

    Project Report

    The third function is for displaying numeric values on the screen. Since the numeric values cannot be directly, so all the digits of number are separated and then they are converted to their respective ASCII values before sending them to the LCD. The conversion is done by adding the ASCII value of zero to the numeric value. The program for such operation has been written below

    void lcdnum (unsigned int i) { int p; int k=0;while(i>0) { num[k]=i%10; i=i/10;k++; } k--; for (p=k;p>=0;p--) { c=num[p]+48; lcddata = c; rw = 0; rs = 1; en =1; delay(1); en = 0; } return; }

    // local variable declaration // loop unless i=0 // separate each digit from a number

    // for sending each value to the LCD // add ASCII value of 0 i.e. 48 to each digit

    4.2.6 4x3 Numeric KeypadA numeric keypad is amatrix of keys arranged into 3 columns and 4 rows. Intersection of each row and column is a push switch. Pressing the switch forms contactbetween that particular row and column. So, 12 unique contacts are present in a4x3 keypad. Corresponding to each contact there is a unique function assigned d

    uring programming themicrocontroller, such that the microcontroller recognizeswhich key has been pressed and acts accordingly. The basic 4x3 keypad and its internal circuit have been shown in the figure.A 4x3 keypad is connected to a port of microcontroller and uses its 7 pins for its operation.

    25

  • 7/29/2019 114421229 Project Report on Dtmf

    27/59

    DTMF Based Automatic Locking System

    Project Report

    Figure 13. Figure showing a 4x3 keypad and its internal connections

    The basic idea behind its working is that whenever a key is pressed, it shorts that particular row and column and they both are at same potential. Say for example if a row is at 0 and column as at 1. Then on pressing the key, the column also gets to 0. This is monitored by the program written in the microcontroller. The program has been shown on the next page. First the code provides 0 to all the rows and1 to all the columns. Then it monitors if a particular column is going to 0. When acolumn does so it means that some key on that column has been pressed. To findout the right key out of the four keys present on a column the main program calls a check program. The check program sets all rows to 1 and columns to 0. After doing so, it sets rows oneby one to 0 and observes that for which row the column is getting to 0. In thisway the pressed key is found out. Since the whole program executes so fast that wedont even realize that these many steps are taken to find the right key. Hence, even before we remove our finger form the key, themicrocontroller finds out which key has been pressed.A simple program that monitors thekeypad connected at port 1 of microcontroller and displays the binary of the key pressed on the port 2, has been shown below:

    #include #define key P1 #define port P2 sbit col1=key^6; sbit col2=key^5; sbit col3=key^4; sbit row1=key^0; sbit row2=key^1; sbit row3=key^2; sbit row4=key^3;

    // Port for keypad // Port for output // Assignment of names to the various connected pins

    26

  • 7/29/2019 114421229 Project Report on Dtmf

    28/59

    DTMF Based Automatic Locking System void check_col1() //Function for checking column 1 { row1=row2=row3=row4=1; row1=0; if(col1==0) P2=0x01; row1=1; row2=0; if(col1==0) P2=0x04; row2=1; row3=0; if(col1==0)P2=0x07; row3=1; row4=0; if(col1==0) P2=0x0A; row4=1; }

    Project Report

    Similarly the check functions for column 2 and 3 are written by replacing col1 with col2 and col3 respectively. The functions are named as check_col2() and check_col3() respectively. These are called in themain program. The main function that monitors the whole operation and calls these functions has been written below : void main() { col1=col2=col3=1; while(1) { row1=row2=row3=row4=0; if(col1==0) { check_col1(); else if(col2==0) { check_col2(); } Else if(col3==0) { check_col3(); } } } }

    // Input Port

    27

  • 7/29/2019 114421229 Project Report on Dtmf

    29/59

    DTMF Based Automatic Locking System

    Project Report

    4.2.7 BUZZER AND LEDSA buzzer or beeper is an audio signaling device, which may be mechanical, electromechanical, or piezoelectric. Typical uses of buzzers and beepers include alarmdevices, timers and confirmation of user input such as a mouse click or keystroke.

    Figure 14. Buzzer

    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. Appearing as practical electronic components in 1962, early LEDs emitted low-intensity red light, but modern versions are available across the visible ultravioletand infrared wavelengths, with very high brightness. When a light-emitting diodeis forward-biased (switched on), electrons are able to recombine with electronholes within the device, releasing energy in the form of photons. This effect iscalled electroluminescence and the color of the light (corresponding to the energy of the photon) is determined by the energy gap of the semiconductor. LEDs present many advantages over incandescent light sources including lower energy consumption, longer lifetime, improved physical 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 lampsources of comparable output. Light-emitting diodes are used in applications asdiverse as aviation lighting, automotive lighting, advertising, general lighting, and 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 unitsof many commercial products including televisions, DVD players, and other domestic appliances. The LEDconsists of a chip of semiconducting material doped withimpurities 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 from28

  • 7/29/2019 114421229 Project Report on Dtmf

    30/59

    DTMF Based Automatic Locking System

    Project Report

    electrodes with different voltages. When an electron meets a hole, it falls intoa lower energy level, and releases energy in the form of a photon. Thewavelength 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 opticalemission, because these are indirect band gapmaterials. The materials used forthe LED have a direct band gap with energies corresponding to near-infrared, visible, or near-ultraviolet light. LED development began with infrared and red devices made with gallium arsenide. Advances inmaterials science have enabled making devices with ever-shorter wavelengths, emitting light in a variety of colors. LEDs are usually built on an n-type substrate, with an electrode attached to the p-type 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.

    Figure 15. Cross-sectional view of LED

    29

  • 7/29/2019 114421229 Project Report on Dtmf

    31/59

    DTMF Based Automatic Locking System

    Project Report

    4.3 SOFTWARE REQUIREMENTS :4.3.1 OVERVIEW OF KEIL Uvision3 SOFTWARE:This software is used for writing the C code for the required program and then compiles the code intoHEX file so as to burn the later into the microcontroller.It is a compiler that compiles the C code. The entire process to run this compiler is discussed below: 1. Double Click on the icon present on the desktop.

    2. The following window will be popped-up

    30

  • 7/29/2019 114421229 Project Report on Dtmf

    32/59

    DTMF Based Automatic Locking System 3. Go to the project & click on newproject

    Project Report

    4. Make a folder on desktop & give file name.

    5. When you click on the save button, following window opens

    31

  • 7/29/2019 114421229 Project Report on Dtmf

    33/59

    DTMF Based Automatic Locking System

    Project Report

    6.6. Select Philips & 89v51RD2xx

    7. Then select NO on the pop-up given below.

    32

  • 7/29/2019 114421229 Project Report on Dtmf

    34/59

    DTMF Based Automatic Locking System

    Project Report

    8. Then make a New File.

    9. Write or copy your code there & save it with extension .c or .asm depending on your coding.

    10. Go to target & then source group, right click on there & click on the optionadd files to the project. 33

  • 7/29/2019 114421229 Project Report on Dtmf

    35/59

    DTMF Based Automatic Locking System

    Project Report

    11. Select your asm or c file which you want to add.

    Example is with .c extension file 12. Go to the option for target, click on output &tick on create hex file option

    34

  • 7/29/2019 114421229 Project Report on Dtmf

    36/59

    DTMF Based Automatic Locking System

    Project Report

    13. Now build target. (Click on the pointed option)...

    14. It will show you 0 errors & 0 warning on Output Window.

    35

  • 7/29/2019 114421229 Project Report on Dtmf

    37/59

    DTMF Based Automatic Locking System

    Project Report

    After performing all these steps the chip will be configured through Flash Magic.Let us hand on the steps of chip configuration through Flash Magic

    Special Notes: -

    Make all the DIP switches in off position before burning the program in the controller.

    Connect the Programming Cable on your Kit (prog. Conn.)And other side of cable with the COM Port of the Computer.

    Burn the Program in the microcontroller with help of FLASHMAGIC or ECEFLASH as

    explained in the next section.36

  • 7/29/2019 114421229 Project Report on Dtmf

    38/59

    DTMF Based Automatic Locking System

    Project Report

    4.3.2 ECE FLASH:To burn chip 89V51RDRXX through ECE flash it required less. Double click on iconas shown below.

    Flash window will appear as shown below.

    Set baud rate 9600, select working comport of PC to hardware and software communication as shown below.

    37

  • 7/29/2019 114421229 Project Report on Dtmf

    39/59

    DTMF Based Automatic Locking System

    Project Report

    Now select hex file to burn in chip through browse option as shown below.

    Now main window will appear as shown below.

    38

  • 7/29/2019 114421229 Project Report on Dtmf

    40/59

    DTMF Based Automatic Locking System

    Project Report

    Click on flash option reset hardware will appear .

    Now press reset switch on hardware board and flash will burn with 5-6 Seconds. Again press reset switch on hardware board to run your program or to see output.

    39

  • 7/29/2019 114421229 Project Report on Dtmf

    41/59

    DTMF Based Automatic Locking System

    Project Report

    5.

    DESIGN

    5.1 BLOCK DIAGRAM

    Figure 16. Block Diagram

    The block diagram depicts the entire working of the system . The users cell phonedials to the cell phone attached to the system. It automatically picks up the call and receives the DTMF tones and sends it as an input to DTMF decoder to decode its BCD code. The BCD code is then sent to the micro-controller which on receiving the input on oneof its port acts according to the program burnt in it.It,on receiving the signal, sends the command via L293D driver to the DCmotor andDC motor acts accordingly.

    40

  • 7/29/2019 114421229 Project Report on Dtmf

    42/59

    DTMF Based Automatic Locking System

    Project Report

    5.2 SCHEMATIC DIAGRAM

    Figure 17. Schematic diagram of DTMF Decoder (M8870)

    41

  • 7/29/2019 114421229 Project Report on Dtmf

    43/59

    DTMF Based Automatic Locking System

    Project Report

    5.3 FLOWCHART

    START

    DIAL RECEIVERS PHONE TO CLOSE THE LOCK

    ENTER PASSWORD FROM KEYPAD

    RECEIVERS CELLWILL AUTOMATICALLY ANSWER

    ENTER THE PASSWORD

    IS PASSWORD CORRECT?

    BUZZER ON

    DTMF DECODER DECODES THE SIGNAL AND SENDS THEMTO ONE OF THE PORTS OF MICROCINTROLLER

    MICRO-CONTROLLER SENDSCOMMAND TO DCMOTOR DRIVE TO OPERATE ACCORDINGLY

    42

  • 7/29/2019 114421229 Project Report on Dtmf

    44/59

  • 7/29/2019 114421229 Project Report on Dtmf

    45/59

    DTMF Based Automatic Locking System dataport = item; rs= 0; rw=0; en=1; delay(1); en=0; return; } void lcd_data(unsigned char item) { dataport = item; rs= 1; rw=0; en=1; delay(1); en=0; return; } void lcd_data_string(unsigned char *str) { int i=0; while(str[i]!= \0 ) { lcd_data(str[i]); i++; } return; } void lcd(unsigned char str[10]) { lcd_cmd(0x38); lcd_cmd(0x0e); lcd_data_string(str); } // Function to send data to LCD

    Project Report

    // Function to send data to string

    // intialisation function for lcd display

    void ans() { if(check>3) { if (flag==1) { lcd_cmd(0x01);

    // output function

    44

  • 7/29/2019 114421229 Project Report on Dtmf

    46/59

    DTMF Based Automatic Locking System lcd_cmd(0x82); lcd_data_string(" LOCK OPEN "); lock_open=0; lock_close=1; delay(400); lock_open=1; lock_close=1; flag=0; } else { lcd_cmd(0x01); lcd_cmd(0x82); lcd_data_string(" LOCK CLOSED "); lock_open=1; lock_close=0; delay(800); lock_open=1; lock_close=1; flag=1; } } else { lcd_cmd(0x01); lcd_cmd(0x82); lcd_data_string(" WRONG PASSWORD "); buzzer_on=1; buzzer_off=0; lock_open=1; lock_close=1; delay(500); buzzer_off=1; } } void code_check() { if(i

  • 7/29/2019 114421229 Project Report on Dtmf

    47/59

    DTMF Based Automatic Locking System check=check+1; break; } case 2: { if(dig_input[1]==digit[1]) check=check+1; break; } case 3: { if(dig_input[2]==digit[2]) check=check+1; break; } case 4: { if(dig_input[3]==digit[3]) check=check+1; break;} } } delay(10); if(i==3) { ans(); } } void display(int a) { switch(a) { case 1:{ lcd_data( * ); delay(1); digit[i]=1; code_check(); break; } case 2:{ lcd_data( * ); delay(1); digit[i]=2; //Display function

    Project Report

    46

  • 7/29/2019 114421229 Project Report on Dtmf

    48/59

    DTMF Based Automatic Locking System code_check(); break; } case 3:{ lcd_data( *); delay(1); digit[i]=3; code_check(); break; } case 4:{ lcd_data( * ); delay(1); digit[i]=4; code_check(); break; } case 5:{ lcd_data( * ); delay(1); digit[i]=5; code_check(); break; } case 6:{ lcd_data( * ); delay(1); digit[i]=6; code_check(); break; } case 7:{ lcd_data( * ); delay(1); digit[i]=7; code_check(); break; } case 8:{ lcd_data( * ); delay(1); digit[i]=8; code_check(); break; }

    Project Report

    47

  • 7/29/2019 114421229 Project Report on Dtmf

    49/59

    DTMF Based Automatic Locking System case 9:{ lcd_data( * ); delay(1); digit[i]=9; code_check(); break; } case 0:{ lcd_data( * ); delay(1); digit[i]=0; code_check(); break; } } } void check_col1() { row1=row2=row3=row4=1; row1=0; if(col1==0)display(1); row1=1; row2=0; if(col1==0) display(4); row2=1; row3=0; if(col1==0)display(7); row3=1; row4=0; if(col1==0) { row4=1; } } void check_col2() { row1=row2=row3=row4=1; row1=0; if(col2==0) display(2);

    Project Report

    48

  • 7/29/2019 114421229 Project Report on Dtmf

    50/59

    DTMF Based Automatic Locking System row1=1 ; row2=0; if(col2==0) display(5); row2=1; row3=0; if(col2==0) display(8); row3=1; row4=0; if(col2==0) display(0); row4=1; } void check_col3() { row1=row2=row3=row4=1; row1=0; if(col3==0) display(3); row1=1; row2=0; if(col3==0) display(6); row2=1; row3=0; if(col3==0) display(9); row3=1; row4=0; if(col3==0) { row4=1; } }

    Project Report

    void check_password_col1() { row1=row2=row3=row4=1; row1=0; if(col1==0) dig_input[k]=1; row1=1; 49

  • 7/29/2019 114421229 Project Report on Dtmf

    51/59

    DTMF Based Automatic Locking System row2=0; if(col1==0) dig_input[k]=4; row2=1;row3=0 ; if(col1==0) dig_input[k]=7; row3=1; row4=0; if(col1==0) { row4=1; } } void check_password_col2() { row1=row2=row3=row4=1; row1=0; if(col2==0) dig_input[k]=2; row1=1; row2=0; if(col2==0) dig_input[k]=5; row2=1; row3=0; if(col2==0) dig_input[k]=8; row3=1; row4=0; if(col2==0) { dig_input[k]=0; row4=1; } }

    Project Report

    void check_password_col3() { row1=row2=row3=row4=1; row1=0; if(col3==0) dig_input[k]=3; 50

  • 7/29/2019 114421229 Project Report on Dtmf

    52/59

    DTMF Based Automatic Locking System row1=1; row2=0; if(col3==0) dig_input[k]=6;row2=1; row3=0; if(col3==0) dig_input[k]=9; row3=1; row4=0; if(col3==0) { row4=1; } } void pass_set() // function to set passwprd { row1=row2=row3=row4=0; while(col1==1 && col2==1 &&col3==1); for(i=0;i

  • 7/29/2019 114421229 Project Report on Dtmf

    53/59

    DTMF Based Automatic Locking System { int e,j=0,count=1; col1=col2=col3=1; buzzer_off=1; buzzer_on=1; lock_close=1; lock_open=1; while(1) //CHECK FOR *{ lcd_cmd(0x01); //Clear LCD screen lcd_cmd(0x80); lcd("Press * to SET"); lcd_cmd(0xC0);lcd("Press # to ENTER"); row1=row2=row3=row4=0; while(col1==1 && col2==1 && col3==1); if(col1==0) { row1=row2=row3=row4=1; row4=0; if (col1==0) edit=1; } if (col3==0) { row1=row2=row3=row4=1; row4=0; if (col3==0) set=1; } //FOR PASSWORD INPUT if (edit==1) { edit=0; lcd_cmd(0x01); //Clear LCD screen lcd_cmd(0x81); lcd("ENTER PASSWORD:"); pass_set(); for(e=0;e

  • 7/29/2019 114421229 Project Report on Dtmf

    54/59

    DTMF Based Automatic Locking System for(e=0;e

  • 7/29/2019 114421229 Project Report on Dtmf

    55/59

    DTMF Based Automatic Locking System } } else { lcd_cmd(0x01); lcd_cmd(0x86); lcd("SORRY"); lcd_cmd(0xc1); lcd("ENTER VALID INPUT"); delay(100); } } }

    Project Report

    54

  • 7/29/2019 114421229 Project Report on Dtmf

    56/59

    DTMF Based Automatic Locking System

    Project Report

    7.

    IMPLENTATION AND RESULTS

    The entire circuit is running successfully when we switch ON the power supply of5 volt and 9 volt tomicrocontroller chip andmotor driver circuit respectively. When a user dials to the cell phone attached to the circuit, it automaticallypicks up the call and accordingly user enters the password to operate the lock.There is also a numeric keypad attached to the door of the vehicle so that in case if tower failure orwhen a user is in the vicinity of vehicle he can use theset password to enter it through the numeric keypad and operate the lock. The user has to press * to set the password and # to operate the lock.A buzzer startsoperating whenever the user enters a wrong password. The successfully running circuit is displayed below:

    Figure 18 : The real implemented DTMF based locking system

    55

  • 7/29/2019 114421229 Project Report on Dtmf

    57/59

    DTMF Based Automatic Locking System

    Project Report

    8.

    CONCLUSIONS AND FUTURE SCOPES

    8.1 CONCLUSIONThis DTMF based automatic car locking system has been realized and its hardwareimplementation has been done in this project. This locking system using 8051 isfully functional and gives a sense of security to users against the thefts of vehicles. Since it is based on the mobile frequency it increases the range of thedevice and hence the locks can be operated from afar places. The systembuilt isvery cheap and easy to install and is very user- friendly. User only has to remember the set password and does not need to carry any key to lock/unlock the door of his vehicle.

    8.2 FUTURE SCOPESThe capability of system can be extended by interfacing an external memory to it.it will allow the user to set passwords of any length. Moreover in future caller identification and mobile authentication can be done for enhanced safety enabling only a set of caller IDs to connect to the cell attached to the circuit. This will prevent the unauthorized use of vehicles and will ensure a greater sense

    of safety to users.56

  • 7/29/2019 114421229 Project Report on Dtmf

    58/59

    DTMF Based Automatic Locking System

    Project Report

    9.Inspiration for the project from:

    REFERENCES

    1. Project report on DTMF based automatic vehicle locking system published by :Karunkar Reddy, a student from electronics engineering at IISc. , Bangalore published on 1st May 2008 and uploaded on www.scribd.com 2. Lecture on applicationsof DTMF in security system by Dr. Arvind Jha at ATECH LABS,Chandigarh Technicalsupport from: 3. The 8051 Microcontroller andEmbedded Systems Using Assembly and C Second Edition, book by : Muhammad Ali Mazidi, Janice Gillispie Mazidi, Rolin D. McKinlay. Datasheet references: 4. P89V51RD2FN datasheet - http://www.alldatasheet.com/datasheet-pdf/view/P89V51RD2.html 5. MT8870D datasheet Online support from: 6. file:///C:/Users/anhnith/Desktop/DOOR-LOCK-Through-Telephone-Using-Dtmf-COMPLETED.htm 7. http://www.edaboard.com/forum 8. http://www.8051projects.com/forum 9. http://www.wikipedia.com/dtmf_circuit Software support from: 10. KeilUvision 4 [ Student Version ], Keil softwares 2005-2009 ARM Limited For HEX codegeneration and compilation of the C Code. 11. ECE Flash For burningHEX code into the microcontroller. http://www.edaboard.com/thread238937.html

    12. Proteus ISIS7 Professional, Labcenter Electronics 1989-2009, Release 7.7SP2- for simulation design circuit diagram development

    57

  • 7/29/2019 114421229 Project Report on Dtmf

    59/59