You are on page 1of 31

SEMINAR REPORT

Title- HOME AUTOMATION SYSTEM

Presented By: -
1.Abhishek Kumar Gupta – 15BEE0035
2.Abu Hamza Farooqui – 15BEE0003
3.Tehreem Shahid – 15BEE0083
B.Tech(Electrical) -6th Semester
Under the supervision of:
Prof. ZAINUL ABDIN JAFFERY
Signature _______________
ABSTRACT
This report involves the design and construction of an individual
control home automation system using RS232, GSM technology and
a microcontroller.

Home automation is the automatic or semi-automatic control and


monitoring of household appliances and residential house features
like doors, gate and even the windows. This project is a
demonstration of how to design and build a multipurpose remotely
controlled system that can switch OFF and ON any electrical
household appliance (including the security light), by dialling a
phone already interfaced via RS232 to a microcontroller that
controls a relay for the automatic switching on and off of the
appliance and the phone will send a feedback short message service
text indicating the new state of the appliance, whether switched ON
or OFF.

The results of the home automation system show that a


microcontroller is a very powerful device for building smart
electronic devices that can automatically control electrical
appliances, with little circuitry complexities and components.

(i)
CONTENT
➢ Abstract……………………………………………………………………………(i)
➢ Chapter 1: Introduction….........................................................(1)
1.1 Automation………………………….………………………….(2)
1.1.1 Office Automation…………………………………...(3)
1.1.2 Building Automation………………………………..(3)
1.1.3 Power Automation…………………………………..(3)
1.1.4 Home Automation…………………………………...(4)
1.2 Aim………………………………………………………………….(4)
1.3 Objective…………………………………………………………(4)
1.4 Scope & Limitation…………………………………………..(5)
➢ Chapter 2: Literature Review………………………………………..…(6)
2.1 History of Home Automation………………………………..(6)
2.2 Home Automation Systems…………………………………..(6)
2.3 Home Automation Standards………………………………..(8)
2.3.1 INSTEON Standard………………………………….(8)
2.3.2 Z-wave Standard…………………………………….(9)
2.3.3 Universal Powerline Bus……………………….(12)
2.4 Home Automation Implementation Platform………(13)
2.4.1 Powerline Communication…………………...(13)
2.4.2 RS232……………………………………………………(14)
2.4.3 Bluetooth……………………………………………..(15)
2.4.4 Infrared………………………………………………..(16)
2.4.5 GSM……………………………………………………..(16)
➢ Chapter 3: Methodology………………………………………………..(19)
3.1 Preliminary Considerations………………………………..(19)
3.1.1 Selection of Implementation Platform…..(19)
3.2 System Design……………………………………………………(20)
3.2.1 PIC181-4455………………………………………...(21)
3.2.1.1 Central Processing Unit……………(22)
3.2.1.2 Random Access Memory (RAM)(22)
3.2.1.3 Read Only Memory (ROM)………(22)
3.2.1.4 Input & Output port (I/O)………..(23)
3.3 Relay………………………………………………………………….(23)
➢ Conclusion………………………………………………………………………..(25)
➢ References……………………………………………………………………………..(26)
CHAPTER 1
INTRODUCTION
Imagine how helpful it will be to be able to switch on your air
conditioning system ten minutes before you get home on a hot afternoon
in January. How about having a security system that will detect smoke,
excessive electrical power usage, burglar attempts and unauthorized
movements in your house and alert you? This I what home automation is
about and there is no end to its application. In fact, sophisticated home
automation systems are now being developed that can maintain an
inventory of household items, record their usage through an RFID (Radio
Frequency Identification) tag, and prepare a shopping list or automatically
order replacements.

Home automation has made it possible to have what is often


referred to as a 'smart home', a home that can detect and identify you,
automatically adjust the lighting to your predefined taste, open doors
automatically, play your favourite music, water your flowers in the
morning, switch on the security lights at night and switch them off in the
morning, heat water for bathe and tea, stream to you anywhere in the
world via the internet a live video of what is happening in and around your
house. It makes it possible to link lighting, entertainment, security,
telecommunications, heating, and air conditioning into one centrally
controlled system. This allows you to make your house an active partner in
managing your busy life.

