Anda di halaman 1dari 39

WIRELESSLY CONTROLLED HOME

APPLIANCES VIA MOBILE

By :
PRAKHAR RASTOGI
ECE-II(5TH SEM)
14815002811

EMBEDDED SYSTEMS

An embedded system is a system that


has software embedded into hardware,
which makes a system dedicated for an
application(s) or specific part of an
application or product or part of a larger
system. It processes a fixed set of preprogrammed instructions to control
electromechanical equipment which may
be part of an even larger system.
Continued..

BLOCK DIAGRAM OF A TYPICAL


EMBEDDED SYSTEM

OBJECTIVE

My objective of this project is to control all


the appliances of the room wirelessly
through my mobile phone.

TECHNOLOGIES USED
DTMF (Dual Tone Multiple Frequency)
RF (Radio Frequency)

Components used
ATMEGA16 Microcontroller
RF module
DTMF module
Relay module
Usbasp
Resistors (integrated on modules)
Capacitors (integrated on modules)
Connecting wires
Power supply

Software used
FOR PROGRAMMING
Avr studio 4
FOR DESIGN AND TESTING
Proteus 7.10
DTMF encoder

ATMEGA16 Microcontroller

ATmega16 is an 8-bit high performance


microcontroller of Atmels Mega AVR family
with low power consumption. Atmega16 is
based on enhanced RISC (Reduced
Instruction Set Computing) architecture with
131 powerful instructions. Most of the
instructions execute in one machine cycle.
Atmega16 can work on a maximum
frequency of 16MHz.
Continued..

ATmega16 has 16 KB programmable


flash memory, static RAM of 1 KB and
EEPROM of 512 Bytes. ATmega16 is a
40 pin microcontroller. There are 32 I/O
(input/output) lines which are divided into
four 8-bit ports designated as PORTA,
PORTB, PORTC and PORTD
ATmega16 has various in-built
peripherals like USART, ADC, Analog
Comparator, SPI, JTAG etc. Each I/O pin
has an alternative task related to in-built
peripherals.

PIN DIAGRAM

ATMEGA16 Development
Board

RF (Radio Frequency)

An RF module (radio frequency module) is


a (usually) small electronic circuit used to
transmit and/or receive radio signals on one
of a number of carrier frequencies, as the
name suggests, operates at Radio
Frequency. The corresponding frequency
range varies between 30 kHz & 300 GHz.
In this RF system, the digital data is
represented as variations in the amplitude
of carrier wave. This kind of modulation is
known as Amplitude Shift Keying (ASK).
Continued..

This RF module comprises of an RF


Transmitter and an RF Receiver. The
transmitter/receiver (Tx/Rx) pair
operates at a frequency of 434 MHz An
RF transmitter receives serial data and
transmits it wirelessly through RF
through its antenna connected at pin4.
The transmission occurs at the rate of
1Kbps - 10Kbps.The transmitted data is
received by an RF receiver operating at
the same frequency as that of the
transmitter.
Continued..

A set of encoder & decoder IC HT12E &


HT12D is used for encoding/decoding of
data.
HT12E is used for encoding the parallel
data to serial at the transmitter module.
HT12D is used for decoding back the
serial data to parallel.

Pin diagram

PIN DESCRIPTION

RF TRANSMITTER MODULE

RF RECEIVER MODULE

DTMF

DTMF stands for Dual Tone Multiple


Frequency. It is system which consists of
two frequencies superimposed. Individual
frequencies are chosen such that it is easy
to design filters and easy to transmit the
tones through a telephone line having
bandwidth of approximately 3.5 kHz. DTMF
was not intended to be used for data
transfer. It was meant to be used for sending
the control signals along the telephone line.
Continued..

Generating DTMF
DTMF signals can be generated
through dedicated ICs or by using RC
networks connected to a
microprocessor. MT8880 is an example
of a dedicated IC.
In this project I am using mobile phone
for DTMF generation.

Table of input and corresponding


4-bit output
KEY

F1(Hz)

