You are on page 1of 62

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

CHAPTER 1
INTRODUCTION
Smart home is a home equipped with special facilities to enable occupants to
control or program an array of automated home electronic devices. For example, a
homeowner on vacation can arm a home security system, control temperature gauges,
switch appliances on or off, control lighting, program a home theater or entertainment
system, and perform many other tasks. Smart home became smarter if the controlling can
be done from any remote place. Our main focus is to control the home appliances from
remote place. The motivations behind the goal to remote control of home appliances are
simple. Its not always feasible to be physically near to the home still sometimes its very
important to control the appliances for many purposes. So the remote controlling takes
the control of the home beyond the home and to the hands of the people. If a simple
mobile phone takes the added responsibility to control the smart home then the control is
reachable from almost everywhere people travels and lives on earth.
This sort of high end technology is supposed to facilitate the different life easing
utilities to a new age and bringing things out of the box to as near as ones palm. There
exists a number of available media for remote communication. Internet is a good example
of this type of remote communication. Internet places virtually no bounds on
geographical placement and is thus considered enough remote by our definition. But
the Internet is a place crowded with various types of traffics, often hostile to each other.
Security vulnerability is the most striking alert point of the Internet. Whenever a web
based application goes live, a lot of efforts have to take place before it can be said to be
secured, if at all. When we say remote control, we want to make sure no malicious party
ever gains control and abolishes everything. Also to use web, it requires resources like
flawless internet connections and hosting servers, which may not always fit to the
concept of remote controlling. Another candidate solution to this remote communication
problem is the use of mobile telephony. Mobile telephony offers a wide range of
communication services like voice and data transfer through SMS and other enhanced
data transfer protocols like GPRS, EDGE at a relatively low price and at a wide variety of
KITE ,DEPT OF ECE

Page 1

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

places on the earth. On the other hand, the security is better achieved by the use of strict
traffic control. We adhered to this method of remote controlling of home appliances
because of its unparallel availability and modest security at the affordable price. In this
research we produce different feasible ways to leverage the mobile telephony using the
existing services but redefining the trivial purposes they serve. So, We have investigated
the different ways we could use the cell phones to go beyond making calls and sending
SMS and devised some ways to implement the remote control, which is Remote and can
be used to control the home appliances of a smart home . There are two approaches for
controlling home appliances. One is to make a custom build controller from scratch for
controlling the home appliances using wired connection.
The main problem is that the connections of this controller become clumsy as
well as not reliable. We find out its better to use the available home controllers than to
devise one from scratch to aid this goal as there are standardized home controllers in the
market and they offer wide coverage of controllable appliances. X10, Insteon, Z-Wave
and ZigBee are the available candidates for the home controller manufacturers. We left
the home appliances controlling part to the X10 and concentrated on the communication
between the mobile phone and the X10 controller for remote controlling of the X10
controller. We choose X10 over others due to its wide availability. This paper is organized
as follows. Section 2 and 3 describes the backgrounds and related works respectively.
Section 4 provides a detailed description of the X10 technology we used for prototype.
Section 5 describes the prototype of the application we developed and its advantages over
the existing solutions. Section 6 and 7 provides descriptions of two possible Medias
(Bluetooth and AT Command) of our application. Finally Section 8 and 9 depicts on the
future expansion possibilities and references.
In telecommunication, telephony encompasses the general use of equipment to
provide voice communication over distances, specifically by connecting telephones to
each other. The term mobile telephony is derived from original telephony to denote the
communication that facilitates mobility using wireless technology. Mobile telephony [1]
offers services like voice and data transfer. Data transfer is done using SMS and some
other enhanced data rate services like GPRS and EDGE. The latter two provides internet
KITE ,DEPT OF ECE

Page 2

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

access facilities to the mobile phones. Short Message Service (SMS) is a


telecommunications protocol that allows the sending of short (160 characters or less) text
messages. It is available on most digital mobile phones and some personal digital
assistants with onboard wireless telecommunications. Devices such as computer and
microcontroller which can connect to mobile phones and PDAs through protocolssuch as
Bluetooth and AT command can also sometimes send SMS messages using the mobile
phones. The usability of this type of SMS can be used in the controller we wish to design.

KITE ,DEPT OF ECE

Page 3

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

CHAPTER 2
HARDWARE DESCRIPTION
HARDWARE COMPONENTS:
1. REGULATED POWER SUPPLY
2. MICROCONTROLLER LPC2148
3. MAX 232
4.CRYSTAL OSCILLATOR
5.RELAY
6.BLUETOOTH
7.LCD DISPLAY
8.UART
9.RESISTOR
10.CAPACITOR
11.TRANSISTOR
12.LED
13.PUSH BUTTON.

SOFTWARE:
1. LPC2148TDMI kit 2 programmer for dumping code into Micro controller.

KITE ,DEPT OF ECE

Page 4

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

BLOCK DIAGRAM
Transmitter:
Micro
controller

Power
supply

2X16 LCD DISPLAY

(LPC2148)
Smart
phone

MAX
232

Bluetooth

Receiver:

Micro
controller

Power
supply

2x16 LCD DISPLAY

(LPC2148)

Bluetoot

MAX
232

Relay
driver

Load

Relay
driver

Load

Fig 2.1:Block Diagram of Transmitter and Receiver

2.1 REGULATED POWER SUPPLY


KITE ,DEPT OF ECE

Page 5

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

Power supply is a reference to a source of electrical power. A device or system


that supplies electrical or other types of energy to an output load or group of loads is
called a power supply unit or PSU. The term is most commonly applied to electrical
energy supplies, less often to mechanical ones, and rarely to others. This power supply
section is required to convert AC signal to DC signal and also to reduce the amplitude of
the signal. The available voltage signal from the mains is 230V/50Hz which is an AC
voltage, but the required is DC voltage(no frequency) with the amplitude of +5V and
+12V for various applications.
In this section we have Transformer, Bridge rectifier, are connected serially and
voltage regulators for +5V and +12V (7805 and 7812) via a capacitor (1000F) in
parallel are connected parallel as shown in the circuit diagram below. Each voltage
regulator output is again is connected to the capacitors of values (100F, 10F, 1 F, 0.1
F) are connected parallel through which the corresponding output(+5V or +12V) are
taken into consideration.
2.1.1 Transformer
A transformer is a device that transfers electrical energy from one circuit to
another through inductively coupled electrical conductors. A changing current in the first
circuit (the primary) creates a changing magnetic field; in turn, this magnetic field
induces a changing voltage in the second circuit (the secondary). By adding a load to the
secondary circuit, one can make current flow in the transformer, thus transferring energy
from one circuit to the other.
The secondary induced voltage VS, of an ideal transformer, is scaled from the
primary VP by a factor equal to the ratio of the number of turns of wire in their respective
windings:

The transformer is based on two principles: firstly, that an electric current can
produce a magnetic field (electromagnetism) and secondly that a changing magnetic field
KITE ,DEPT OF ECE

Page 6

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

within a coil of wire induces a voltage across the ends of the coil (electromagnetic
induction). By changing the current in the primary coil, it changes the strength of its
magnetic field; since the changing magnetic field extends into the secondary coil, a
voltage is induced across the secondary.
A simplified transformer design is shown below. A current passing through the
primary coil creates a magnetic field. The primary and secondary coils are wrapped
around a core of very high magnetic permeability, such as iron; this ensures that most of
the magnetic field lines produced by the primary current are within the iron and pass
through the secondary coil as well as the primary coil.

Fig 2.2:An ideal step-down transformer showing magnetic flux in the core
Induction law:
The voltage induced across the secondary coil may be calculated from Faraday's
law of induction, which states that:

Where VS is the instantaneous voltage, NS is the number of turns in the secondary


coil and equals the magnetic flux through one turn of the coil. If the turns of the coil
are oriented perpendicular to the magnetic field lines, the flux is the product of the
KITE ,DEPT OF ECE

Page 7

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