Nowadays, you can hardly find a house without a home automation


system which can range from the remote for the television, burglar alarm
and hi-tech security gates, to an automated air conditioning system that
maintains the temperature at a predefined value.

1|Page
1.1 AUTOMATION
Automation is the use of control systems and information
technology to control equipment, industrial machinery and processes,
reducing the need for human intervention. In the scope of industrialization,
automation is a step beyond mechanization. Mechanization provided
human operators with machinery to assist them with the physical
requirements of work while automation greatly reduces the need for
human sensory and mental requirements as well (Wikipedia, 2009).

Automation plays an increasingly important role in the global


economy and in daily experience. Engineers strive to combine automated
devices with mathematical and organizational tools to create complex
systems for a rapidly expanding range of applications and human activities.
Many roles for humans in industrial processes presently lie beyond the
scope of automation. Human-level pattern recognition, language
recognition, and language production ability are well beyond the
capabilities of modern mechanical and computer systems. Tasks requiring
subjective assessment or synthesis of complex sensory data, such as scents
and sounds, as well as high-level tasks such as strategic planning, currently
require human expertise.

Automation has had a notable impact in a wide range of highly


visible industries beyond manufacturing. Once ubiquitous telephone
operators have been replaced largely by automated telephone
switchboards and answering machines. Medical processes such as primary
screening in electrocardiograph or radiography and laboratory analysis of
human genes, blood plasmas, cells, and tissues are carried out at much
greater speed and accuracy by automated systems. Automated teller
machines have reduced the need for bank visits to obtain cash and carry
out transactions. In general, automation has been responsible for the shift

2|Page
in the world economy from agrarian to industrial in the 19th century and
from industrial to services in the 20th century.
1.1.1 Office automation
Office automation refers to the varied computer machinery and
software used to digitally create, collect, store, manipulate, and relay office
information needed for accomplishing basic tasks and goals. Raw data
storage, electronic transfer, and the management of electronic business
information comprise the basic activities of an office automation system,
office automation helps in optimizing or automating existing office
procedures.

1.1.2 Building automation


Building automation describes the functionality provided by the
control of a building. The control system is a computerized, intelligent
network of electronic devices, designed to monitor and control the
mechanical and lighting systems of a building. A building automation
system is an example of a distributed control system. The building
automation system (BAS) core functionality keeps the building climate
within a specific range, provides lighting based on an occupancy schedule,
and monitors system performance and device failures and provides email
and/or text notifications to building engineering staff. The BAS
functionality reduces building energy and maintenance costs when
compared to a non-controlled building.

1.1.3 Power automation


Power automation is the automated control and monitoring of
power plants, substations and transformers for effectiveness, efficiency
and fault detection. It has made it possible to have a reliable municipal or
national electricity system, which often comprises remote and hard-to-
reach transformers and power sub-system units. It makes it possible to

3|Page
monitor different power units, relay their status and health information,
and even carry out fault detection and correction without human
interference.

Example of power automation system is the Supervisory Control and


Data Acquisition (SCADA) system.

1.1.4 Home automation


Home automation may designate an emerging practice of increased
automation of household appliances and features in residential dwellings,
particularly through electronic means that allow for things impracticable,
overly expensive or simply not possible in recent decades. Home
automation includes all that a building automation provides like climate
controls, door and window controls, and in addition control of multimedia
home theatres, pet feeding, plant watering and so on. But there exists a
difference in that home automation emphasizes more on comforts
through ergonomics and ease of operation.

1.2 Aim
The aim is to design and construct a home automation system that
will remotely switch on or off any household appliance connected to it,
using a microcontroller, voice dial on phone, and short message service for
feedback.

1.3 OBJECTIVE
The objective of this is to implement a low cost, reliable and scalable
home automation system that can be used to remotely switch on or off any
household appliance, using a microcontroller to achieve hardware

4|Page
simplicity, low cost short message service (SMS) for feedback and voice dial
from any phone to toggle the switch state.

1.4 Scope and limitation


This project work is complete on its own in remotely and
automatically switching on and off of any electrical appliance not limited
to household appliances and sends a feedback message indicating the new
present state of the appliance. It does not implement control of multiple
appliances or automatic detection of faults in the controlled appliance.

