You are on page 1of 50

SPEECH OPERATED HOME APPLIANCES

CONTROL SYSTEM
A project report submitted in partial fulfilment of the requirements
for the award of

Bachelor of Technology
In

ELCTRONICS AND COMMUNICATION ENGINEERING


By
JONNADULA SATHISH
(12BQ1A0439)

DEVARAGATUU SURESH
(12BQ1A0427)

AVVARU PHANINDRA
(12BQ1A0410)

DOOLA JAGADEESH BABU


(12BQ1A0429)

Under the guidance of


G.NAVEEN KUMAR M.Tech
Assistant Professor

VASIREDDY VENKATADRI INSTITUTE OF TECHNOLOGY


(Approved by AICTE and affiliated to JNTUK)

NAMBUR(V), PEDAKAKANI(M), GUNTUR-522508


APRIL 2016
i

CERTIFICATE

This is to certify that the project entitled SPEECH OPERATED HOME


APPLIANCES CONTROL SYSTEM is a bonafide record of work done by
JONNADULA SATHISH, AVVARU PHANINDRA, DEVARAGATTU SURESH and
DOOLA JAGADEESH BABU, Regd.No. 12BQ1A0439, 12BQ1A0410, 12BQ1A0427
and 12BQ1A0429 respectively under the guidance of Mr.G.NAVEEN KUMAR,
Assistant Professor in partial fulfilment of the requirement for bachelor of technology in
Electronics and Communication Engineering, JNTUK during the academic year 2015-16.

Mr. G. NAVEEN KUMAR


Project Guide

Dr. K. GIRI BABU


Head of the Department

ii

DECLARATION

We, J.SATHISH (12BQ1A0439), A.PHANINDRA (12BQ1A0410), D. SURESH


(12BQ1A0427), D.JAGADEESH BABU (12BQ1A0429), here by declare that the project
report entitled SPEECH OPERATED HOME APPLIANCES CONTROL SYSTEM
done by us under the guidance of Mr.G.Naveen Kumar, Assitant Professor, Dept. Of
ECE is submitted in partial fulfilment of the requirements for the award of degree of
BACHEOLAR OF TECHNOLOGY in ELECTRONICS AND COMMUNICATION
ENGINEERING.

DATE :
PLACE : NAMBUR
SIGNATURE OF THE CANDIDATES

J.SATHISH

A.PHANINDRA

D.SURESH

D.JAGADEESH BABU

iii

ACKNOWLEDGEMENT

We express our sincere thanks wherever it is due


We express our sincere thanks to the Chairman, Vasireddy Venkatadri Institute of
Technology,Sri Vasireddy Vidya Sagar for providing us well equipped infrastructure and
environment.
We express our sincere thanks to our beloved Director Dr.Naveen Ravela for providing
support and stimulating environment for developing the project.
We thank Dr. Y.Mallikarjuna Reddy,Principal,Vasireddy Venkatadri Institute of
Technology,Nambur,for providing us the resources for carrying out the project.
Our sincere thanks to Dr. K. Giri Babu, Professor and Head, Dept. of ECE for his cooperation and guidance in helping us to make our project successful and complete in all aspects.
We also express our sincere thanks and are grateful to our guide G.NAVEEN KUMAR
Assistant Professor, Dept of ECE, for motivating us to make our project successful and fully
complete. We are grateful for his precious guidance and suggestions.
We also place our floral gratitude to all other teaching staff and lab technicians for their
constant support and advice throughout the project.

NAME OF THE CANDIDATES


JONNADULA SATHISH
AVVARU PHANINDRA
EVARAGATTU SURESH
DOOLA JAGADEESH BABU

(12BQ1A0439)
(12BQ1A0410)
(12BQ1A0427)
(12BQ1A0429)

LIST OF CONTENTS

PG.NO
LIST OF FIGURES
LIST OF TABLES
ABSTRACT
1.
INTRODUCTON
1.1 OVERVIEW
1.2 THORITICAL BACK GROUND
1.2.1 HISTORY OF ANDROID OPERATING SYSTEM
1.2.2 GOOGLE VOICE SEARCH
1.2.3 HISTORY OF BLUETOOTH
2.
BLOCK DIAGRAM, CIRCUIT DIAGRAM AND BRIEF DESCRIPTION
2.1 BLOCK DIAGRAMS
2.2 CIRCUIT DIAGRAM
2.3 COMPONENTS AND EXPLANATION
2.3.1 POWER SUPPLY
2.3.2 BLUETOOTH-HC05 RECEIVER CHIP
2.3.3 MICRO CONTROLLER
2.3.4 LCD DISPLAY
2.3.5 RELAY
3.
MAKING OF PCB
3.1 INTRODUCTION
3.2 THE ARTWORK
3.3 THE ETCHING
3.4 DRILLING
3.5 ADVANTAGES OF PCB
4.
SOFTWARE REQUIREMENTS AND IMPLIMENTATION
4.1 SOFTWARES USED
4.2 COMPILING OF ASSEMBLY CODE
4.3 SOFTWARE DUMPING PROCEDURE
4.4 GHOST REMOTE ANDROID APP
5.
RESULT
6.
ADVANTAGES AND APPLICATIONS
REFERENCES

