You are on page 1of 33

1

CHAPTER 1

INTRODUCTION

1.1 INTRODUCTION:

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, home security has not seen much benefit from this revolution.
Household entry has long been a very manual routine with little effort to automate
the process. Entry into a residence is still primarily limited to a manual process
which involves inserting a key into a bolt and physically moving the locking
mechanism. The cell phone security system aims to change this. The micro
controller based digital lock presented here is an access control system that allows
only authorized persons to access a restricted area, this system is best suitable for
corporate offices, automated machine (ATMs) and home security.
The system has the ability to introduce two-levels of security. The first level will be
decoding the callers identification information while the second level would consist
of the user attempting a password entry over the phone. The system also has the
ability to provide feedback to the user regarding the state of the system through a
special user mode. 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.

1.2 PROBLEM DEFENITION
The micro controller based digital lock presented here is an entry access control
system that allows only authorized persons to access a restricted area, this system
is best suitable for corporate offices, automated machine (ATMs) and home
2

security. It comprises of a small electronic unit which is fixed at the entry door to
control a lock with the help of a motor, when an authorized person enters
predetermined user password the motor is operated for a limited time to unlatch the
lock so the door can be opened.

1.3 OUTLINE
The operation of this project is summarized as follows:
i. A call is placed to the phone that is connected to the system, this call is like any
normal call to a friend, colleague etc. The call made is set to be automatically
answered at the other (i.e. door) end, the caller immediately presses the six digit
number (password).
ii. The signal qualities of the tone are interpreted by the DTMF decoder.
iii. The tones are received by the DTMF decoder and decoded into a binary code
equivalent. The output of the decoder is sent to the microcontroller.
iv. The microcontroller processes the output from the DTMF decoder. Here, these
decoded signals are identified as the keys pressed on the phone keypad. If it matches
with the security code of the lock, the microcontroller sends input to the motor
driving circuit which in turn opens the lock.









3

CHAPTER 2

DUAL TONE MULTI FREQUENCY

2.1 DTMF SIGNALLING
Dual Tone Multi Frequency Signaling is used for telecommunication signaling over
analog telephone lines in the voice frequency band between telephone handsets and
other communication devices and 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. DTMF is standardized by ITU-T
Recommendation.
Multi-frequency signaling is a group of signaling methods that use a mixture of two
pure tone (pure sine wave) sounds. Various MF signaling protocols were devised by
the Bell System. The earliest of these were for in-band signaling between switching
centers, where long-distance telephone operators used a 16-digit keypad to input the
next portion of the destination telephone number in order to contact the next
downstream long-distance telephone operator. This semi-automated signaling and
switching proved successful in both speed and cost effectiveness. Based on this
prior success with using MF by specialists to establish long-distance telephone calls,
Dual-tone multi-frequency (DTMF) signaling was developed for the consumer to
signal their own telephone-call's destination telephone number instead of talking to
a telephone operator. DTMF, as used in push-button telephone tone dialing, was
known throughout the Bell System by the trademark Touch-Tone. This term was
first used by AT&T in commerce on July 5, 1960 and then was introduced to the
public on November 18, 1963, when the first push-button telephone was made
available to the public. In telephony, multi-frequency signaling (MF) is a signaling
4

system that was introduced by the Bell System after WWII. It uses a combination
of tones for address (phone number) and supervision signaling. The signaling is sent
in-band over the same channel as the bearer channel used for voice traffic.Multi-
frequency signaling is a precursor of modern DTMF signaling (Touch-Tone), now
used for subscriber signaling. DTMF uses eight frequencies.
Operation: Digits are represented by two simultaneous tones selected from a sets of
five (MF 2/5), six (MF 2/6), or eight (MF 2/8) frequencies. The frequency
combinations are played, one at a time for each digit, to the remote multi-frequency
receiver in a distant telephone exchange.

Fig 2.1.1: DTMF Keypad
MF was used for signaling in trunking applications. Using MF signaling, the
originating telephone switching office sends a starting signal such as a seizure (off-
hook) by toggling the AB bits. After the initial seizure, the terminating office
acknowledges a ready state by responding with a wink (short duration seizure) and
then goes back on-hook (wink start). The originating office sends the destination
digits to the terminating switch.
MF and other in-band signaling systems differ from Signaling System 7 (SS7) in
that the routing digits are out-pulsed in MF format in the same voice band channel
used for voice. In some countries, the dialing user cannot detect these digits being
out-pulsed because the audio connection is not established all the way to the users
handset or device until after the connection is established with the terminating
switch. Following a full connection, the same audio channel is connected to the user
in order to communicate the voice, modem or fax data across that same 64-kbit
channel previously used for the in-band MF signaling.
5