5|Page
CHAPTER 2
Literature review
2.1 history of home automation
Home automation has been around since the world war 1 (1914), in
fact, the television remote (a simple home automation system) was
patented in 1893 (Wikipedia, 2009). Since then different home automation
systems have evolved with a sharp rise after the second World War. Its
growth has been through various informal research and designs by
technology enthusiasts who want a better way of getting things done at
home without much effort on their part. The systems evolved from one
that can automatically do routine chores like switch on and off security
lights, to more sophisticated ones that can adjust lighting, put the
television channel to favourite station and control doors.

2.2 home automation systems

Home automation systems may designate electronic systems in


homes and residential buildings that make possible the automation of
household appliances. The new stream of home automation systems has
developed into a vast one and the current market is flooded with a flurry
of home automation systems and device manufacturers.

The types of home automation systems based on their control


systems are:

6|Page
1.Individual Control System
These types were the first to hit the market in the early years, here
each device like the heater or the air conditioner will have an independent
control dedicated to it.
2.Distributed Control System
The main feature of these type of systems is emergency shut-down.
With this system you can pre-set or change the control parameters of
several similar devices, for example, the thermostat of several air
conditioners and their ON/OFF timings.

3.Central Control System


These are computerized systems programmed to handle all functions
of multiple utilities like air conditioning system, home entertainments,
doors, windows, refrigerators and cooking systems, all at the same time
regardless of whether you are at home or away. You can connect to the
control system through telephone or internet from anywhere in the world.

The types of home automation systems based on the carrier mode are:

1.Wireless Systems
Also available are wireless home automation systems that utilize
radiofrequency technology. They are often used to operate lights,
sometimes in conjunction with a hardwired lighting control system.

2.Hardwired Systems
Wired, or “hardwired” home control systems are the most reliable
and expensive. These systems can operate over high-grade
communications cable such as Category 5 or 5e, or their own proprietary
“bus” cable. That is why it is best to plan for them when a house is being
constructed. Hardwired systems can perform more tasks at a time and do

7|Page
them quickly and reliably, making them ideal for larger homes. They can
also integrate more systems in the home, effectively tying together indoor
and outdoor lighting, audio and video equipment, security system, even
the heating and cooling system into one control package that will be easy
and intuitive to operate.

3.Internet Protocol Control Systems


Internet Protocol (IP) control automation system uses the internet,
gives each device under its control an Internet Protocol address, and
creates a local area network (LAN) in the home. Hence, the home can be
interacted with over the internet with possibility of live video streaming
and real-time control.

2.3 home automation standards

There are many established industry standards for home automation


systems and are implemented over the various carrier modes ranging from
powerline to wireless. The popular and major standards are INSTEON,
European Home Systems (EHS), ZigBee, KNX, Z-Wave, X10, LonWorks,
ONE-NET and Universal Powerline Bus (UPB).

2.3.1 INSTEON Standards

INSTEON standard is a dual-band mesh topology employing ac-


power lines and a radio frequency (RF) protocol to communicate with and
automate home electronic devices and appliances, which normally work
independently. It is a home automation networking technology invented

8|Page
by Smart Labs Inc. INSTEON was developed, based on the X10 model, for
control and sensing applications in the home (Wikipedia, 2009).

INSTEON is designed to enable simple devices to be networked


together using the powerline and/or radio frequency (RF). All INSTEON
devices are peers, meaning each device can transmit, receive, and repeat
any message of the INSTEON protocol, without requiring a master
controller or complex routing software. INSTEON is not only an effective
system for connecting lighting switches and loads without extra wiring, but
it also forms the basis for a more sophisticated home automation network.

The following are the possible applications of INSTEON:

• Scene and remote-control lighting,

• Security alarm interfaces and sensors,

• Home sensors (e.g. water, humidity, temperature),

• Access control (e.g. door locks),

• Heating, ventilating and air cooling (HVAC) control,

• Audio-video control, and

• Appliance management.

2.3.2. Z-Wave standard


The Z-wave is a wireless communications proprietary standard
designed for home automation, specifically to remote control applications
in residential and light commercial environments. This technology, which