9
9
10
10
11
12
13
13
15
16
19
21
33
35
37
37
37
38
38
38
39
39
41
46
49
50

S.NO

FIGURE TITLE

PG.NO

1.1

ANDROID LOGO

10

1.2

GOOGLE SEARCH BY VOICE

10

1.3

BLUETOOTH SYMBOL

12

1.4

BLOCK DIAGRAM OF TRANSMITTER

13

1.5

BLOCK DIAGRAM OF RECEIVE

14

1.6

CIRCUIT DIAGRAM

15

1.7

CIRCUIT DIAGRAM OF A RECTIFIER

16

1.8

BLUETOOTH RECEIVER CHIP

20

1.9

BLUETOOTH RECEIVER CHIP PINS

20

1.10

AT89C52 PIN DIAGRAM

22

1.11

ARCHITECTURE OF 89C52

23

1.12

UPPER 128 BYTES OF INTERNAL RAM

30

1.13

SFR SPACE

30

1.14

16X2 LINE LCD DISPLAY

33

1.15

SCHEMATIC DIAGRAM OF 16X2 LINE LCD DISPLAY

34

1.16

OPERATION OF A RELAY

35

1.17

RELAY

36

1.18

OPENING A DIRECTORY

39

1.19

CHECKING FOR ASSEMBLY CODE ERRORS

40

1.20

GENERATING .HEX FILE

40

1.21

MICRO FLASH SOFTWARE APPLICATION WINDOW

41

1.22

SELECTING AT89C52 TYPE MICROCONTROLLER

42

1.23

SELECTING REQUIRE HEX FILE TO BE DUMP

42

1.24

HEX FILE DATA

43

1.25

WRITING PROGRAM INTO CHIP ROM

44

1.26

DUMPING PROCESS COMPLITED

44

5.1

OVERVIEW OF THE PROJECT KIT

46

5.2

LIGHT ON

47

S.NO
2.1
2.2
2.3
2.4
2.5
2.6

TABLE TITLE

PG.NO

REGULATOR ICS AND THEIR NOMINAL VOLTAGES


ALTERNATE FUNCTIONS OF PORT 1
ALTERNATE FUNCTIONS OF PORT 3
SPECIAL FUNCTION REGISTERS
DIFFERENT SPECIAL FUNCTION REGISTERS
PIN SPECIFICATIONS OF 16X2 LCD DISPLAY

18
24
25
31
32
34

ABSTRACT
Device controlling by switch or remote is old concept now. The next
generation technology is here. Voice operated device controlling project utilizes
human voice command to control electrical devices. This application recognizes
the voice commands and sends it to the project. A receiver and decoder decode
these commands and give it to the 8051 microcontroller over a serial port. Then
microcontroller takes decision on which devices to control depending upon input
received from android application. we can say that roughly there are two types of
controlling operations. In first one, user has to speak in a microphone connected
to electronic circuit. And in another type user can speak in Android mobile or any
other device and then this device sends commands to the project through
wireless communication technique. In this project we have used second type of
operation, which means voice controlling through android mobile application.
One of the main purposes of this technique is to reduce the human efforts. Users
dont have to get up from his place to control the device. This is an advanced
Voice Operated Home Appliance Control System which needs Android smartphone or tablet

CHAPTER-1
INTRODUCTION
1.1 OVERVIEW
Home automation is not a new concept in today world, it is used to provide
convenience for user to remotely control and monitor the appliances and it
provides a better use of electricity. The efficient use of electricity makes the
HOME automation to play an important role in daily life. As by the growth of PC
(personal computers), internet, mobile phone and wireless technology makes it
easy for a user to remotely access and controls the appliances. A lot of research
has been done and many solutions have been proposed to remotely access the
HOME appliances. Some of them used internet, wireless technology to
communicate and control home appliances, others used Bluetooth and GSM
technology for controlling the home appliances. Proposed method reduces the
wiring and complexity of the system. It has no geographical limitation and can be
used on any GSM network; it provides portability to the system. It is mainly
focused on the elderly people, disables and for the people who are unable to
type text or face difficulties in typing. For the disable people, it is quite difficult to
operate the HOME appliances physically or they are unable or feel
uncomfortable to type a text so as to switch on/off the relative device . So a
system has been developed to monitor the Appliances remotely by simply
running the mobile application and giving voice command. The mobile application
efficiently converts the voice command to text and transfers it to the GSM
network. It is affordable to everyone, cheap and easy to install. As there is no
wired communication between the remote user and appliances control module
and the electronic devices used to control are easily available making it a cost
effective solution. The technology used to develop the system is Java for mobile
and MPLAB for microchip family of controller, and Bluetooth interface for wireless
communication between home mobile and hardware control module.

1.2 THEORITICAL BACK GROUND