magnetic field strength B and the area A through which it cuts. The area is constant,
being equal to the cross-sectional area of the transformer core, whereas the magnetic field
varies with time according to the excitation of the primary. Since the same magnetic flux
passes through both the primary and secondary coils in an ideal transformer, the
instantaneous voltage across the primary winding equals

Taking the ratio of the two equations for VS and VP gives the basic equation for
stepping up or stepping down the voltage

Ideal power equation:


If the secondary coil is attached to a load that allows current to flow, electrical power is
transmitted from the primary circuit to the secondary circuit. In the transformer all the incoming
energy is transformed from the primary circuit to the magnetic field and into the secondary
circuit. If this condition is met, the incoming electric power must equal the outgoing power.

Pin-coming = IPVP = Pout-going = ISVS


2.1.2 Bridge Rectifier
KITE ,DEPT OF ECE

Page 8

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

A diode bridge or bridge rectifier is an arrangement of four diodes in a bridge


configuration that provides the same polarity of output voltage for any polarity of input
voltage. When used in its most common application, for conversion of alternating current
(AC) input into direct current (DC) output, it is known as a bridge rectifier. A bridge
rectifier provides full-wave rectification from a two-wire AC input, resulting in lower
cost and weight as compared to a center-tapped transformer design, but has two diode
drops rather than one, thus exhibiting reduced efficiency over a center-tapped design for
the same output voltage.
Basic Operation:
When the input connected at the left corner of the diamond is positive with
respect to the one connected at the right hand corner, current flows to the right along the
upper colored path to the output, and returns to the input supply via the lower one. When
the right hand corner is positive relative to the left hand corner, current flows along the
upper colored path and returns to the supply via the lower colored path.
In each case, the upper right output remains positive with respect to the lower
right one. Since this is true whether the input is AC or DC, this circuit not only produces
DC power when supplied with AC power: it also can provide what is sometimes called
"reverse polarity protection". That is, it permits normal functioning when batteries are
installed backwards or DC input-power supply wiring "has its wires crossed" (and
protects the circuitry it powers against damage that might occur without this circuit in
place
Output smoothing (Using Capacitor):
For many applications, especially with single phase AC where the full-wave
bridge serves to convert an AC input into a DC output, the addition of a capacitor may be
important because the bridge alone supplies an output voltage of fixed polarity but
pulsating magnitude.

KITE ,DEPT OF ECE

Page 9

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

The function of this capacitor, known as a reservoir capacitor (aka smoothing


capacitor) is to lessen the variation in (or 'smooth') the rectified AC output voltage
waveform from the bridge. One explanation of 'smoothing' is that the capacitor provides a
low impedance path to the AC component of the output, reducing the AC voltage across,
and AC current through, the resistive load. In less technical terms, any drop in the output
voltage and current of the bridge tends to be cancelled by loss of charge in the capacitor.
This charge flows out as additional current through the load. Thus the change of load
current and voltage is reduced relative to what would occur without the capacitor.
Increases of voltage correspondingly store excess charge in the capacitor, thus
moderating the change in output voltage / current. Also see rectifier output smoothing.
The simplified circuit shown has a well deserved reputation for being dangerous,
because, in some applications, the capacitor can retain a lethal charge after the AC power
source is removed. If supplying a dangerous voltage, a practical circuit should include a
reliable way to safely discharge the capacitor. If the normal load cannot be guaranteed to
perform this function, perhaps because it can be disconnected, the circuit should include a
bleeder resistor connected as close as practical across the capacitor. This resistor should
consume a current large enough to discharge the capacitor in a reasonable time, but small
enough to avoid unnecessary power waste. Because a bleeder sets a minimum current
drain, the regulation of the circuit, defined as percentage voltage change from minimum
to maximum load, is improved. However in many cases the improvement is of
insignificant magnitude. The capacitor and the load resistance have a typical time
constant = RC where C and R are the capacitance and load resistance respectively. As
long as the load resistor is large enough so that this time constant is much longer than the
time of one ripple cycle, the above configuration will produce a smoothed DC voltage
across the load.
In some designs, a series resistor at the load side of the capacitor is added. The
smoothing can then be improved by adding additional stages of capacitorresistor pairs,
often done only for sub-supplies to critical high-gain circuits that tend to be sensitive to
supply voltage noise. The idealized waveforms shown above are seen for both voltage
and current when the load on the bridge is resistive. When the load includes a smoothing
KITE ,DEPT OF ECE

Page 10

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

capacitor, both the voltage and the current waveforms will be greatly changed. While the
voltage is smoothed, as described above, current will flow through the bridge only during
the time when the input voltage is greater than the capacitor voltage. For example, if the
load draws an average current of n Amps, and the diodes conduct for 10% of the time, the
average diode current during conduction must be 10n Amps. This non-sinusoidal current
leads to harmonic distortion and a poor power factor in the AC supply.
2.1.3Voltage Regulator
A voltage regulator is an electrical regulator designed to automatically maintain a
constant voltage level. The 78xx (also sometimes known as LM78xx) series of devices is
a family of self-contained fixed linear voltage regulator integrated circuits. The 78xx
family is a very popular choice for many electronic circuits which require a regulated
power supply, due to their ease of use and relative cheapness. When specifying individual
ICs within this family, the xx is replaced with a two-digit number, which indicates the
output voltage the particular device is designed to provide (for example, the 7805 has a 5
volt output, while the 7812 produces 12 volts). The 78xx line is positive voltage
regulators, meaning that they are designed to produce a voltage that is positive relative to
a common ground. There is a related line of 79xx devices which are complementary
negative voltage regulators. 78xx and 79xx ICs can be used in combination to provide
both positive and negative supply voltages in the same circuit, if necessary.
78xx ICs have three terminals and are most commonly found in the TO220 form
factor, although smaller surface-mount and larger TrO3 packages are also available from
some manufacturers. These devices typically support an input voltage which can be
anywhere from a couple of volts over the intended output voltage, up to a maximum of
35 or 40 volts, and can typically provide up to around 1 or 1.5 amps of current (though
smaller or larger packages may have a lower or higher current rating).

KITE ,DEPT OF ECE

Page 11

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

2.2 MICROCONTROLLER LPC2148


ARM is a family of instruc1tion set architectures for computer processors based
on a reduced instruction set computing (RISC) architecture developed by British
company ARM Holdings. A RISC-based computer design approach means ARM
processors require significantly fewer transistors than typical processors in average
computers. This approach reduces costs, heat and power use. These are desirable traits for
light, portable, battery-powered devicesincluding smart phones, laptops, tablet and
notepad computers), and other embedded systems. A simpler design facilitates more
efficient multi-core CPUs and higher core counts at lower cost, providing higher
processing power and improved energy efficiency for servers and supercomputers .In
2005, about 98% of all mobile phones sold used at least one ARM processor. The low
power consumption of ARM processors has made them very popular: 37 billion ARM
processors have been produced as of 2013, up from 10 billion in 2008. The ARM
architecture (32-bit) is the most widely used architecture in mobile devices, and most
popular 32-bit one in embedded systems. According to ARM Holdings, in 2010 alone,
producers of chips based on ARM architectures reported shipments of 6.1 billion ARM
Based processors, representing 95% of smart phones, 35% of digital televisions and settop boxes and 10% of mobile computers. It is the most widely used 32-bit instruction set
architecture in terms of quantity produced.
LPC2148 is the widely used IC from ARM-7 family. It is manufactured by
Philips and it is pre-loaded with many inbuilt peripherals making it more efficient and a
reliable option for the beginners as well as high end application developer.

KITE ,DEPT OF ECE

Page 12

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

Fig 2.3:LPC 2148

Features of LPC214x series controllers:


