security and controlling electrical decices by mobile
TRANSCRIPT
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
1/70
1
A PROJECT REPORT ON
SECURITY AND CONTROLLING ELECTRICAL
DEVICES WITH VOICEACKNOWLEDGEMENT
THROUGH MOBILE HANDSET
FINAL YEAR
OFDIPLOMA IN ENGINEERING
ELECTRONICS AND COMMUNICATION
SUBMITTED BY :
ADROJA SAGAR P.
GUIDED BY :
PREETI MAHAVAR.
Vishnubhai Punjalal Mangaldas Patel Polytechnic
Sector -15, Gandhinagar
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
2/70
2
CERTIFICATE
VPMP POLYTECHNICSECTOR-15, GANDHINAGAR
This is to certify thatMr. ADROJA SAGAR P having Enrolment No :
096540311022 has completed Part-I IDP Project work Having title
SECURITY AND CONTROLLING ELECTRICAL DEVICES WITH VOICE
ACKNOWLEDGEMENT THROUGH MOBILE HANDSET .
He has undergone the process of shodh yatra, literature survey and problemdefinition. He is supposed to carry out the residue IDP Part-II work on same
problem during Semester - VI for the final fulfilment of the IDP work which is
prerequisite to complete Diploma Engineering.
Guide IDP Head of Department
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
3/70
3
ABSTRACT
As name indicates, in our project we are controlling electrical devices through
mobile. You can control devices not only through mobile but also with telephone.
So users allow controlling the equipment by both, mobile and simultaneously.
Here, all functions are performed by Microcontroller i.e. read signal from mobile,
to send acknowledgement, to send status, to control device, providing security and
all that.
Working of our project is something like this: as one mobile is connected to
microcontroller circuits. Now we can call to this mobile. Now as this mobile gets
call circuits and this signal and than performs the particular task. Now after
performing particular task it will check whether the voice is completed
successfully from hardware side if so it will reply user that task is successful
otherwise there is something hardware problem. And with all this we are
continuously check for anti-theft system. So we can secure you.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
4/70
4
Table of Contents
CHAPTER 1 ..................................................................................................................................9
INTRODUCTION ................................................................................................................................... 9
CHAPTER 2 ................................................................................................................................11
INTEGRATED CIRCUITS ........................ .......................... ......................... .......................... .................. 11
2.1 INTRODUCTION ........................... .......................... ......................... .......................... .................. 11
2.2 VOICE RECORDING AND PLAYBACK ........................ .......................... ......................... .................. 12
2.3 MESSAGE MANAGEMENT GENERAL DESCRIPTION ........................... .......................... ................. 14
2.4 RANDOM ACCESS MODE .......................... ......................... .......................... .......................... ..... 15
2.5 DTMF RECEIVER ........................... .......................... ......................... .......................... .................. 19
2.6 APPLICATIONS ........................ .......................... .......................... ......................... ....................... 26
CHAPTER 3 ................................................................................................................................27
NETWORK ELEMENTS ........................................................................................................................ 27
3.1 DIODE ........................ ........................... ......................... .......................... .......................... ......... 27
3.2 CAPACITOR ......................... .......................... .......................... ......................... .......................... . 28
3.3 LED .................................... ........................... ......................... .......................... ......................... . 30
3.4 OSCILLATOR ........................ .......................... .......................... ......................... ........................... 32
CHAPTER 4 ................................................................................................................................33
POWER CIRCUIT ......................... .......................... .......................... ......................... .......................... . 33
4.1 POWER SUPPLY ........................ .......................... .......................... ......................... ....................... 33
4.2 TRANSFORMER ............................................................................................................................ 34
4.3 RECTIFIER..................................................................................................................................... 35
4.3.1 Types of Rectifier .................................................................................................................. 35
4.3.2 Full-wave Rectifier: ......................... ......................... .......................... .......................... ......... 36
4.4 FILTER: ......................................................................................................................................... 38
4.4.1 Capacitor Filter...................................................................................................................... 38
4.5 REGULATOR AND ITS FEATURES ......................... .......................... ......................... ....................... 39
CHAPTER 5 ................................................................................................................................41
RELAYS .............................................................................................................................................. 41
5.1 INTRODUCTION ........................................................................................................................... 41
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
5/70
5
5.2 TYPES OF RELAYS ......................................................................................................................... 42
5.2.1 Attracted armature type relay .......................... .......................... ......................... .................. 42
5.2.3 Induction type relay .............................................................................................................. 43
5.3 MERITS AND DEMERITS .......................... ......................... .......................... .......................... ......... 43
CHATER 6 ..................................................................................................................................44
Microcontroller ................................................................................................................................. 45
6.1 INTRODUCTION ........................................................................................................................... 45
6.2 8051 Microcontroller .................................................................................................................. 46
About the 8051.......................................................................................................................... 46
CHATER 7 ..................................................................................................................................48
CELL PHONE BASED DEVICE CONTROL ...................................... .......................... .......................... ..... 48
7.1 INTRODUCTION ....................... .......................... .......................... ......................... ....................... 48
7.2 CIRCUIT DESCRIPTION ........................... ......................... .......................... .......................... ......... 49
7.3 VOICE RECORDING AND PLAYBACK ............................................. ......................... ....................... 52
7.4 Circuit Diagram of CBDC ........................ ......................... .......................... ......................... .......... 53
7.5 PCB LAYOUT ........................ .......................... .......................... ......................... ........................... 55
CHATER 8 ..................................................................................................................................56
Software ........................................................................................................................................... 56
8.1 Project Code ............................................................................................................................... 58
CHATER 9 ..................................................................................................................................68
CONCLUSION ..................................................................................................................................... 68
FUTURE SCOPE .................................................................................................................................. 68
ABBREVATIONS ................................................................................................................................. 69
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
6/70
6
Industry Introduction:
LiteMediawas established in the year 2009 with the aim of providing our
customers with world class quality solutions that will aid them in achieving their
business objective in an efficient manner.
There are proud to introduce ourselves as a Creative Media Development
company, which is eager to serve customers with a range of specialized
solutions in the area of Web Development, Web Hosting Domain Registration
and Customized Software Solutions and Product Base. There have developed a
range of packages from which our customers can choose the most appropriateoption.
There operations are based on our focus on Development and Creativity, which
have become the brain and soul of the company. There solutions have their
foundation on these two aspects that help us to innovate and create constantly to
provide customers with flawless solutions.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
7/70
7
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
8/70
8
Website Designing
Website Hosting
E-Commerce Solutions
Corporate CD Presentation
Web Maintenance
Advanced technologies Involving customers during all decision making process
Timely deliveryOption of choosing the most suitable open source option
list
Comprehensive, end-to end service Support of the most experienced team of IT experts
Cost-effective solutions
Software engineers Tele callers
Qualified designing professionals Sales executives
Qualified programming experts Marketing managers
IT experts Relationship manager
Customer care staff
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
9/70
9
CHAPTER: 1
INTRODUCTION
The utilization of electrical power progressively increases in now-a-days. The demand
for the electrical power is also increases over the entire world, particularly in India the
demand for electrical power increases more and more because of the increase in
population. The people utilize the power higher than their requirements because of their
sophisticated needs in the day to day life. The major part of electrical power is
consumed by the urban areas than the rural areas .The people lived in the urban areas
wants to make their life luxurious with the use of more power for their home appliances.
The power conservation is more important to reach the demand of the electrical power;
there are several methods available for the conservation of electrical power.
Every system is automated in order to face new challenges in the present day situation.
Automated systems have less manual operations, so that the flexibility, reliabilities are
high and accurate. Hence every field prefers automated control systems. Especially in
the field of electronics automated systems are doing better performance increasingly.
The use of modern technologies is to achieve the power conservation not only through
the proper design of respective devices and other parameters in the power system. A
major part of power conservation can be achieved by consumersproper usage of the
power for home appliances, for this purpose CELLPHONE BASED DEVICE
CONTROL WITH VOICEACKNOWLEDGEMENTis one of the optimal way .Which
uses Mobile technology that keeps monitoring of the various appliances, and will controlthe operation of these appliances with respect to the signal sent by the mobile. For
utilization of appliances the new concept has been thought to manage them remotely by
using mobile, which enables the user to remotely control switching of domestic
appliances. Just by dialing keypad of remote telephone, from where you are calling you
can perform ON / OFF operation of the appliances.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
10/70
10
The mobile communications has become one of the driving forces of the digital
revolution. Every day, millions of people are making phone calls by pressing a few
buttons. Little is known about how one person's voice reaches the other person's phone
that is thousands of miles away. Even less is known about the security measures and
protection behind the system. The complexity of the cell phone is increasing as people
begin sending text messages and digital pictures to their friends and family. The cell
phone is slowly turning into handheld computer. All the features and advancements
incell phone technology require a backbone to support it. The system has to provide
security and the capability for growth to accommodate future enhancements.
The main aim of our project is to operate our home appliances like lights and waterpump from office or any other remote places. So if we forgot to switch off the lights or
other appliances while going out, it helps us to turn off the appliances with our cell
phone. Cell phone works as the remote control for our home appliances. We can control
the desire appliance by pressing the corresponding key. The system also gives us voice
acknowledgement of the appliance status.
In this project we use several numbers of integrated circuits, network elements such as
diodes, rectifiers, filters, resisters, capacitors, etc. In this project we use the
microprocessor program based integrated circuit namely IC AT89C51 micro controller,
APR9600 audio recording and playback device, MT8870 DTMF receiver, ULN2003
relay driver and other electrical and electronic components for the desired performance
of this project. These are explained in the corresponding chapters.
The process of the whole project depends upon the functions of the switches and
mobile keys. The functions of switches and mobile keys also explained in the
corresponding chapters.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
11/70
11
CHAPTER 2
INTEGRATED CIRCUITS
2.1 INTRODUCTION:
We are going through a period of micro-electric revolution. For a common person, the
role of electronics is limited to audio-visual gadgets like radio and television, but the
truth is, today the growth of any industry like communication, control, instrumentation or
computer, is depend upon electronics to a great extent .And integrated circuits are
electronics. The term IC reflects the capabilities of semiconductor industry to fabricate
complex electronic circuit consisting of a large number of components on a singlesubstrate. The IC is a miniature, low cost electronic circuit consisting of active and
passive components that irreparably joined together on a single chip of silicon. Most of
the components used in ICs are not similar to conventional components in appearance
although they perform similar electrical functions. These circuits naturally offer a number
of advantages over those made by interconnecting discrete components.
These are broadly classified as Digital ICs and Linear ICs .Based upon the
above requirements , two distinctly different IC technology namely MONOLITHIC and
HYBRID technologies have been developed. In monolithic ICs, all circuitscomponents,
both active and passive elements and their interconnections are manufactured into or
on top of a single chip of silicon. The monolithic circuit is ideal for applications where
identical circuits are required in very large quantities and hence provides lowest per unit
cost and higher order of reliability .Based upon the active devices used, ICs can be
classified as bipolar and unipolar (BJT & FET).
ADVANTAGES:
1. Miniaturization and hence increased equipment density
2. Cost reduction due to batch processing
3 .Improved functional performance
4. Matched devices, Increased operating speeds
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
12/70
12
2.2 VOICE RECORDING AND PLAYBACK:
The APR9600 device offers true single-chip voice recording, non-volatile storage, and
Playback capability for 40 to 60 seconds. The device supports both random and
sequential access of multiple messages. Sample rates are user-selectable, allowing
designers to customize their design for unique quality and storage time needs.
Integrated output amplifier, microphone amplifier, and AGC circuits greatly simplify
system design. The device is ideal for use in portable voice recorders, toys, and many
other consumer and industrial applications. APLUS integrated achieves these high
levels of storage capability by using its proprietary analog /multilevel storage technologyimplemented in an advanced Flash non-volatile memory process, where each memory
cell can store 256 voltage levels .This technology enables the APR9600 device to
reproduce voice signals in their natural form. It eliminates the need for encoding and
compression, which often introduce distortion APR9600 block diagram is included in
order to describe the device's internal architecture. At the left hand side of the diagram
are the analog inputs. A differential microphone amplifier, including integrated AGC, is
included on-chip for applications requiring use .The amplified microphone signals fed
into the device by connecting the ANA_OUT pin to the ANA_IN pin through an external
DC blocking capacitor. Recording can be fed directly into the ANA_IN pin through a DC
blocking capacitor, however, the connection between ANA_IN and ANA_OUT is still
required for playback. The next block encountered by the input signal is the internal
anti-aliasing filter. The filter automatically adjusts its response according to the
sampling frequency selected so Shannons Sampling Theorem is satisfied. After anti-
aliasing filtering is accomplished the signal is ready to be clocked into the memory array
.This storage is accomplished through a combination of the Sample and Hold circuit and
the Analog Write/Read circuit. These circuits are clocked by either the Internal Oscillator
or an external clock source.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
13/70
13
and amplified as shown on the right hand side of the diagram. Thesignal can be heard
by connecting a speaker to the SP+ and SP- pins .Chip-wide management is
accomplished through the device control block shown in the upper right hand corner.
When playback is desired the previously stored recording is retrieved from memory,
Low pass filtered, Message management is provided through the message control block
represented in the lower center of the block diagram. More detail on actual device
application can be found in the Sample application section. More detail on samplingcontrol can be found in the Sample Rate and Voice quality section. More detail on
Message management and device control can be found in the Message Management
section.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
14/70
14
2.3 MESSAGE MANAGEMENT GENERAL DESCRIPTION:
Playback and record operations are managed by on-chip circuitry. There are several
available messaging modes depending upon desired operation. These message modes
determine message management style, message length, and external parts count.
Therefore, the designer must select the appropriate operating mode before beginning
the design. Operating modes do not affect voice quality; for information on factors
affecting quality refer to the Sampling Rate & Voice Quality section .The device
supports five message management modes.
????Random access mode with 2, 4, or 8 fixed-duration messages Tape mode, with
multiple variable-duration messages, provides two options:
(a)- Auto rewind (b)Normal
Modes cannot be mixed. Switching of modes after the device has recorded an initial
message is not recommended. If modes are switched after an initial recording has been
made some unpredictable message fragments from the previous mode may remain
present, and be audible on playback, in the new mode. These fragments will disappear
after a Record operation in the newly selected mode. Table 1 defines the decoding
necessary to choose the desired mode. An important feature of the APR9600 Message
management capabilities is the ability to audibly prompt the user to change in the
device's status through the use of "beeps" superimposed on the device's output. This
feature is enabled by asserting a logic high level on the BE pin.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
15/70
15
2.4 RANDOM ACCESS MODE:
Random access mode supports 2, 4, or 8 Message segments of fixed duration. Assuggested recording or playback can be made randomly in any of the selectedmessages. The length of each message segment is the total recording length available
(as defined by the selected sampling rate) divided by the total number of segmentsenabled (as decoded in Table3.1). Random access mode provides easy indexing tomessage segments.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
16/70
16
2.4.1 A functional description of recording in random access mode:
record, /CE must be set low to enable the device and /RE must be set low to enable
recording. You initiate recording by applying a low level on the message trigger pin that
represents the message segment you intend to use. The message trigger pins are
labeled /M1_MESSAGE - /M8_OPTION on pins 1-9 (excluding pin 7) for message
segments 1-8 respectively. Note: Message trigger pins of
M1_MESSAGE,/M2_NEXT,/M7_END, and /M8_OPTION, have expanded names to
represent the different functionality that these pins assume in the other modes .In
random access mode these pins should be considered purely message trigger pins withthe same functionality as /M3, /M4, /M5,and /M6. For a more thorough explanation of
the functionality of device pins in different. On power up, the device is ready to record or
playback in any of the enable message segment.
When actual recording begins the device responds with a single beep (if the BE pin is
high to enable the beep tone) at the speaker outputs to indicate that it has started
recording. Recording continues as long as the message pin stays low. The rising edge
of the same message trigger pin during record stops the recording operation (indicated
with a single beep).If the message trigger pin is held low beyond the end of the
maximum allocated duration, recording stops automatically (indicated with two beeps),
regardless of the state of the message trigger pin. The chip then enters low-power
mode until the message trigger pin returns high. After the message trigger pin returns to
high, the chip enters standby mode. Any subsequent high to low transition on the same
message trigger pin will initiate recording from the beginning of the same message
segment. The entire previous message is then overwritten by the new message,
regardless of the duration of the new message. Transitions on any other message
trigger pin or the /RE pin during the record operation are ignored until after the deviceenters standby.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
17/70
17
2.4.2 Signal storage:
The APR9600 samples incoming voice signals and stores the instantaneous voltage
Samples in non-volatile FLASH memory cells. Each memory cell can support voltage
Ranges from 0 to 256 levels. These 256 discrete voltage levels are the equivalent of 8-
bit (28=256) binary encoded values. During playback the stored signals are retrieved
from memory, smoothed to form a continuous signal, and then amplified before being
fed to an external speaker.
2.4.3 Sampling Rate & Voice Quality:
According to Shannon's sampling theorem, the highest possible frequency component
Introduced to the input of a sampling system must be equal to or less than half the
sampling frequency if aliasing errors are to be eliminated. The APR9600 automatically
filters its input, based on the selected sampling frequency, to meet this requirement.
Higher sampling rates increase the bandwidth and hence the voice quality, but they also
use more memory cells for the same length of recording time .Lower sampling rates use
fewer memory cells and effectively increase the duration capabilities of the device, but
they also reduce incoming signal bandwidth.
(2.1)
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
18/70
18
The APR9600 accommodates sampling rates as high as 8 kHz and as low as 4 kHz.
You can control the quality/duration trade off by controlling the sampling frequency.
Mode An internal oscillator provides the APR9600 sampling clock. Oscillator frequency
can be changed by changing the resistance from the OscR pin to GND. The pin
configuration and the IC APR9600 internal circuit diagrams are shown in fig 2.1 and 2.2.
CIRCUIT DIAGRAM :
(2.2)
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
19/70
19
2.5 DTMF RECEIVER
2.5.1 Introduction:
The M-8870 is a full DTMF Receiver that integrates both band split filter and
decoder functions into a single18-pin DIP or SOIC package. Manufactured using CMOS
process technology, the M-8870 offers low power consumption (35 mW max) and
precise data handling. Its filter section uses switched capacitor.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
20/70
20
Technology for both the high and low group filters and for dial tone rejection. Its 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 provision of an on-chip differential
input bus. Minimal external components required include a low-cost 3.579545 MHz
color burst crystal, a timing resistor, and a timing capacitor .The M-8870-02 provides a
power-down option which, when enabled, drops consumption to less than 0.5 mW.
The M-8870-02 can also inhibit the decoding of fourth column digits (see Tone
Decoding table).
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
21/70
21
2.5.2 Functional Description:
M-8870 operating functions (see block diagram fig 3.3) include a band split filter that
separates the high and low tones of the received pair, and a digital decoder that verifies
both the frequency and duration of the received tones before passing the resulting 4-bitcode to the output bus.
2.5.3 Filter:
The low and high group tones are separated by applying the dual-tone signal to the
inputs of two 6th order switched capacitor band pass filters with bandwidths thatcorrespond to the bands enclosing the low and high group tones. The filter also
incorporates notches at 350 and 440 Hz, providing excellent dial tone rejection. Each
filter output is followed by a single-order switched capacitor section that smooth the
signal prior to limiting. Signal limiting is performed by high gain comparators provided
with hysteresis to prevent detection of unwanted low-level signals and noise. The
comparator outputs provide full-rail logic swing sat the frequencies of the incoming
tones.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
22/70
22
2.5.4 Decoder:
The M-8870 decoder uses a digital counting technique to determine the frequencies of
the limited tones and to verify that they correspond to standard DTMF frequencies. A
complex averaging algorithm is used to protect against tone simulation by extraneous
signals(such as voice) while tolerating small frequency variations The algorithm ensures
an optimum combination of immunity to talk off and tolerance to interfering signals(third
tones) and noise. When the detector recognizes the simultaneous presence of two valid
tones (known as signal condition), it raises the Early Steering flag (EST). Any
subsequent loss of signal condition will cause EST to fall.
(Tone Decoding table)
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
23/70
23
2.5.5 Steering Circuit:
Before a decoded tone pair is registered, the receiver checks for valid signal duration
(referred to as character-recognition-condition). This check is performed by an external
RC time constant driven by EST. Logic high on EST causes VC to rise as the capacitor
discharges. Provided that signal condition is maintained (EST remains high) for the
validation period (tGTF), VC reaches the threshold (VTSt) of the steering logic to register
the tone pair, thus latching its corresponding 4-bit code into the output latch. At thispoint, the GT output is activated and drives VC to VDD.GT continue to drive high as
long as ESF remains high. Finally, after a short delay to allow the output latch to settle,
the delayed steering output flag (SOF) goes high, signaling that a received tone pair has
been registered. The contents of the output latch are made available on the 4-bit output
bus by raising the three state control input (OE) to logic high. The steering circuit works
in reverse to validate the inter digit pause between signals. Thus, as well as rejecting
signals too short to be considered valid, the receiver will tolerate signal interruptions
(dropouts) too short to be considered a valid pause. This capability, together with the
ability to select the steering time constants externally, allows the designer to tailor
performance to meet a wide variety of system requirements.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
24/70
24
2.5.6 Guard Time Adjustment:
Where independent selection of signal duration and inter digit pause are not required,the simple steering circuit of Basic Steering Circuit is applicable. Component values arechosen according to the formula: tREC= tDP+ tGTPtGTP@ 0.67 RC The value of tDPis a
parameter of the device and tRECis the minimum signal duration to be recognized by thereceiver. A value for C of 0.1 ?F is recommended for most applications, leaving R to beselected by the designer. For example, a suitable value of R for a t RECof 40 ms wouldbe 300 k?. The timing requirements for most telecommunication applications aresatisfied with this circuit.
Different steering arrangements may be used to select independently the guard times
for tone-present (tGTP) and tone-absent (tGTA).This may be necessary to meet system
specification that place both accept and reject limits on both tone duration and inter digitpause. 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. On the other hand, a relatively short tREwith a
long tDOwould be appropriate for extremely noisy environments where fast acquisition
time and immunity to dropouts would be required. Design information.
2.5.7 Input Configuration:
The input arrangement of the M-8870 provides a differentia input operational amplifier
as well as a bias source (VREF) to bias the inputs at mid-rail. Provision is made for
connection of a feedback resistor to the op-amp output (GS) for gain adjustment below.
In a single-ended configuration, the input pins are connected as shown in the Single -
Ended Input Configuration on page 3 with the op-amp connectedfor unity gain and
VREFbiasing the input at 1/2VDD.The Differential Input Configuration bellow permitsgain
adjustment
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
25/70
25
2.5.8 DTMF Clock Circuit:
The internal clock circuit is completed with the addition of a standard 3.579545 MHztelevision color burst crystal. It can be connected to a single M-8870 as shown in theSingle - Ended Input Configuration on fig3.5, or to a series of M-8870s. As illustrated inthe Common Crystal Connection, a single crystal can be used to connect a series of M-8870s by coupling the oscillator output of each M-8870 through a 30pF capacitor to theoscillator input of the next M-8870.t with the feedback resistor R5.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
26/70
26
2.6 APPLICATIONS:
1. Linear ICs are used in a number of electronic applications such as in fields like audio
and radio communications, medical electronics, instrumentation control.
2. A number of linear and non-linear applications of ICs such as subtractor, adder,
integrator, differentiator, instrumentation amplifier.
3. Log/antilog amplifiers, analog computation techniques.
4. Clipper / clamper wave generators, variable voltage regulator and switched mode
power supply.
5. Comparators, active filters, 555-timer, phase locked loops, DAC and ADC.
6. Ac amplifier, Voltage to current and current to voltage converter.
7. Sample and hold circuit is very useful in digital interfacing and analog to digital and
pulse code modulation systems, operational Trans-conductance amplifier (OTA).
8. Power Amplifiers, Multivibrator, and voltage regulators.
9. Embedded System, Robotics.
10. Half wave and Full wave rectifier circuits.
11. Peak detector, find application in test and measurement instrumentation as well as
in amplitude modulation communication.
12. Static relays in power systems.
13.Multiplier used in frequency doubling ,measurement of real power ,detecting phase
angle difference between two signals of equal frequency ,multiplying two signals ,taking
square root of a signal.
14. Linear switched reluctance motor and stepper motor control circuits.
15. Siren, Alarm using LM380 power amplifier.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
27/70
27
CHAPTER 3
NETWORK ELEMENTS
3.1 DIODE:
Diode is an electronic device that allows the passage of current in only one direction.
The first such devices were vacuum-tube diodes, consisting of an evacuated glass or
steel envelope containing two electrodes a cathode and an anode. Because electrons
can flow in only one direction, from cathode to anode, the vacuum-tube diode could be
used in rectification. The diodes most commonly used in electronic circuits today aresemiconductor diodes. The simplest of these, the germanium point-contact diode, dates
from the early days of radio, when the received radio signal was detected by means of a
germanium crystal and a fine, pointed wire that rested on it. In modern germanium (or
silicon) point-contact diodes, the wire and a tiny crystal plate are mounted inside a small
glass tube and connected to two wires that are fused into the ends of the tube.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
28/70
28
Junction-type diodes consist of a junction of two different kinds of semiconductor
material. The zener diode is a special junction-type diode, using silicon, in which the
voltage across the junction is independent of the current through the junction. Because
of this characteristic, zener diodes are used as voltage regulators. Another special
junction-type diode is used in solar cells; a voltage appears spontaneously when the
junction is illuminated. In light-emitting diodes (LEDs), on the other hand, a voltage
applied to the semiconductor junction results in the emission of light energy. LEDs are
used in numerical displays such as those on electronic digital watches and pocket
calculators.
3.2 CAPACITOR:
Capacitor, device for storing an electrical charge, sometimes called a condenser. In its
simplest form a capacitor consists of two metal plates separated by a non-conducting
layer called the dielectric. The dielectric may be air, plastic, waxed paper, or another
substance such as the mineral mica. When one plate of a capacitor is charged using a
battery or other source of direct current, the other plate becomes charged with the
opposite sign; that is, positive if the original charge is negative, and negative if the
original charge is positive.
The electrical size of a capacitor is its capacitance, that is the amount of electric charge
it can hold per unit potential difference across its platesC = Q/V. The SI unit of
capacitance is the farad (F). Because this is such a large unit, capacitors commonly
have their size expressed in F (1 microfarad = 10-6 F) or pF (1 picofarad = 10-9 F).
The capacitance of a parallel plate capacitor can be calculated from the relationship:
Where A is the area of the plates, d is the distance between them, e0 is the permittivity
of free space, and er is the relative permittivity of the dielectric between the two plates.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
29/70
29
Capacitors can hold a limited amount of electric charge. As more and more charge is
added to the plates of a capacitor, the potential difference between the plates increases.
Eventually this potential difference becomes so great that the atomic structure of the
dielectric breaks down, and charge leaks through it. Capacitors can conduct direct
current for only an instant but are able to act as conductors in alternating-current
circuits, as they constantly charge and discharge as the direction of the current
constantly changes. This property makes them useful when direct current must be
prevented from entering some part of an electric circuit. Fixed-capacity and variable-capacity capacitors are used with coils in resonant circuits in radios and other electronic
equipment. Because the dielectric of a capacitor may break down, there is a limit to the
potential difference that may be applied across a capacitor. Capacitors are therefore
labeled not only with their capacitance but also with their working potential difference in
order to prevent breakdown of the dielectric in use.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
30/70
30
3.3 LED :
Light-Emitting Diode (LED), semiconductor device that gives out light when a small
current (typically 10 milliamps) flows through it. LEDs are used extensively as electronic
indicators. They are available in a range of sizes and shapes, and give out light of avariety of colures. The most common types are cylindrical and glow red, green, or
yellow. They are used in displays on devices such as bedside radios and car
instruments.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
31/70
31
Specialized displays often use a number of LEDs in their construction. For example, a
seven-segmentdisplay indicates a numeral from 0 to 9, and consists of seven LEDs
arranged in a figure of eight. Different segments are illuminated to form the different
digits. LED indicators tend to have a limited viewing angle, so it is difficult to see
whether they are illuminated except by looking directly from the front.
In common with many other types of diode, the LED is a junction diode, consisting of
two kinds of semiconductor (p-type and n-type) joined together (see Semiconductor:
Doping). It is usually made from gallium arsenide phosphide, which emits light when a
suitable current flows through it. The light output is caused by a release of energy that
occurs as electrons pass from one side of the semiconductor junction to the other. The
current flowing through an LED must be strictly limited to avoid damaging the device.
Features:
High reliability
High radiant intensity
Peak wave length of 940nm
Low forward voltage
Applications:
Free air transmission system
Infrared remote control units with high power requirements
Smoke detector
Infrared applied system
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
32/70
32
3.4 OSCILLATOR:
The oscillator are the amplifiers having the gain infinity with which they are capable of
generating the pulse itself without any input source , the function of the oscillator is to
generate the timing pulses of the specified frequency.
The oscillators of crystal type are of vast usage in the field of linear and digital
electronics. Operation of the particular IC in the PCB will be done with the generation of
the pulse of the required frequency. The oscillators are also used in the
microcontrollers, embedded system.
Sine wave oscillators based on the use of feedback amplifiers is also used. It consists
of amplifier with a gain of A and the transfer ratio B. The quantity AB represents the loop
gain of the system. The output signal can be continuously obtained without any input
signal if we satisfy the condition AB=1.
The above is called Barkhausen criterion for oscillators. The above condition can be
satisfied only at one specified frequency for the given component values. But the above
condition is difficult to maintain due to temperature variations, aging of components, and
change of supply voltage.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
33/70
33
CHAPTER 4
POWER CIRCUIT
4.1 POWER SUPPLY:
The power supplies are designed to convert high voltage AC mains electricity to a
suitable low voltage supply for electronic circuits and other devices. A power supply can
by broken down into a series of blocks, each of which performs a particular function. A
D.C power supply which maintains the output voltage constant irrespective of A.C mains
fluctuations or load variations is known as RegulatedD.C Power SupplyFor example
a 5V regulated power supply system as shown below.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
34/70
34
4.2 TRANSFORMER:
A transformer is an electrical device which is used to convert electrical power from one
electrical circuit to another without change in frequency.
Transformers convert AC electricity from one voltage to another with little loss of power.
Transformers work only with AC and this is one of the reasons why mains electricity is
AC. Step-up transformers increase in output voltage, step-down transformers decrease
in output voltage. Most power supplies use a step-down transformer to reduce the
dangerously high mains voltage to a safer low voltage. The input coil is called the
primary and the output coil is called the secondary. There is no electrical connection
between the two coils; instead they are linked by an alternating magnetic field created in
the soft-iron core of the transformer. The two lines in the middle of the circuit symbol
represent the core.
Turns ratio = Vp/ VS= Np/NS
Power Out= Power In
VSX IS=VPX IP
Np= number of turns on primary coil
Ip = primary (input) current
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
35/70
35
4.3 RECTIFIER
A circuit which is used to convert A.C to D.C is known as RECTIFIER. The process of
conversion A.C to D.C is called RECTIFICATION.
4.3.1 Types of Rectifier:
4.3.1.1 Half wave Rectifier
4.3.1.2 Full wave Rectifier
1. Centre tap full wave rectifier.
2. Bridge type full bridge rectifier
Comparison of rectifier circuits:
Parameter
Type of Rectifier
Half wave Full wave Bridge
Number of diodes1 2 4
PIV of diodesVm 2Vm Vm
D.C output voltage Vm/ 2Vm/ 2Vm/
Vdc,atno-load
0.318Vm 0.636Vm 0.636Vm
Ripple factor 1.21 0.482 0.482
RippleFrequency F 2f 2f
RectificationEfficiency 0.406 0.812 0.812
TransformerUtilizationFactor(TUF)
0.287 0.693 0.812
RMS voltage Vrms Vm/2 Vm/?2 Vm/?2
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
36/70
36
4.3.2 Full-wave Rectifier:
From the above comparison we came to know that full wave bridge rectifier as more
advantages than the other two rectifiers. So, in our project we bridge are using full wave
rectifier circuit.
Bridge Rectifier: A bridge rectifier makes use of four diodes in a bridge arrangement to
achieve full-wave rectification. This is a widely used configuration, both with individual
diodes wired as shown and with single component bridges where the diode bridge is
wired internally.
A bridge rectifier makes use of four diodes in a bridge arrangement as shown in fig 5.2
to achieve full-wave rectification. This is a widely used configuration, both with individual
diodes wired as shown and with single component bridges where the diode bridge is
wired internally.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
37/70
37
Operation:
During positive half cycle of secondary, the diodes D2 and D3 are in forward biased
while D1 and D4 are in reverse biased as shown in the fig(5.4). The current flow
direction is shown in the fig 5.3 with dotted arrows.
During negative half cycle of secondary voltage, the diodes D1 and D4 are in forward
biased while D2 and D3 are in reverse biased as shown in the fig 5.4. The current flow
direction is shown in the fig 5.4 with dotted arrows.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
38/70
38
4.4 FILTER:
A Filter is a device which removes the A.C component of rectifier output but allows the
D.C component to reach the load.
4.4.1 Capacitor Filter:
We have seen that the ripple content in the rectified output of half wave rectifier
is 121% or that of full-wave or bridge rectifier or bridge rectifier is 48%such high
percentages of ripples is not acceptable for most of the applications. Ripples can be
removed by one of the following methods of filtering.
(a)A capacitor, in parallel to the load, provides an easier by pass for the ripples
voltage though it due to low impedance. At ripple frequency and leave the D.C.toappears the load.
(b)An inductor, in series with the load, prevents the passage of the ripple current (due
to high impedance at ripple frequency) while allowing the D.C (due to low resistance to
D.C)
(c) Various combinations of capacitor and inductor, such as L-section filter section filter,
multiple section filter etc. which make use of both the properties mentioned in (a) and
(b) above. Two cases of capacitor filter, one applied on half wave and another with full
wave rectifier.
Filtering is performed by a large value electrolytic capacitor connected across the DC
supply to act as a reservoir, supplying current to the output when the varying DC
voltage from the rectifier is falling. The capacitor charges quickly near the peak of the
varying DC, and then discharges as it supplies current to the output. Filtering
significantly increases the average DC voltage to almost the peak value (1.4 RMS
value).
To calculate the value of capacitor(C),
C = *?3*f*r*Rl
Where,
f = supply frequency,
r = ripple factor,
Ri resistance = load
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
39/70
39
4.5 REGULATOR AND ITS FEATURES:
Voltage regulator ICs is available with fixed (typically 5, 12 and 15V) or variable output
voltages. The maximum current they can pass also rates them. Negative voltage
regulators are available, mainly for use in dual supplies. Most regulators include some
automatic protection from excessive current ('overload protection') and overheating
('thermal protection'). Many of the fixed voltage regulator ICs has 3 leads and look like
power transistors, such as the 7805 +5V 1A regulator shown on the right. The LM7805
is simple to use. You simply connect the positive lead of your unregulated DC power
supply (anything from 9VDC to 24VDC) to the Input pin, connect the negative lead to
the Common pin and then when you turn on the power, you get a 5 volt supply from the
output pin.
78XX:
The Bay Linear LM78XX is integrated linear positive regulator with three terminals. The
LM78XX offer several fixed output voltages making them useful in wide range of
applications. When used as a zener diode/resistor combination replacement, the
LM78XX usually results in an effective output impedance improvement of two orders of
magnitude, lower quiescent current. The LM78XX is available in the TO-252, TO-220 &
TO-263packages,
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
40/70
40
Features:
Output Current of 1.5A
Output Voltage Tolerance of 5%
Internal thermal overload protection
Internal Short-Circuit Limited
No External Component
Output Voltage 5.0V, 6V, 8V, 9V, 10V, 12V, 15V, 18V, 24V
Offer in plastic TO-252, TO-220 & TO-263
Direct Replacement for LM78XX
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
41/70
41
CHAPTER 5
RELAYS
5.1 INTRODUCTION:
Read out following articles about Relay :
Relayis one of the most important electromechanical devices highly used in industrial
applications specifically in automation. A relay is used for electronic to electrical
interfacing i.e. it is used to switch on or off electrical circuits operating at high AC
voltage using a low DC control voltage. A relay generally has two parts, a coil whichoperates at the rated DC voltage and a mechanically movable switch. The electronic
and electrical circuits are electrically isolated but magnetically connected to each other,
hence any fault on either side does not affects the other side.
Relay shown in the image above consists of five terminals. Two terminals are used to
give the input DC voltage also known as the operating voltage of the relay. Relaysareavailable in different operating voltages like 6V, 12V, 24V etc. The rest of the three
terminals are used to connect the high voltage AC circuit. The terminals are called
Common, Normally Open (NO) and Normally Closed (NC). Relays are available in
various types & categories and in order to identify the correct configuration of the output
terminals, it is best to see the data sheet or manual. You can also identify the terminals
using a multimeter and at times it is printed on the relay itself.
http://www.engineersgarage.com/electronic-components/relayshttp://www.engineersgarage.com/electronic-components/relayshttp://www.engineersgarage.com/electronic-components/relayshttp://www.engineersgarage.com/electronic-components/relayshttp://www.engineersgarage.com/electronic-components/relayshttp://www.engineersgarage.com/electronic-components/relays -
8/13/2019 Security and Controlling Electrical Decices by Mobile
42/70
42
5.2 TYPES OF RELAYS:
5.2.1 Attracted armature type relay:
The schematic arrangement of an attracted armature type relay consists of a laminated
electromagnet M carrying a coil c and a pivoted laminated armature. The armature
is balanced by a counterweigh and carries a pair of a spring at its free end.
Under normal operatin-g conditions, the current through the relay coil C is such that
counter weight holds the armature in the position shown. However, when a short
circuit occurs, the current through relay coil increases sufficiently and the relay
armature is attracted upwards. The contacts on the relay armature bridge a pair of
stationary contacts attached to the relay frame.
This completes the trip which results in the opening of the circuit breaker and
disconnection of the faulty circuit. The minimum current at which the relay armature
is attracted to close the trip circuit is called pick up current. It is a usual practice to
provide a number of tappings,on the relay coil so that the number of turns in use andthe setting value can be varied.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
43/70
43
5.2.3 Induction type relay:
The induction relays operate based on the electromagnetic principle. therefore , these
relays can be used only on A.C circuits and not on D.C circuits. Depending upon thetype of rotor being used ,these relays are categorized as (a) induction disc type and(b)
induction cup type of relays. In disc type of relays disc is moving element on which
moving contact of relay is fixed where as in case of induction cup the contact is fixed
with the cup. there are two structures available under the induction disc type of relay(1)
shaded pole (2) watt hour meter structures respectively.
In shaded pole type structure the disc is placed between the shaded and un shaded
poles of the relay. The relay consists of an operating coil which is fed by the current
proportional to the system current. The air gap flux produced by this flux is split into two
out of phase components by a shading ring made of copper that encircles the part of the
pole phase of each pole at the air gap. The disc is normally made of aluminium so as to
have low inertia and, therefore, requires less deflecting torque for its motion. Unless the
contacts of the other relay are closed, the shading coil remains open and hence no
torque can be developed.
5.3 MERITS AND DEMERITS:
Merits of relays:
Relays can switch AC and DC, transistors can only switch DC.
Relays can switch high voltages, transistors cannot.
Relays are a better choice for switching large currents (> 5A).
Relays can switch many contacts at once. Relays are used in long power transmission lines
\
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
44/70
44
Demerits of relays:
Relays are bulkier than transistors for switching small currents.
Relays cannot switch rapidly (except reed relays), transistors can switch many times
per second.
Relays use more power due to the current flowing through their coil.
Relays require more current than many chips can provide, so a low power transistor
may be needed to switch the current for the relays.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
45/70
45
CHAPTER 6Microcontroller
6.1 INTRODUCTION
A microcontroller is a computer with most of the necessary support chips onboard. All
computers have several things in common, namely:
A central processing unit (CPU) that executes programs. Some random-access memory (RAM) where it can store data that is variable.
Some read only memory (ROM) where programs to be executed can be stored.
Input and output (I/O) devices that enable communication to be establishedWith the outside world i.e. connection to devices such as keyboard, mouse,monitors and other peripherals.
There are a number of other common characteristics that define microcontrollers If acomputer matches a majority of these characteristics, then it can be classified as amicrocontroller. Microcontrollers may be:
Embedded inside some other device (often a consumer product) so that they
can control the features or actions of the product. Another name for a
microcontroller is therefore an embedded controller.
Dedicated to one task and run one specific program. The program is stored in
ROM and generally does not change.
A low-power device. A battery-operated microcontroller might consume as little
as 50 milliwatts.
A microcontroller may take an input from the device it is controlling and controls thedevice by sending signals to different components in the device.A microcontroller is
often small and low cost. The components may be chosento minimise size and to be asinexpensive as possible.
The actual processor used to implement a microcontroller can vary widely. Inmanyproducts, such as microwave ovens, the demand on the CPU is fairly low and price isan important consideration. In these cases, manufacturers turn to dedicatedmicrocontroller chipsdevices that were originally designed to below-cost, small, low-
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
46/70
46
power, embedded CPUs. The Motorola 6811 and Intel8051 are both good examples ofsuch chips.
A typical low-end microcontroller chip might have 1000 bytes of ROM and20 bytes of
RAM on the chip, along with eight I/O pins. In large quantities, thecost of these chipscan sometimes be just a few pence.
6.2 8051 Microcontroller
The Intel 8051 microcontroller is one of the most popular general purpose
microcontrollers in use today. The success of the Intel 8051 spawned a number of
clones which are collectively referred to as the MCS-51 family of microcontrollers, whichincludes chips from vendors such as Atmel, Philips, Infineon, and Texas Instruments.
About the 8051:
The Intel 8051 is an 8-bit microcontroller which means that most available operations
are limited to 8 bits. There are 3 basic "sizes" of the 8051: Short, Standard, and
Extended. The Short and Standard chips are often available in DIP (dual in-line
package) form, but the Extended 8051 models often have a different form factor, andare not "drop-in compatible". All these things are called 8051 because they can all be
programmed using 8051 assembly language, and they all share certain features
(although the different models all have their own special features).
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
47/70
47
Some of the features that have made the 8051 popular are:
4 KB on chip program memory. 128 bytes on chip data memory(RAM). 4 reg banks. 128 user defined software flags. 8-bit data bus 16-bit address bus 32 general purpose registers each of 8 bits 16 bit timers (usually 2, but may have more, or less). 3 internal and 2 external interrupts. Bit as well as byte addressable RAM area of 16 bytes. Four 8-bit ports, (short models have two 8-bit ports). 16-bit program counter and data pointer. Microsecond instruction cycle with 12 MHz Crystal.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
48/70
48
CHATER 7
CELL PHONE BASED DEVICE CONTROL
7.1 INTRODUCTION
The rapid development of the modern technologies in electric field results in the
innovation of the earlier instruments and devices as well as the control methods and the
inventions too. The cell phone based device control is one of the control method
implemented for the control of a device from the remote place the main advantage of
this is prevent the utilization of power under the absence of the consumer in the home,
office. Especially for the farmer who will be a larger consumer of power in a day as well
as night for the water pumps, lightening and for the protection of field. After the use of
the pumps at night times with the CBDC he can switch on/off the pump from his home
itself.
The user can easily operate the turn ON and turn OFF a particular device, because ofthe voice recording/play back device in the CBDC gives the voice acknowledgement to
the user regarding the status of that particular device . the main merit and demerit of
CBCD . when it is installed in home , the installation need two handsets among them
one will be connected to the circuit permanently and the other one is the users, the
circuit provides the facility to control the user and their family member and friends , and
the demerit is that by knowing the service number of the handset installed at the circuit
others can control the devices. The CBCD will be a one of the optimal way to save
power.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
49/70
49
7.2 CIRCUIT DESCRIPTION:
Cell phone base device control with voice acknowledgement .It comprises
microcontrollerAT89C51, DTMF decoderMT8870, voice recording/play back device
APR9600 and a few discrete components. Microcontroller AT89C51 is at the heart of
the circuit. It is a low-power ,high-performance, 8-bit microcontroller with 4 kB of flash
programmable and erasable read-only memory(PEROM) used as on-chip program
memory, 128 bytes of RAM used as internal data memory, 32 individually
programmable input/output (I/O)lines divided into four 8-bit ports, two16-bit
programmable timers/counters ,a five-vector two-level interrupt architecture ,on-chip
oscillator and clock circuitry .A 11.0592MHz crystal (XTAL1) is used to provide basic
clock frequency for the microcontroller. Capacitor C3and resistor R3 forms the power-on
reset circuit, while push-to-on switchS20 is used for manual reset. Port pins P1.0through P1.7 of the microcontroller are configured to get the input from push-to-on
switches S1through S8. Pins of Port P1 are pulled high via resistor network RNW1. Port
pins P2.0 through P2.4 are configured to receive the decoded DTMF signal from DTMF
receiver MT8870. The functions of the corresponding switches (S1 to S8) and cell
phone keys are shown in Table 7.1.
SWITCHES MOBILE KEYS FUNCTIONSS1 1 SELECT DEVICE 1; ON/OFF
S2 2 SELECT DEVICE 2; ON/OFF
S3 3 SELECT DEVICE 3; ON/OFF
S4 4 SELECT DEVICE 4; ON/OFF
S5 5 SELECT DEVICE 5; ON/OFF
S6 6 SELECT DEVICE 6; ON/OFF
S7 * INFORM STATUS OF DEVICE
S8 # ON/OFF VOICE ALERT
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
50/70
50
The DTMF decoder is used for decoding the mobile signal. It gets DTMF tone from the
mobile headsets speaker pins and decodes it into 4-bit digital signal. The DTMF
decoder is operated with a 3.579MHz crystal (XTAL2). In DTMF receiver MT8870 (IC3),
capacitorC12 is used to filter the noise and resistors R6 and R7 help to amplify the input
signal using the internal amplifier .
Pin 16 of IC3 connected to resistorR5 provides the early steering output .It goes high
immediately when the digital algorithm detects a valid tone pair (signal condition). Any
momentary loss of signal condition causes Est. to return to low state. Pin 17 of IC3
connected to capacitorC11 are bidirectional, acting as steering input/guard time output
(St/GT).
A voltage greater than threshold of the steering logic VTStdetected at St Causes the
device to register the detected tone pair. The guard time output resets the external
steering time constant, and its state is a function of Est. and the voltage at St. Port P3
pins P3.6 and P3.7 of IC1are configured to select the control source for the devices.
These are connected to DIP switches S17 and S18and pulled high via resistors R2 and
R1, respectively. Here, we are using two control sources, switches and mobiles key.
DIP switches S17 and S18select the control sources as shown in Table 7.2.
Pin 2.5 of Port P2 is configured to show the rest status. That is, if none of the controlsources is selected by DIP switches S17 and S18, LED1 glows. Resistor R14 limits the
SWITCH 17 SWITCH 18 CONTROL STATUS
0 0 REST STATUS
0 1 SWITCHES ONLY
1 0 MOBILE ONLY
1 1 SWITCHES AND MOBILE
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
51/70
51
current throughLED1. Voice acknowledgement is provided by the APR9600 (IC2). It is asingle-chip voice recording and play back device that can record and play multiplemessages at random or in sequential mode for 60 seconds. The user can select samplerates with corresponding- quality recording lengths. Microphone amplifier, automaticgain control (AGC) circuits, internal anti -aliasing filter, internal output amplifier and
message management are some of the features of the APR9600.
Here the APR9600 is configured in random-access mode, which supports two, four and
eight messages of fixed durations. The length of each message is the total recording
length available divided by the total number of memory segments/tracks enabled. Audio
processor APR9600 can store up to eight voice messages. Port P0pins and P2.7 are
configured to communicate with IC2. Port P0 pins trigger selection of the message. Port
pin P2.7 is the input signal to identify whether the voice message is playing or not. Pins
P3.0 through P3.5 of Port P3 control the devices with the help of relays RL1 throughRL6 via relay driver IC4.A speaker is connected to IC2 for audio output.
The speaker output drives the mic input of the mobile for audio acknowledgement. An
electrets microphone MIC1 is connected to IC2 to record the voice in IC2. LED2 flashes
to show the busy status of IC2 during recording and playback. The audio messages to
be recorded inAPR9600, by using trigger switchesS9 through S16, are shown in Table
7.3
SWITCHES TRIGGER OF IC FUNCTIONS
S9 1 NAME OF DEVICE 1
S10 2 NAME OF DEVICE 2
S11 3 NAME OF DEVICE 3
S12 4 NAME OF DEVICE 4
S13 5 NAME OF DEVICE 5
S14 6 NAME OF DEVICE 6
S15 7 STATUS "ON"S16 8 STATUS "OFF"
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
52/70
52
SPST switch S19 is closed for recording and switch S19 is opened for play back.
Fig.7.2 shows the power sup- ply circuit. The 230V AC mains is stepped down by
transformer X1 to deliver the secondary output of 9V, 500 mA. The transformer output is
rectified by a full-wave bridge rectifier comprising diodes D1 throughD4, filtered by
capacitor C16 and then regulated by IC 7806 (IC5). CapacitorC15 bypasses the ripples
present in the regulated 6V power supply.LED3 acts as a power-on indicator and
resistor R16 limits the current through LED3.
7.3 VOICE RECORDING AND PLAYBACK:
To record the voice in IC2, follow Table III. Close SPST switch S19 to make pin27 of
IC2 low. Thereafter, press and hold switches S9 through S16 to record correspondingvoice messages. LED2flashes to indicate audio recording .For playback of any device
status, open SPST switch S19 and press the corresponding switch (S9 through
S16).The recorded audio can be heard from the speaker connected to pins 14 and15 of
IC2. Fig. 2 shows the pin configuration of mobile headset.
Pin configuration of mobile headset:
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
53/70
53
7.4 Circuit Diagram of CBDC:
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
54/70
54
After that, the main function checks through Do loop which control source has been
enabled by using DIP switch pins. If you select switch S17, it searches the input from
the mobile only. If you select switch S18, it searches the input from the switches (S1
through S8) only. If you enable both switch S17and switch S18, it searches the inputs
from switches and mobile. Else, the rest-status LED1 glows. Refer to Table 7.2 to select
the control source. The mobile signal is decoded into the DTMF signal by IC3. The
DTMF output for each mobile key (used in this project) pressed is shown in Table 7.4.
After getting the input from the switches or mobile, the program goes to the device
action subroutine and executes the corresponding action (refer Table 7.1).
key StD Q3 Q2 Q1 Q01 H 0 0 0 1
2 H 0 0 1 0
3 H 0 0 1 1
4 H 0 1 0 0
5 H 0 1 0 1
6 H 0 1 1 0
* H 1 0 1 1
# H 1 1 0 0
The device action subroutine changes the status of the device and calls the voice alert
subroutine. The voice alert subroutine checks the device status and device name from
the source input and controls the corresponding pins of IC2. First, it selects the voice
signal for the device name .After playing that, it selects on/off status of corresponding
device as mentioned in Table 7.3. If you press *key followed by the device number on
your mobile handset, it will not change the status of that device and inform the current
device status. If you press device number.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
55/70
55
7.5 PCB LAYOUT:
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
56/70
56
CHATER 8
Software:
The program (Device_Control.BAS) for the microcontroller is written using BASCOM
microcontroller programming software. In the program, first, initialize the ports (P0-P3)
for corresponding controls. Thereafter, declare the variables for the program. After
declaration, assign some initial value to variables. Here, microcontroller ports are
initialized to make all the devices offinitially.
This program cantrun in the Keil software.
Here run this programs use of the Windows 8051 BASIC Compiler.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
57/70
57
To download the Windows 8051 BASIC Compiler from
www.mcselec.com
http://www.mcselec.com/http://www.mcselec.com/http://www.mcselec.com/ -
8/13/2019 Security and Controlling Electrical Decices by Mobile
58/70
58
8.1 Project Code:
DEVICE_CONTROL.BAS
$large
$regfile = "89c51cc.DAT"$crystal = 11059200
' DECLERATION OF FUNCTIONS
Declare Sub KeypadDeclare Sub Device_actionDeclare Sub Voice_alertDeclare Sub Dtmf_input
' INPUT FROM DTMF DECODERDtmf_a Alias P2.4Dtmf_b Alias P2.3Dtmf_c Alias P2.2Dtmf_d Alias P2.1Dtmf_ack Alias P2.0
' INPUT FROM KEYPADKey_1 Alias P1.0Key_2 Alias P1.1Key_3 Alias P1.2Key_4 Alias P1.3Key_5 Alias P1.4Key_6 Alias P1.5Key_a Alias P1.6Key_v Alias P1.7
' OUTPUT TO AUDIO SELECTIONAud_1 Alias P0.0Aud_2 Alias P0.1Aud_3 Alias P0.2Aud_4 Alias P0.3Aud_5 Alias P0.4Aud_6 Alias P0.5Aud_on Alias P0.6Aud_off Alias P0.7
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
59/70
59
'Aud_rewind Alias P2.6
'INPUT FROM APR9600Aud_busy Alias P2.7
'OUTPUT TO DEVICE
Device_1 Alias P3.0Device_2 Alias P3.1Device_3 Alias P3.2Device_4 Alias P3.3Device_5 Alias P3.4Device_6 Alias P3.5
'CONTROLLING MODE SELECTION
Device_a Alias P3.6Device_b Alias P3.7
' DECLARING VARIABLES
Dim Keypad_value As ByteDim Device_1_status As BitDim Device_2_status As BitDim Device_3_status As BitDim Device_4_status As BitDim Device_5_status As BitDim Device_6_status As BitDim Common_status As BitDim Voice As Bit
Dim Status_enable As Bit
'INTIALIZING VALUESKeypad_value = 15
Aud_1 = 1Aud_2 = 1Aud_3 = 1Aud_4 = 1Aud_5 = 1Aud_6 = 1Aud_on = 1Aud_off = 1
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
60/70
60
'Aud_rewind = 0
Device_1_status = 0Device_2_status = 0
Device_3_status = 0Device_4_status = 0Device_5_status = 0Device_6_status = 0
Device_1 = 0Device_2 = 0Device_3 = 0Device_4 = 0Device_5 = 0Device_6 = 0
Voice = 1
Do
If Device_a = 0 And Device_b = 0 Then
P2.5 = 0
Elseif Device_a = 0 And Device_b = 1 ThenP2.5 = 1
Call Keypad
'If Keypad_value < 9 Then
Call Device_action
'End If
Elseif Device_a = 1 And Device_b = 0 ThenP2.5 = 1Call Dtmf_input
'If Keypad_value < 9 Then
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
61/70
61
Call Device_action
'End If
Elseif Device_a = 1 And Device_b = 1 ThenP2.5 = 1
Call KeypadCall Dtmf_input
'If Keypad_value < 9 Then
Call Device_action
' End If
End If
If Status_enable = 1 ThenWhile Keypad_value > 7If Device_b = 1 ThenCall KeypadEnd IfIf Device_a = 1 ThenCall Dtmf_inputEnd If
WendCall Voice_alert
Status_enable = 0End If
Loop
Sub KeypadIf Key_1 = 0 ThenKeypad_value = 1Bitwait Key_1 , Set
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
62/70
62
Elseif Key_2 = 0 ThenKeypad_value = 2Bitwait Key_2 , Set
Elseif Key_3 = 0 ThenKeypad_value = 3Bitwait Key_3 , Set
Elseif Key_4 = 0 ThenKeypad_value = 4Bitwait Key_4 , Set
Elseif Key_5 = 0 ThenKeypad_value = 5Bitwait Key_5 , Set
Elseif Key_6 = 0 ThenKeypad_value = 6Bitwait Key_6 , Set
Elseif Key_a = 0 ThenKeypad_value = 7Bitwait Key_a , Set
Elseif Key_v = 0 ThenKeypad_value = 8Bitwait Key_v , Set
ElseKeypad_value = 15
End If
End Sub
Sub Device_action
If Keypad_value = 1 Then
Device_1_status = Not Device_1_status
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
63/70
63
Device_1 = Device_1_statusCall Voice_alert
Elseif Keypad_value = 2 Then
Device_2_status = Not Device_2_statusDevice_2 = Device_2_statusCall Voice_alert
Elseif Keypad_value = 3 Then
Device_3_status = Not Device_3_status
Device_3 = Device_3_statusCall Voice_alert
Elseif Keypad_value = 4 Then
Device_4_status = Not Device_4_statusDevice_4 = Device_4_statusCall Voice_alert
Elseif Keypad_value = 5 Then
Device_5_status = Not Device_5_statusDevice_5 = Device_5_statusCall Voice_alert
Elseif Keypad_value = 6 Then
Device_6_status = Not Device_6_statusDevice_6 = Device_6_statusCall Voice_alert
Elseif Keypad_value = 7 Then
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
64/70
64
Keypad_value = 15
Status_enable = 1
Elseif Keypad_value = 8 ThenIf Voice = 1 ThenVoice = 0Elseif Voice = 0 ThenVoice = 1End If
End If
Keypad_value = 15
End Sub
Sub Dtmf_input
If Dtmf_ack = 1 ThenBitwait Dtmf_ack , Reset
If Dtmf_d = 0 And Dtmf_c = 0 And Dtmf_b = 0 And Dtmf_a = 1 Then
Keypad_value = 1
Elseif Dtmf_d = 0 And Dtmf_c = 0 And Dtmf_b = 1 And Dtmf_a = 0 Then
Keypad_value = 2
Elseif Dtmf_d = 0 And Dtmf_c = 0 And Dtmf_b = 1 And Dtmf_a = 1 Then
Keypad_value = 3
Elseif Dtmf_d = 0 And Dtmf_c = 1 And Dtmf_b = 0 And Dtmf_a = 0 Then
Keypad_value = 4
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
65/70
65
Elseif Dtmf_d = 0 And Dtmf_c = 1 And Dtmf_b = 0 And Dtmf_a = 1 Then
Keypad_value = 5
Elseif Dtmf_d = 0 And Dtmf_c = 1 And Dtmf_b = 1 And Dtmf_a = 0 Then
Keypad_value = 6
Elseif Dtmf_d = 1 And Dtmf_c = 0 And Dtmf_b = 1 And Dtmf_a = 1 Then
Keypad_value = 7
Elseif Dtmf_d = 1 And Dtmf_c = 1 And Dtmf_b = 0 And Dtmf_a = 0 Then
Keypad_value = 8
Else
Keypad_value = 15
End If
End If
End Sub
Sub Voice_alertIf Voice = 1 And Keypad_value < 7 Then
If Keypad_value = 1 Then
Common_status = Device_1_status
Aud_1 = 0Wait 1
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
66/70
66
Aud_1 = 1
Elseif Keypad_value = 2 Then
Common_status = Device_2_status
Aud_2 = 0Wait 1Aud_2 = 1
Elseif Keypad_value = 3 Then
Common_status = Device_3_statusAud_3 = 0Wait 1Aud_3 = 1
Elseif Keypad_value = 4 Then
Common_status = Device_4_statusAud_4 = 0Wait 1Aud_4 = 1
Elseif Keypad_value = 5 Then
Common_status = Device_5_statusAud_5 = 0Wait 1Aud_5 = 1
Elseif Keypad_value = 6 Then
Common_status = Device_6_statusAud_6 = 0Wait 1Aud_6 = 1
End If
'Bitwait Aud_busy , SetWait 5
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
67/70
67
If Common_status = 1 Then
Aud_off = 0Wait 1
Aud_off = 1
Elseif Common_status = 0 Then
Aud_on = 0Wait 1Aud_on = 1
End If
Bitwait Aud_busy , Set
End If
End Sub
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
68/70
68
CHATER 9
CONCLUSION:
The projectDevelopment of Cell-phone Based Device Control with
VoiceAcknowledgement"an effective switching system for controlling home and
office appliances.has been successfully designed and tested.
It has been developed by integrating features of all the hardware components used.
Presence of every module has been reasoned out and placed carefully thus contributing
to the best working of the unit.
Secondly, using highly advanced ICs and with the help of growing technology theproject has been successfully implemented.
Finally we conclude that CELL-PHONE BASED WIRELESS HOME APPLIANCES
MONITORING AND CONTROL is an emerging field and there is a huge scope for
research and development.
FUTURE SCOPE:
In this project we are monitoring and controlling the home appliances from remote
places by using the mobile technology. This project can be further enhanced to the
High voltage A.C Applications by changing the ratings of the Relay. By this we can
control and monitoring the high speed induction motors as well as synchronous motors.
This can be done in an economical way.
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
69/70
69
ABBREVATIONS:
IC Integrated CircuitsRAM Random access memory
ROM Read only memory
EPROM Erasable programmable read only memory
ADC Analog to digital converter
DAC Digital to analog converter
CPU Central processing unit
LSB Least significant bit
MSB Most significant bit
DIP Dual-in-line package
ALE Address latch enable
MOS Metal oxide semi-conductor
BJT Bipolar junction transistor
FET Field effect transistor
AGC Automatic gain control
DTMF Dual tone medium frequency
CMOS Complementary metal oxide semi-conductor
GND GroundBE Byte enable
LED Light emitting diode
PCB Printed circuit board
PIV Peak inverse voltage
TUF Transformer utilization factor
NO Normally close
NC Normally open
COM Common
SPDT Single pole Double through
DPDT Double pole Double through
-
8/13/2019 Security and Controlling Electrical Decices by Mobile
70/70
70