2.2 DTMF BASED LOCK SYSTEM
DTMF based locking system can be controlled using a mobile. A mobile
phone is used to make a call to the mobile phone attached to the lock. In the course
of the call if any button is pressed, a tone corresponding to the button is heard at the
other end of the call. This tone is called Dual Tone Multiple Frequency Tone. A
connection is made that generates two tones at the same time. A Row tone and a
Column tone. When a key is pressed the phone generates two tones of specific
frequencies so the voice cant imitate the tones, one tone is generated from a high
frequency group of tones and the other from a low frequency group.



Table 2.2

1

2

3 697Hz
4 5 6 770Hz
7 8 9 852Hz
* 0 # 941Hz
1209Hz 1336Hz 1477Hz
6

When the digit 1 is pressed it generates the frequencies 1209Hz and 697Hz.
Similarly if the digit 2 is pressed 1336Hz and 697Hz are generated. In both the cases
the tone 697 is same for both the digits, but it takes two tones to make a digit and
the decoding equipment knows the difference between the 1209Hz that would
complete the digit 1 and a 1336Hz that completes the digit 2. The signal generated
by the DTMF encoder is the direct algebraic summation in real time of the
amplitudes of two sine waves of different frequencies i.e. pressing 5 will send a
tone made by adding 1336Hz and 770Hz to other end of the mobile.


















7

CHAPTER 3

EMBEDDED SYSTEM

3.1 EMBEDDED SYSTEMS
An Embedded System is a combination of computer hardware and software, and
perhaps additional mechanical or other parts, designed to perform a specific
function. An embedded system is a microcontroller-based, software driven, reliable,
real-time control system, autonomous, or human or network interactive, operating
on diverse physical variables and in diverse environments and sold into a
competitive and cost conscious market.
An embedded system is not a computer system that is used primarily for
processing, not a software system on PC or UNIX, not a traditional business or
scientific application. It is classified to high-end embedded & lower end embedded
systems. High-end embedded system - Generally 32, 64 Bit Controllers used with
OS. Examples Personal Digital Assistant and Mobile phones etc .Lower end
embedded systems - Generally 8,16 Bit Controllers used with an minimal operating
systems and hardware layout designed for the specific purpose. Examples Small
controllers and devices in our everyday life like Washing Machine, Microwave
Ovens, where they are embedded in. Embedded systems are designed to do some
specific task, rather than be a general-purpose computer for multiple tasks. Some
also have real-time performance constraints that must be met, for reasons such as
safety and usability; others may have low or no performance requirements, allowing
the system hardware to be simplified to reduce costs.
Embedded systems are not always standalone devices. Many embedded
systems consist of small, computerized parts within a larger device that serves a
8

more general purpose. For example, an embedded system in an automobile provides
a specific function as a subsystem of the car itself. Embedded systems range from
no user interface at all, in systems dedicated only to one task, to complex graphical
user interfaces that resemble modern computer desktop operating systems. Simple
embedded devices use buttons, LEDs, graphic or character LCDs (for example
popular HD44780 LCD) with a simple menu system. Modern embedded systems
are often based on microcontrollers (i.e. CPUs with integrated memory and/or
peripheral interfaces) but ordinary microprocessors (using external chips for
memory and peripheral interface circuits) are also still common, especially in more
complex systems. In either case, the processor(s) used may be types ranging from
rather general purpose to very specialized in certain class of computations, or even
custom designed for the application at hand. A common standard class of dedicated
processors is the digital signal processor.
In this project we implement an embedded system dedicated to provide
security to the door.
3.2 MICROCONTROLLER
A Microcontroller is a small computer on a single integrated circuit containing a
processor core, memory and a programmable input/output peripherals. It is a self-
contained system as it has the RAM, ROM, timer and counter inbuilt in it. Using
the input/output ports we can input different signals into the controller and get the
desired output according to the program we have burned into the controller.

