You are on page 1of 24


Universiti Teknologi MARA

Home Automation System

Using Parallel Port

Muhamad Syahrizam bin Salidin

Thesis submitted in fulfillment of the requirements for

Bachelor of Science (Hons) Information System
Faculty of Information Technology And
Quantitative Science

November 2005




This thesis was prepared under the direction of thesis supervisor, Mohd Zaki Ghazali. It
was submitted to the Faculty of Information Technology and Quantitative Sciences and
was accepted in partial fulfillment of the requirements for the degree of Bachelor of
Information System Engineering.

improved by:

Mohd 2^aki Ghazali

Thesis Supervisor

Date: NOVEMBER 18,2005


I certify that this project to which it refers are the product of my own work and that any
ideas or quotation from the work of other people, published or otherwise are fully
acknowledged in accordance with fhe standard referring practices of the discipline.




The main purpose of this project is to help users how to control their electrical
appliances while they are not at home through the control timer. This projectfocusedon
the developing home automation system in Windows platform. The home apphances can
be controlled through parallel port on Personal Computer (PC) by program developed
using software for example Microsoft Visual Basic. The home appliances and the PC
can be accessed and controlled via parallel port cable by a Home Automation System
program. Parallel port interface circuit was constructed for the purpose of the controlling
the appliances. Basically the parallel port is to be used as a media inter&ce in this
controlling purpose. The parallel port is a very simple and affordable technique in
controlling external circuitry. With just a D-Type 25 Pin Male Connector, buffers, relays
and simple wiring, the computer can be interfaced to the external devices.





1.1 Background 1
1.2 Problem statement 3
1.3 Objective of the project 4
1.4 Scope of the project 4
1.5 Significance of the project 5
1.6 Structure and organization of this document 5

1.7 Conclusion 6


2.1 Introduction 7
2.2 Overview of Home Automation
2.2.1 Home Automation Defined 7
2.2.2 Why Home Automation? 8


