Vous êtes sur la page 1sur 57

DTMF Based Automatic Locking System

Project Report

1.

INTRODUCTION

Cell-phone is an ubiquitous device and so when it got combined with the digital door 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 the door 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 is in fact controlled by cell-phone which is actually performing the role of remote controller over here. Door lock device inside the vehicle is consisting another cell-phone with an electronic circuit. The users cellphone transmits DTMF (dual tone 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 any part of the word. The working 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 the information whether the door has been locked safely, like in case password has been pressed wrong by mistake by owner. Nowadays theft cases are increasing everywhere and the key based locking system is no longer a safe option. It is quite easy to open the traditional key based doors either with duplicate keys or some other way. Therefore for safety of vehicles, this system can be installed.it is simple to install and cheap too. With this system, you will never be in tension of 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 can be made for enhanced safety purposes.

DTMF Based Automatic Locking System

Project Report

1.1 MOTIVATION
Keyless 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 system has the ability to introduce twolevels of security. The first level will be decoding the calling partys identification information while the second level would consist of the user attempting a password entry over the phone. By combining the mobility of this telecommunication medium with microcontrollers, the system achieves a secure, convenient, and automated form of security for a place of residence [2].

1.2 DEFINITION
The cell phone security system is the result of a fusion of a creative idea with an 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 OBJECTIVE
The fundamental requirements for the cell phone security system remained fixed throughout the design process. The goal was to design a system which would allow the user automated and convenient access to their car security system through a cell 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. Allow the user to reset password

DTMF Based Automatic Locking System

Project Report

1.4 LIMITATIONS OF THE PROJECT


No 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 DOCUMENTATION


In this project documentation we have initially put the definition and objective of 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 this Documentation.

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 corresponding DTMF tone for that key. The land-line phone system can then "listen" and decode that tone to determine which 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 such as 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 trademark.

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 of the two frequencies (697 and 1209 hertz (Hz)). The original keypads had levers inside, so each button activated two contacts. The multiple tones are the reason for calling the system multifrequency. 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.

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. The graph below in figure 2 shows that resultant frequency waveform of key 1 consists of 1209 Hz and 69 Hz.

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

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 problem and 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 first system 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 present system can lead to diversion from exact solution.

3.2 HARDWARE REQUIREMENTS


3.2.1 MT8870DE DTMF DECODER CIRCUIT
The 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

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:

DTMF Based Automatic Locking System

Project Report

Table 2. Pin description of MT8870D IC

Functional Description The 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 of the received tones before passing the corresponding code to the output bus. Different steering arrangements may be used to select independently the guard times for tone present (t GTP) and tone absent (tGTP). This may be necessary to meet system specifications which place both accept and reject limits on both tone duration and interdigital pause. Guard time adjustment also allows the designer to tailor 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 environments where fast acquisition time and immunity to tone drop-outs are 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 a feedback 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 for unity gain and VRef biasing the input at 1/2VDD.
.

Crystal Oscillator The internal clock circuit is completed with the addition of an 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 the next device. Subsequent devices are connected in a similar fashion. The problems associated with unbalanced loading are not a concern with the arrangement shown, i.e., precision balancing capacitors are not required.

DTMF Based Automatic Locking System

Project Report

DATA SHEET OF MT8870D

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

Project Report

Figure 5. Circuit diagram of DTMF decoder circuit

An oscillator of 3.579 MHz is connected across 7th and 8th pins of MT8870D IC which produces pulses to synchronize all the internal blocks of the IC.DTMF input is 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 a BCD code . The other functions of pins are described in Table 2 described above.

10

DTMF Based Automatic Locking System

Project Report

4.2.2 MICROCONTROLLER 8051 4.2.2(A) The Introduction


The P89V51RD2 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 highdensity nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set and pin-out. 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 P89V51RD2 is a powerful microcomputer which provides a highly-flexible and costeffective solution to many 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 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 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 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. The pin diagram of basic 8051 microcontroller family has been shown in figure 6.
Figure 6 - Pin diagram of 8051 microcontroller

4.2.2(C) Pin Configuration


VCC (PIN 40) Supply voltage (+5V DC) GND (PIN 20) Ground Port 0 (PIN 39-32)

11

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 bytes during Flash programming, and outputs the code bytes 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 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 (PIN 21-28) Port 2 is an 8-bit bi-directional 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 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that uses 16-bit addresses (MOVX @ DPTR). In this application, it uses strong internal pull-ups when emitting 1s. During accesses to external data memory that uses 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2 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 high 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 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. Note, however, that one ALE pulse is skipped during each 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 during a 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 execution mode.

12

DTMF Based Automatic Locking System

Project Report

PSEN (PIN 29) Program Store 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 two PSEN activations are skipped during each access to external data memory. EA/VPP (PIN 31) 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. EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming, for parts that require 12-volt VPP. XTAL1 (PIN 18) Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2 (PIN 19) Output from the inverting oscillator amplifier.

4.2.2(D) Basic hardware architecture


The 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

DTMF Based Automatic Locking System

Project Report

4.2.2(D1) CPU
As 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 is a part of the electronics which recognizes program instructions and runs other circuits 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 kind of working desk used for storing all data upon which 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 related to the accumulator, showing at any given time the "status" of a number stored in the accumulator (the number is greater or less than zero etc.).

4.2.2(D2) Memory
It has different types of memory such as: Read Only Memory (ROM) Read Only 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 are reduced as the microcontroller uses its own input/output ports for connection to the chip. The internal ROM is usually smaller and more expensive, but leaves more pins available for connecting to peripheral environment. The size of ROM ranges from 512B to 64KB. Random Access Memory (RAM) Random Access Memory (RAM) is a type of memory used for temporary storing data and intermediate results created and used during the operation of the microcontrollers. The content of this memory is cleared once the power supply is off. For example, if the program performs an addition, it is necessary to have a register standing for what in everyday life is called the sum. For that purpose, one of the registers in RAM is 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 changed during 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 count up to etc.), which must be saved after turning the power supply off. A disadvantage of this memory is that the process of programming is relatively slow. It is measured in milliseconds.