1.2.1 HISTORY OF ANDROID OPERATING SYSTEM
Android is a mobile operating system(OS) currently developed by Google,
based on the Linux kernel and designed primarily for touch screen mobile
devices such as smart phones and tablets. Android's user interface is mainly
based on direct manipulation, using touch gestures that loosely correspond to
real-world actions, such as swiping, tapping and pinching, to manipulate onscreen objects, along with a virtual keyboard for text input. In addition to touch
screen

devices,

Google

has

further

developed Android

TV

for

televisions, Android Auto for cars, and Android Wear for wrist watches, each with
a

specialized

user

interface.

Variants

of

Android

are

also

used

on notebooks, game consoles, digital cameras, and other electronics.

FIG 1.1:ANDROID LOGO

Android has the largest installed base of all operating systems of any kind.
Android has been the best selling OS on tablets since 2013, and on smart
phones it is dominant by any metric. Initially developed by Android, Inc., which
Google bought in 2005,Android was unveiled in 2007, along with the founding of
the Open

Handset

Alliance

consortium

of hardware, software,

and

telecommunication companies devoted to advancing open standards for mobile


devices. As of July 2013, the Google Play store has had over one million Android
10

applications ("apps") published, and over 50 billion applications downloaded. An


AprilMay 2013 survey of mobile application developers found that 71% of
developers create applications for Android, and a 2015 survey found that 40% of
full-time professional developers see Android as their priority target platform,
which is comparable to Apple's iOS on 37% with both platforms far above
others. At Google I/O 2014, the company revealed that there were over one
billion active monthly Android users, up from 538 million in June 2013.
Android's source code is released by Google under open source licenses,
although most Android devices ultimately ship with a combination of open source
and proprietary software, including proprietary software required for accessing
Google services. Android is popular with technology companies that require a
ready-made,

low-cost

and

customizable

operating

system

for high-

tech devices. Its open nature has encouraged a large community of developers
and enthusiasts to use the open-source code as a foundation for communitydriven projects, which add new features for advanced users or bring Android to
devices originally shipped with other operating systems. At the same time, as
Android has no centralised update system most Android devices fail to receive
security updates: research in 2015 concluded that almost 90% of Android phones
in use had known but unpatched security vulnerabilities due to lack of updates
and support. The success of Android has made it a target for patent litigation as
part of the so-called "Smartphone wars" between technology companies
1.2.2 GOOGLE VOICE SEARCH
Google Voice Search or Search by Voice is a Google product that allows users to
use Google Search by speakingon a mobile phone or computer, i.e. have the
device search for data upon entering information on what to search into the
device by speaking. Initially named as a distinct feature was Voice Action which
allows one to give speech commands to an Android phone. Once only available
for the U.S. English locale commands were later recognizable and replied to in
American, British, and Indian English, French, Italian, German, and Spanish
In Android 4.1+ (Jelly Bean), it was merged with Google Now.
11

FIG 1.2:Google Search by voice