2.2.3 Home Automation Works 9
2.2.4 Method of control 10
2.2.5 Items to be controlled 12
2.2.6 Types of system 13
2.2.7 Systems costs 14
2.3 Programming Language 15
2.3.1 Visual Basic (VB) 16
2.3.2 Visual Basic Features 17
2.4 ParaUelPort 18
2.4.1 Introduction to the Parallel Port 18
2.4.2 Why ParaUelPort 21
2.4.3 Parallel Port Mode 22
2.4.3[a]SPPMode 22
2.4.3[b] EPP Mode 24
2.5 Similar Works and Research
2.5.1 Controlling Home Appliances Over The Internet By
Muhammad Ucar, Drexel University, Philadelphia, US. 24
2.5.2 Auto-Mate: Intelligent Home Automation Using Mains
Power Communications by Warren Astings, University
Of Queensland, Australia. 27
2.6 Review of Similar Home Automation Products
2.6.1 Secure SmithfromINIX Technologies Sdn. Bhd.
(Adaptedfrom 28

2.6.2 SecurityfromInfotech Accord Sdn. Bhd.

(Adaptedfrom 30
2.7 Conclusion 31



3.1 Introduction 32
3.2 Planning 34
3.3 Problem Identification 34
3.4 Information Gathering 35
3.5 Project Requirement 35
3.5.1 Hardware 37
3.5.2 Software 37
3.6 Product Design
3.6.1 Prototype Design 39
3.6.2 Home Prototype
3.6.2[a] Introduction 40
3.6.2[b] Home Prototype Components 40
3.6.3 Controller Circuit Schematic Diagram 41
3.6.4 The External Power Supply 44
3.6.5 Development of the Control Circuit 44
3.6.6 Testing the HACB 48
3.6.7 Troubleshooting 49
3.6.8 Pilot Run 50
3.7 Documentation 54
3.8 Conclusion 54


4.1 Introduction 55
4.2 Password 56
4.3 Main Menu 57
4.3.1 Home Plan 58
4.3.2 Clock 59


4.3.3 Control Buttons 59
4.3.4 Panel Buttons 60
4.3.4[a] Lock Button 61
4.3.4[b] Setting Button 61
4.3.4[c] Exit Button 67
4.4 Conclusion 67


5.1 Introduction 68
5.2 Result 68
5.2.1 The Project Requirements 69
5.2.1 [a] Software 69
5.2.1[b] Hardware 70
5.2.2 The Prototype Design 78
5.2.2[a] Home Prototype 78
5.2.2[b]HACB Prototype 80
5.2.3 Testing the HACB 82
5.2.4 Home Prototype Experiment 83
5.3 Conclusion 88


6.1 Introduction 89
6.2 Recommendation 89
6.3 Conclusion 90




APPENDIX A A Gantt Chart for Developing Home Automation System

APPENDIX B Crime Rate StatisticfromRoyal Malaysia Police (RMP)

Official Website

APPENDIX C In-Progress Assessment

APPENDIX D Simple I/O Circuit and Electronic Components

APPENDIX E Step by step installing Visual Basic

APPENDIX F Basic System Simple I/O Circuit using Visual Basic

APPENDIX G Coding Visual Basic for Home Automation System

APPENDIX H Cost for Developing Home Automation Control Box (HACB)



2.1 Pin assignments of the D-Type 25 pin for SPP mode and
Parallel Port Centronics Connector 23
2.2 EPP mode pin signal 24
3.1 Hardware requirement for the project 37
3.2 Software requirement for PC 39
3.3 List of home prototype components 41
3.4 List of all tools that are going to be used for constructing the
circuits 45
3.5 List of all electronic components has used for this circuit 45




^F - microFarad
AV - Audio Video
CMS - Central Monitoring System
D-RF - Digital Radio Frequency
DB - Distribution Box
DVD - Digital Versatile Disk
ECP - Extended Capabilities Port
EPP - Enhanced Parallel Port
GUI - Graphical User Interface
HACB - Home Automation Controller Box
HVAC - Heat, Ventilation and Air Conditioner
ICT - Infonnation Communication Technology
10 - Input output
kbps - kilo bit per second
LCD - Liquid Crystal Display
LED - Light Emitting Diode
PC - Personal Computer
PDA - Personal Digital Assistant
PLC - Power Line Carrier
RF - Radio Frequency
RM - Ringgit Malaysia
RMP - Royal Malaysia Police
SPP - Standard Parallel Port
VB - Visual Basic




2.1 A typical parallel port on the back of the computer 19

2.2 Types of parallel cable 20
2.3 Pin assignment of the parallel port on the back of the computer 21
2.4 8255 inter&ce card 25
2.5 Terminal expansion board 26
2.6 SPDT Relay Circuit 26
2.7 The circuit is being tested 26
2.8 Secure Smith Central Unit 29
2.9 Security Control Unit 31
3.1 The methodology overview 33
3.2 Framework for developing HACB 36
3.3 Flowchart of the program 38
3.4 The home prototype 40
3.5 Schematic diagram of control circuit 42
3.6 Schematic diagram of inside the ULN2803 43
3.7 Schematic diagram of simplest application of ULN2803 43
3.8 Schematic diagram of the external power supply 44
3.9 Wiring design of the control circuit on the strip board 46
3.10 The actual wiring design of the control circuit on the strip board 47
3.11 The illustrated connection of the DB25 male type 47
3.12 The actual connection the HACB control circuit and the
computer parallel port 48
3.13 Testing using LED on HACB 48
3.14 12 Volt power supply unit 49
3.15 HACB is connected to the desktop parallel port 49
3.16 Prototype design of HACB 50


3.17 The plug 3 pin with Fuse 13 Amp 51
3.18 Real connection between Home Prototype, HACB and
Home Automation System 51
3.19 The connection plug 3 pin with socket domestic power 240VAC 52
3.20 The connection power cable (life)fromdomestic power
240VACtoHACB 52
3.21 The connection power cable (neutral)fromdomestic power
240VAC to Home Prototype 52
3.22 Schematic Diagram connection bettveen Home Prototype,
HACB and Home Automation System 53
4.1 Data Control for Home Automation System 56
4.2 Home Automation System Password 57
4.3 Home Automation System Main Menu 58
4.4 Home Plan 58
4.5 Clock 59
4.6 Control Buttons 60
4.7 Panel Buttons 60
4.8 System Locked 61
4.9 Hardware Setting 62
4.10 Security Setting 63
4.11 Password Setting 63
4.12 Lock Button Disable 64
4.13 Open Lock Button 64
4.14 System Locked at the system 65
4.15 Control Timer 66
4.16 Set Time 66
4.17 Exit Button 67
5.1 Windows XP Professional 69
5.2 Microsoft Visual Basic 70
5.3 Computer (Desktop) Pentium 4 2.0GHz 70


5.4 DB 25 Male Type Connector 71
5.5 2.0 Meter Cable 71
5.6 Ruler, Marker, Eraser and Pencil 71
5.7 Sal tape and Double Site Tape 72
5.8 Glue 72
5.9 Wire 72
5.10 Polystyrene 72
5.11 Wire Cutter 73
5.12 Multimeter 73
5.13 Screwdriver 73
5.14 Sucker Pump 73
5.15 Soldering Lead 74
5.16 Soldering Iron 74
5.17 Polystyrene 74
5.18 Black Cardboard 75
5.18 Lamp Socket 75
5.19 Lamp 75
5.20 StoidFan 76
5.21 Wired Connector 76
5.22 Plug 3pin 3 Amp 76
5.23 CD-Rom Driver 76
5.24 Strip Board 77
5.25 PCB Mounted DB25 Socket 77
5.26 Red LED, 560ohm Resistor, 1N4004 and 1N914 Diode 77
5.27 ULN2803 IC, Connector Terminal, Relay 12 V and Wired Jumper 78
5.28 Negative and Positive Terminal 78
5.29 Floor plan design of the home prototype 79
5.30 Four Lamps on gate and one ^ t e door 79
5.31 Four lamps in hall, one in parking lot and one in bedroom 80
5.32 One fan in hall and one in bedroom 80


5.33 Wiring Design of the Control Circuit on the Strip Board 81
5.34 The Actual Wiring Design of the Control Circuit on the
Strip Board 81
5.35 Prototype Design of HACB 82
5.36 Testing the HACB 82
5.37 'Home Automation System' program 83
5.38 Gate door open at system and home prototype 84
5.39 Gate lamp ON at system and home prototype 84
5.40 Outside lamp ON at system and home prototype 85
5.41 IfoU lamp ON at system and home prototype 85
5.42 Hall fan ON at system and home prototype 85
5.43 Bedroom lamp ON at system and home prototype 86
5.44 Bedroom fan ON at system and home prototype 86
5.45 Control Timer for control gate door 87
5.46 Gate door open at time 23:33 and close at time 23:34 87




1.1 Bacl^round

The occurrences of housebreaking in Malaysia especially during the festive

season are getting worse. Most of the successfiil robbery occurred during the
absent of the occupant who lives there. This scenario has limited the house
owner to have enjoyable life while they are awayfromhome. As a result, before
leaving the residential for a vacation or outstation duties, the home owner will
turn on some of the electrical devices to show that the residential is occupied or
to show a lively environment of the residential. This not only could pose a treat
to existence of the residential but it also adds weight to monthly electricity bill.

However, with the rapid changing of the information communication technology

(ICT), many smart home specialists have come forward to provide home
automation system and security system for homes and businesses. It is very much
useful in today's modem busy society. The existence of this technology has
engineered the educated community to transform a hving home into a smart
home. For decades home automation has been a techno-dream that never really
came true. It has either been a hobbyist passion or luxury for the ehte group.

The home automation system gives us the power to control lights and domestic
appliances using computers. With some additional gadgetry and software,
computers can be transformed into an assistive technology to our home. Yet its
design and features can give us some idea of what tomorrow's intelligent houses
will be capable of There can be no doubt that computers will eventually find

their way into all modem homes. Hence, these computers will be capable of
more than just high powered gaming, video-editing and nmning Office
applications faster than ever before.

The latest innovation of home automation technology is remotely controlled and

monitored the domestic electrical appUancesfi'omdistance which mean its can
be controlled over the intemet. This technology has been widely marketed and
used predominantly in larger building such as office blocks, shops and for rich
and £amous. At present, most of the home automation systems with this
technology which are vastly available in the market are being offered for new
home township development only and it will be expensive if the developers
themselves selling this technology to the consumers. Furthermore, the consumers
need to pay extra money for the services of central monitoring system (CMS)
each month.

However this matter can be overcome by Do-It-Yourself (DIY) equipment. With

the availability of the flexible rate of the broadband connection and also with the
availability of the massive electronic components in the local market, an
affordable home automation system can be a reality. A self developed of home
automation can be constructed by utilizing all the available resources of
technologies at home such as computers and the high speed intemet connection.
It might not be as intelligent as the expensive home automation technologies
vMch are available in the current market but the objectives are more or less is
the same. Ultimately, it is about home security and easy living. It is also will be
an alternative way to help cut household bills and save energy.

1.2 Problem Statement

A home automation system is an incredible technology which can be purchased

easily in the market. It work of art is fantastic and so do the price. The products
are no doubts use a lot of electronics devices. However the electrical and
electronics components and devices which can be used to produce a lot of
gadgets are nowadays can easily be found in the market. Due to this, the home
automation system can be developed but with Umitation of the fimctions or

The market for smart wiring and home automation systems is still in its infancy
in Asia. Understanding the capabiUties of these systems is currently very hmited
within the housing industry. Some industry experts believe that the bulk of the
current market is made up of a combination of wealthy individuals and
technophiles (von Hof&nan, 1998).

Referring to the title "Home Automation System", the system that will be
developed is because of the several problems that arise in our today's modem
society. They are:

1. A system of home automation products can cost more than RM 1000 for end
users. Although this technology is available in the local and international
market, not all people can afford it.

2. The increasing number of housebreaking caused the anxiety to people to

leave their house. We will feel inferiors every time going out for a vacation
because of the incomplete security system surrounding the house. We cannot
always rely on our neighbour to look after our house while we are away from
home unless we are rich enough to hire a house security guard.

13 Objective of the project

This research is done to achieve four objectives:

1. To identify the project requirements including software and hardware.

2. To design the prototype including Home Prototype and Home Automation

Control Box prototype.

3. To testing the Home Automation Control Box (HACB) with home

automation system program.

4. To develop a system that can be interfaced with the PC parallel port for
controlling the home electrical q)pliances and also control using control
timer in home automation system.

1.4 Scope of the project

The scope of this project which needed to be emphasized for the completion of
the project consists of following criteria.

1. The circuitry of controlling the electrical appUances that is needed to be

formulated in period of two semesters.

2. The development of the project is focus on controlling home appliances such

as the lamps, fans and gate using parallel port.

1.5 Significance of the project

To create a Mly integrated, versatile, intelligent home that makes its own
decisions for optimizing the secure home's operation. Foremost is maximizing
the comfort, safety, security, money savings and enjoyment of the people who
hve there.
Self controlling the appliances will help to reduce the cost of maintenance
instead of using the commercial security system for residential (Woodnutt,
1998). Despite of controlling appliances and lamps locally, the home owners are
enable to operate them remotely while they are awayfromhome. It will benefit
the people who always leave their home for outstation duty and it is utterly
helpfrd for the family who are going for a long vacation especially during festive

1.6 Structure and Organization of this document

This thesis provides an overview of the design and subsequent experiment of a

home automation system tentatively titled Home Automation System using PC
Parallel Port.

Following this introductory chapter the next section, Chapter Two, explores the
overview of home automation technology and all the terminologies that will be
used during the project development. The related works and products will also be
discussed in Chapter Two.

Chapter Three then will move on to explain in detail the techniques used to
complete the project efficiently within time given.

Develop 'Home Automation System' program used for this project will be
e>q)lained in the Ch^ter Four. The Microsoft Visual Basic tool used in achieving
the objectives for this project will be e)q)lained in detail.