Fig 3.2 Microcontroller
9

There are five major 8-bit microcontrollers. They are: Freescale Semiconductor's
(formerly Motorola) 68HC08/68HC11, Intel's 8051, Atmel's AVR, Zilog's Z8, and
PIC from Microchip Technology. Three criteria in choosing microcontrollers are as
follows: (1) meeting the computing needs of the task at hand efficiently and cost
effectively; (2) availability of software and hardware development tools such as
compilers, assemblers, debuggers, and emulators; and (3) wide availability and
reliable sources of the microcontroller. Next, we elaborate on each of the above
criteria.
The first and foremost criterion in choosing a microcontroller is that it must meet
the task at hand efficiently and cost effectively. In analyzing the needs of a
microcontroller-based project, we must first see whether an 8-bit, 16-bit, or 32-bit
microcontroller can best handle the computing needs of the task most effectively.
Among other considerations in this category are:
(a) Speed. What is the highest speed that the microcontroller supports?
(b) Packaging. Does it come in a 40-pin DIP (dual inline package) or a QFP (quad
flat package), or some other packaging format? This is important in terms of space,
assembling, and prototyping the end product.
(c) Power consumption. This is especially critical for battery-powered products.
(d) The amount of RAM and ROM on the chip.
(e) The number of I/O pins and the timer on the chip.
(f) Ease of upgrade to higher-performance or lower-power-consumption versions.
(g) Cost per unit. This is important in terms of the final cost of the product in which
a microcontroller is used. For example, some microcontrollers cost 50 cents per unit
when purchased 100,000 units at a time.
The second criterion in choosing a microcontroller is how easy it is to develop
products around it. Key considerations include the availability of an assembler,
debugger, a code-efficient C language compiler, emulator, technical support, and
both in-house and outside expertise. In many cases, third-party vendor (i.e., a
10

supplier other than the chip manufacturer) support for the chip is as good as, if not
better than, support from the chip manufacturer.
The third criterion in choosing a microcontroller is its ready availability in needed
quantities both now and in the future. For some designers this is even more
important than the first two criteria. Currently, of the leading 8-bit micro-
controllers, the 8051 family has the largest number of diversified (multiple source)
suppliers. (Supplier means a producer besides the originator of the microcontroller.)
In the case of the 8051, which was originated by Intel, several companies also
currently produce (or have produced in the past) the 8051.
In our project we have used PIC18F452 microcontroller for comparing the code
produced by the DTMF decoder with our pre-programmed code and produce
necessary output.














11


12

CHAPTER 4

HARDWARE COMPONENTS

4.1 POWER SUPPLY UNIT

Power Supply is a reference to a source of electric power. A device or
system that supplies electrical or other types of energy to an output load or group
of loads is called a Power Supply Unit. The term is most commonly applied to
electrical energy supplies, less often to mechanical ones and rarely to others.
All the components used in our project requires a 5V DC supply. To provide this
5V DC we have used a 9V battery and a DC voltage regulator.

4.1.1 VOLTAGE REGULATOR IC (LM7805)

A DC regulating IC is used to get a low DC voltage from a high DC voltage.
It is also used to get a regulated DC current from an unregulated DC current. There
are two types of voltage regulators fixed voltage regulators (78xx, 79xx) and
variable voltage regulators (LM317). Fixed voltage regulators are again classified
into positive and negative voltage regulators. The LM7805 IC gives constant 5V
DC voltage if input is in the range of 7.5 to 20V and can deliver upto 1.5A of output
current. In our project we have used a 9V battery as supply to LM7805 IC to obtain
constant 5V from it.
13



Fig.4.1
4.2 DTMF DECODER

A DTMF (Dual Tone Multi Frequency) decoder is an integrated circuit
which decodes the DTMF tone from the mobile to an equivalent binary number.
One common DTMF receiver IC is the Motorola MT8870 that is widely used in
electronic communications circuits. It is a complete DTMF receiver integrating both
the band-split filter and digital decoding 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.
External component count is minimized by on chip provision of a differential input
amplifier, clock oscillator and latched three state bus interface. For optimum
working of telephone equipment, the DTMF receiver must be designed to recognize
a valid tone pair greater than 40 ms in duration and to accept successive digit tone-
pairs that are greater than 40 ms apart. In a telephone exchange, when you press a
number on the telephone, a tone pair is generated which is decoded by a computer
which connects the dialer to the designated phone line. Similarly for each number
pressed the DTMF decoder generates an equivalent binary number which is then
fed into the microcontroller.
14