1. 8 to 40 kb of on-chip static RAM and 32 to 512 kB of on-chip flash program
memory.128 bit wide interface/accelerator enables high speed 60 MHz operation.
2. In-System/In-Application Programming (ISP/IAP) via on-chip boot-loader
software. Single flash sector or full chip erase in 400 ms and programming of
256 bytes in 1ms.
3. Embedded ICE RT and Embedded Trace interfaces offer real-time debugging
with the on-chip Real Monitor software and high speed tracing of instruction
execution.
4. USB 2.0 Full Speed compliant Device Controller with 2 kb of endpoint RAM. In
addition, the LPC2146/8 provides 8 kb of on-chip RAM accessible to USB by
DMA.
5. One or two (LPC2141/2 vs. LPC2144/6/8) 10-bit A/D converters provide a total
of 6/14analog inputs, with conversion times as low as 2.44 us per channel.
6. Single 10-bit D/A converter provides variable analog output.
7. Two 32-bit timers/external event counters (with four capture and four compare
channels each), PWM unit (six outputs) and watchdog.
8. Low power real-time clock with independent power and dedicated 32 kHz clock
input.
9. Multiple serial interfaces including two UARTs (16C550), two Fast I2C-bus(400
kbit/s), SPI and SSP with buffering and variable data length capabilities.

KITE ,DEPT OF ECE

Page 13

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

Pin configuration of LPC 2148:

Fig 2.4:Pin configuration of LPC2148

2.3 MAX 232


A standard serial interface for PC, RS232C, requires negative logic, i.e., logic 1 is
-3V to -12V and logic 0 is +3V to +12V. To convert TTL logic, say, TxD and RxD pins of
the microcontroller thus need a converter chip. A MAX232 chip has long been using in
KITE ,DEPT OF ECE

Page 14

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

many microcontrollers boards. It is a dual RS232 receiver / transmitter that meets all
RS232 specifications while using only +5V power supply. It has two onboard charge
pump voltage converters which generate +10V to -10V power supplies from a single 5V
supply. It has four level translators, two of which are RS232 transmitters that convert
TTL/CMOS input levels into +9V RS232 outputs. The other two level translators are
1RS232 receivers that convert RS232 input to 5V. Typical MAX232 circuit is shown
below.

Fig 2.5: MAX 232


Features:
1.
2.
3.
4.
5.
6.
7.
8.
9.

Operates With Single 5-V Power Supply


2.LinBiCMOSE Process Technology
3.Two Drivers and Two Receivers
4.30-V Input Levels
5.Low Supply Current . 8 mA Typical
6.Meets or Exceeds TIA/EIA-232-F and ITU
Recommendation V.28
7.Designed to be Interchangeable With
Maxim MAX232

2.4 CRYSTAL OSCILLATOR


A crystal

oscillator is

an electronic

oscillator circuit

that

uses

the

mechanical

resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a very
precise frequency. This frequency is commonly used to keep track of time (as in quartz
wristwatches), to provide a stable clock signal for digital integrated circuits, and to stabilize
frequencies for radio transmitters and receivers. The most common type of piezoelectric
resonator used is the quartz crystal, so oscillator circuits incorporating them became known as
KITE ,DEPT OF ECE

Page 15

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL


crystal oscillators,[1] but other piezoelectric materials including polycrystalline ceramics are used
in similar circuits.
Quartz crystals are manufactured for frequencies from a few tens of kilohertz to hundreds
of megahertz. More than two billion crystals are manufactured annually. Most are used for
consumer devices such as wristwatches, clocks, radios, computers, and cellphones. Quartz
crystals are also found inside test and measurement equipment, such as counters, signal
generators, and oscilloscopes.

Fig 2.6:Crystal oscillator


XTAL1:
Input to the inverting oscillator amplifier and input to the internal clock operating
circuit.
XTAL2:
Output from the inverting oscillator amplifier.
Oscillator Characteristics:
XTAL1 and XTAL2 are the input and output, respectively, of an inverting
amplifier which can be configured for use as an on-chip oscillator, as shown. Either a
quartz crystal or ceramic resonator may be used. To drive the device from an external
clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in.

KITE ,DEPT OF ECE

Page 16

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

There are no requirements on the duty cycle of the external clock signal, since the input
to the internal clocking circuitry is through a divide-by-two flip-flop.

Fig 2.7: Oscillator Connection

2.5 RELAY
A relay is an electrical switch that opens and closes under the control of another electrical
circuit. In the original form, the switch is operated by an electromagnet to open or close one or
many sets of contacts. A relay is able to control an output circuit of higher power than the input
circuit, it can be considered to be, in a broad sense, a form of an electrical amplifier. Relays are

usually SPDT (single pole double through switch)or DPDT (double pole double through
switch) but they can have many more sets of switch contacts, for example relays with 4
sets of changeover contacts are readily available.

KITE ,DEPT OF ECE

Page 17

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

Fig 2.8:Relay
Basic operation:
An electric current through a conductor will produce a magnetic field at right angles
to the direction of electron flow. If that conductor is wrapped into a coil shape, the
magnetic field produced will be oriented along the length of the coil. The greater the
current, the greater the strength of the magnetic field, all other factors being equal.

Fig 2.9:working of Relay


Inductors react against changes in current because of the energy stored in this
magnetic field. When we construct a transformer from two inductor coils around a
common iron core, we use this field to transfer energy from one coil to the other.
However, there are simpler and more direct uses for electromagnetic fields than the
applications we've seen with inductors and transformers. The magnetic field produced by
a coil of current-carrying wire can be used to exert a mechanical force on any magnetic
object, just as we can use a permanent magnet to attract magnetic objects, except that this
magnet (formed by the coil) can be turned on or off by switching the current on or off
through the coil.
If we place a magnetic object near such a coil for the purpose of making that
object move when we energize the coil with electric current, we have what is called a
solenoid. The movable magnetic object is called an armature, and most armatures can be
moved with either direct current (DC) or alternating current (AC) energizing the coil. The
KITE ,DEPT OF ECE

Page 18

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

polarity of the magnetic field is irrelevant for the purpose of attracting an iron armature.
Solenoids can be used to electrically open door latches, open or shut valves, move robotic
limbs, and even actuate electric switch mechanisms and is used to actuate a set of switch
contacts
Applications:
1. To control a high-voltage circuit with a low-voltage signal, as in some types of
modems or audio amplifiers,
2. To control a high-current circuit with a low-current signal, as in the starter
solenoid of an automobile,
3. To detect and isolate faults on transmission and distribution lines by opening
and closing circuit breakers (protection relays),
4. To isolate the controlling circuit from the controlled circuit when the two are
at different potentials, for example when controlling a mains-powered device
from a low-voltage switch. The latter is often applied to control office lighting
as the low voltage wires are easily installed in partitions, which may be often
moved as needs change. They may also be controlled by room occupancy
detectors in an effort to conserve energy,
5. To perform logic functions. For example, the boolean AND function is
realised by connecting NO relay contacts in series, the OR function by
connecting NO contacts in parallel. The change-over or Form C contacts
perform the XOR (exclusive or) function. Similar functions for NAND and
NOR are accomplished using NC contacts. The Ladder programming
language is often used for designing relay logic networks.

2.6 BLUETOOTH
Bluetooth is a wireless protocol utilizing short-range communications technology
facilitating data transmission over short distances from fixed and/or mobile devices,
KITE ,DEPT OF ECE

Page 19

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

creating wireless personal area networks (PANs). The intent behind the development of
Bluetooth was the creation of a single digital wireless protocol, capable of connecting
multiple devices and overcoming issues arising from synchronization of these devices.
Bluetooth uses a very robust radio technology called frequency hopping spread spectrum.
It chops up the data being sent and transmits chunks of it on up to 75 different
frequencies. In its basic mode, the modulation is Gaussian frequency shift keying
(GFSK). It can achieve a gross data rate of 1 Mb/s. Bluetooth provides a way to connect
and exchange information between devices such as mobile phones, telephones, laptops,
personal computers, printers, GPS receivers, digital cameras, and video game consoles
over a secure, globally unlicensed Industrial, Scientific, and Medical (ISM) 2.4 GHz
short-range radio frequency bandwidth.
Bluetooth is a standard and communications protocol primarily designed for low
power consumption, with a short range (power-class-dependent: 1 meter, 10 meters, 100
meters) based on low-cost transceiver microchips in each device. Bluetooth enables these
devices to communicate with each other when they are in range. The devices use a radio
communications system, so they do not have to be in line of sight of each other, and can
even be in other rooms, as long as the received transmission is powerful enough.
Bluetooth device class indicates the type of device and the supported services of which
the information is transmitted during the discovery process.