In the Chapter Five, we will discussed Ae result andfindingfor the project. In

this chaipter we will be explained the necessary of project requirements, the home
prototype and control circuit, testing the HACB and also the fimctions of home
automation system using parallel port.

Finally, in Chapter Six we will provide some brief concluding remarks on what
may be considered a successful thesis project we will make and also a possible
direction for the prototype that we design.

1.7 Conclusion

With the imderstanding of the concept of the home automationftmctionality,the

e7q)loration of self-developing of a few features and functions of it can be
implemented. The study of the related available home automation products in the
market will be a useful assist in the project experimentation. The successful of
this project will decrease the anxiety of the resident leaving their residential and
also will be an alternative solution in avoiding the crime of house break-in.
Furthermore, the successful experimentation of this project will maximize the
home's technological capabilities.



2.1 Introduction

This chapter will be a review on some literature that related to the home
automation system. From the particular to the area of research, literature review
is the documentation of a conq)rehensive review of the pubhshed and
unpublished workfromsecondary source of information. The overview of home
automation system will be described in detail in this chapter. Furthermore, the
literature on the programming language used for this research project on
achieving it goal. This will follow by the review of the technical terminologies
that will be used in tiiis research project. The review on the similar works and
research from the other researchers will be included in this chapter. Finally, we
will review similar products which are available in the local market. Most of
these articles or Uteratures are gathered on browsing through the internet and also
from the printed material.