Fig.4.2 Internal Diagram
4.2.1 FUNCIONAL 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.



4.2.2 FILTER SECTION

Separation of the low-group and high group tones is achieved by applying
the DTMF signal to the inputs of two sixth-order switched capacitor bandpass
filters, the bandwidths of which correspond to the low and high group frequencies.
The filter section also incorporates notches at 350 and 440 Hz for exceptional dial
tone rejection. Each filter output is followed by a single order switched capacitor
filter section which smooths the signals prior to limiting. Limiting is performed by
15

high-gain comparators which are provided with hysteresis to prevent detection of
unwanted low-level signals. The outputs of the comparators provide full rail logic
swings at the frequencies of the incoming DTMF signals.


Fig.4.3 Input Signal Frequency
4.2.3 DECODER SECTION

Following the filter section is a decoder employing digital counting
techniques to determine the frequencies of the incoming tones and to verify that
they correspond to standard DTMF frequencies. A complex averaging algorithm
protects against tone simulation by extraneous signals such as voice while providing
tolerance to small frequency deviations and variations. This averaging algorithm
has been developed to ensure an optimum combination of immunity to talk-off and
tolerance to the presence of interfering frequencies (third tones) and noise. When
the detector recognizes the presence of two valid tones (this is referred to as the
signal condition in some industry specifications) the Early Steering (ESt)
output will go to an active state. Any subsequent loss of signal condition will cause
ESt to assume an inactive state.
4.2.4 DIFFERENTIAL INPUT CONFIGURATION

The input arrangement of the MT8870D 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
16

are connected as shown in Fig.4.2 with the op-amp connected for unity gain and
VRef biasing the input at 1/2VDD.

4.2.5 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.4.4 (Single-
Ended Input Configuration). However, it is possible to configure several MT8870D
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.


Fig.4.4 Circuit Diagram

4.3 PIC18 MICROCONTROLLERS
The PICI8 has a RISC architecture that comes with some standard features
such as on-chip program (code) ROM, data RAM, data EEPROM, timers, ADC,
and USART and I/O ports. Although the size of the program ROM, data RAM, data
EEPROM, and I/O ports varies among the family members, they all have
peripherals such as timers, ADC, and USART. Due to the importance of these
peripherals, we have dedicated an entire chapter to each one of them. The details of
the RAM/ROM memory and I/0 features of the PIC18 are given in the next few
chapters.
17


Fig.4.5 Internal Diagram

4.3.1 PIC18FXXX WITH FLASH
Many PIC18 chips have on-chip program ROM in the form of flash
memory. The flash version uses the letter F in the part number to indicate that the
on-chip ROM is flash. PIC18F452 is an example of PIC18 with flash ROM. The
flash version is ideal for fast development because flash memory can be erased in
seconds compared to the 20 minutes or more needed for the UV-EPROM version.
For this reason, the PIC18F has been used in place of the UV-EPROM to eliminate
the waiting time needed to erase the chip, thereby speeding up the development
time. To use the PIC18F to develop a microcontroller based system requires a ROM
burner that supports flash memory however, a ROM eraser is not needed, because
flash is an EEPROM (electrically erasable PROM). Notice that in flash memory,
the entire contents of ROM must be erased in order to program it again. This erasing
of flash is done by the ROM programmer itself, and so a separate eraser is not
needed. We can also program the PIC18F via the PICkit 2 from MicroChip using
the USB port of an IBM PC. For mass production masked version of PIC can be
used.

18