14

DTMF Based Automatic Locking System

Project Report

4.2.2(D3) Registers
All information in the microcontroller, 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 a one 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 storing general data. Others have specific functions like controlling the A/D converters or timers, or setting and getting values on the I/O pins. Registers in RAM can be 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 registers


Special 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 appropriate port pin to be configured as input or output. In other words, each bit of this register controls the function of one single pin.

4.2.2(D5) Timers
Most 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 clock source, 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 it has 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 is turned into a counter.

4.2.2(D6) Interrupts
If microcontrollers are being used in different events, they must provide real time response. When some particular event occurs, an interrupt system signal the microprocessor to discontinue processing the current instruction classification and to begin an (ISR) interrupts service routine. The interrupts service routine will perform required processing based on the source of the interrupt. Possible interrupt 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 from a low power sleep sate where the processor is halted until required to do something by a peripheral event. There are five interrupt sources for the 8051, which means that they can recognize 5 different events that can interrupt regular program execution. Each interrupt can be enabled or disabled by setting bits of the IE register. Likewise, the whole interrupt system can be disabled by clearing the EA bit of the same register.

4.2.2(D7) Serial communication ports


When 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 cable diminish and even distort signals. Furthermore an 8bite path is expensive. For these reasons, serial communication is used for transferring data between two systems located at distances of hundreds of feet to millions of miles apart. The fact that serial 15

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 two different 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. This also 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

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 used to 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 the microcontroller IC as the main programming memory, the 31st pin is connected to Vcc. 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 using PC 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 component. The capacitors are used of typical values for biasing of the MAX232 IC.

17

DTMF Based Automatic Locking System

Project Report

4.2.3 L293DE Motor Driver Circuit


L293D 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, L293D has output current of 600 mA and peak output current of 1.2A per channel. Moreover for protection of circuit from back EMF output diodes are included within the IC. The output supply (VCC2) has a wide range from 4.5 to 36V, which has made L293D 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 DC motors 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 DC motors. 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

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 pin is an enable pin which is enabled every time we need to operate the motors. Dual dc motors are connected at the output pins to show the capability of the L293D driver.

19

DTMF Based Automatic Locking System

Project Report

4.2.4 Geared DC Motor


Industrial applications use dc motors because the speed-torque relationship can be 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 are often applied where they momentarily deliver three or more times their rated torque. In emergency situations, dc motors can supply over five times rated torque without 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 dc motors on applications requiring quick stops, thus eliminating the need for, or reducing the size of, a mechanical brake.

20

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 to the 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 dc motor. Combinations of the two are sometimes used to adjust the speed of a dc motor. DC Motor - Shunt-field control: Reel drives require this 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 to reduce 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 a large speed range is required, the base speed must be proportionately lower and the motor size must be larger. If speed range is much over 3:1, armature voltage control should be considered for at least part of the range. Very wide dynamic speed range can be obtained with armature voltage control. However, below about 60% of base speed, the motor should be derated or used for only short periods. DC Motors - Speed variation with torque: Applications requiring constant speed at all torque demands should use a shunt-wound dc motor. If speed change with load must be minimized, a dc motor regulator, such as one employing feedback from a tachometer, 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 be used with shunt-wound dc motor. DC Motors - Reversing: This operation affects power supply and control, and may affect 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 motor windings should not be used, and a suitable armature-voltage control system should supply power to the dc motor. DC Motors - Duty cycle: Direct current motors are seldom used on drives that run continuously at one speed and load. Motor size needed may be determined by either the peak torque requirement or heating. DC Motors - Peak torque: The peak torque that a dc motor delivers is limited by that load at which damaging commutation begins. Dc motor brush and commentator damage depends on sparking severity and duration. Therefore, the DC motors peak torque depends 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