In August 2014, a new feature was added to Google Voice Search, allowing
users to choose up to five languages and the app will automatically understand
the spoken language
1.2.3 HISTORY OF BLUETOOTH
Bluetooth is a wireless technology standard for exchanging data over
short distances (using short-wavelength UHF radio waves in the ISM band from
2.4 to 2.485 GHz from fixed and mobile devices, and building personal area
networks (PANs). Invented by telecom vendor Ericsson in 1994, it was originally
conceived as a wireless alternative to RS-232 data cables. It can connect several
devices, overcoming problems of synchronization.

FIG 1.3:BLUETOOTH Symbol


Bluetooth is managed by the Bluetooth Special Interest Group (SIG),
which

has

more

telecommunication,

than

25,000

computing,

member
networking,

companies
and

in

the

consumer

areas

of

electronics.

The IEEE standardized Bluetooth as IEEE 802.15.1, but no longer maintains the
standard. The Bluetooth SIG oversees development of the specification,
manages the qualification program, and protects the trademarks.
12

CHAPTER 2

BLOCK DIAGRAM, CIRCUIT DIAGRAM AND BRIEF DESCRIPTION


2.1 BLOCK DIAGRAMS:
BLOCK DIAGRAM OF TRANSMITTER

FIG 1.4:Block diagram of transmitter

BLOCK DIAGRAM OF RECEIVER

13

FIG1.5 :BLOCK DIAGRAM OF RECEIVER

14

2.2 CIRCUIT DIAGRAM:

FIG 1.6:Circuit Diagram


15

2.3 COMPONENTS AND EXPLANATION


2.3.1 POWER SUPPLY:
DESCRIPTION:

The Power Supply is a Primary requirement for the project work. The
required DC power supply for the base unit as well as for the recharging unit is
derived from the mains line. For this purpose centre tapped secondary of 12V012V transformer is used. From this transformer we getting 5V power supply. In
this +5V output is a regulated output and it is designed using 7805 positive
voltage regulator. This is a 3 Pin voltage regulator, can deliver current up to 800
milliamps.

Rectification is a process of rendering an alternating current or voltage into


a unidirectional one. The component used for rectification is called Rectifier. A
rectifier permits current to flow only during positive half cycles of the applied AC
voltage. Thus, pulsating DC is obtained to obtain smooth DC power additional
filter circuits required.
CIRCUIT DIAGRAM:

FIG 1.7:CIRCUT DIAGRAM

+12v
1N4007 X 2

230v / 12v- 0 -12v


500mA Transformer

2200F/25v
100F/25v

16

A diode can be used as rectifier. There are various types of diodes.


However, semiconductor diodes are very popularly used as rectifiers. A
semiconductor diode is a solid-state device consisting of two elements is being
an electron emitter or cathode, the other an electron collector or anode. Since
electrons in a semiconductor diode can flow in one direction only-form emitter to
collector-the diode provides the unilateral conduction necessary for rectification.

The rectified Output is filtered for smoothening the DC, for this purpose
capacitor is used in the filter circuit. The filter capacitors are usually connected in
parallel with the rectifier output and the load. The AC can pass through a
capacitor but DC cannot, the ripples are thus limited and the output becomes
smoothed. When the voltage across the capacitor plates tends to rise, it stores
up energy back into voltage and current. Thus, the fluctuation in the output
voltage is reduced considerable.
VOLTAGE REGULATOR:
LM 78XX SERIES VOLTAGE REGULATOR

The LM 78XXX series of the three terminal regulations is available with several
fixed output voltages making them useful in a wide range of applications. One of
these is local on card regulation. The voltages available allow these regulators to
be used in logic systems, instrumentation and other solid state electronic
equipment.

Although designed primarily as fixed voltage regulators, these

devices can be used with external components to obtain adjustable voltages and
currents. The LM78XX series is available in aluminium to 3 packages which will
allow over 1.5A load current if adequate heat sinking is provided. Current limiting
is included to limit the peak output current to a safe value. The LM 78XX is
available in the metal 3 leads to 5 and the plastic to 92.For this type, with
adequate heat sinking. The regulator can deliver 100mA output current. The
advantage of this type of regulator is, it is easy to use and minimize the number
of external components.
17

The following are the features voltage regulators:


a) Output current in exces of 1.5A for 78 and 78L series
b) Internal thermal overload protection
c) No external components required
d) Output transistor sage area protection
e) Internal short circuit current limit.
f) Available in aluminum 3 package.
POSITIVE VOLTAGE REGULATOR
The positive voltage regulator has different features like
Output current up to 1.5A
No external components
Internal thermal overload protection
High power dissipation capability
Internal short-circuit current limiting
Output transistor safe area compensation
Direct replacements for Fairchild microA7800 series
Nominal

Regulator

Output Voltage
5V

uA7805C

6V

uA7806C

8V

uA7808C

8.5V

uA7885C

10V

uA7810C

12V

uA7812C

15V

uA7815C

18V

uA7818C

24V

uA7824C

TABLE 2.1:Different voltage regulator ICs and their nominal voltages

18

2.3.2 BLUETOOTH-HC05 RECEIVER CHIP

Bluetooth is a wireless technology standard for exchanging data over


short distances (using short-wavelength UHF radio waves in the ISM band from
2.4 to 2.485 GHz) from fixed and mobile devices and building personal area
networks

(PANs).

Range

is

approximately

10

Meters

(30

feet).

These modules are based on the Cambridge Silicon Radio BC417 2.4 GHz
Bluetooth Radio chip. This is a complex chip which uses an external 8 MB flash
memory. These low-cost Bluetooth Sub-modules work well with Arduino and
other Microcomputers.
HC-05 is a more capable module that can be set to be either Master or Slave
HC-06 is a Slave only device. (It looks physically just like the HC-05).(Note: Now
HC-06 not cheaper)
These small ( 3 cm long) modules run on 3.3V power with 3.3V signal levels,
They have no pins and usually solder to a larger board. (See example below)
The module has two modes of operation, Command Mode where we can send
AT commands to it and Data Mode where it transmits and receives data to
another Bluetooth module.
"Breakout" Boards that make these easy to use are available and recommended.
These mount the sub-module like that shown on the right on a slightly larger
board. NOTE: Sellers often label them "HC-05" or "HC-06", but they have some
other model number on the reverse side. Most of these boards support operation
at 5V power and interface to 5V Arduino signal levels with some technique of
level shifting. A typical "breakout" board is shown below:

19

FIG 1.8 :Bluetooth receiver chip

The Green HC-05 sub-module is soldered on top of the Blue BT Board


The HC-05 module includes the Radio and Memory chips, 26 MHz crystal,
antenna and RF matching network.
The right section of the BT Board has connection pins for power and signals
as well as a 5V to 3.3V Regulator, LED, and level shifting.

FIG 1.9:Bluetooth receiver chip pins

20

KEY: If brought HIGH before power is applied, forces AT Command Setup


Mode. LED blinks slowly (2 seconds)

VCC: +5 Power

GND: System / Arduino Ground