4.3.2 RAM AND EEPROM
While ROM is used to store program (code), the RAM space is for data
storage. The PIC18 has a maximum of 4096 bytes (4K) of data RAM space. Not all
of the family members come with that much RAM. The data RAM size for the
P1C18 varies from 256 bytes to 4096 bytes. As we will see in the next chapter, the
data RAM space has two components: General-Purpose RAM (GPR) and Special
Function Registers (SFR). Because the SFRs are fixed and every microcontroller
must have them, it is the GPR's size that varies from chip to chip. For this reason,
the Microchip web site gives only the GPR size. The RAM GPR space is used for
read/write scratch pad and data manipulation and is divided into banks of 256 bytes
each. The GPR size given for the PIC18 is always a multiple of 256 bytes. In some
of the PIC18 family members, we also have a small amount of EEPROM to store
critical data that does not need to be changed very often. While every PIC18 must
have some data RAM for scratch pad, the EEPROM is optional, so not all versions
of the PIC18 come with EEP-ROM. EEPROM is used mainly for storage of critical
data. PIC18F452 has 32K of ROM and 1536K of data RAM space.
4.3.3 I/O PINS
The PIC18 can have from 16 to 72 pins dedicated for 1/0. The number of
1/0 pins depends on the number of pins in the package itself. The number of pins
for the PIC18 package goes from 18 to 80 at this time. In the case of the 18-pin
PIC18F1220, we have 16 pins for I/O, while in the case of the 80-pin PIC18F8722,
we can use up to 72 pins for I/O. In PIC18F452 we have 34 I/O pins.
4.3.4 PERIPHERALS
All the members of the PIC18 family come with ADC (analog-to-digital
converter), timers, and USART (Universal Synchronous Asynchronous Receiver
Transmitter) as standard peripherals. The ADC is 10- bit and the number of ADC
channels in each PIC chip varies from 5 to 16, depending on the number of pins in
the package. The PIC18F452 has 4 timers besides the watchdog timer. The USART
peripheral allows us to connect the PIC18-based system to serial ports such as the
COM port of the IBM PC.
19

4.4 MOTOR DRIVER IC
The Motor Driver IC receives its input from the microcontroller and drives
a DC motor according to the input. It can run the motor in both forward and reverse
directions and also can stop it when necessary.
The L293 and L293D are quadruple high-current half-H drivers. The L293
is designed to provide bidirectional drive currents of up to 1 A at voltages from 4.5
V to 36 V. The L293D is designed to provide bidirectional drive currents of up to
600-mA at voltages from 4.5 V to 36 V. Both devices are designed to drive
inductive loads such as relays, solenoids, dc and bipolar stepping motors, as well as
other high-current/high-voltage loads in positive-supply applications. All inputs are
TTL compatible. Each output is a complete totem-pole drive circuit, with a
Darlington transistor sink and a pseudo-Darlington source. Drivers are enabled in
pairs, with drivers 1 and 2 enabled by 1,2EN and drivers 3 and 4 enabled by 3,4EN.
When an enable input is high, the associated drivers are enabled and their outputs
are active and in phase with their inputs. When the enable input is low, those drivers
are disabled and their outputs are off and in the high-impedance state. With the
proper data inputs, each pair of drivers forms a full-H (or bridge) reversible drive
suitable for solenoid or motor applications. On the L293, external high-speed output
clamp diodes should be used for inductive transient suppression. We have used
L293D IC.


FUNCTION TABLE
Table.4.1
H High
L Low
X Irrelevant
Z High Impedence
20


4.5 OSCILLATOR
An electronic oscillator is an electronic circuit that produces a
repetitive, oscillating electronic signal, often a sine wave or a square
wave. Oscillators convert direct current (DC) from a power supply to an alternating
current signal. They are widely used in many electronic devices. Common examples
of signals generated by oscillators include signals broadcast by radio and television
transmitters, clock signals that regulate computers and quartz clocks, and the sounds
produced by electronic beepers and video games.
Oscillators are often characterized by the frequency of their output signal. An audio
oscillator produces frequencies in the audio range, about 16 Hz to 20 kHz. An RF
oscillator produces signals in the radio frequency (RF) range of about 100 kHz to
100 GHz. A low-frequency oscillator (LFO) is an electronic oscillator that generates
a frequency below 20 Hz. This term is typically used in the field of
audio synthesizers, to distinguish it from an audio frequency oscillator. There are
two main types of electronic oscillator: the linear or harmonic oscillator and the
nonlinear or relaxation oscillator.
4.5.1 LINEAR OSCILLATOR
Linear Oscillators are of two types Feedback oscillator and negative
resistance oscillator.

4.5.2 FEEDBACK OSCILLATOR