9|Page
is developed by Sigma designs' Zensys, uses a low power RF radio
embedded or retrofitted into home electronics devices and systems, such
as lighting, home access control, entertainment systems and household
appliances. The technology has been standardized by the Z Wave Alliance,
an international consortium of manufacturers that oversees
interoperability between Z-Wave products and enabled devices
(Wikipedia, 2018).

Z-Wave is a mesh networking technology where each node


or device on the network is capable of sending and receiving control
commands through walls or floors and around household obstacles or
radio dead spots that might occur in the home. Z-Wave devices can work
singly or in groups and can be programmed into scenes or events that
trigger multiple devices, either automatically or via remote control.

Z-Wave is a low-power wireless technology designed specifically for


15 remote control applications. Unlike Wi-Fi and other IEEE 802.11-based
wireless LAN systems that are designed primarily for high-bandwidth data
flow, the Z-Wave RF system operates in the sub Gigahertz frequency range
and is optimized for low overhead commands such as on-off (as in a light
switch or an appliance) and raise lower (as in a thermostat or volume
control), with the ability to include device metadata in the
communications. Because Z-Wave operates apart from the 2.4 GHz
frequency of 802.11 based wireless systems, it is largely impervious to
interference from common household wireless electronics, such as Wi-Fi
routers, cordless telephones and Bluetooth devices that work in the same
frequency range. This freedom from household interference allows for a
standardized low-bandwidth control medium that can be reliable
alongside common wireless devices. On other hand, 2.4 GHz frequency
usage allows unlicensed devices usage in most countries; this is convenient
to customers and allows wider technology adoption and reduced
deployment costs. This could be not true for other frequencies and could

10 | P a g e
easily turn into a strong drawback if licensing is required or frequency is
occupied. That's one of reason why competing 2.4 GHz technologies
became so popular.

As a result of its low power consumption and low cost of


manufacture, Z Wave is easily embedded in consumer electronics
products, including battery operated devices such as remote controls,
smoke alarms and security sensors. Z-Wave is currently supported by over
200 manufacturers worldwide and appears in a broad range of consumer
products in the U.S. and Europe.

Some common applications for Z-Wave include:

• Remote Home Control and Management


By adding Z-Wave to 16 home electronics such as lighting, climate
and security systems, it is possible to control and monitor these household
functions via remote control, based on manual or automated decisions.
The control can be applied to a single device or group of devices, in a single
room or zone or throughout the entire home. One of the benefits of Z-
Wave over powerline communication technologies is the ability to function
in older houses lacking a neutral wire. Z-Wave devices can also be
monitored and controlled from outside of the home by way of a gateway
that combines Z-Wave with broadband Internet access.

• Energy Conservation
Z-Wave is envisioned as a key enabling technology for energy
management in the green home. As an example, Z Wave- enabled
thermostats are able to raise or lower automatically, based on commands
from Z-Wave enabled daylight sensors. Grouped scene controls can ensure
that unnecessary energy consumption is minimized by various all-off states

11 | P a g e
for systems throughout the home, such as lighting, appliances and home
entertainment systems.

• Home Safety and Security System


Because Z-Wave can transceiver commands based on real time
conditions, and is able to control devices in intelligent groupings, it allows
novel extensions of traditional home security concepts. As an example, the
opening of a Z-Wave enabled door lock can de-activate a security system
and turn on lights when children arrive home from school and send a
notification to a parent's PC or cell phone via the Internet. Opening a Z-
Wave enabled garage door can trigger exterior and interior home lights,
while a Z-Wave motion detector can trigger an outdoor security light and
a webcam, which would allow the end user to monitor the home while
away.

2.3.3. Universal Powerline Bus

The Universal Powerline Bus (UPB) is an industry emerging


standard for communication among devices used for home automation. It
uses powerline wiring for signalling and control.

Household electrical wiring is used to send digital data between UPB


devices. While in the X10 protocol, this digital data is encoded onto a
120KHz carrier which is transmitted as bursts during the relatively quiet
zero crossings of the 50 or 60 Hz AC alternating current waveform, the UPB
protocol works differently. The UPB communication method consists of a
series of precisely timed electrical pulses (called UPB Pulses) that are
superimposed on top of the normal AC power waveform (sinewave).
Receiving UPB devices can easily detect and analyse these UPB Pulses and
pull out the encoded digital information from them. UPB Pulses are