TXD: Transmit Serial Data from HC-05 to Arduino Serial Receive. NOTE: 3.3V
HIGH level: OK for Arduino

RXD: Receive Serial Data from Arduino Serial Transmit

STATE: Tells if connected or no

2.3.3 MICROCONTROLLER 89C52:


FEATURES:
Compatible with MCS-51 Products.
8K Bytes of In-System Reprogrammable Flash Memory.
Endurance: 1,000 Write/Erase Cycles.
Fully Static Operation: 0 Hz to 24 MHz.
Three-level Program Memory Lock.
256 x 8-Bit Internal RAM.
32 Programmable I/O Lines.
Three 16-bit Timer/Counters.
Eight Interrupt Sources.
Programmable Serial Channel.
Low Power Idle and Power Down Modes

PIN DIAGRAM AND ITS DESCRIPTION:


The microcontroller generic part number actually includes a whole family of
microcontrollers that have numbers ranging from 8031to 8751 and are available
in N-Channel Metal Oxide Silicon (NMOS) and Complementary Metal Oxide
Silicon (CMOS) construction in a variety of package types.

21

PIN DIAGRAM

FIG 1.10 : Pin Diagram


with 4Kbytes of Flash Programmable and Erasable Read Only Memory
(PEROM). The device is manufactured using Atmels high density non-volatile
memory technology and is compatible with the industry standard MCS-51
instruction set and pin out. The on-chip Flash allows the program memory to be
reprogrammed in-system or by a conventional non-volatile memory programmer.
By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel
AT89C52 is a powerful microcomputer which provides a highly flexible and cost
effective solution to many embedded control applications.
The AT89C52 provides the following standard features: 4 Kbytes of Flash, 256
bytes of RAM, 32 I/O lines, two 16-bit timer/counters, a five vector two-level
interrupt architecture, a full duplex serial port, on-chip oscillator and clock
circuitry. In addition, the AT89C52 is designed with static logic for operation down
to zero frequency and supports two software selectable power saving modes.

22

The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port
and interrupt system to continue functioning.

ARCHITECTURE OF 89C52

Fig 1.11:Architecture of 89C52

PORT 0:
Port 0 is an 8-bit open drain bidirectional I/O port. As an output port each
pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be
23

used as high-impedance inputs. Port 0 may also be configured to be the


multiplexed low order address/data bus during accesses to external program and
data memory. In this mode P0 has internal pull-ups. Port 0 also receives the
code bytes during Flash programming, and outputs the code bytes during
program verification. External pull-ups are required during program verification
PORT 1:
Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 output
buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they
are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port
1 pins that are externally being pulled low will source current (IIL) because of the
internal pull-ups. Port 1 also receives the low-order address bytes during Flash
programming and program verification.
Alternate functions of port 1

TABLE 2.2: Alternate functions of port 1

PORT 2:
Port 2 is an 8-bit bidirectional I/O port with internal pullups. The Port 2
output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins
they are pulled high by the internal pull-ups and can be used as inputs. As inputs,
Port 2 pins that are externally being pulled low will source current (IIL) because
of the internal pullups. Port 2 emits the high-order address byte during fetches
from external program memory and during accesses to external data memory
that use 16-bit addresses (MOVX A,@DPTR). In this application it uses strong
internal pull-ups when emitting 1s. During accesses to external data memory that
24

uses 8-bit addresses (MOVX A,@RI), Port 2 emits the contents of the P2 Special
Function Register. Port 2 also receives the high-order address bits and some
control signals during Flash programming and verification.
PORT 3:
Port 3 is an 8-bit bidirectional I/O port with internal pullups. The Port 3 output
buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they
are pulled high by the internal pullups and can be used as inputs. As inputs, Port
3 pins that are externally being pulled low will source current (IIL) because of the
pullups. Port 3 also serves the functions of various special features of the
AT89C52 as listed below:
Alternate functions of port 3

TABLE 2.3: Alternate functions of port 3

RST:
RST means RESET; 89C52 uses an active high
reset pin. It must go high for two machine cycles. The simple RC circuit used
here will supply voltage (Vcc) to reset pin until capacitance begins to charge. At a
threshold of about 2.5V, reset input reaches a low level and system begin to run.

25

Fig: : Reset Connection

ALE/PROG:
Address Latch Enable output pulse for latching the low byte of the address
during accesses to external memory. This pin is also the program pulse input
(PROG) during Flash programming. In normal operation ALE is emitted at a
constant rate of 1/6 the oscillator frequency, and may be used for external timing
or clocking purposes. Note, however, that one ALE pulse is skipped during each
access to external Data Memory. If desired, ALE operation can be disabled by
setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a
MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the
ALE-disable bit has no effect if the microcontroller is in external execution mode.
PSEN:
Program Store Enable is the read strobe to external program memory.
When the AT89C52 is executing code from external program memory, PSEN is
activated twice each machine cycle, except that two PSEN activations are
skipped during each access to external data memory.
EA/VPP:
External Access Enable. EA must be strapped to GND in order to enable
the device to fetch code from external program memory locations starting at
OOOOH up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be
internally latched on reset. EA should be strapped to Vcc for internal program
executions. This pin also receives the 12-volt programming enable voltage (Vpp)
during Flash programming, for parts that require 12-volt Vpp.