Class

Maximum Permitted Power

Range

mW(dBm)

(approximate)

Class 1

100 mW (20 dBm)

~100 meters

Class 2

2.5 mW (4 dBm)

~10 meters

KITE ,DEPT OF ECE

Page 20

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

Class 3

1 mW (0 dBm)

~1 meter

Table 2.1:Class,Power and Range of Bluetooth


In most cases the effective range of class 2 devices is extended if they connect to
a class 1 transceiver, compared to pure class 2 network. This is accomplished by the
higher sensitivity and transmission power of Class 1 devices.

Version

Version 1.2

1 Mbit/s

Version 2.0 + EDR

3 Mbit/s

WiMedia Alliance
(proposed)
.

Data Rate

53 - 480 Mbit/s

Table 2.2:Power of class 1 devices

Bluetooth devices:
Bluetooth exists in many products, such as telephones, printers, modems and
headsets. The technology is useful when transferring information between two or more
devices that are near each other in low-bandwidth situations. Bluetooth is commonly used
to transfer sound data with telephones (i.e. with a Bluetooth headset) or byte data with
hand-held computers (transferring files).Bluetooth protocols simplify the discovery and
setup of services between devices. Bluetooth devices can advertise all of the services they
provide. This makes using services easier because more of the security, network address
and permission configuration can be automated than with many other network types.

KITE ,DEPT OF ECE

Page 21

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

Bluetooth 1.0 and 1.0B:


Versions 1.0 and 1.0B had many problems, and manufacturers had difficulty making their
products interoperable. Versions 1.0 and 1.0B also included mandatory Bluetooth
hardware device address (BD_ADDR) transmission in the Connecting process (rendering
anonymity impossible at the protocol level), which was a major setback for certain
services planned for use in Bluetooth environments.
Bluetooth 1.1:
1. Ratified as IEEE Standard 802.15.1-2002.
2. Many errors found in the 1.0B specifications were fixed.
3. Added support for non-encrypted channels.
4. Received Signal Strength Indicator (RSSI).
Bluetooth 1.2:
1. Faster Connection and Discovery
2. Adaptive frequency-hopping spread spectrum (AFH), which improves resistance
to radio frequency interference by avoiding the use of crowded frequencies in the
hopping sequence.
3. Higher transmission speeds in practice, up to 721 kbit/s, as in 1.1.
4. Extended Synchronous Connections (eSCO), which improve voice quality of
audio links by allowing retransmissions of corrupted packets, and may optionally
increase audio latency to provide better support for concurrent data transfer.
5. Host Controller Interface (HCI) support for three-wire UART.
6. Ratified as IEEE Standard 802.15.1-2005.

KITE ,DEPT OF ECE

Page 22

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

Bluetooth 2.0:
This version of the Bluetooth specification was released on November 10, 2004. It
is backward-compatible with the previous version 1.1. The main difference is the
introduction of an Enhanced Data Rate (EDR) for faster data transfer. The nominal rate of
EDR is about 3 megabits per second, although the practical data transfer rate is 2.1
megabits per second. The additional throughput is obtained by using a different radio
technology for transmission of the data. Standard, or Basic Rate, transmission uses
Gaussian Frequency Shift Keying (GFSK) modulation of the radio signal; EDR uses a
combination of GFSK and Phase Shift Keying (PSK) modulation.
According to the 2.0 specification, EDR provides the following benefits:
1. Three times faster transmission speed up to 10 times (2.1 Mbit/s) in some
cases.
2. Reduced complexity of multiple simultaneous connections due to additional
bandwidth.
3. Lower power consumption through a reduced duty cycle.
The Bluetooth Special Interest Group (SIG) published the specification as "Bluetooth
2.0 + EDR" which implies that EDR is an optional feature. Aside from EDR, there are
other minor improvements to the 2.0 specification, and products may claim compliance to
"Bluetooth 2.0" without supporting the higher data rate. At least one commercial device,
the HTC TyTN pocket PC phone, states "Bluetooth 2.0 without EDR" on its data sheet.

Bluetooth 3.0:
The next version of Bluetooth after v2.1, code-named Seattle (the version number
of which is TBD) has many of the same features, but is most notable for plans to adopt
ultra-wideband (UWB) radio technology. This will allow Bluetooth use over UWB radio,

KITE ,DEPT OF ECE

Page 23

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

enabling very fast data transfers of up to 480 Mbit/s, while building on the very lowpower idle modes of Bluetooth.
Any Bluetooth device will transmit the following information on demand:
1. Device name.
2. Device class.
3. List of services.
4. Technical information, for example, device features, manufacturer, Bluetooth
specification used, clock offset.
Any device may perform an inquiry to find other devices to connect to, and any
device can be configured to respond to such inquiries. However, if the device trying to
connect knows the address of the device, it always responds to direct connection requests
and transmits the information shown in the list above if requested. Use of device services
may require pairing or acceptance by its owner, but the connection itself can be initiated
by any device and held until it goes out of range. Some devices can be connected to only
one device at a time, and connecting to them prevents them from connecting to other
devices and appearing in inquiries until they disconnect from the other device.
Every device has a unique 48-bit address. However these addresses are generally not
shown in inquiries. This name appears when another user scans for devices and in lists of
paired devices Most phones have the Bluetooth name set to the manufacturer and model
of the phone by default. Most phones and laptops show only the Bluetooth names and
special programs that are required to get additional information about remote devices.
This can be confusing as, for example, there could be several phones in range named
T610 (see Bluejacking).
Pairing:

KITE ,DEPT OF ECE

Page 24

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

Pairs of devices may establish a trusted relationship by learning (by user input) a
shared secret known as a passkey. A device that wants to communicate only with a trusted
device can cryptographically authenticate the identity of the other device. Trusted devices
may also encrypt the data that they exchange over the airwaves so that no one can listen
in. The encryption can, however, be turned off, and passkeys are stored on the device file
system, not on the Bluetooth chip itself. Since the Bluetooth address is permanent, a
pairing is preserved, even if the Bluetooth name is changed. Pairs can be deleted at any
time by either device. Devices generally require pairing or prompt the owner before they
allow a remote device to use any or most of their services. Some devices, such as mobile
phones, usually accept OBEX business cards and notes without any pairing or prompts.
Certain printers and access points allow any device to use its services by default, much
like unsecured Wi-Fi networks. Pairing algorithms are sometimes manufacturer-specific
for transmitters and receivers used in applications such as music and entertainment.
Bluetooth 2.1 has an optional "touch-to-pair" feature based on NFC. By simply bringing
two devices into close range (around 10cm), pairing can securely take place without
entering a passkey or manual configuration.
Applications:
1. Wireless control of and communication between a mobile phone and a hands-free
headset. This was one of the earliest applications to become popular.
2. Wireless networking between PCs in a confined space and where little bandwidth
is required.
3. Wireless communications with PC input and output devices, the most common
being the mouse, keyboard and printer.
4. Transfer of files between devices with OBEX.
5. Transfer of contact details, calendar appointments, and reminders between devices
with OBEX.

KITE ,DEPT OF ECE

Page 25

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

6. Replacement of traditional wired serial communications in test equipment, GPS


receivers, medical equipment, bar code scanners, and traffic control devices.
7. For controls where infrared was traditionally used.
8. Sending small advertisements from Bluetooth enabled advertising hoardings to
other, discoverable, Bluetooth devices.
9. Two seventh-generation game consoles, Nintendo's Wii and Sony's PlayStation 3
use Bluetooth for their respective wireless controllers.
10. Dial-up internet access on personal computer or PDA using a data-capable mobile
phone as a modem.

2.7 LCD 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. A program must interact with
the outside world using input and output devices that communicate directly with a human
being. One of the most common devices attached to an controller is an LCD display.

