Professional Documents
Culture Documents
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
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
Page 3
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.
Page 4
BLOCK DIAGRAM
Transmitter:
Micro
controller
Power
supply
(LPC2148)
Smart
phone
MAX
232
Bluetooth
Receiver:
Micro
controller
Power
supply
(LPC2148)
Bluetoot
MAX
232
Relay
driver
Load
Relay
driver
Load
Page 5
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
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:
Page 7
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
Page 8
Page 9
Page 10
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).
Page 11
Page 12
Page 13
Page 14
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.
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
Page 16
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.
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.
Page 17
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.
Page 18
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
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
Range
mW(dBm)
(approximate)
Class 1
~100 meters
Class 2
2.5 mW (4 dBm)
~10 meters
Page 20
Class 3
1 mW (0 dBm)
~1 meter
Version
Version 1.2
1 Mbit/s
3 Mbit/s
WiMedia Alliance
(proposed)
.
Data Rate
53 - 480 Mbit/s
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.
Page 21
Page 22
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,
Page 23
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:
Page 24
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.
Page 25
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, 24,
32 and
40
charact
ers are
all
standar
KITE ,DEPT OF ECE
Page 26
d,
one,
two
in
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
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.
Page 28
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
10
Start
bit
Start
Stop
58 data bits
bit(s)
Data
Data
Data
Data
Data
Data
Data
Data
Page 30
Stop
11
Page 31
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.
Page 32
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.
Page 33
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
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
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:
Page 36
Page 37
Transistor as an amplifier:
Page 38
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.
Page 39
Page 40
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:
CHAPTER 3
KITE ,DEPT OF ECE
Page 41
SCHEMATIC DIAGRAM
Page 42
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.
Page 43
Page 44
232/233 IC must be used for voltage logic conversion. Related connections are as given
below.
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.
Page 45
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.
Page 46
2.
3.
4.
5.
Save the Project by typing suitable project name with no extension in u r own
folder sited in either C:\ or D:\
Page 47
6.
7.
8.
9.
Page 48
10.
Then Click on OK
11.
12.
13.
Page 49
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.
Page 50
17.
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
Page 51
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.
23.
Now Press function key F7 to compile. Any error will appear if so happen.
Page 52
24.
25.
26.
Then Click OK
27.
Now Click on the Peripherals from menu bar, and check your required port as
shown in fig below
Page 53
28.
29.
30.
Page 54
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.
Page 55
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.
Page 56
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.
Page 57
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
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.
Page 59
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
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
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];
}
}
}
}
Page 62