Professional Documents
Culture Documents
CHAPTER 1
INTRODUCTION
1.1 Introduction
Automation
It is the most frequently spelled term in the field of electronics. The hunger
for automation brought many revolutions in the existing technologies. These
had greater importance than any other technologies due to its user-friendly
nature. These can be used as a replacement of the existing switches in home
which produces sparks and also results in fire accidents in few situations.
Considering the advantages of Wi-Fi an advanced automation system was
developed to control the appliances in the house.
1.2 Necessity
Now a days home and building automation systems are used more and more.
On the one hand, they provide increased comfort especially when employed in a
private Home. On the other hand, automation systems installed in commercial
buildings do not only increase comfort, but also allow centralized control of
heating, ventilation, air condition and lighting. Hence, they contribute to an
overall cost reduction and also to energy saving which is certainly a main issue
today. Existing, well-established systems are based on wired communication.
Examples include backed, Lon works and KNX. Employing a traditional wired
automation system does not pose a problem as long as the system is planned
before and installed during the physical construction of the building. If,
however, already existing buildings should be augmented with automation
systems, this requires much effort and mush cost since cabling is necessary.
Obviously, wireless systems can come to help here. In the past few years,
wireless technologies reached their breakthrough. Wireless based systems, used
every day and everywhere, ranges from wireless home networks and mobile
phones to garage door openers. As of today, little comparative research of
wireless automation standards has been done, although such knowledge would
provide valuable information to everyone looking for the most suitable system
for given requirements.
1.3 Objectives
CHAPTER 2
LITERATURE SURVEY
R.A Ramlee, M.A. Othman, M.H. Leoung, M.M. Ismail, S.S.S. Ranjit
has implemented the HAS using Wireless Bluetooth Technology. The work from
the paper has extended the system by keeping the physical switches where the 5V
switches replaced the conventional switches, which guarantees that electric shocks
don’t take place. This is to ensure that safety must be of the prime concern at
home. The system is implemented with the help of Bluetooth module, which is of
the measure of frequency 2400 Hz and is able to provide connectivity up to 100
meters at the speed of 3 MBPS. Moreover, a group of devices not exceeding than 7
can be interfaced in a Picante.
connected to the internet, so remote users can access server web based application
through the internet using compatible web browser.
The home network which monitors the appliances and sensors and transmits
data to the cloud-based data server which manages the information and provides
services for users by transmitting data and receiving user commands from mobile
application.The proposed system has good modularity and configurability
characteristics with very low power consumption in cost efficient way.
page has been setup running on a Web server. The user interface and the Internet
front end are connected to a backend data base server. The control of devices is
established and their condition is monitored through the Internet.
(Al-Khateeb et al., 2009) used X10 controller interfaced through serial port
to PC server for control of devices. The Common Gateway Interface (CGI) is used
to interface between the browser and the X10 protocol via http connection. The
server executes CGI programs in order to satisfy a particular request from the
browser, which expresses its request using the http.
(Peng Liu et al., 2007) developed model of web services based email
extension for remote monitoring of embedded systems which integrates web
services into emails. It uses a general purpose email messaging framework to
connect devices and manipulators. This low cost model fits for systems with low
connection bandwidth, small data transportation volume and non realtime control,
e.g., monitoring of home appliances and remote meter-reading.
(Tan and Soy, 2002) developed a system for controlling home electrical
appliances over the Internet by using Bluetooth wireless technology to provide a
link from the appliance to the Internet and Wireless Application Protocol (WAP) to
provide a data link between the Internet and a mobile phone. However, technical
details relating controller are not revealed.
(Nikolova et al., 2002) demonstrated that the control of home appliances can
be extended beyond the home network to wireless mobile networks without any
modification in the network specifications. This was accomplished by developing
and implementing a HAVi (Home Audio Video Interoperability) - WAP UI
gateway that intermediates between a wired home network and a wireless
communication network using HAVi and WAP specifications, respectively. The
gateway use both pull and push technologies, improves the network integration and
provides opportunities for developing applications that combine mobile devices
with home network device
command from the user and can also access the database created in server, using
Internet Explorer (IE) Browser. The server performs function of fuzzy logic
control, communication interface between server and PLC, and receiving
command from client. Furthermore, the server also creates a database of the sensed
temperature, speed of inverter-controlled motor drives, and reference command.
(Chen Chao et al., 2009) developed a remote wireless monitoring system for
off grid Wind turbine based on the GPRS and the Internet. The remote monitoring
system is made up of three parts: controlling terminal, central monitoring computer
and communication network. Controlling terminal consists of microcontroller
ARM7 LM3S1138, data acquisition module and GPRS communication module
WAVECOM Q2406B connected to ARM7 system using serial port. GPRS module
sends parameters relating wind turbine to central monitoring computer. The client
can access central monitoring computer server through Internet and know
parameters of different wind turbines.
(Zhu and Cui, 2007) developed remote intelligent monitoring system based
on embedded Internet technology for device-room monitoring of the campus
network. The Intelligent Monitoring Terminal (IMT) is provided with the functions
of Embedded Internet Node Unit and local MSD (Monitoring System Devices).
IMT can give alarm of theft or fire according to detection analysis of temperature,
sound and smog. And it also can connect to Internet for carrying out remote data
communication. The MCU S3C44B0, which utilize 32-bit ARM kernel, is adopted
in intelligent monitoring terminal. μClinux operating system is chosen as the
software core of embedded system. It offers self-contained TCP/IP network
protocol module and provides strong support for embedded Internet technology.
CHAPTER 3
SYSTEM DESIGN
3.1 DESIGNING OF POWER SUPPLY:-
A) The following information must be available to the designer of the
transformer.
1) power output.
2) operating voltage.
3) Frequency range.
4) Efficiency and regulation.
Ai = √ Wp / 0.87
Where Ai = Area of cross section in square cm.
Wp = Primary Wattage.
a) Turns per volt:- Turns per volt of transformer are given by relation.
Where,
F = Frequency in Hz.
Following table gives the value of turns per volt for 50 Hz frequency.
Flux
density
0.83 1.14 1.01 0.91
0.76 Wb
/sq m
Turns per
Volt 55 / Ai 40 / Ai 45 / Ai 50 / Ai
45 / Ai
Generally lower the flux density better the quality of transformer. For our project
we have taken the turns per volt is 0.91 Wb / sq.m from above table.
= 50 / 2.673
= 18.7055
9 * 18.7055 =168.3495
b) wire size :- As stated above the size is depends upon the current to be carried
out by winding which depends upon current density. For our transformer one tie
can safely use current density of 3.1 Amp / sq.mm.
for less copper loss 1.6Amp/sq.mm or 2.4sq.mm may be used generally even
size gauge of wire are used.
Vrms=Vm / √2
= 9 * 1.141
= 12.727v
Vdc = 2 * Vrms/pi
= 2 * 12.727/3.14
= 8.08 V
PIV = 2Vdc
= 2 * 8.08
= 16.16 V
Maximum forward current, which flow from each diode is 500 mA. So from above
parameter, we select diode 1N4007 from the diode selection manual.
C = ¼ √ 3 r * F * R1
Where,
r = ripple present at output of rectifier, which is maximum 0.1 for full wave
rectifier.
F = frequency of AC main.
= 1030 µf
= 1000 uF
Voltage rating of filter capacitor should be greater than the i/p Vdc i.e. rectifier
output which is 8.08 V so we choose 1000µf / 25V filter capacitor.
Parameter Rating
RESISTORS
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. 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. Critical resistance depends upon the materials constituting the
resistor as well as its physical dimensions; it's determined by design.
Resistors can be integrated into hybrid and printed circuits, as well as
integrated circuits. Size, and position of leads (or terminals) are relevant to
equipment designers; resistors must be physically large enough not to overheat
when dissipating their power.
CAPACITORS
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, parallel, narrowly separated conductors.
Features
• Output Current up to 1A
micro-contoller Buzzer
Series
Relay1 Lamp1
Relay2 Lamp2
Relay3 Lamp3
Relay4 Lamp 4
Power Supply:
A power supply is an electronic device that supplies electric energy to
an electrical load. The primary function of a power supply is to convert one form
of electrical energy to another and, as a result, power supplies are sometimes
referred to as electric power converters. Some power supplies are discrete, stand-
alone devices, whereas others are built into larger devices along with their loads.
Examples of the latter include power supplies found in desktop
computers and consumer electronics devices.
Every power supply must obtain the energy it supplies to its load, as well as any
energy it consumes while performing that task, from an energy source. Depending
on its design, a power supply may obtain energy from various types of energy
sources, including electrical energy transmission systems, energy storage devices
such as a batteries and fuel cells, electromechanical systems such as generators
and alternators, solar power converters, or another power supply.
All power supplies have a power input, which receives energy from the energy
source, and a power output that delivers energy to the load. In most power supplies
the power input and output consist of electrical connectors or hardwired circuit
connections, though some power supplies employ wireless energy transfer in lieu
of galvanic connections for the power input or output. Some power supplies have
Department of Electronics Engineering Page 18
Wi-Fi Based Home Automation System
other types of inputs and outputs as well, for functions such as external monitoring
and control.
LCD
Microcontroller
Why 89C52?
8051 is an architecture developed by Intel. And the controllers at89c51 & at89c52
are designed by Atmel Corp based on Intel 8051 architecture. The basic difference
between these two controllers is in their RAM memory and flash memory.
The 89S52 has 4 different ports, each one having 8 Input/output lines providing a
total of 32 I/O lines. Those ports can be used to output DATA and orders do other
devices, or to read the state of a sensor, or a switch. Most of the ports of the 89S52
have 'dual function' meaning that they can be used for two different functions.
The first one is to perform input/output operations and the second one is
used to implement special features of the microcontroller like counting external
pulses, interrupting the execution of the program according to external events,
performing serial data transfer or connecting the chip to a computer to update the
software. Each port has 8 pins, and will be treated from the software point of view
AT89C52 AT89C51
RAM 256 Bytes 128 Bytes
Flash 8 KB 4 KB
Number of
3 (16-bit each) 2 (16-bit each)
Timers/Counters
Number of Interrupt
8 6
Sources
*The pin configuration of AT89C52 is exactly similar to that of AT89C51 except that
the first two pins, P1.0 and P1.1 are multiplexed to correspond to Timer2 operations as
given in the following table.
While AT89C51 has two timers (Timer0 & Timer1), AT89C52 also has Timer2.
Corresponding to Timer2, there are extra SFRs (Special Function Registers)
T2CON & T2MOD. Also there are registers RCAP2H & RCAP2L to configure 16
bit Capture & Auto-reload modes of Timer2.
Pin Description:
Pin
Function Name
No
External count input to Timer/Counter 2,
1 T2 P1.0
clock-out
Timer/Counter 2 capture/reload trigger and
2 T2 EX P1.1
direction control
3 P1.2
4 P1.3
5 P1.4
8 bit input/output port (P1) pins
6 P1.5
7 P1.6
8 P1.7
9 Reset pin; Active high Reset
Input (receiver) for serial
10 RxD P3.0
communication
Output (transmitter) for
11 TxD P3.1
serial communication
12 External interrupt 1 Int0 P3.2
8 bit
13 External interrupt 2 Int1 P3.3
input/output
14 Timer1 external input T0 P3.4
port (P3) pins
15 Timer2 external input T1 P3.5
Write to external data
16 Write P3.6
memory
Read from external data
17 Read P3.7
memory
18 Crystal 2
Quartz crystal oscillator (up to 24 MHz)
19 Crystal 1
20 Ground (0V) Ground
21 8 bit input/output port (P2) pins P2.0/ A8
22 / P2.1/ A9
23 High-order address bits when interfacing with external P2.2/ A10
24 memory P2.3/ A11
25 P2.4/ A12
26 P2.5/ A13
27 P2.6/ A14
28 P2.7/ A15
Program store enable; Read from external program
29 PSEN
memory
Address Latch Enable ALE
30
Program pulse input during Flash programming Prog
External Access Enable; Vcc for internal program
EA
executions
31
Programming enable voltage; 12V (during Flash
Vpp
programming)
32 P0.7/ AD7
33 P0.6/ AD6
8 bit input/output port (P0) pins
34 P0.5/ AD5
35 P0.4/ AD4
Low-order address bits when interfacing with external
36 P0.3/ AD3
memory
37 P0.2/ AD2
38 P0.1/ AD1
39 P0.0/ AD0
40 Supply voltage; 5V (up to 6.6V) Vcc
Relay:
A relay is an electrically operated switch. Many relays use an electromagnet to
mechanically operate a switch, but other operating principles are also used, such
as solid-state relays. Relays are used where it is necessary to control a circuit by a
separate low-power signal, or where several circuits must be controlled by one
signal. The first relays were used in long distance telegraph circuits as amplifiers:
they repeated the signal coming in from one circuit and re-transmitted it on another
circuit. Relays were used extensively in telephone exchanges and early computers
to perform logical operations.
A type of relay that can handle the high power required to directly control an
electric motor or other loads is called a contactor. Solid-state relays control power
The relay swing terminals are controlled with ULN driver. Where ULN
driver input pins are controlled by using 89S52/89C52 microcontroller port P1
pins.
SPST – Single Pole Single Throw. These have two terminals which can be
connected or disconnected. Including two for the coil, such a relay has four
terminals in total. It is ambiguous whether the pole is normally open or
normally closed. The terminology "SPNO" and "SPNC" is sometimes used to
resolve the ambiguity.
SPDT – Single Pole Double Throw. A common terminal connects to either of
two others. Including two for the coil, such a relay has five terminals in total.
DPST – Double Pole Single Throw. These have two pairs of terminals.
Equivalent to two SPST switches or relays actuated by a single coil. Including
two for the coil, such a relay has six terminals in total. The poles may be Form
A or Form B (or one of each).
DPDT – Double Pole Double Throw. These have two rows of change-over
terminals. Equivalent to two SPDT switches or relays actuated by a single coil.
Such a relay has eight terminals, including the coil.
Max 232:
+3 and +15 V, and changes TTL logic 1 to between −3 and −15 V, and vice versa
for converting from TIA-232 to TTL. This can be confusing when you realize that
the TIA-232 data transmission voltages at a certain logic state are opposite from
the TIA-232 control line voltages at the same logic state. To clarify the matter, see
the table below. For more information, see RS-232 voltage levels.
Control signals
−3 V to −15 V 5V
(RTS/CTS/DTR/DSR) logic 0
Control signals
+3 V to +15 V 0V
(RTS/CTS/DTR/DSR) logic 1
Lamp(LOADS):
2
R5 D5
PHASE
R4 1N4007 K5
10K 1K
5V
3
5V NEUTRAL
2 Q1 D6
1
U1 BC557 LED
1
1
R6
AT89C52
Relay 1
40
LS2 1K 2 5V RELAY SPDT
1
5v RS 39 21 Bank1
VCC
BUZZER P0.0/AD0 P2.0/A8 R8 R7 Q2
1
J1 R/W 38 22 Bank2
P0.1/AD1 P2.1/A9 23 Bank3 1K BC547
3
EN 37 10K
5V 1 36 P0.2/AD2 P2.2/A10 24 Bank4
2 P0.3/AD3 P2.3/A11
2 D4 35 25
2
R1 P0.4/AD4 P2.4/A12
C3 3 RS 10k D5 34 26
10uF/63V 4 D6 33 P0.5/AD5 P2.5/A13 27 +5v
R/W P0.6/AD6 P2.6/A14
5 EN D7 32 28
RST 6 P0.7/AD7 P2.7/A15
2
3
7 1 10 RXD
8 2 P1.0 P3.0/RXD 11 TXD R9 R10 D7
P1.1 P3.1/TXD PHASE
R3 9 3 12 10K 1N4007 K6
P1.2 P3.2/INTO 1K
8K2 10 D4 4 13
3
11 P1.3 P3.3/INT1 R11 BC557
D5 5 14 NEUTRAL
12 P1.4 P3.4/TO 2 Q3 D8
1
D6 6 15
13 7 P1.5 P3.5/T1 16 LED
D7
1
14 P1.6 P3.6/WR 1K
15
2 1
5V
8
P1.7 P3.7/RD
17
2 5V RELAY SPDT Relay 2
1
RESET LCD
16 56E R2 19
18 XTAL1 PSEN
29
R12 Q4
CKT RST 9 XTAL2 R13 1K BC547
3
30
RST ALE/PROG
10K
GND
31
5V EA/VPP
20
2
R14 D9
PHASE
Y1 10K R15 1N4007 K7
C4 11.059Mhz 1K
3
R16
U5 33pf NEUTRAL
5V 2 Q5 D10
1
D1 D2 LM7805 5V
C5 BC557 LED
1
1 3
VIN VOUT 33pf 1K
2 5V RELAY SPDT Relay 3
1
DC1
GND
3
2 0.1uf 0.1uf 10uf
10K
2
1
I/P 4007 4007 C11 MICROCONTROLLER +5v
1000uf /35v
2
POWER SUPPLY R19
R20
D11
K8
PHASE
10K 1N4007
3
1K
R21
NEUTRAL
2 Q7 D12
1
BC557 LED
1
5V
1K
2 5V RELAY SPDT
Relay 4
1
R22 Q8
R23 1K BC547
3
10K
1 C6 C7 U4 MAX232
6 1uf 1uf 1 C8
2 2 C1+ 3
1uf
7 6 V+ C1-
3 V- 4
P1 8 C2+ 5 C9
4 C2-
1uf
9 14 11 TXD
5 7 T1OUT T1IN 10
T2OUT T2IN
13 12 RXD
8 R1IN R1OUT 9
R2IN R2OUT
3.4 Flowchart-
3.5 Algorithm:
1) Start.
2) Initialize the Wi-Fi, timer, relay.
3) Wait for Wi-Fi command from android mobile.
4) If ‘a’ command is received, relay 1 ON, send feedback to Wi-Fi device 1
ON.
5) If ‘a’ command is not received then go to step 3.
6) If ‘b’ command received then relay 1 OFF.
7) If command not received then go to step 3.
8) Send feedback message 1 to Wi-Fi device 1 OFF.
9) Stop.
CHAPTER 4
CHAPTER 5
CONCLUSION
5.1 Conclusions
5.2 Applications
5.3 Advantages
Energy Savings -Through user tracking both in- and outdoors, a home
automation system would potentially be able to make sure that, for
example, no unnecessary light or heat is turned on in individual
rooms.
Convenience-Through Web based access to the home automation
system a forgetful user will potentially no longer have to worry about
if the coffee machine was left on when he left for work. Simply go to
a Webpage, check it, and turn it off if necessary.
References.
[3] A.J. Bernheim Brush, Bongshin Lee, Ratul Mahajan, Sharad Agarwal,
Stefan Saroiu, and Colin Dixon, "Home Automation in the Wild: Challenges and
Opportunities", CHI 2011, May 7-12, 2011, Vancouver, BC, Canada