Some of the most common LCDs connected to the controllers are 16X1, 16x2available.
and 20x2Line lengths of
displays. This means 16 characters per line by 1 line 16 characters per line by 2 lines and

8, 16,

20 characters per line by 2 lines, respectively.

20, 24,

32 and
40
charact

ers are
all
standar
KITE ,DEPT OF ECE

Page 26

d,
one,
two

in

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

Fig 2.10:Block diagram of LCD Display


PIN DESCRIPTION:
Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16 Pins
(two pins are extra in both for back-light LED connections).

CONTROL LINES:
EN:
Line is called "Enable." This control line is used to tell the LCD that you are
sending it data. To send data to the LCD, your program should make sure this line is low
(0) and then set the other two control lines and/or put data on the data bus. When the
other lines are completely ready, bring EN high (1) and wait for the minimum amount of
time required by the LCD datasheet (this varies from LCD to LCD), and end by bringing
it low (0) again.
RS:
Line is the "Register Select" line. When RS is low (0), the data is to be treated as
a command or special instruction (such as clear screen, position cursor, etc.). When RS is
high (1), the data being sent is text data which should be displayed on the screen. For
example, to display the letter "T" on the screen you would set RS high.
RW:
Line is the "Read/Write" control line. When RW is low (0), the information on the
data bus is being written to the LCD. When RW is high (1), the program is effectively
querying (or reading) the LCD. Only one instruction ("Get LCD status") is a read
command. All others are write commands, so RW will almost always be low. Finally, the
data bus consists of 4 or 8 lines (depending on the mode of operation selected by the
user). In the case of an 8-bit data bus, the lines are referred to as DB0, DB1, DB2, DB3,
DB4, DB5, DB6, and DB7.
KITE ,DEPT OF ECE

Page 27

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

Logic status on control lines:


1. E - 0 Access to LCD disabled
- 1 Access to LCD enabled
2. R/W - 0 Writing data to LCD
- 1 Reading data from LCD
3. RS - 0 Instructions
- 1 Character
Writing data to the LCD:
1.
2.
3.
4.
5.

Set R/W bit to low


Set RS bit to logic 0 or 1 (instruction or character)
Set data to data lines (if it is writing)
Set E line to high
Set E line to low

Read data from data lines (if it is reading)on LCD:


1.
2.
3.
4.
5.

Set R/W bit to high


Set RS bit to logic 0 or 1 (instruction or character)
Set data to data lines (if it is writing)
Set E line to high
Set E line to low

Entering Text:
First, a little tip: it is manually a lot easier to enter characters and commands in
hexadecimal rather than binary (although, of course, you will need to translate commands
from binary couple of sub-miniature hexadecimal rotary switches is a simple matter,
although a little bit into hex so that you know which bits you are setting). Replacing the
d.i.l. switch pack with a of re-wiring is necessary. The switches must be the type where On
= 0, so that when they are turned to the zero position, all four outputs are shorted to the
common pin, and in position F, all four outputs are open circuit.

KITE ,DEPT OF ECE

Page 28

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

All the available characters that are built into the module are shown in Table 3.
Studying the table, you will see that codes associated with the characters are quoted in
binary and hexadecimal, most significant bits (left-hand four bits) across the top, and
least significant bits (right-hand four bits) down the left.
Most of the characters conform to the ASCII standard, although the Japanese and
Greek characters (and a few other things) are obvious exceptions. Since these intelligent
modules were designed in the Land of the Rising Sun, it seems only fair that their
Katakana phonetic symbols should also be incorporated. The more extensive Kanji
character set, which the Japanese share with the Chinese, consisting of several thousand
different characters, is not included!

Using the switches, of whatever type, and referring to Table 3, enter a few
characters onto the display, both letters and numbers. The RS switch (S10) must be up
(logic 1) when sending the characters, and switch E (S9) must be pressed for each of them.
Thus the operational order is: set RS high, enter character, trigger E, leave RS high, enter
another character, trigger E, and so on. The first 16 codes in Table 3, 00000000 to
00001111, ($00 to $0F) refer to the CGRAM. This is the Character Generator RAM
(random access memory), which can be used to hold user-defined graphics characters.
This is where these modules really start to show their potential, offering such capabilities
as bar graphs, flashing symbols, even animated characters. Before the user-defined
characters are set up, these codes will just bring up strange looking symbols.
Codes 00010000 to 00011111 ($10 to $1F) are not used and just display blank
characters. ASCII codes proper start at 00100000 ($20) and end with 01111111 ($7F).
Codes 10000000 to 10011111 ($80 to $9F) are not used, and 10100000 to 11011111 ($A0
to $DF) are the Japanese characters.

2.8 UART
A UART is usually an individual (or part of an) integrated circuit used for serial
communications over a computer or peripheral device serial port. UARTs are now
KITE ,DEPT OF ECE

Page 29

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

commonly included in microcontrollers. A dual UART, or DUART, combines two


UARTs into a single chip. An octal UART or OCTART combines eight UARTs into one
package, an example being the NXP SCC2698. Many modern ICs now come with a
UART that can also communicate synchronously; these devices USARTs (universal
synchronous/asynchronous receiver/transmitter).
The universal asynchronous receiver/transmitter (UART) takes bytes of data and
transmits the individual bits in a sequential fashion. [1] At the destination, a second UART
re-assembles the bits into complete bytes. Each UART contains a shift register, which is
the fundamental method of conversion between serial and parallel forms. Serial
transmission of digital information (bits) through a single wire or other medium is less
costly than parallel transmission through multiple wires.
The UART usually does not directly generate or receive the external signals used
between different items of equipment. Separate interface devices are used to convert
the logic level signals of the UART to and from the external signalling levels. External
signals may be of many different forms. Examples of standards for voltage signaling
are RS-232, RS-422 and RS-485 from the EIA. Historically, current (in current loops)
was used in telegraph circuits.
Character framing:
Bit
numbe

10

Start
bit

Start

Stop

58 data bits

bit(s)

Data

Data

Data

Data

Data

Data

Data

Data

KITE ,DEPT OF ECE

Page 30

Stop

11

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

Table 2.3: Character framing


The idle, no data state is high-voltage, or powered. This is a historic legacy from
telegraphy, in which the line is held high to show that the line and transmitter are not
damaged. Each character is sent as a logic low start bit, a configurable number of data
bits (usually 8, but users can choose 5 to 8 or 9 bits depending on which UART is in use),
an optional parity bit if the number of bits per character chosen is not 9 bits, and one or
more logic high stop bits. In most applications the least significant data bit (the one on
the left in this diagram) is transmitted first, but there are exceptions (such as the IBM
2741printing terminal).
The start bit signals the receiver that a new character is coming. The next five to
nine bits, depending on the code set employed, represent the character. If a parity bit is
used, it would be placed after all of the data bits. The next one or two bits are always in
the mark (logic high, i.e., '1') condition and called the stop bit(s). They signal the
receiver that the character is completed. Since the start bit is logic low (0) and the stop bit
is logic high (1) there are always at least two guaranteed signal changes between
characters. If the line is held in the logic low condition for longer than a character time,
this is a break condition that can be detected by the UART.
Receiver:
All operations of the UART hardware are controlled by a clock signal which runs
at a multiple of the data rate, typically 8 times the bit rate. The receiver tests the state of
the incoming signal on each clock pulse, looking for the beginning of the start bit. If the
apparent start bit lasts at least one-half of the bit time, it is valid and signals the start of a
new character. If not, it is considered a spurious pulse and is ignored. After waiting a
further bit time, the state of the line is again sampled and the resulting level clocked into
a shift register. After the required number of bit periods for the character length (5 to 8
bits, typically) have elapsed, the contents of the shift register are made available (in
parallel fashion) to the receiving system. The UART will set a flag indicating new data is

KITE ,DEPT OF ECE

Page 31

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