12 | P a g e
generated by charging a capacitor to a high voltage and then discharging
that capacitor’s voltage into the powerline at a precise time. This quick
discharging of the capacitor creates a large “spike” (or pulse) on the
powerline that is easily detectable by receiving UPB devices wired large
distances away on the same powerline.

UPB controllers range from extremely simple plug-in modules to very


sophisticated whole house home automation controllers. The simplest
controllers are plug-in controllers that are recommended for a moderate
number of switches and devices as it becomes cumbersome to control a
wide range of devices. More sophisticated controllers can control more
units and/or incorporate timers that perform pre-programmed functions
at specific times each day. Units are also available that use passive infrared
motion detectors or photocells to turn lights on and off based on external
conditions. Finally, whole house home automation controllers can be fully
programmed. These systems can execute many different timed events,
respond to external sensors, and execute, with the press of a single button,
an entire scene, turning lights on, establishing brightness levels, and so on.

2.4 Home Automation Implementation


Platforms

Home automation can be implemented over a number of


platforms namely, Powerline, RS232 serial communication, Ethernet,
Bluetooth, Infrared and GSM. Each platform having its own peculiarity and
area of application.

2.4.1 Powerline Communication


Powerline communication is a system for carrying data on a
conductor also used for electrical power transmission. Though electrical

13 | P a g e
power is transmitted over high voltage transmission lines, distributed over
medium voltage and used inside buildings at lower voltages, powerline
communication can be applied at each stage.

All powerline communication systems operate by impressing


a modulated carrier signal on the wiring system. Different types of
powerline communications use different frequency bands, depending on
the signal transmission characteristics of the power wiring used. Since the
power wiring system was originally intended for transmission of
alternating current (AC) power, in conventional use, the power wire
circuits have only a limited ability to carry higher frequencies. The
propagation problem is a limiting factor for each type of powerline
communications. Data rates over a powerline communications system vary
widely. Low-frequency (about 100 –200 KHz) carriers impressed on high-
voltage transmission lines may carry one or two analog voice circuits, or
telemetry and control circuits with an equivalent data rate of a few
hundred bits per second; however, these circuits may be many miles long.

2.4.2 RS232

The RS232 stands for recommended standard number 232. The


serial ports on most computers use a subset of the RS232 standard. The
full RS232 standard specifies a 25-pin "D" connector of which 22 pins are
used. Most of these pins are not needed for normal PC communications,
and indeed, most new PCs are equipped with male D type connectors
having only 9 pins, trading off compatibility with the standard against the
use of less costly and more compact connectors.

In RS232, the communicating devices are referred to as Data


Terminal Equipment (DTE) and Data Communication Equipment (DCE). The
DTE is an end instrument that converts user information into signals or
reconverts received signals and uses the male connector. The DTE is the

14 | P a g e
functional unit of a data station that serves as a data source or a data sink
and provides for the data communication control function to be performed
in accordance with link protocol. While the DCE is communication link
control device that provides the clock signal and uses the female
connector. The DTE ends the communication line, whereas the DCE
provides a path for communication. In connecting a DTE device to a DCE a
straight pin-for-pin connection is used. However, to connect two DCEs or
DTEs the transmit and receive lines must be crossed. The DTE is usually a
computer or a terminal device and the DCE is usually a modem.

2.4.3 BLUETOOTH

Bluetooth is an open wireless protocol for exchanging data


over short distances from fixed and mobile devices, creating personal area
networks (PANs). It was originally conceived as a wireless alternative to
RS232 data cables. It can connect several devices, overcoming problems of
synchronization. It is a standard and a 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 makes it possible for devices to
communicate with each other when they are in range. Because the devices
use a radio (broadcast) communications system, they do not have to be in
line of sight of each other.

Bluetooth uses a radio technology called frequency-


hopping spread spectrum, which chops up the data being sent and
transmits chunks of it on up to 79 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, Global Positioning
Systems (GPS) receivers, digital cameras, and video game consoles through

15 | P a g e
a secure, globally unlicensed Industrial, Scientific and Medical (ISM) 2.4
GHz short-range radio frequency band. The Bluetooth specifications are
developed and licensed by the Bluetooth Special Interest Group (SIG). The
Bluetooth SIG consists of companies in the areas of telecommunication,
computing, networking, and consumer electronics.