DTMF Based Automatic Locking System

Project Report

Dc motors can commutate greater loads at low speed without damage. NEMA standards 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's operating temperature is to use thermal capability curves available from the dc motor manufacturer. If curves are not available, dc motor temperature can be estimated by the power-loss method. This method requires total losses versus load curve or an efficiency curve. For each portion of the duty cycle, power loss is obtained 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 is multiplied by the dc motor's rated temperature rise to give the approximate temperature rise of the dc motor when operated on that duty cycle. Selecting DC motors Sizing a DC motor to accurately meet a set of requirements can be a thankless task. Having to choose between brush-type or brushless motors can complicate the selection. Even experienced designers may sometimes overlook critical motor 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 expedient procedure to properly size and select dc motors. This procedure is based upon an accurate definition of the target system parameters and designer experience. DC motor 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 ratio of 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 at this point because other factors must be determined. As the design selection progresses, some trade-offs typically take place. For example, the motor must also satisfy physical size and inertia requirements. Winding resistance is a major factor in motor selection because it seriously affects Km. Winding resistance and motor current produce power loss in the form of heat and motor temperature rise (TPR). These losses are also referred to as I2R losses and directly degrade motor efficiency.

22

DTMF Based Automatic Locking System

Project Report

4.2.5 16x2 LCD


Liquid crystal display (LCD) is used for the display of various instructions for the 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 columns of display matrix. So at a time 32 characters can be displayed on the LCD. Each position has its own address and initialization command. For anything to be displayed on the LCD display, we need to send the initializing command and the ASCII value of that character to the LCD using a predefined function as discussed later.

4.2.5(A) Pin configuration


A 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. PIN 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 to change the brightness of the display. PIN 4:- RS pin. This pin is set to 0 during sending command to the LCD and set to 1 during sending data to the LCD. PIN 5:- RW pin. 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 and ASCII values into the LCD. 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 sent 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

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 the address CxH. The value x varies from 0 to F for 16 columns.

Project Report

4.2.5(B) Interfacing with 8051


The connections are made as shown in fig 6. Then for the interfacing, predefined functions are used. There are mainly 3 types of functions that are used in case of LCD interfacing:1. Function for sending command to the LCD. 2. Function for sending 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. This is used to set the LCD display 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 LCD screen. The function remains the same but the rs pin is set to 1 instead of 0. 24

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 Keypad


A numeric keypad is a matrix of keys arranged into 3 columns and 4 rows. Intersection of each row and column is a push switch. Pressing the switch forms contact between that particular row and column. So, 12 unique contacts are present in a 4x3 keypad. Corresponding to each contact there is a unique function assigned during programming the microcontroller, such that the microcontroller recognizes which 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

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 and 1 to all the columns. Then it monitors if a particular column is going to 0. When a column does so it means that some key on that column has been pressed. To find out 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 one by one to 0 and observes that for which row the column is getting to 0. In this way the pressed key is found out. Since the whole program executes so fast that we dont even realize that these many steps are taken to find the right key. Hence, even before we remove our finger form the key, the microcontroller finds out which key has been pressed. A simple program that monitors the keypad connected at port 1 of microcontroller and displays the binary of the key pressed on the port 2, has been shown below:

#include<reg51.h> #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

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 the main 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

DTMF Based Automatic Locking System

Project Report

4.2.7 BUZZER AND LEDS


A buzzer or beeper is an audio signaling device, which may be mechanical, electromechanical, or piezoelectric. Typical uses of buzzers and beepers include alarm devices, 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 ultraviolet and infrared wavelengths, with very high brightness. 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 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 lamp sources of comparable output. Light-emitting diodes are used in applications as diverse 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 units of many commercial products including televisions, DVD players, and other domestic appliances. 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
28

DTMF Based Automatic Locking System

Project Report

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. LED development began with infrared and red devices made with gallium arsenide. Advances in materials 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

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 into HEX 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

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

Project Report

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

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

31

DTMF Based Automatic Locking System

Project Report

6.
6. Select Philips & 89v51RD2xx

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

32

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 option add files to the project. 33

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

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

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 FLASH MAGIC or ECE FLASH as explained in the next section.

36

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 icon as 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

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

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

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 phone dials 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 one of its port acts according to the program burnt in it.It, on receiving the signal, sends the command via L293D driver to the DC motor and DC motor acts accordingly.

40

DTMF Based Automatic Locking System

Project Report

5.2 SCHEMATIC DIAGRAM

