Microcontroller based mobile
control
Of electronics appliances
Submitted in partial
fulfillment award of
requirement for the degree in
bachelors of
engineering(electronics &
electrical) from kiit college
of engg. Under the guidance of
mr. Anurag sharma.
Submitted by:
Pankaj yadav(1431)
Suman yadav(1450)
Vipul avasthi(1460)
Mohammad jalaludin(1421)
Reena yadav(1441)
Microcontroller based mobile
control
Of electronics appliances
(or)
Smart home automation system
Home automation refers to the
automatic control of things
around the home. From this
project we can control any
electrical appliance through
mobile or landline from any
part of the country. In this
one base unit is connected to
the basic landline or with the
mobile phone in parallel with
the landline phone,in the case
of landline but in the case of
mobile phone we use hand free
option logic.
When we want to control any
appliance through outer phone
then first we dial the home
number,bell is ok ringing and
after few bell phone is
automatic on and switch on the
base unit to operate.
Now we press the 8-digit
excess code,one by one if the
excess is ok then unit give an
ack in the form of tone pulse
and switch on the base unit.
Now again we press the switch
on/off code to on/off any
electrical appliances. With
the help of this code unit is
on and base unit give a
acknowledge pulse for on and
off separately.
Ac register signaling is used
in dtmf telephones, here tones
rather than make/break pulse
are used for dialing, and each
dialed digit is uniquely
represented by a pair of sine
waves tones. These tones (one
from low group for row and
another from high group for
column) are sent to the
exchange when a digit is
dialed by pushing the key,
these tone lies within the
speech band of 300 to 3400 hz,
and are chosen so as to
minimize the possibility of
any valid frequency pair
existing in normal speech
simultaneously.
Actually, this minimisator is
made possible by forming pairs
with one tone from the higher
group and the other from the
lower of frequencies. A valid
dtmf signal is the sum of two
tones, one from a lower group
(697-940 hz) and the other
from a higher group (1209-1663
hz). Each group contains four
individual tones. This scheme
allows 10 unique combinations.
Ten of these codes represent
digits 1 through 9 and 0.
Tones in dtmf dialing are so
chose that none of the tones
is harmonic of are other tone.
Therefore is no change of
distortion caused by
harmonics. Each tone is sent
as along as the key remains
pressed. The dtmf signal
contains only one component
from each of the high and low
group. This significaly
simplifies decoding because
the composite dtmf signal may
be separated with band pass
filters into single frequency
components, each of which may
be handled individually.
Circuit diagram
Cont.
List of components
• dtmf decoder (ic mt 8870)
• bcd to decimal decoder (ic
74154)
• decade counter (ic 4017)
• microcontroller (ic
89c51)
• flash memory (ic 2402 )
• regulator (ic 7805)
• transistors (bc 548)
• diode (in4148)
• crystal oscillator
• optocoupler (moc3021)
• triac (bt136)
• led
• capacitor
• step down transformer
• hands free
Working
In this project our first part
is dtmf decoder. Dtmf ic
receives the dtmf pulse and
then converted into binary
coded decimal. Pin no 18 of
the ic is connected to
positive supply. In this
circuit we use 5 volt
regulated power supply for the
smooth working.
Dtmf signal is applied to the
pin no 2 and 3 of the ic
through resistor and capacitor
network. Capacitor 0. 1
microfarad work as a dc
blocking capacitor. Pin no 5,
6, 9 is connected to the
ground pin. Pin no. 7 and 8 is
connected to the 3. 57945 mhz
crystal. Pin no 16 and 17 is
connected to rc network work
as a auto reset, when we
switch on the power supply.
Bcd output is available on the
pin no 11,12,13,1,4, and this
output is connected to the
microcontroler 89c51
Our next part of the circuit
is ic 89c51. 89c51 is 40 pin
ic. Pin no 40 of the ic is
connected to the positive
supply. Pin no 9 is rest pin.
One capacitor and resistor
network is connected to pin no
9. This microcontroller has a
total of four input output
ports each 8 bit wide.
We use port 2 as a bcd input.
Output from the 8870 is
connected to the p2 – 4
pins.
8870 port2 ic
pin
Pin 11 p2. 0 21
Pin 12 p2. 1 22
Pin 13 p2. 2 23
Pin 14 p2. 3 24
Output is available on the
port1 and port 3; here we use
only 10 output from the
microcontroller. All the
output is available on the
port p1
P0. 0 pin no 39
P0. 1 pin no 38
P0. 2 pin no 37
P0. 3 pin no 36
P0. 4 pin no 35
P0. 5 pin no 34
P0. 6 pin no 33
P0. 7 pin no 32
P3. 0 pin no 10
P3. 1 pin no 11
All the output led is
connected to this output. Note
that 0 logic is available on
these pin , so cathode of the
led is connected to this pin.
Another pins of the port 3 is
also connected for another
useful uses.
P3. 3 acknowledge of code
lock
P3. 4 time indication of the
code lock
P3. 5 led indication of
sound output for on/off
signal
P3. 2 output frequency for
opto-coupler input.
Led output of the
microcontroller is further
connected to the triac circuit
through opto-coupler circuit.
Output from the
microcontroller is firstly
connected to the optocoupler
pin no 1. This optocoupler is
a special optocoupler. The
moc3121 is optically isolated
triac driver devices. These
devices contain a infra red
emitting diode and a light
activated silicon bilateral
switch. They are specially
designed for interfacing
between electronics controls
and power triaces to control
resistive and inductive loads
for 240 volt ac operation.
Pin no 1 is anode pin of infra
red transmitter
Pin no2 is cathode pin of
infra red transmitter
Pin no 4 and 6 is the output
pin
Pin no 6 is output pin and
connected to the gate of the
triac through 100 ohm
resistor.
At the output of the triac we
control any 220 load. In this
project its our choice, how
many optocoupler we interface
this circuit. If we use 10
opto coupler then we interface
10 load output with this
circuit.
Now when ic receive any pulse
then output led is on and then
load is on. Again we press the
same code then led is off and
load is also off.
Working of this
microcontroller is depending
on the combination lock. When
combination lock gives an
output on port3. 3 then only
ic sense the signal.
Complete circuit is divided
into following parts:
dtmf decoder
microcontroller
automatic control of
circuit through outer phone
Dtmf decoder
Dtmf decoder is a very easy to
use program to decode dtmf
dial tones found on telephone
lines with touch tone phones.
Dtmf decoder is also used for
receiving data transmissions
over the air in amateur radio
frequency bands. The following
are the frequencies used for
the dtmf (dual-tone,
multi-frequency) system, which
is also referred to as tone
dialing. The signal is encoded
as a pair of sinusoidal (sine
wave) tones from the table
below which are mixed with
each other. Dtmf is used by
most pstn (public switched
telephone networks) systems
for number dialing, and is
also used for voice-response
systems such as telephone
banking and sometimes over
private radio networks to
provide signaling and
transferring of small amounts
of data.
In dtmf decoder circuit we use
ic 8870 ic. Ic 8870 is a dtmf
decoder ic. Ic 8870 converts
the dual tones to
corresponding binary outputs.
Ac register signaling is used
in dtmf telephones, here tones
rather than make/break pulse
are used for dialing, and each
dialed digit is uniquely
represented by a pair of sine
waves tones. These tones (one
from low group for row and
another from high group fro
column) are sent to the
exchange when a digit is
dialed by pushing the key,
these tone lies within the
speech band of 300 to 3400 hz,
and are chosen so as to
minimize the possibility of
any valid frequency pair
existing in normal speech
simultaneously. Actually, this
minimisator is made possible
by forming pairs with one tone
from the higher group and the
other from the lower of
frequencies. A valid dtmf
signal is the sum of two
tones, one from a lower group
(697-940 hz) and the other
from a higher group (1209-1663
hz). Each group contains four
individual tones. This scheme
allows 10 unique combinations.
Ten of these codes represent
digits 1 through 9 and 0.
Tones in dtmf dialing are so
chose that none of the tones
is harmonic of are other tone.
Therefore is no change of
distortion caused by
harmonics. Each tone is sent
as along as the key remains
pressed. The dtmf signal
contains only one component
from each of the high and low
group. This significaly
simplifies decoding because
the composite dtmf signal may
be separated with band pass
filters into single frequency
components, each of which may
be handled individually.
Microcontrollers
A microcontroller is a
computer-on-a-chip. It
integrates the features like
read-write memory for data
storage,read only memory such
as flash for code
storage,eprom for permanent
data storge,peripheral devices
and input/output devices. By
reducing the size,cost and
power consumption compared to
separate designed
microprocessor,memory,input/ou
tput deveices ,
microcontrollers made it
economical to electronically
control of many more process.
Here 8051 microcontrollers are
used and some basic features
of the 8051 are following :
1) 8-bit cpu. (consisting of
the ‘a’ and ‘b’
registers)
Most of the transactions
within the microcontroller are
carried out through the
‘a’ register, also known
as the accumulator. In
addition all arithmetic
functions are carried out
generally in the ‘a’
register. There is another
register known as the ‘b’
register, which is used
exclusively for multiplication
and division.
2) 4k on-chip rom
The instructions written for
the microcontroller,are put on
this memory.
To make these instructions
safe, and not get deleted or
changed during execution. We
load these instructions into
rom. The size program to be
written is bound to vary
depending on the application,
and the number of lines. So
the space can be extended by
connecting to 64k of external
rom if required.
3) 128 bytes on-chip ram
This is the space provided for
executing the program in terms
of moving data, storing data
etc.
4) 32 i/o lines. (four- 8 bit
ports, labeled p0, p1, p2,
p3)
Each port has 8 bits. There
are a total of four ports
named p0, p1, p2, p3, giving a
total of 32 lines. These lines
can be used both as input or
output.
5) two 16 bit timers /
counters
A microcontroller normally
executes one instruction at a
time. However certain
applications would require
that some event has to be
tracked independent of the
main program.
The manufacturers have
provided a solution, by
providing two timers. These
timers execute in the
background independent of the
main program. Once the
required time has been
reached, they can trigger a
branch in the main program.
These timers can also be used
as counters, so that they can
count the number of events,
and on reaching the required
count, can cause a branch in
the main program.
6) full duplex serial data
receiver / transmitter
The 8051 microcontroller is
capable of communicating with
external devices like the pc
etc. Here data is sent in the
form of bytes, at predefined
speeds, also known as baud
rates.
The transmission is serial, in
the sense, one bit at a time
7) 5- interrupt sources with
two priority levels (two
external and three internal)
Interrupts can be set to
either the timers, or to some
external events. Whenever the
background program has reached
the required criteria in terms
of time or count or an
external event, the branch is
taken, and on completion of
the branch, the control
returns to the main program.
Priority levels indicate which
interrupt is more important,
and needs to be executed first
in case two interrupts occur
at the same time.
8) on-chip clock oscillator.
This represents the oscillator
circuits within the
microcontroller. Thus the
hardware is reduced to just
simply connecting an external
crystal, to achieve the
required pulsing rate.
Automatic control of circuit
through outer phone
Electronics combination
lock:-
In this section we use two ic
one is ic 74154 and second is
ic 4017. Both ic generate a
combination sequence by which
we enable the microcontroller.
When we want to switch on the
base unit by outer phone then
phone is automatic on after
few bells, this is achieve by
another circuit. But after few
bells when phone is on and
unit require a code of 9
numbers. When we press proper
codes then only micrcontroller
allow us to switch on the
circuit.
First ic of this section is ic
74154. Ic 74154 is bcd to
decimal decoder. 74154 is
active low ic. Pin no
20,21,22,23 is connected to
dtmf decoder ic. Pin no 18 and
19 of this ic is connected to
the collector of one npn
transistor base of the npn
transistor is connected to the
pin no 15 of the ic 8870. When
dtmf decoders decode the
signal at that time pin no 15
is on for a time and
acknowledge the signal. This
signal is fed to the base of
npn transistor through 1 kohm
resistor. When this signal is
coming then 74154 is on and
gives an output.
If we press the proper code in
steps then at every digit of
code 74154 is on and gives the
corresponding output as per
the digit. Output of the ic
74154 is connected to the pnp
transistor base point through
10 k ohm resistor. Emitter of
the all pnp transistor is
connected output of the decade
counter circuit. Here we use
ic 4017 as a decade counter
circuit. Pin no 16 is the
positive supply pin and pin no
8 is the negative pin. Pin no
14 of the ic is clock input of
the ic. On starting mode when
is in on reset mode then its
start from the zero point. O
means first output is
available on the pin no 3. Its
means pin no 3 is positive in
first output. Now ic 4017
receive a clock pulse on pin
no 14 then counter shifts its
output from pin no 3 to nest
output not 1 , pin no 2.
As we press the proper code
then ic 74154 gives an output
and this output is available
on the output pin, with the
help of this output pnp
transistor is on and positive
output is available on the
collector point of the pnp
transistor. All the pnp
transistor collector point is
connected together is and
reconnected to the clock input
of the ic 4017 through rc
network to another npn
transistor. By this npn
transistor we give a clock
pulse to the pin no 14 of the
ic 4017. As the counter move
after incoming clock pulse
then last output is available
on the pin no 9. As the last
output is available on the pin
no 9. After getting a voltage
on the pin no 9 we switch on
the next pair of npn
transistor. Output of first
npn transistor is on collector
is connected to the port p3. 4
to give a acknowledge signal
that code lock is loaded
successfully. Output of this
npn transistor is again
connected to the connected to
the base of next npn
transistor. Collector of this
npn transistor disables the
pin no 18 of the ic to receive
any further code input of the
signal
Auto swith on phone form
incoming call:-
In this project if we use
mobile phone as a receiver
then we use handfree kit.
After using a hand free kit we
assign our phone to an auto
action mode. In auto action
mode we assign our phone to on
itself after some time. In
every phone there is an option
of auto answer mode after few
bells.
Our next circuit is automatic
switch on this circuit on the
incoming call.
In the case of landline phone
we use auto hook up circuit to
switch on the base unit
automatically. For this
circuit we use one opto
coupler circuit + one timer
circuit + one counter circuit.
Signal from telephone lines is
connected to the opto coupler
pin no1. Pin no 2 is ground
pin. Pin no 3 is also ground
pin. Pin no 4 is the output
pin no of this opt coupler.
When incoming call connected
to opto coupler the opto
coupler is on and output pulse
is connected to the pin no 2
of the monostable timer
circuit. Pin no 4 and 8 is
connected to the positive
supply and pin no 1 is
connected to the negative
supply. Pin no 3 is output pin
and this pin is connected to
the next ic. Next ic is
counter circuit. In counter
circuit we use ic 4017. Pin no
16 is connected to the
positive supply. Pin no 8 is
connected to the negative
supply. Pin no 13 and 7 is an
output pin and connected to
the relay through nun
transistor.
When call in coming then due
to short pulse from the bell
opt coupler is on/off for the
frequency of the bell. But
when output is connected to ic
555 then ic 555 is switch on
for a time period. And for
every pulse timer is on for a
second and output from timer
is connected to counter
circuit. We use forth output
of the counter so that after
receiving forth pulse counter
is on and switch on the relay
circuit and connect the main
circuit to the telephone
instrument.
Main part of this project is
program code.
Programming detail of the
mobile control mobile control
Program is to be wriiten in
the assemblly language in the
8051 assembler. Assembler
assemble the software and then
this software is further
converted into the hex code
with the help ofassembler
itself.
In this program we receive the
data from the dtmf decoder ic
and then this bcd input is
processed by the
microcontroller.
Applications:
Security system & access
control,home theater &
entertainment,lighting,phone
systems,thermostats,networking
,irrigation etc.
Future scope
the main advantage of this
circuit is its unlimited
range, as connection is
established using mobile
phones which have dtmf tones
are attached.
also operation is not
based on infrared transmission
due to which positioning and
adjustments are not required
at all.
thus working is easy &
only appliance’s connection
to kit and kit’s to mobile
is to be done just plug ‘n
play. ’
flexibility is provided in
a way that one can connect
less number of appliances in
starting for testing & later
on expand the circuitry as per
requirement.
using the teleremote
switch or mobile phone one can
control switching up to 10
appliances. More than 10
appliances can be controlled
by inserting a multiplexer.
just by using dial keypad
of mobile phone from where we
are calling, we can perform
on/off operation of the
appliances. These appliances
have to be connected to phone
line through the kit, at the
called side.
the ranges of appliances
that are controlled depend
upon the person’s usage.
Room heater, water heater,
music system or any other
electrical / electronic
appliance switching can be
controlled once they are
connected to kit.
energy & electricity are
saved using this kit.
by using this project kit,
one can save money, time as
well as enhance convenience,
safety & fun.
conclusion
we have all gotten used to
controlling our tv from couch,
just wait until we are able to
dim lights as well. Imagine
adjusting the temperature from
our bed or controlling the
volume of our whole house
audio system from any room. Or
can you imagine the wall
heater in our bathroom coming
on automatically 5 minutes
before our alarm clock goes
off so that it is warm when we
enter.
we all are used to opening
the garage door from the car,
but you will be surprised how
mush safer you will feel
coming home to a lit home and
even turning on more lights
from our mobile phone upon our
arrival. With a couple of
basic products, we can have
our whole house light up when
there is motion detected at
any corner of our house.
high technology products
for the home are fun to use &
share with others, whether
viewing visitors at our front
door on our tv or tuning our
stereo by using voice
recognition. And when it comes
to impressing the friends,
you’ll be happy to show off
your new found applications.
with the broad selection
of home automation products
offered one can control just
about anything one wishes at
home.
Key technologies Used in this project: assembly language programming,microcontroller & GSM technique