available, and may also generate a processor interrupt to request that the host processor
transfers the received data.
Communicating UARTs usually have no shared timing system apart from the
communication signal. Typically, UARTs resynchronize their internal clocks on each
change of the data line that is not considered a spurious pulse. Obtaining timing
information in this manner, they reliably receive when the transmitter is sending at a
slightly different speed than it should. Simplistic UARTs do not do this, instead they
resynchronize on the falling edge of the start bit only, and then read the center of each
expected data bit, and this system works if the broadcast data rate is accurate enough to
allow the stop bits to be sampled reliably.
It is a standard feature for a UART to store the most recent character while
receiving the next. This "double buffering" gives a receiving computer an entire character
transmission time to fetch a received character. Many UARTs have a small first-in, firstout FIFO buffer memory between the receiver shift register and the host system interface.
This allows the host processor even more time to handle an interrupt from the UART and
prevents loss of received data at high rates.
Transmitter:
Transmission operation is simpler as the timing does not have to be determined
from the line state, nor is it bound to any fixed timing intervals. As soon as the sending
system deposits a character in the shift register (after completion of the previous
character), the UART generates a start bit, shifts the required number of data bits out to
the line, generates and sends the parity bit (if used), and sends the stop bits. Since
transmission of a single character may take a long time relative to CPU speeds, the
UART maintains a flag showing busy status so that the host system does not deposit a
new character for transmission until the previous one has been completed; "ready for next
character" may also be signalled with an interrupt. Since full-duplex operation requires
characters to be sent and received at the same time, UARTs use two different shift
registers for transmitted and received characters.

KITE ,DEPT OF ECE

Page 32

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

Application:
Transmitting and receiving UARTs must be set for the same bit speed, character length,
parity, and stop bits for proper operation. The receiving UART may detect some
mismatched settings and set a "framing error" flag bit for the host system; in exceptional
cases the receiving UART will produce an erratic stream of mutilated characters and
transfer them to the host system.
Typical serial ports used with personal computers connected to modems use eight data
bits, no parity, and one stop bit; for this configuration the number of ASCII characters per
second equals the bit rate divided by 10.
Some very low-cost home computers or embedded systems dispense with a UART and
use the CPU to sample the state of an input port or directly manipulate an output port for
data transmission. While very CPU-intensive (since the CPU timing is critical), the
UART chip can thus be omitted, saving money and space. The technique is known as bitbanging.

2.9 RESISTOR
A resistor is a two-terminal electronic component designed to oppose an
electric current by producing a voltage drop between its terminals in proportion to the
current, that is, in accordance with Ohm's law:
V = IR
Resistors are used as part of electrical networks and electronic circuits. They are
extremely commonplace in most electronic equipment. Practical resistors can be made of
various compounds and films, as well as resistance wire (wire made of a high-resistivity
alloy, such as nickel/chrome).
The primary characteristics of resistors are their resistance and the power they
can dissipate. Other characteristics include temperature coefficient, noise, and inductance.

KITE ,DEPT OF ECE

Page 33

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

Less well-known is critical resistance, the value below which power dissipation limits the
maximum permitted current flow, and above which the limit is applied voltage

Fig 2.11:Resistor
A resistor is a two-terminal passive electronic component which implements
electrical resistance as a circuit element. When a voltage V is applied across the terminals
of a resistor, a current I will flow through the resistor in direct proportion to that voltage.
The reciprocal of the constant of proportionality is known as the resistance R, since, with
a given voltage V, a larger value of R further "resists" the flow of current I as given by
Ohm's law:

Units
The ohm (symbol: ) is the SI unit of electrical resistance, named after Georg
Simon Ohm. An ohm is equivalent to a volt per ampere. Since resistors are specified and
manufactured over a very large range of values, the derived units of milliohm (1 m =
103 ), kilohm (1 k = 103 ), and megohm (1 M = 106 ) are also in common usage.

2.10 CAPACITOR
A capacitor or condenser is a passive electronic component consisting of a pair of
conductors separated by a dielectric. When a voltage potential difference exists between
the conductors, an electric field is present in the dielectric. This field stores energy and
produces a mechanical force between the plates. The effect is greatest between wide, flat,
KITE ,DEPT OF ECE

Page 34

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

parallel, narrowly separated conductors. An ideal capacitor is characterized by a single


constant value, capacitance, which is measured in farads. This is the ratio of the electric
charge on each conductor to the potential difference between them. In practice, the
dielectric between the plates passes a small amount of leakage current.

Fig 2.12:Capacitor
A capacitor (formerly known as condenser) is a device for storing electric charge.
The forms of practical capacitors vary widely, but all contain at least two conductors
separated by a non-conductor. Capacitors used as parts of electrical systems, for example,
consist of metal foils separated by a layer of insulating film.
Theory of operation:

Fig 2.13:Capacitance
Charge separation in a parallel-plate capacitor causes an internal electric field. A
dielectric (orange) reduces the field and increases the capacitance. The capacitor is a
KITE ,DEPT OF ECE

Page 35

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

reasonably general model for electric fields within electric circuits. An ideal capacitor is
wholly characterized by a constant capacitance C, defined as the ratio of charge Q on
each conductor to the voltage V between them:

Sometimes charge build-up affects the capacitor mechanically, causing its capacitance to
vary. In this case, capacitance is defined in terms of incremental changes:

2.11 TRANSISTOR
Transistor is a semiconductor device used to amplify and switch electronic signals
and electrical power. It is composed of semiconductor material with at least three
terminals for connection to an external circuit. A voltage or current applied to one pair of
the transistor's terminals changes the current through another pair of terminals. Because
the controlled (output) power can be higher than the controlling (input) power, a
transistor can amplify a signal. Today, some transistors are packaged individually, but
many more are found embedded in integrated circuits.
Transistor as a switch:

Fig 2.14:Transistor as a switch

KITE ,DEPT OF ECE

Page 36

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

BJT used as an electronic switch, in grounded-emitter configuration. Transistors are


commonly used as electronic switches, both for high-power applications such as
switched-mode power supplies and for low-power applications such as logic gates .In a
grounded-emitter transistor circuit, such as the light-switch circuit shown, as the base
voltage rises, the emitter and collector currents rise exponentially. The collector voltage
drops because of reduced resistance from collector to emitter. If the voltage difference
between the collector and emitter were zero (or near zero), the collector current would be
limited only by the load resistance (light bulb) and the supply voltage. This is
called saturation because current is flowing from collector to emitter freely. When
saturated, the switch is said to be on.[32]
Providing sufficient base drive current is a key problem in the use of bipolar
transistors as switches. The transistor provides current gain, allowing a relatively large
current in the collector to be switched by a much smaller current into the base terminal.
The ratio of these currents varies depending on the type of transistor, and even for a
particular type, varies depending on the collector current. In the example light-switch
circuit shown, the resistor is chosen to provide enough base current to ensure the
transistor will be saturated.
In any switching circuit, values of input voltage would be chosen such that the
output is either completely off,[33] or completely on. The transistor is acting as a switch,
and this type of operation is common in digital circuits where only "on" and "off" values
are relevant.

KITE ,DEPT OF ECE

Page 37

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

Transistor as an amplifier:

Fig 2.15:Transistor as a amplifier


Amplifier circuit, common-emitter configuration with a voltage-divider bias
circuit. The common-emitter amplifier is designed so that a small change in voltage (Vin)
changes the small current through the base of the transistor; the transistor's current
amplification combined with the properties of the circuit mean that small swings
in Vinproduce large changes in Vout.
Various configurations of single transistor amplifier are possible, with
some providing current gain, some voltage gain, and some both. From mobile
phones to televisions, vast numbers of products include amplifiers for sound
reproduction, radio transmission, and signal processing. The first discretetransistor audio amplifiers barely supplied a few hundred milliwatts, but
power and audio fidelity gradually increased as better transistors became
available and amplifier architecture evolved. Modern transistor audio
amplifiers of up to a few hundred watts are common and relatively
inexpensive.

2.12 LED(LIGHT EMITTING DIODE)

KITE ,DEPT OF ECE

Page 38

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

A light-emitting diode (LED) is a semiconductor diode that emits light when an