2.4.4 INFRARED

Infrared (IR) radiation is electromagnetic radiation whose


wavelength is longer than that of visible light (400 – 700 nm), but shorter
than that of microwave radiation. It's wavelength spans between 750nm
and 100 μm and is employed in short-range communication among devices
that conform to the standards published by the Infrared Data Association
(IrDA).
Remote controls and IrDA devices use infrared light-emitting
diodes (LEDs) to emit infrared radiation which is focused by a plastic lens
into a narrow beam. The beam is modulated, i.e. switched on and off, to
encode the data. The receiver uses a silicon photodiode to convert the
infrared radiation to an electric current. It responds only to the rapidly
pulsing signal created by the transmitter and filters out slowly changing
infrared radiation from ambient light. Infrared communications are useful
for indoor use in areas of high population density. IR does not penetrate
walls and so does not interfere with other devices in adjoining rooms.
Infrared is the most common way for remote controls to command
appliances.

2.4.5 GSM

GSM which stands for Global System for Mobile


Communication, is the most popular standard for mobile phone

16 | P a g e
communication in the world. It is used by over three billion people across
more than 212 countries and territories (Wikipedia,2018).
GSM basically provides voice call and short message service (SMS).
It operates as a cellular network that mobile phones connect to by trying
to search for cells in their immediate vicinity. The modulation used in GSM
is Gaussian minimum shift keying (GMSK), a kind of continuous-phase
frequency shift keying. In GMSK, the signal to be modulated onto the
carrier is first smoothed with a Gaussian low-pass filter prior to being fed
to a frequency modulator, which greatly reduces the interference to
neighbouring channels (adjacent channel interference). GSM networks
operate in the 900 MHz or 1800MHz frequency bands in most countries of
the world except in few countries like USA and Canada where 850 and 1900
MHz bands are used as the 900 and 1800 MHz bands were already
allocated. The GSM technology uses a 200 KHz radio frequency channels
that are time division multiplexed to enable up to eight users to access
each carrier.

A microcontroller is an inexpensive single-chip computer. Single-chip


computer means that the entire computer system lies within the confines
of the integrated circuit chip (Byte, 2002). The microcontroller on the
encapsulated silver of silicon has features similar to those of our standard
personal computer. Its ability to store and run unique programs makes it
extremely versatile, and its ability to perform maths and logic functions
allows it to mimic sophisticated logic and electronic circuits.
Microcontrollers are used in automatically controlled products and
devices, such as automobile engine control systems, remote controls,
office machines, appliances, power tools and toys. Hence, microcontrollers
due not function in isolation, they accept input from one or more devices
and provide output to other devices within a given system. In fact, they are
responsible for the intelligence in most smart devices in the consumer
market.

17 | P a g e
Fig 2.1 Bluetooth Module Fig 2.2 GSM Module

Fig 2.3 Arduino UNO

18 | P a g e
CHAPTER 3
METHODOLOGY
In designing a home automation system, one or more suitable
platforms are used in order to build a reliable and flexible system that can
be easily operated and adapted for a new household appliance. Therefore,
for the purpose of this project some specific deliberate choices were made
on the type of platforms, hardware components and mode of operation of
the home automation system.

3.1 PRELIMINARY CONSIDERATIONS

Before the actual design of the project work, specific deliberate


choices in selection of appropriate platforms and hardware components
were made. Priority was given to low cost availability, reliability, flexibility
and simplicity in all these sections.

3.1.1 Selection of Implementation Platform

As already explained in the previous chapter, there are many


platforms over which a home automation system can be implemented. Of
the currently available platforms -Powerline, RS-232, Ethernet, Infrared,
GSM and Microcontroller.RS-232, GSM and Microcontroller were found
most appropriate due to their low-cost availability, reliability and simplicity
when used for an individual control home automation system on which the
project is on. Powerline and Ethernet are too expensive and complex for
this kind of home automation system while Bluetooth and infrared are
unreliable.

19 | P a g e
3.2 SYSTEM DESIGN

The designed home automation system uses PIC18F4455