26

XTAL1: Input to the inverting oscillator amplifier and input to the internal clock
operating circuit
XTAL2: Output from the inverting oscillator amplifier.
T2: External count input to Timer/Counter 2, Clock out.
T2EX: Counter 2 capture/reload trigger & direction control.
THE ON-CHIP OSCILLATORS
Pins XTAL1 and XTAL2 are provided for connecting a resonant network to form
an oscillator. The crystal frequency is basic internal clock frequency. The
maximum and minimum frequencies are specified from 1to 24MHZ.
Program instructions may require one, two or four machine

cycles to be

executed depending on type of instructions. To calculate the time any particular


instructions will take to be executed, the number of cycles C,
T = C*12d / Crystal frequency
Here, we chose frequency as 11.0592MHZ. This is because,
baud= 2*clock frequency/(32d. 12d[256d-TH1]).The oscillator is chosen to help
generate both standard and nonstandard baud rates. If standard baud rates are
desired, an 11.0592MHZ crystal should be selected. From our desired standard
rate, TH1 can be calculated. The internally implemented value of capacitance is
33 pf.

Fig :On-Chip Oscillators

27

Program Memory Lock Bits:


On the chip there are three lock bits which can be left unprogrammed (U) or can
be programmed (P) to obtain the additional features .When lock bit 1 is programmed,
the logic level at the EA pin is sampled and latched during reset. If the device is
powered up without a reset, the latch initializes to a random value, and holds that value
until reset is activated. It is necessary that the latched value of EA be in agreement with
the current logic level at that pin in order for the device to function properly.
Program Counter and Data Pointer:
The 89C52 contains two 16-bit registers: the program counter (PC) and the data
pointer (DPTR), Each is used to hold the address of a byte in memory. The PC is the
only register that does not have an internal address. The DPTR is under the control of
program instructions and can be specified by its 16-bit name, DPTR, or by each
individual byte name, DPH and DPL. DPTR does not have a single internal address,
DPH and DPL are each assigned an address.
A & B REGISTERS:
The 89C52 contains 34 general-purpose, working, registers. Two of these,
registers A and B, hold results of many instructions, particularly math and logical
operations, of the 89C52 CPU. The other 32 are arranged as part of internal RAM in
four banks, B0-B3, of eight registers. The A register is also used for all data transfers
between the 89C52 and any external memory. The B register is used for with the A
register for multiplication and division operations.
FLAGS AND THE PROGRAM STATUS WORD (PSW):
Flags may be conveniently addressed, they are grouped inside the program
status word (PSW) and the power control (PCON) registers.
The 89C52 has four math flags that respond automatically to the outcomes of
math operations and three general-purpose user flags that can be set to 1 or cleared to
0 by the programmer as desired. The math flags include Carry (C), Auxiliary Carry (AC),
Overflow (OV), and Parity (P). User flags are named F0,GF0 and GF1, they are
general-purpose flags that may be used by the programmer to record some event in the
program.

28

MEMORY ORGANISATION
Internal Memory:
The 89C52 has internal RAM and ROM memory for the functions.
Additional memory can be added externally using suitable circuits. This has a
Hardware architecture, which uses the same address, in different memories, for
code and data.
Internal RAM:
The 256-byte internal RAM. The upper 128 bytes occupy a parallel
address space to the Special Function Registers. Instructions that use indirect
addressing access the upper 128 bytes of RAM. Stack operations are examples
of indirect addressing.
Internal Data Memory addresses are always one byte wide, which implies
an address space of only 256 bytes. However, the addressing modes for internal
RAM can in fact accommodate 384 bytes, using a simple trick. Direct addresses
higher than 7FH access one memory space, and indirect addresses higher than
7FH access a different memory space. Thus Figure shows the Upper 128 and
SFR space occupying the same block of addresses, 80H through FFH, although
they are physically separate entities.
The Lower 128 bytes of RAM are present in all 89C52 devices as mapped in
Figure. The lowest 32 bytes are grouped into 4 banks of 8 registers. Program
instructions call out these registers as R0 through R7.
Two bits in the Program Status Word (PSW) select which register bank is
in use. This allows more efficient use of code space, since register instructions
are shorter than instructions that use direct addressing. The next 16 bytes above
the register banks form a block of bit addressable memory space. The 89C52
instruction set includes a wide selection of single-bit instructions, and the 128 bits
in this area can be directly addressed by these instructions. The bit addresses in
this area are 00H through 7FH. All of the bytes in the Lower 128 can be
accessed by either direct or indirect addressing.
The Upper 128 can only be accessed by indirect addressing. SFRs include the
Port latches, timers, peripheral controls, etc. These registers can only be
29