electrical current is applied in the forward direction of the device, as in the simple LED
circuit. The effect is a form of electroluminescence. where incoherent and narrowspectrum light is emitted from the p-n junction..LEDs are widely used as indicator lights
on electronic devices and increasingly in higher power applications such as flashlights
and area lighting. An LED is usually a small area (less than 1 mm 2) light source, often
with optics added to the chip to shape its radiation pattern and assist in reflection

The

color of the emitted light depends on the composition and condition of the semi
conducting material used, and can be infrared, visible, or ultraviolet. Besides lighting,
interesting applications include using UV-LEDs for sterilization of water and disinfection
of devices Like a normal diode, the LED consists of a chip of semi conducting material
impregnated, or doped, with impurities to create a p-n junction. As in other diodes,
current flows easily from the p-side, or anode, to the n-side, or cathode, but not in the
reverse direction. Charge-carriers electrons and holes flow into the junction from
electrodes with different voltages. When an electron meets a hole, it falls into a lower
energy level, and releases energy in the form of a photon.
The wavelength of the light emitted, and therefore its color, depends on the band
gap energy of the materials forming the p-n junction. In silicon or germanium diodes, the
electrons and holes recombine by a non-radiative transition which produces no optical
emission, because these are indirect band gap materials. The materials used for the LED
have a direct band gap with energies corresponding to near-infrared, visible or nearultraviolet light. LED development began with infrared and red devices made with
gallium arsenide LEDs are usually built on an n-type substrate, with an electrode attached
to the p-type layer deposited on its surface.

KITE ,DEPT OF ECE

Page 39

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

Fig 2.16:Operation of LED

2.13 PUSH BUTTONS

Fig. 2.17:Push buttons


A push-button (also spelled pushbutton) or simply button is a simple switch
mechanism for controlling some aspect of a machine or a process. Buttons are typically
made out of hard material, usually plastic or metal. The surface is usually flat or shaped
to accommodate the human finger or hand, so as to be easily depressed or pushed.
Buttons are most often biased switches, though even many un-biased buttons (due to their
physical nature) require a spring to return to their un-pushed state. Different people use
different terms for the "pushing" of the button, such as press, depress, mash, and punch.

KITE ,DEPT OF ECE

Page 40

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

Uses:
In industrial and commercial applications push buttons can be linked together by a
mechanical linkage so that the act of pushing one button causes the other button to be
released. In this way, a stop button can "force" a start button to be released. This method
of linkage is used in simple manual operations in which the machine or process have no
electrical circuits for control.
Pushbuttons are often color-coded to associate them with their function so that the
operator will not push the wrong button in error. Commonly used colors are red for
stopping the machine or process and green for starting the machine or process.
Red pushbuttons can also have large heads (mushroom shaped)

for easy

operation and to facilitate the stopping of a machine. These pushbuttons are called
emergency stop buttons and are mandated by the electrical code in many jurisdictions for
increased safety. This large mushroom shape can also be found in buttons for use with
operators who need to wear gloves for their work and could not actuate a regular flushmounted push button. As an aid for operators and users in industrial or commercial
applications, a pilot light is commonly added to draw the attention of the user and to
provide feedback if the button is pushed. Typically this light is included into the center of
the pushbutton and a lens replaces the pushbutton hard center disk.
In popular culture, the phrase "the button" refers to a (usually fictional) button
that a military or government leader could press to launch nuclear weapons.
Push to ON button:

Fig. 2.18: Push on button

CHAPTER 3
KITE ,DEPT OF ECE

Page 41

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

SCHEMATIC DIAGRAM

Fig 3.1: Schematic diagram

3.1 OPERATION EXPLANATION:

KITE ,DEPT OF ECE

Page 42

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

POWER SUPPLY:
LPC2148 works on 3.3 V power supply. LM 117 can be used for generating 3.3 V
supply. However, basic peripherals like LCD, ULN 2003 (Motor Driver IC) etc. works on
5V. So AC mains supply is converted into 5V using below mentioned circuit and after
that LM 117 is used to convert 5V into 3.3V.
Transformer:It is used to step down 230V AC to 9V AC supply and provides isolation
between power grids and circuit.
Rectifier: It is used to convert AC supply into DC.
Filter:It is used to reduce ripple factor of DC output available from rectifier end.
Regulator:It is used to regulate DC supply output.

Fig 3.2: Working of Regulated power supply


Here, Regulator IC 7805 is used to provide fix 5V dc supply.Now we can use LM 117 for
generating 3.3V supply from 5V using below circuit. Reset button is essential in a system
to avoid programming pitfalls and sometimes to manually bring back the system to the
initialization mode. Circuit diagram for reset is as shown below.MCP 130T is a special IC
used for providing stable RESET signal to LPC 2148.

KITE ,DEPT OF ECE

Page 43

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

Fig 3.3: Reset operation


Oscillations, the heartbeat, are provided using a crystal and are necessary for the system
to work. The value of capacitors C20 & C21 depends upon the frequency of crystal Y3.
General circuit and its equivalent circuit is as shown below oscillator for providing.
Oscillator Circuit: It provides clock for RTC operation.

Fig 3.4:RTC operation


UART:LPC 2148 has inbuilt ISP which means we can program it within the system using
serial communication on COM0. It has also COM1 for serial communication. MAX

KITE ,DEPT OF ECE

Page 44

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

232/233 IC must be used for voltage logic conversion. Related connections are as given
below.

Fig 3.5: Connections of LPC2148

3.2 WORKING
After turning the supply on, the Bluetooth device (HC_05), turns on light,
indicating it is ready to get connected with the AMR_Voice application. After connecting,
it indicates a blink such that the HC_05 is ready to operate with the application such that
the given control in voice form is processed through the LPC2148 microcontroller. LCD
(2 x16) display will show up voice command for home appliances.
The connection process of application with the microcontroller is, after opening
the application in the mobile device, select for the Bluetooth controller device (HC_05),
and then the blinking will be in view.

KITE ,DEPT OF ECE

Page 45

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

In order to turn ON the fan, select the voice input method in application, and we
give a voice command stating TURN ON. And now, the LPC2148 will process the
command and sends the command to device (fan) to start running immediately. Transistor
will act as an amplifier to increase the supply of voltage required by the fan, and for
turning the process of turning off the fan, the command TURN OFF is given through
the voice control unit in AMR application, and the controller will initiate the condition
and command to the fan to stop running and turns off the fan.
For the process of turning the light in the premises, select the voice input method
in application, and we give a voice command stating BULB ON. Then, the LPC2148
will process the given input command and switch the bulb on, and similarly to off the
bulb, the user gives a command, BULB OFF, and the microcontroller initiates the
command to the bulb in premises to switch off the bulb.

CHAPTER 4
SOFTWARE DESCRIPTION
1.

Click on the Keil u Vision Icon on Desktop

KITE ,DEPT OF ECE

Page 46

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

2.

The following fig will appear

3.

Click on the Project menu from the title bar

4.

Then Click on New Project

5.

Save the Project by typing suitable project name with no extension in u r own
folder sited in either C:\ or D:\

KITE ,DEPT OF ECE

Page 47

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

6.

Then Click on Save button above.

7.

Select the component for u r project. i.e. Atmel

8.

Click on the + Symbol beside of Atmel

9.

Select AT89C51 as shown below

KITE ,DEPT OF ECE

Page 48

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

10.

Then Click on OK

11.

The Following fig will appear

12.

Then Click either YES or NOmostly NO

13.

Now your project is ready to USE

KITE ,DEPT OF ECE

Page 49

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

14.

Now double click on the Target1, you would get another option Source group
1 as shown in next page.

15.

Click on the file option from menu bar and select new

16.

The next screen will be as shown in next page, and just maximize it by double
clicking on its blue boarder.

KITE ,DEPT OF ECE

Page 50

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

17.

Now start writing program in either in C or ASM

18.

For a program written in Assembly, then save it with extension . asm and
for C based program save it with extension .C

19.

Now right click on Source group 1 and click on Add files to Group Source

KITE ,DEPT OF ECE

Page 51

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

20.