2.2 Overview of Home Automation

2.2.1 Home Automation Defined

By definition, according to GuruNet (2003), automation refers to the automatic

operation or control of equipment, a process, or a system without conscious
thought. It also can be defined as the use of computers to perform tasks
previously performed by people.

The Home Automation is one that provides a comfortable and productive
environment through automated control systems such as fire safety, security and
energy/Ughting management (Clements, 1998). This reflects the evolution from
Energy Management Systems in which a central computer was used to control
the building services.

According to Bill Gates (2000), home automation is predicted to become a boom

industry by technology pundits. It can provide additional time for recreational
piirsuits, monetary savings through power management and peace of mind that
valued homes and contents are being monitored 24 hours a day. For elderly or
disabled people home automation could prove to enhance their quality of life

222 Why Home Automation?

Home automation means much more than comfort and convenience. Is it a much
better chance of avoiding a break-in if the house looks occupied, even if nobody
is home? According to Royal Malaysia PoUce (RMP) oflBcial website, the
statistic of the crime rate in Malaysia describes that the burglars would much
rather hit an unoccupied house, especially at night. Nothing screams
UNOCCUPIED to a burglar more than a dark house at night. Adding some
ine?q)ensive light controllers that can turn on and off Ughts at different times each
day will make the house look occupied. Turning on and off a radio or television
add to the effect. Even if the occupant has an alarm system, it will not go off
until the burglar has broken a door or window. For much less than it would cost
to repair that damage, the occiq)ant can purchase numerous light and appliance

Avoiding a break-in not only saves money, but it also saves the mental anguish
that goes along with a break-in. Adding light and appUance conti-oUers to avoid a
break-in is a smart investment in home security and peace of mind.

The Home Automation can give benefit to groups such as women (Peterson,
2001). The elderly or people with handicaps, enabling them to maintain a larger
degree of independence with increased safety and security through the use of
automated and/or remote control of the various functions within the home

According to Edward Steinfeld (1996), there are clearly many benefits to home
automation. The first is greater comfort and convenience. A second is improved
safety and security. A third is a high level of control over operating costs for
example, energy conservation.

2.2.3 Home Automation Works

A home automation technology can enable the person by assisting in daily

routines and enabling the individual to achieve tasks, they might not have
previously been able to achieve. Tasks can range in levels of complexity fi'om
simple tasks such as turning on or off lights through to fully automating the
majority of electrical systems within the house.

Referring to Bill Gates (2000), we will be able to control our entertainment

systems in simple but elegant ways, use any TV in the house to monitor
inexpensive outdoor surveillance cameras and connect to the Internet fi'om
multiple locations. Some of these tasks will not require a PC, but in the end it
will make sense to have a computer to quietly orchestrate the operations of the
systems in a house.