accessed by direct addressing. Sixteen addresses in SFR space are both byteand bit-addressable. The bit-addressable SFRs are those whose address ends in
OH or 80H.

FIG:1.12:UPPER 128 BYTES OF INTERNAL RAM

FIG 1.14:SFR SPACE


30

THE STACK AND STACK POINTER:


The stack refers to an area of internal RAM that is used in conjunction with
certain opcodes to store and retrieve data quickly. The 8-bit stack pointer register is
used by the 89C52 to hold an internal RAM address that is called the top of the stack.
The address held in the SP register is the location in internal RAM where the last byte of
data was stored by a stack operation. When data is to be placed on the stack, the SP
increments before storing data on the stack so that the stack grows up as data is stored.
As data is retrieved from the stack, the byte is read from the stack, then the SP
decrements to point to the next available byte of stored data.
SPECIAL FUNCTION REGISTERS
The 89C52 operations that do not use the internal 128-byte RAM addresses from
00h to 7Fh are done by a group of specific internal registers, each called a Special
Function register, which may be addressed much like internal RAM, using addresses
from 80h to FFh. PC is not part of the SFR and has no internal RAM address

TABLE 2.4:Special Function Registers

31

TABLE 2.5: Different Special Function Registers

32

2.3.4 LCD (Liquid Cristal Display):


A liquid crystal display (LCD) is a thin, flat display device made up of any
number of color or monochrome pixels arrayed in front of a light source or
reflector. Each pixel consists of a column of liquid crystal molecules suspended
between two transparent electrodes, and two polarizing filters, the axes of
polarity of which are perpendicular to each other. Without the liquid crystals
between them, light passing through one would be blocked by the other. The
liquid crystal twists the polarization of light entering one filter to allow it to pass
through the other.
It is used to show current time and various messages. These messages
are Invalid card, Valid card, attendance of student. We have used 16 by 2
alphanumeric display.

FIG 1.14: 16x2 Line LCD Display

len
FEATURES:

of

Interface

with either 4-bit or 8-bit microprocessor.

16

Display data RAM

20

80x8 bits (80 characters).

24

Character generator ROM

an

Display data RAM and character generator RAM may be

40

accessed by the microprocessor.

ch

Numerous instructions

cte

Clear Display, Cursor Home, Display ON/OFF, Cursor ON/OFF,

are

sta
33

ard

on

tw

Blink Character, Cursor Shift, Display


Built-in reset circuit is
Built-in

triggered

Shift.

at power

ON.

oscillator.

Fig 1.15: Schematic Diagram of 16x2 LCD Display

TABLE 2.7: Pin Specifications of 16x2 LCD Display


34

2.3.5 RELAY:
A relay is

an electrically operated switch.

Many

relays

use

an electromagnet to mechanically operate a switch, but other operating principles


are also used, such as solid-state relays. Relays are used where it is necessary
to control a circuit by a low-power signal (with complete electrical isolation
between control and controlled circuits), or where several circuits must be
controlled

by

one

signal.

The

first

relays

were

used

in

long

distance telegraph circuits as amplifiers: they repeated the signal coming in from
one circuit and re-transmitted it on another circuit. Relays were used extensively
in telephone exchanges and early computers to perform logical operations.
A type of relay that can handle the high power required to directly control an
electric motor or other loads is called a contactor. Solid-state relays control
power circuits with no moving parts, instead using a semiconductor device to
perform switching. Relays with calibrated operating characteristics and
sometimes multiple operating coils are used to protect electrical circuits from
overload or faults; in modern electric power systems these functions are
performed by digital instruments still called "protective relays".

FIG 1.16:OPERATION OF A RELAY

35

Magnetic latching relays require one pulse of coil power to move their
contacts in one direction, and another, redirected pulse to move them back.
Repeated pulses from the same input have no effect. Magnetic latching relays
are useful in applications where interrupted power should not be able to transition
the contacts.

FIG 1.17:RELAY

Magnetic latching relays can have either single or dual coils. On a single
coil device, the relay will operate in one direction when power is applied with one
polarity, and will reset when the polarity is reversed. On a dual coil device, when
polarized voltage is applied to the reset coil the contacts will transition. AC
controlled magnetic latch relays have single coils that employ steering diodes to
differentiate between operate and reset common

36

CHAPTER-3
MAKING OF PCB
3.1: INTRODUCTION
One of the most discouraging things about making a hardware project is
building the printed circuit board-PCB.it is sometimes possible to use strip board
or some other pre-fabricated board but more often than not the circuit complexity
and performance requires a proper PCB to be made .The good news is that due
to improvements in printing and processing technologies it is now relatively easy
to make inexpensive high quality PCBs at home.
WARNING-Making PCBs requires the use of Ferric Chloride(FeCi3) which is
corrosive so avoid skin and eye contact .Remember safety-first so, use glasses,
gloves and protective overalls .Ferric Chloride is also very good at distorting
cloths weeks after you think you have washed it off. If you do get any on your
skin then wash it off immediately with lots of water and soap.
3.2: THE ARTWORK
The first stage is to transfer the circuit layout from the PC to the special
Press-n-Peel film. Put the film in the laser printer so that the print will appear on
it. This will produce a contact print where the black image will end up as copper
on the final PCB. Now to transfer the artwork to the Copper board by following
the instructions with the Press-n-Peel film:
Clean the copper board very well with the PCB cleaning rubber.
Heat the cloths iron to 300 deg F.
Hole the film with the print in contact to the copper and smoothly iron the film
down until the print appears black through the film (about 1min).
Allow 5min to cool down (or speed up this with water) then peel the film off.
This should produce a clean black print on to the copper. If you let the film move
or overheat then you will find that the tracks and writing will be smeared and out
of focus also the film may be wrinkled up. If you dont use enough heat or heat