Figure 17. Schematic diagram of DTMF Decoder (M8870)

41

DTMF Based Automatic Locking System

Project Report

5.3 FLOWCHART

START

DIAL RECEIVERS PHONE TO CLOSE THE LOCK

ENTER PASSWORD FROM KEYPAD

RECEIVERS CELL WILL AUTOMATICALLY ANSWER

ENTER THE PASSWORD

IS PASSWORD CORRECT?

BUZZER ON

DTMF DECODER DECODES THE SIGNAL AND SENDS THEM TO ONE OF THE PORTS OF MICROCINTROLLER

MICRO-CONTROLLER SENDS COMMAND TO DC MOTOR DRIVE TO OPERATE ACCORDINGLY

42

DTMF Based Automatic Locking System

Project Report

6.

PROGRAM CODE

#include<reg51.h> #define port P3 #define dataport P2 #define key P1 #define sec 100 int flag = 1; int edit =0; int set=0; sbit rs = port^1; sbit rw = port^2; sbit en = port^3; int check=0; int digit[4]={0,0,0,0}; int dig_input[4]={0,0,0,0}; int dig_input_recheck[4]={0,0,0,0}; int i,k; sbit col1=key^4; sbit col2=key^5; sbit col3=key^6; sbit row1=key^3; sbit row2=key^2; sbit row3=key^1; sbit row4=key^0; sbit lock_open=P3^4; sbit lock_close=P3^5; sbit buzzer_on=P3^6; sbit buzzer_off=P3^7; void delay(unsigned int msec) { int i,j ; for(i=0;i<msec;i++) for(j=0;j<1275;j++); } void lcd_cmd(unsigned char item) {

// library of 8051 // port for output // port for lcd display // port for keypad // variable declaration

// keys for keypad

// output for dc motor // output for buzzer

// Time delay function

// Function to send command to LCD

43

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

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<=3 ) { switch((i+1)) { case 1: { // Function to check password

Project Report

if(dig_input[0]==digit[0]) 45

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

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

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

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

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

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<4;i++) { k=i; delay(5); lcd_cmd(0xc4+i); delay(50); row1=row2=row3=row4=0; while(col1==1 && col2==1 && col3==1); row1=row2=row3=row4=0; if(col1==0) check_password_col1(); else if(col2==0) check_password_col2(); else if(col3==0) check_password_col3(); lcd_data('*'); delay(5); } }

Project Report

void main()

// main function 51

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<4;e++) dig_input_recheck[e]=dig_input[e]; lcd_cmd(0x01); lcd("CONFIRM PASSWORD:"); pass_set();

Project Report

52

DTMF Based Automatic Locking System for(e=0;e<4;e++) { if(dig_input_recheck[e]==dig_input[e]) j++; } if(j<4) { lcd_cmd(0x01); lcd_cmd(0x85); lcd("PASSWORD"); lcd_cmd(0xC2); lcd("NOT MATCH"); delay(300); } } else if (set==1) { set=0; lcd_cmd(0x01); lock_close=1; lock_open=1; lcd_cmd(0x82); lcd("ENTER PASSWORD"); check=0; row1=row2=row3=row4=0; while(col1==1 && col2==1 && col3==1); for(i=0;i<4;i++) { delay(50); lcd_cmd(0xc4+i); row1=row2=row3=row4=0; while(col1==1 && col2==1 && col3==1); row1=row2=row3=row4=0; if(col1==0) check_col1(); else if(col2==0) check_col2(); else if(col3==0) check_col3(); } count++; delay(1);

Project Report

53

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

DTMF Based Automatic Locking System

Project Report

7.

IMPLENTATION AND RESULTS

The entire circuit is running successfully when we switch ON the power supply of 5 volt and 9 volt to microcontroller chip and motor driver circuit respectively. When a user dials to the cell phone attached to the circuit, it automatically picks 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 or when a user is in the vicinity of vehicle he can use the set 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 starts operating whenever the user enters a wrong password. The successfully running circuit is displayed below:

Figure 18 : The real implemented DTMF based locking system

55

DTMF Based Automatic Locking System

Project Report

8.

CONCLUSIONS AND FUTURE SCOPES

8.1 CONCLUSION
This DTMF based automatic car locking system has been realized and its hardware implementation has been done in this project. This locking system using 8051 is fully 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 the device and hence the locks can be operated from afar places. The system built is very 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 SCOPES


The 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

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 applications of DTMF in security system by Dr. Arvind Jha at ATECH LABS,Chandigarh Technical support from: 3. The 8051 Microcontroller and Embedded 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. Keil Uvision 4 [ Student Version ], Keil softwares 2005-2009 ARM Limited For HEX code generation and compilation of the C Code. 11. ECE Flash For burning HEX 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

Vous aimerez peut-être aussi