The most common form of linear oscillator is an electronic amplifier such
as a transistor or op amp connected in a feedback loop with its output fed back into
its input through a frequency selective electronic filter to provide positive feedback.
When the power supply to the amplifier is first switched on, electronic noise in the
circuit provides a signal to get oscillations started. The noise travels around the loop
and is amplified and filtered until very quickly it becomes a sine wave at a single
frequency.
21

Feedback oscillator circuits can be classified according to the type of
frequency selective filter they use in the feedback loop. In an RC oscillator circuit,
the filter is a network of resistors and capacitors. RC oscillators are mostly used to
generate lower frequencies, for example in the audio range. In an LC
oscillator circuit, the filter is a tuned circuit (often called a tank circuit; the tuned
circuit is a resonator) consisting of an inductor(L) and capacitor (C) connected
together. Charge flows back and forth between the capacitor's plates through the
inductor, so the tuned circuit can store electrical energy oscillating at its resonant
frequency. LC oscillators are often used at radio frequencies, when a tunable
frequency source is necessary, such as in signal generators, tunable
radio transmitters and the local oscillators in radio receivers.
In a crystal oscillator circuit the filter is a piezoelectric crystal (commonly
a quartz crystal). The crystal mechanically vibrates as a resonator, and its frequency
of vibration determines the oscillation frequency. Crystals have very high Q-
factor and also better temperature stability than tuned circuits, so crystal oscillators
have much better frequency stability than LC or RC oscillators. Crystal oscillators
are the most common type of linear oscillator, used to stabilize the frequency of
most radio transmitters, and to generate the clock signal in computers and quartz
clocks. Crystal oscillators often use the same circuits as LC oscillators, with the
crystal replacing the tuned circuit; the Pierce oscillator circuit is also commonly
used. Quartz crystals are generally limited to frequencies of 30 MHz or below.
4.5.3 NEGATIVE RESISTANCE OSCILLATOR
In addition to the feedback oscillators described above, which use two-
port amplifying active elements such as transistors and op amps, linear oscillators
can also be built using one-port (two terminal) devices with negative
resistance, such as magnetron tubes, tunnel diodes and Gunn diodes. Negative
resistance oscillators are often used at high frequencies in the microwave range and
above, since at these frequencies feedback oscillators perform poorly due to
excessive phase shift in the feedback path.
In negative resistance oscillators, a resonant circuit, such as an LC
circuit, crystal, or cavity resonator, is connected across a device with negative
differential resistance, and a DC bias voltage is applied to supply energy. A resonant
22

circuit by itself is "almost" an oscillator; it can store energy in the form of electronic
oscillations if excited, but because it has electrical resistance and other losses the
oscillations are damped and decay to zero. The negative resistance of the active
device cancels the (positive) internal loss resistance in the resonator, in effect
creating a resonator with no damping, which generates spontaneous continuous
oscillations at its resonant frequency.
4.5.4 RELAXATION OSCILLATOR
A nonlinear or relaxation oscillator produces a non-sinusoidal output, such
as a square, sawtooth or triangle wave. It contains an energy-storing element
(a capacitor or, more rarely, an inductor) and a nonlinear switching circuit
(a latch, Schmitt trigger, or negative resistance element) that periodically charges
and discharges the energy stored in the storage element thus causing abrupt changes
in the output waveform. Square-wave relaxation oscillators are used to provide
the clock signal for sequential logic circuits such as timers and counters, although
crystal oscillators are often preferred for their greater stability. Triangle wave or
sawtooth oscillators are used in the time base circuits that generate the horizontal
deflection signals for cathode ray tubes in analogue
oscilloscopes and television sets. In function generators, this triangle wave may then
be further shaped into a close approximation of a sine wave.
4.6 ELECTRIC MOTOR
An Electric Motor is device that converts electric energy into mechanical
energy. Electric motors are used in industrial fans, blowers and pumps, machine
tools, household appliances, power tools, and disk drives, electric motors can be
powered by direct current (DC) sources, such as from batteries, motor vehicles or
rectifiers, or by alternating current (AC) sources, such as from the power grid,
inverters or generators. Small motors may be found in electric watches. General-
purpose motors with highly standardized dimensions and characteristics provide
convenient mechanical power for industrial use. The largest of electric motors are
used for ship propulsion, pipeline compression and pumped-storage applications
with ratings reaching 100 megawatts. Electric motors may be classified by electric
23