37

unevenly then the film may not stick or to be dark enough. In either case clean off
the PCB and try again, you should get it right after a couple of goes.
3.3: THE ETCHING
Etching the PCB is to remove the unwanted copper.
Dilute the concentrated Ferric Chloride fluid with water (1:1) and pour into the
one liter glass jar.
Put the PCB copper side up on the top tray and pour all Ferric Chloride on top.
Gently rock the top tray to keep the etch fluid moving avoiding spillage.
After about 15min all of the unwanted copper disappears.
Remove the board and drop it into a bucket of cold water to clean off.
3.4: DRILLING

Drilling with 0.8mm drill bits can be bit tricky as it is easy to break the drill bits.
Always hold the drill straight and do not bend it when the hole has started .Using a
0.8mm PCB drill bit, drill out all of the component holes that are required. So, now the
PCB is finished and it is ready to solder.

3.5: ADVANTAGES OF PCB


Reducing wiring errors.
Decreases assembly cost.
Typically consume less space than traditionally build circuits.

38

CHAPTER-4
SOFTWARE IMPLEMENTATION
4.1 SOFT WARES USED:
1. Assembly language for 8051
2. 8051 Cross compiler
3. Universal Programmer soft ware
4. ORCAD for PCB designing and layout.

4.2 COMPILING OF ASSEMBLY CODE: (MACRO ASSEMBLER OR MASM)

FIG 1.18:OPENING A DIRECTORY

39

FIG 1.19:CHECKING FOR ASSEMBLY CODE ERRORS

FIG 1.20:GENERATING .HEX FILE

40

4.3 SOFTWARE DUMPING PROCEDURE


1. The assembly language Instructions typed in dos editor or notepad with an
extension of .ASM.
2. Compile the above .asm file with 8052 cross assembler.
3. The assembler converts the .ASM file into .HEX file (Contains all op codes).
4. Copy the converted Hex file into internal flash Rom of Micro Controller with
the help of Universal Programmer or Micro Controller Programmer.

FIG 1.21: MICRO FLASH SOFTWARE APPLICATION WINDOW

41

FIG 1.22: SELECTING AT89C52 TYPE MICROCONTROLLER

FIG 1.23: SELECTING REQUIRE HEX FILE TO BE DUMP

42

FIG 1.24 :HEX FILE DATA

FIG1.25: WRITING PROGRAM INTO CHIP ROM

43

FIG 1.26: DUMPING PROCESS COMPLITED

4.4 GHOST REMOTE ANDROID APP


Ghost Remote is primarily a Bluetooth remote for Eventghost in windows but can also
be used with anything that accepts SPP as input.
Could be used as an Arduino Voice Commander.
KEY FEATURES :
Voice search.
Use Google"s voice to text engine to send limitless commands to and control
your computer by voice.
Speak to your phone and watch what you've said get typed on to your big
screen, this is excellent for search boxes such as in XBMC. (no more hastle with
on screen keyboards or multitap)

44

Full keyboard in real time or use your phones predictive text then send as text or
as a command.
Touchpad with scroll which can be used as basic mouse control or as seek
control.
Big D-pad so you can keep your eyes on the big screen.

45

CHAPTER-5
RESULT

FIG:OVER VIEW OF ENTIRE PROJECT KIT

46

FIG:LIGHT IS ON

47

FIG:FAN IS ON

48

CHAPTER-6
ADVANTAGES AND APPLICATIONS
6.1 ADVANTAGES:
Small in size.
Easy to operate from a remote place.
Cost of manufacture is very less.
Flexibility of using in various applications.
6.2 APPLICATIONS:
After some small modifications made, the same kit can find many applications.
Automation in industries ,house hold appliances etc
Also used in a remote areas where the facility of Cell network is provided.

49

REFERENCES
The information required for developing the project and presenting the report is
gathered from:
TEXT BOOKS:
1. The 8051 Microcontroller Architecture, Programming and Applications by
Kenneth J Ayala.
2. Fundamentals Of Digital Signal Processing By Robert. J. Schilling and Sandra. L
.Harris, Thomson
3. MCS51 series authorized manual.
OTHER REFERENCES:
1. http://www.atmel.com
2. http://www.aplus.com
3. http://www. I2C protocols
4. http://www.alldatasheets.com

50

You might also like