microcontroller, Nokia 6021 mobile phone, RS232 standard for
communication between the microcontroller and mobile phone, HIN232
for interfacing the microcontroller, a relay and a driver for interfacing the
relay. As illustrated in the block diagram shown in figure 3.1, when the
Nokia 6021 receives the required signal, it communicates via the RS232 and
HIN232 to the PIC18F4455, the PIC18F4455 controls the relay state via a
driver and this in turn determines the state of the connected appliance,
whether switched on or off.

Fig 3.1 Block Diagram

20 | P a g e
3.2.1 PIC18F4455

PIC18F4455 is manufactured by Microchip Incorporation based


in United States of America and is one of their Harvard architecture-based
microcontroller series called PIC. PIC is generally assumed to mean
“programmable interface controller”. The PIC microcontroller contains a
CPU (central processing unit), RAM (random access memory), ROM (read-
only memory), I/O (input/output) lines, serial and parallel ports, timers and
sometimes other built in peripherals such as A/D (analogue-to-digital) and
D/A (digital-to-analogue) converters.

Figure 3.2 shows the interactions (data flow) between the main
microcontroller parts.

Figure 3.2: Interactions between the main microcontroller parts

21 | P a g e
3.2.1.1 Central Processing Unit

The CPU is responsible for all the computing, it fetches, decodes


and executes program instructions and directs the flow of data to and from
memory. It performs the calculations required by program instructions and
places the results of these calculations, if required, into memory space.
Most CPUs are synchronous, meaning that they depend on the cycles of a
processor clock, this clock generates a high-frequency square wave usually
driven by a crystal, a RC (resistor capacitor) or an external source. The clock
is sometimes referred to as an oscillator. The clock speed, or oscillation
rate, is measured in megahertz (MHz) which represents one million
cycles/second.

3.2.1.2 Random Access Memory (RAM)

The RAM, random access memory, is used to write and read data
values as a program runs. RAM is volatile meaning that if the power supply
to the microcontroller is removed, its contents are lost. All variables used
in a program are allocated from the RAM. The time to retrieve information
from RAM does not depend upon the location of the information because
RAM is not sequential, hence the term random access. Most small PIC
microcontrollers provide very little RAM which forces you to write
applications that use RAM wisely. Manipulating large data structures and
using pointers, re-entrant or recursive functions use large amounts of RAM
and are techniques which are generally avoided on microcontrollers

3.2.1.3 Read Only Memory (ROM)

The ROM, read only memory, is non-volatile memory used for


program information and permanent data. The microcontroller uses ROM

22 | P a g e
memory space to store program instructions it will execute when it is
started or reset. Program instructions must be saved in non-volatile
memory so that they are not affected by loss of power, the microcontroller
usually cannot write data to program memory space.

3.2.1.4 Input and Outputs Port (I/O)

Without some means of getting information and signals in and out,


the microcontroller will have little or no use. Hence, the input and output
ports are used to pass data in and out of the microcontroller in a controlled
manner, often according to a standard protocol. The PIC microcontroller
ports are of two types namely, serial and parallel ports. They can operate
in two main modes namely, synchronous and asynchronous modes. The
parallel I/O ports require a data line for each bit in a byte, while the serial
I/O uses a single data line for all the bits in the data stream by transferring
the bits in sequence. The synchronous mode involves synchronizing the
data transfer with a clock while the asynchronous mode does not. PIC
microcontrollers most often have parallel I/O capability built in and the
serial I/O as a peripheral feature.

3.3 RELAY
Relay is a small electrical switch consisting of an electromagnet (coil), a
switch and a spring, that opens and closes under the control of another
electrical circuit. The spring holds the switch in one position, until a current
is passed through the coil, the coil generates a magnetic field which moves
the switch. Because the relay is able to control an output circuit of higher
power than the input circuit, it is often used to automatically switch large
electrical power devices (Wikipedia, 2018).

There are many types of relay, namely;

• Latching relay – This relay has two relaxed states (bistable) and it is
often referred to as 'impulse', 'keep' or 'stay' relay. When the current is