Now you will get another window, on which by default C files will appear.

21.

Now select as per your file extension given while saving the file

22.

Click only one time on option ADD

23.

Now Press function key F7 to compile. Any error will appear if so happen.

KITE ,DEPT OF ECE

Page 52

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

24.

If the file contains no error, then press Control+F5 simultaneously.

25.

The new window is as follows

26.

Then Click OK

27.

Now Click on the Peripherals from menu bar, and check your required port as
shown in fig below

KITE ,DEPT OF ECE

Page 53

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

28.

Drag the port a side and click in the program file.

29.

Now keep Pressing function key F11 slowly and observe.

30.

You are running your program successfully

KITE ,DEPT OF ECE

Page 54

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

CHAPTER 5
ADVANTAGES & DISADVANTAGES
5.1 ADVANTAGES:
1. High speed operation through the voice commands reduces time consumption
without any intervention of wastage of time
2. Low power consumption which is an important advantage, reduce the wastage of
electricity.
3. Reduces human intervention and work enforcement by operating only on voice,
without strain to human to turn on and off the appliances
4. This application could be easily used by handicapped human beings where a short
command is necessary to operate the devices
5. Bluetooth is a cost effective technology which is used in shorter area without
wasting power, money, and time.
5.2 DISADVANTAGES:
1. Bluetooth range is very less.
2. It cannot be used by disabled people(dumb).
3. Voice clarity plays a vital role in performance.

KITE ,DEPT OF ECE

Page 55

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

CHAPTER-6
APPLICATIONS
1) This project has main application in home.
2) It can also be used in Industries.
3) Important application is for physically handicap people and elderly people.
4) It can also be used in libraries.
5) It can also be used in offices.

KITE ,DEPT OF ECE

Page 56

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

RESULT

The main objective of this project is to design a voice recognition based home automation
system for controlling home appliances and operates according to the voice commands
given by the user. After receiving the voice commands the with lights , fan and other
electronic devices on and off according to the instructions. It is very useful for the
disabled persons and old people .It saves the energy of the system and reduces the burden
on the person.

KITE ,DEPT OF ECE

Page 57

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

FUTURESCOPE&CONCLUSION
In the process of implementation of ARM7 LPC2148 PROCESSOR
BASED VOICE COMMAND FOR HOME APPLIANCE CONTROL, the Embedded
Systems platform has been utilized. For this purpose, an ARM7 IPC2148 controller was
implemented and tested in this study. In this work, the method for controlling and
monitoring the appliances in home, have been presented, in order to manage appliances
dramatically over voice control commands reducing the external devices usage such as
remotes.
The system intelligently detects the voice command defined by a particular
defined manner like TURN ON, BULB ON and process the request in order to result the
desired appliance performance. Furthermore, the output presented here in showed that the
proposed system can be used to perfectly calibrate the remote operation in the Bluetooth
defined acceptable area. In the process usage of Bluetooth device (HC_05), MAX 232,
LPC2148 Microcontroller, have been used efficiently used in reliable conditions to operate
the appliances
This system could monitor the appliances in a defined manner in access to
the handicapped individuals also, but also a power saving construction has been
implemented with a futuristic scope of additional amendments which could improve more
reliable device appliance controlling and monitoring also.
KITE ,DEPT OF ECE

Page 58

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

This project can be further developed by integrating it with the internet to monitor
your home while sitting in remote areas. By doing this one can keep an eye on his or her
home through internet connected to the users mobile phone. This will not only improve
the security of your home in this modern day world but will also assist in conservation of
energy. You can check the status of the appliances on the graphical interface made on
your mobile and can switch it off using the internet connectivity.

REFERENCES
1. The 8051 Micro controller and Embedded Systems by Muhammad Ali Mazidand
Janice Gillispie Mazidi.
2. The 8051 Micro controller Architecture, Programming & Applications by
Kenneth J.Ayala.
3. Fundamentals of Micro processors and Micro computers by B.Ram.
4. Micro processor Architecture, Programming & Applications by Ramesh
S.Gaonkar.
5. Electronic Components by D.V.Prasad.

KITE ,DEPT OF ECE

Page 59

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

CODING
#include<lpc214x.h>
#include"lcd.h"
#include"gpio.h"
#include"serial.h"
//#include"gsm.h"
//#include"adc.h"
#define trig P1_16 //p1.16
#define echo P1_17//p1.17
#define LIGHT 0x00000040 //P0.6
#define FAN
0X00000020//p0.5
void serial0_RxISR(void) __irq;
unsigned char eco;
void InitSerial0Int(unsigned isrPtr)
{
U0IER = 0x01;
VICVectCntl0 = 0x00000026;//select a priority slot for a given interrupt
VICVectAddr0 = (unsigned long)isrPtr;//pass the address of the IRQ into the
VIC slot
VICIntEnable |= 0x00000040;//enable interrupt2
}
void pin()
{
PINSEL0=0X00050005;//SELECTING PIN OPERATION
PINSEL1=0X15000000;
PINSEL2=0X00000000;
IODIR0=0XFFFFFFFF;// as output and 2 pins as input
IOCLR1=0XFFFFFFFF;
IOPIN1=0X0;
}
char inp0(unsigned long int pinNumber)
{
unsigned long int pinBlockState=IOPIN0;
int pinState = (pinBlockState &(pinNumber))? 1 : 0;
return pinState;
}
int main()
{
unsigned char status,cmd[10],i,temp,rec;
eco=0;
KITE ,DEPT OF ECE

Page 60

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

pin();
IODIR0=0XFFFFFFFF;
initlcd();
delay(50);
ser_init_1(0x61,0x00);
ser_init_0(0x61,0x00);
clcd(0x01);delay(10);
stringlcd(0x01," VOICE BASED ");
stringlcd(0xC0," DEVICE CONTROL ");
IOCLR0|=0x00000080;
string_0(" VOICE BASED ");
string_0(" DEVICE CONTROL ");
while(1)
{
rec=receive_0();
if(rec=='b'||rec=='f')
{
cmd[0]=rec;
for(i=1;i<6;i++)
{
cmd[i]=receive_0();
} // string_0(cmd);
stringlcd(0x01,cmd);
if((cmd[0]=='b')&&(cmd[1]=='u')&&(cmd[2]=='l')&&(cmd[3]=='b')&&(cmd[4]=
='o')&&(cmd[5]=='n'))
{ stringlcd(0x01," LIGHT ON ");
IOSET0|=0x00000040;
string_0(" LIGHT ON ");
for(i=0;i<6;i++)
{
temp=cmd[i];
}
}

if((cmd[0]=='b')&&(cmd[1]=='u')&&(cmd[2]=='l')&&(cmd[3]=='b')&&(cmd[4]=
='o')&&(cmd[5]=='f'))
{ stringlcd(0x01," LIGHT OFF ");
IOCLR0|=0x00000040;
string_0(" LIGHT OFF ");
for(i=0;i<6;i++)
{
temp=cmd[i];
}
}
KITE ,DEPT OF ECE

Page 61

ARM7 LPC2148 BASED VOICE COMMAND FOR HOME APPLIANCES CONTROL

if((cmd[0]=='f')&&(cmd[1]=='a')&&(cmd[2]=='n')&&(cmd[3]=='1')&&(cmd[4]=
='o')&&(cmd[5]=='n'))
{ stringlcd(0x01," FAN ON ");
IOSET0|=0x00000020;
string_0(" FAN ON ");
for(i=0;i<6;i++)
{
temp=cmd[i];
}
}
if((cmd[0]=='f')&&(cmd[1]=='a')&&(cmd[2]=='n')&&(cmd[3]=='1')&&(cmd[4]=
='o')&&(cmd[5]=='f'))
{ stringlcd(0x01," FAN OFF ");
IOCLR0|=0x00000020;
string_0(" FAN OFF ");
for(i=0;i<6;i++)
{
temp=cmd[i];
}
}
else
for(i=0;i<6;i++)
{
temp=cmd[i];
}
}
}
}

KITE ,DEPT OF ECE

Page 62

You might also like