F2(Hz)

Q1

Q2

Q3

Q4

1209

697

1336

697

1477

697

1209

770

1336

770

1477

770

1209

852

KEY

F1(Hz)

F2(Hz)

Q1

Q2

Q3

Q4

1336

852

1477

852

1336

941

1209

941

1477

941

1633

697

1633

770

1633

852

1633

941

Decoding DTMF

Detecting DTMF with satisfactory


precision is a hard thing. Often, a
dedicated IC such as MT8870 is used for
this purpose. It uses two 6th order bandpass filters using switched capacitors
filters and it suppresses any harmonics.
Hence they can produce pretty good
sine waves from distorted input. Hence it
is preferred.

Pin diagram IC- MT8870

DTMF module

RELAY

a relay is a simple electromechanical


switch made up of an electromagnet and
a set of contacts. Relays are found
hidden in all sorts of devices. In fact,
some of the first computers even build
used relays to implement Boolean
gates.
Continued..

There are four parts in every relay:


Electromagnet
Armature that can be attracted by the
electromagnet
Spring
Set of electrical contacts

RELAY INTERNAL
STRUCTURE

Working of relay

In this figure, you can see that a relay


consists of two separate and completely
independent circuits. (1-3 & 2-4) the first is
at the bottom and drives the coil. In this
circuit, a switch is controlling power to the
electromagnet (2-4). When the switch is on,
the electromagnet is on, and it attracts the
armature. The armature completes the
second circuit and the light is on. When the
electromagnet is not energized, the spring
pulls the armature away and the circuit is not
complete. In that case, the light is dark.

RELAY MODULE

Block diagram
Block 1:
-DTMF signal generated
by mobile
-passed to DTMF module
- 4-bit code sent to
controller

Block 4:
-corresponding relay
activate
-corresponding appliance
is on

Block 2:
-Code processed by
microcontroller
-Generate code for
activating relay
-code sent to transmitter

Block 3:
-code encoded by IC
HT12E
-transmitted wirelessly
-code decoded by IC
HT12D
-code send to relay module

Working of each block


Block 1: Producing Signal
Mobile phone is used for producing the
DTMF signal. This signal is passed as
input
to the DTMF module. DTMF module has
the encoder IC MT8870, which produces
a
4-bit code corresponding to the key
pressed as according to the table.

Block 2: Signal Processed by the


Microcontroller

The 4-bit code produced by the IC


MT8870 is passed to the controller
through the PORT A of the controller. The
controller is programmed in such a way
that whenever it receives some input at
PORT A; it sends the code for activating
corresponding relay to the transmitter
module.

Block 3: Code Processed by RF module


The transmitter module has a encoder IC
HT12E on its board. It encodes the code
coming from the microcontroller from
parallel to serial and send it wirelessly via
transmitters antenna.
This 4-bit code is in environment. This code
is received by the antenna of the receiver.
The received code is passed to the decoder
IC HT12D for decoding the received code
back from serial to parallel. Then this code
is passed to the relay module which is
connected to the receivers module.

Block 4: Relay Module


The code received from the receivers
module activates the corresponding
relay, which completes the circuit of the
appliance connected via that relay to the
power supply and the appliance
connected to power supply via that relay
starts working.

Circuit diagram
DTMF
MODULE
RF
TRANSMITTE
R MODULE

POWER
SUPPLY

APPLIANC
E

WIRELE
SS
RELAY
MODULE

RF RECIEVER
MODULE

ADVANTAGES
You can on/off any appliance from
anywhere within the range of RF
module.
Prevent from electric shocks which
occurs due to current leakage in
mechanical switches.
Any mobile can be used.
Long life than mechanical switches.

REFERENCES
Atmega16 data sheet from
www.atmel.com/atmega16.pdf.
HT12D and HT12E data sheet from
www.hitachi.com/
Avr programming concepts from the book
embedded c by MAZIDI
YouTube videos on working of RF Module.

THANK YOU

Anda mungkin juga menyukai