23 | P a g e
switched off, the relay remains in its last state. This is possible due to a
solenoid operating a ratchet and cam mechanism, or by having two
opposing coils with an over-center spring or permanent magnet to hold the
armature and contacts in position while the coil is relaxed. Hence, the first
pulse of current to the coil turns the relay on and the second pulse turns it
off.

• Reed relay – This relay has a set of contacts inside a vacuum or inert gas-
filled glass tube, which protects the contacts against atmospheric
corrosion. The contacts are closed by a magnetic field generated when
current passes through a coil around the glass tube. Reed relays are
capable of faster switching speeds than most other relay types, but have a
low switch current and voltage ratings.

• Contactor relay – This is a very heavy-duty relay used for switching


electric motors and lighting loads. High current contacts are made with
alloys containing silver. Though there is an unavoidable arcing and the
contacts oxidize, the silver oxide formed is still a good conductor.
Contactor relays are often used for motor starters and they generate a lot
of noise when switching.

• Solid-state relay – This relay type is a solid state electronic component


that provides the same function as the electromagnetic relay. It is just that
it does not have any moving part which increases its long-term reliability.

Fig 3.3 RELAY MODULE

24 | P a g e
CONCLUSION
It is evident from this work that an individual control home
automation system can be cheaply made from low-cost locally
available components and can be used to control multifarious
home appliances ranging from the security lamps, the television
to the air conditioning system and even the entire house lighting
system. And better still, the components required are so small and
few that they can be packaged into a small inconspicuous
container.

The designed home automation system was tested a number of


times and certified to control different home appliances used in
the lighting system, air conditioning system, heating system,
home entertainment system and many more (this is as long as the
maximum power and current rating of the appliance does not
exceed that of the used relay).

Finally, this home automation system can be also implemented


over Bluetooth, Infrared and WAP connectivity without much
change to the design and yet still be able to control a variety of
home appliances. Hence, this system is scalable and flexible.

25 | P a g e
REFERENCES
Byte Craft (2002). First Steps with Embedded Systems. Byte Craft Limited,
Canada.

B & B Electronics (2003) RS-232 connections that work! DTE & DCE
FAQ. From http://www.bb-elec.com Retrieved on 29/03/2018

Collins, T. J. (2008). A project report on the design and construction of a


low voltage power line communication system. Project Report, FUTA
Akure.

Intersil (2008). HIN232 datasheet. Intersil Inc, USA.

Martin Bates (2006). Interfacing PIC Microcontrollers Embedded Design


by Interactive Simulation. Newnes, London.

Microchip (2007). PIC 18F2455/2550/4455/4550 Data Sheet. Microchip


Technology. Inc, USA

Nigel Gardner (1998). An Introduction to programming the Microchip PIC


in C. Character Press, UK.

Wikipedia. Automation. From http://en.wikipedia.org/wiki/Automation.


Retrieved on 7/03/2018

Wikipedia. Bluetooth. From http://en.wikipedia.org/wiki/Bluetooth.


Retrieved on 7/03/2018

26 | P a g e
Wikipedia. Building Automation. From
http://en.wikipedia.org/wiki/Building_automation. Retrieved on
7/03/2018

Wikipedia. Ethernet. From http://en.wikipedia.org/wiki/Ethernet.


Retrieved on 8/03/2018

Wikipedia. GSM. From http://en.wikipedia.org/wiki/GSM. Retrieved on


8/03/2018

Wikipedia. Home Automation. From


http://en.wikipedia.org/wiki/Home_automation. Retrieved on 7/03/2018

Wikipedia. INSTEON. From http://en.wikipedia.org/wiki/INSTEON.


Retrieved on 8/03/2018

Wikipedia. KNX (standard). From


http://en.wikipedia.org/wiki/KNX_(standard). Retrieved on 8/03/2018

Wikipedia. Microcontroller. From


http://en.wikipedia.org/wiki/Microcontroller. Retrieved on 8/03/2018

Wikipedia. RS232. From http://en.wikipedia.org/wiki/RS232. Retrieved


on 21/03/2018

Wikipedia. X10 (Industry Standard). From


http://en.wikipedia.org/wiki/X10_(industry standard). Retrieved on
8/03/2018

Wikipedia. Z-Wave. From http://en.wikipedia.org/wiki/Z-Wave.


Retrieved on 8/03/2018

27 | P a g e

You might also like