power source type, internal construction, application, type of motion output, and so
on.
4.6.1 DC MOTOR
A DC Motor is also a type of electric motor which uses direct current to do
mechanical work. DC Motor works on the principle, when a current carrying
conductor is placed in magnetic field it experiences a force and the direction of this
force is given by Flemings Left Hand Rule. The rule states that if the thumb
represents the direction of motion of the conductor and the fore finger represents
the direction of magnetic field then the middle finger represents direction current
through the conductor.

Fig.4.6 Loop in magnetic field
In most common DC motors, the external magnetic field is produced by
high-strength permanent magnets. The stator is the stationary part of the motor --
this includes the motor casing, as well as two or more permanent magnet pole
pieces. The rotor (together with the axle and attached commutator) rotate with
respect to the stator. The rotor consists of windings made of copper generally on a
core, the windings being electrically connected to the commutator. The geometry
of the brushes, commutator contacts, and rotor windings are such that when power
is applied, the polarities of the energized winding and the stator magnets are
misaligned, and the rotor will rotate until it is almost aligned with the stator's field
magnets. As the rotor reaches alignment, the brushes move to the next commutator
24

contacts, and energize the next winding. For example a two-pole motor, the rotation
reverses the direction of current through the rotor winding, leading to a "flip" of the
rotor's magnetic field, driving it to continue rotating.
The direct current motor is represented by the circle in the center, on which
is mounted the brushes, where we connect the external terminals, from where
supply voltage is given. On the mechanical terminal we have a shaft coming out of
the Motor, and connected to the armature, and the armature-shaft is coupled to the
mechanical load. On the supply terminals we represent the armature resistance Ra
in series. Now, let the input voltage E, is applied across the brushes. Electric current
which flows through the rotor armature via brushes, in presence of the magnetic
field, produces a torque Tg . Due to this torque Tg the dc motor armature rotates. As
the armature conductors are carrying currents and the armature rotates inside the
stator magnetic field, it also produces an emf Eb in the manner very similar to that
of a generator. The generated emf Eb is directed opposite to the supplied voltage
and is known as the back emf, as it counters the forward voltage. The back emf
generated is given by, Eb = NZ P / 60 A
Eb Back Emf (V) N Speed (rpm)
- Flux (Wb) Z No. of conductors
P No. of poles A No. of parallel paths

Fig.4.7 DC motor connections.
25


CHAPTER 5

PERFOMANCE AND RESULTS

5.1 FLOW DIAGRAM OF PROGRAM CODE

26

5.2 SIMULATION
LED D3 shows the pic is working.
LED D2 shows that the number pressed is received by the PIC.
LED D1 blinks when the password entered is wrong.
The green box represents the DTMF equivalent circuit.
The DC motor rotates when the password entered is correct.
27

5.3 FLOW DIAGRAM

28

5.4 RESULT
We were able to open the door without being near it.
Password can be changed after entering the current password.
Locking of the door can be done by pressing a button.
Password can be 255 characters long.
5.5 ADVANTAGES
We can unlock the door from a distance.
No need to carry a key.
Has security higher than a normal lock.
Password can be changed.
5.6 DISADVANTAGES
Requires 24 hour supply.
Cannot be connected main supply as there may be outages.
Calling the phone to unlock the door will cost the call charges.
Cost of maintain and construction is more than an ordinary lock.







29

CHAPTER 6
CONCLUSION
6.1 CONCLUSION
Our project on DTMF BASED DOOR LOCKING SECURITY SYSTEM
which make use of DTMF signalling for door control will provide a better security
system which can be operated more easily and which is more reliable.
The working model of the system was designed, implemented and tested
successfully. It could be implemented in real life with proper modifications.
The real life implementation of the project is very easy and can be done in an
efficient and effective way. It can really provide a secure, convenient, and
automated form of security for a place of residence.

6.2 FUTURE SCOPE OF THE PROJECT
This project can expanded in a variety of ways. It can be programmed in
such a way that the user can get the present state of the door (closed/open) by
sending an SMS. More modification can be done so that the main power supply can
be controlled by evaluating the present position of the lock. It can also be
implemented with an alarm so that we get alert signal to mobile when the door is
opened or closed.






30







31

32

33

You might also like