HOME AUTOMATION SYSTEM USING POWER LINE COMMUNICATION

DARLENE BINTI MOHAMAD DOUGLAS

A report submitted as partial fulfillment of the requirements for the award of the Degree of Bachelor of Electrical Engineering (Electronics)

Faculty of Electrical & Electronics Engineering Universiti Malaysia Pahang

NOVEMBER 2008

UNIVERSITI MALAYSIA PAHANG

BORANG PENGESAHAN STATUS TESIS
JUDUL:

HOME AUTOMATION SYSTEM USING POWER LINE COMMUNICATION
SESI PENGAJIAN:________________ 2008/2009 ________________________________________________________________ DARLENE BINTI MOHAMAD DOUGLAS ( 861031-59-5268 ) (HURUF BESAR)

Saya

mengaku membenarkan tesis (Sarjana Muda/Sarjana /Doktor Falsafah)* ini disimpan di Perpustakaan dengan syarat-syarat kegunaan seperti berikut: 1. 2. 3. 4. Tesis adalah hakmilik Kolej Universiti Kejuruteraan & Teknologi Malaysia. Perpustakaan dibenarkan membuat salinan untuk tujuan pengajian sahaja. Perpustakaan dibenarkan membuat salinan tesis ini sebagai bahan pertukaran antara institusi pengajian tinggi. **Sila tandakan (  ) SULIT TERHAD (Mengandungi maklumat yang berdarjah keselamatan atau kepentingan Malaysia seperti yang termaktub di dalam AKTA RAHSIA RASMI 1972) (Mengandungi maklumat TERHAD yang telah ditentukan oleh organisasi/badan di mana penyelidikan dijalankan)

TIDAK TERHAD Disahkan oleh:

___________________________ (TANDATANGAN PENULIS) Alamat Tetap: NO.4, LRG DESA DAHLIA 1/6, TMN. DESA DAHLIA, SENAWANG, 70450 SEREMBAN, N. SEMBILAN. Tarikh: 17 NOVEMBER 2008

___________________________
(TANDATANGAN PENYELIA)

ROSMADI BIN ABDULLAH ( Nama Penyelia ) Tarikh: : 17 NOVEMBER 2008

CATATAN:

* Potong yang tidak berkenaan. ** Jika tesis ini SULIT atau TERHAD, sila lampirkan surat daripada pihak berkuasa/organisasi berkenaan dengan menyatakan sekali tempoh tesis ini perlu dikelaskan sebagai atau TERHAD.  Tesis dimaksudkan sebagai tesis bagi Ijazah doktor Falsafah dan Sarjana secara Penyelidikan, atau disertasi bagi pengajian secara kerja kursus dan penyelidikan, atau Laporan Projek Sarjana Muda (PSM).

“I hereby acknowledge that the scope and quality of this thesis is qualified for the award of the Bachelor Degree of Electrical Engineering (Electronics)” Signature Name Date : _________________________ : ROSMADI BIN ABDULLAH : 17 NOVEMBER 2008 .

ii “All the trademark and copyrights use herein are property of their respective owner. References of information from other sources are quoted accordingly. otherwise the information presented in this report is solely work of the author.” Signature Author Date : ____________________________________ : DARLENE BINTI MOHAMAD DOUGLAS : 17 NOVEMBER 2008 .

. Mohamad Douglas Bin Abdullah and Che Minah Binti Daik who’s been with me through all the years.iii Specially dedicated to my beloved parents. my precious friends and those people who have guided and inspired me throughout my journey of education.

enjoyable and memorable. My fellow friends under the same supervisor should also be recognized for their support and ideas. my sincere appreciation also extends to all my colleagues and others who have provided assistance at various occasions. I would also like to thank to all UMP’s lecturers and electrical technicians whom had helped directly or indirectly. invocation and greetings to adoration of Nabi Muhammad (S. In particular. Unfortunately. for encouragement. Not to be forgotten. Rosmadi Bin Abdullah. I sincerely appreciated all of the efforts and precious time to be spent together in making this final year project educational. . In addition. thanks to God because giving me strength and patience in finishing this Final Year Project (Projek Sarjana Muda). Their views and tips are useful indeed. The great cooperation and kindheartedness to share worth experiences that have been shown by them will be always appreciated and treasured by me. guidance. it is not possible to list all of them in this limited space. Mr. my deepest thanks to my parents for all the support and blessings.W. I wish to express my sincere appreciation to my supervisor.iv ACKNOWLEDGEMENT In the name of Allah.A. Alhamdulillah. thank you.). critics and friendship.

A simple home automation system using power line communication (PLC) which is convenient for people with disabilities and elderly to control lamps and gates using a computer at home is showed in this paper.0. the power line increasingly become a popular transmission medium in creating residential network. It requires only electricity to run the system. The buttons are designed using the Visual Basic 6. connecting to the PLC modem serially using Recommended Standard 232 (RS232) and a transceiver MAX232. the home appliance specified is the gate and the lamp.v ABSTRACT In recent years. This modem is plugged into regular power outlet. Hence this system is very simple and cheap. The receiver demodulates the carrier wave and sends the signal to the micro controller which is the PIC16F877. The PIC controls the home appliances to function. for its convenient installation and low cost. The PLC modem (TDA5051A) operates by modulating in a carrier wave of between 20-200 kHz into the household wiring at the transmitter. In this project. User will automate the home appliance based on the Graphical User Interface (GUI) by selecting the button appeared on their computer screen. . The computer operates as a host station. The receiver has an address and can be commanded by the signals transmitted over the household wiring and decoded at the receiver. The carrier is modulated by digital signals (Amplitude Shift Keying). These problems can be overcome by using the Home Automation System Using Power Line Communication (PLC) at home which is user friendly and cost efficient. The objective of this project is to build a home automation system using a PLC modem and applying PIC microcontroller to control and automate lamps and gates. In houses. lamp switches normally located at a high location and it is hard to reach for the switches without help for kids and disable person including people who unable to move a lot due to accident cases.

Objektif projek ini adalah untuk membina satu sistem automasi kediaman menggunakan modem PLC dan mengaplikasikan pengawal mikro PIC untuk mengawal dan mengautomasikan lampu dan pagar rumah.0. suis lampu biasanya terletak pada paras yang sukar dicapai oleh kanak-kanak dan golongan orang kurang upaya termasuklah golongan yang menghadapi kesukaran untuk bergerak akibat kemalangan.vi ABSTRAK Talian elektrik telah menjadi semakin popular sebagai medium pemancar dalam mewujudkan rangkaian perumahan. Pengawal mikro mengawal peralatan elektrik untuk berfungsi. Pengguna akan mengautomasi peralatan elektrik di rumah berasaskan Antaramuka Pengguna Bergrafik (GUI) dengan menekan butang pada skrin computer. Maka. Modem PLC (TDA5051A) berfungsi dengan mengubahsuaikan gelombang pembawa diantara 20-200 kHz pada pemancar ke pendawaian di kediaman. Satu sistem automasi kediaman mudah yang menggunakan PLC yang sesuai untuk golongan kurang upaya dan warga emas untuk mengawal lampu dan pagar dengan menggunakan computer di rumah ditunjukkan. sistem ini sangat mudah dan murah. Sistem ini hanya memerlukan bekalan elektrik untuk menjalankannya. Butang-butang ini direka dengan menggunakan Visual Basic 6. Penerima pula mendapat alamat dan boleh diarahkan oleh isyarat yang telah dipanncarkan ke pendawaian dan kod ditafsir pada penerima. Dalam sesebuah rumah. Masalah ini boleh diselesaikan dengan menggunakan Sistem Automasi Kediaman yang menggunakan komunikasi talian elektrik (PLC) yang mudah digunakan dan kos efisien. Komputer berfungsi sebagai stesen utama. Gelombang pembawa ini diubahsuai oleh isyarat digital (ASK). menghubungkan modem PLC secara siri dengan menggunakan RS232 dan MAX232. .

3 Scopes of Project 1.3 Amplitude Shift Keying (ASK) 2.1 Power-line Communication in Home Automation 2.4 Microcontroller 5 5 6 8 8 .5 Thesis Overview 2 LITERATURE REVIEW 2.4 Problem Statement 1.1 Introduction 1.2 Objective 1.2 PLC Modem 2.vii TABLE OF CONTENTS CHAPTER DECLARATION DEDICATION TITLE PAGE ii iii iv v vi vii x xii xiii xiv xvi ACKNOWLEDGEMENT ABSTRACT ABSTRAK TABLE OF CONTENTS LIST OF FIGURES LIST OF TABLES LIST OF SYMBOLS LIST OF ABBREVIATIONS LIST OF APPENDICES 1 INTRODUCTION 1 1 2 2 3 3 1.

3.2.4.1 Transmission mode of TDA5051A 3.1 PIC16F877 3.3.2 Improve sensitivity circuit 3.2 Visual Basic Programming 3.4.2.2 GUI 3.3.1.4 Receiver Module 3.4.4.1 Visual Basic 2.4.2 “Bug” Problem 3.1.1.1.1 TDA5051A 3.3.3.4.1.1 VBCom parameter setting 3.1.2 PIC LED Test 3.3 Hardware Development 3.1 PIC Module 3.1 LED Test 3.3.3.3 Voltage Regulator 3.6 RS232 9 11 11 12 3 METHODOLOGY 3.3.3.3.3.3.4.4.4.1.1 PIC 16F877 2.3.3.1 Visual Basic Design 3.2.viii 2.5 Graphical user interface (GUI) 2.3.2.3.2 Metal Oxide Varistor (MOV) 3.4.2 VBCom port setting 13 13 14 14 14 14 15 16 16 19 21 21 22 22 23 23 24 24 24 25 25 25 28 28 28 31 31 31 .3.3.4 Coupler circuit 3.5 Dual D Flip Flop CD74HCT74 3.3 Transmitter Module 3.2 Serial Test 3.5.1 PIC Programming 3.2 Modem Module 3.2 General Description of the System 3.3.1.4 Software Development 3.1 Block Diagram of the System 3.4.3.1 Reception mode of TDA5051A 3.

3.1 LED Test 4.1.1 5.3.1 PIC Module 4.3 Coasting and Commercialization REFERENCES APPENDICES A .2 Commercialization 45 45 46 46 46 48 5.2 Serial Test 4.2 Conclusion Future Development 5.1 Project Coasting 5.5 GUI 32 32 33 33 35 38 39 42 5 CONCLUSION AND FUTURE DEVELOPMENT 5.K 49 52-93 .1.2 Transmitter Module 4.ix 4 RESULT AND DISCUSSIONS 4.3 Receiver Module 4.4 Modem Module 4.

6 3.18 TITLE A binary ASK signal (lower).2 3.16 3.1 3.x LIST OF FIGURE FIGURE NO.14 3.1 2.11 3.3 3.10 3.8 3.15 3.5 3.17 3. together with the binary sequence which initiated it (upper) PIC16F877 Block diagram of the transmitter circuit Block diagram of the receiver circuit Pin configuration of PIC16F877 Block Diagram TDA5051A Typical Configuration for on-chip clock circuit Pin Configuration Cases when DATAIN signal being completely asynchronous with the digital clock Normal behavior (left) and the missing information of the modulated wave (right) The usage of same clock for microcontroller or modem The usage of an external D-Latch Parts of the coupler circuit Parts of the improved sensitivity Microcode Studio meProg Configuration meProg Program Downloader meLabs U2 programmer (hardware) meLabs U2 programmer hardware Serial-In Program PAGE 8 10 13 13 15 17 17 18 19 20 21 21 23 25 26 26 27 27 27 28 . 2.13 3.4 3.2 3.7 3.12 3.9 3.

12 4.11 4.20 3.exe VBCom parameter setting VBCom port setting PCB layout of PIC module LED test Serial test Transmitter module Measurement at 1D CD74HCT74 Measurement at 1Q CD74HCT74 Measurement at TXOUT TDA5051A Measurement at TXOUT before sending a character Measurement at TXOUT while sending a character PCB layout of transmitter module Measurement at RXIN TDA5051A Measurement at DATAOUT TDA5051A PCB layout of receiver module PCB layout of modem module TDA5051A Measurement of the CLKOUT TDA5051A Lamp control icon VBCom parameter setting Comport setting A green light indicator shown after the COM is ON 29 30 30 31 32 33 34 35 36 36 36 37 37 37 38 38 39 40 40 40 42 43 44 44 .7 4.exe Lamp controller.22 4.xi 3.9 4.6 4.8 4.17 4.21 3.10 4.4 4.18 4.19 3.3 4.5 4.13 4.20 Test RS232.14 4.19 4.16 4.15 4.1 4.2 4.

xii LIST OF TABLE TABLE NO.1 4.1 5. 3.1 Pin Configuration TITLE Calculation of parameter depending on the clock frequency The cost of components PAGE 18 41 46 .

xiii LIST OF SYMBOLS Hz s m Ω dB V F H A W m k M µ p n f - Hertz Seconds Meters Ohms Decibel Volts Farad Henry Ampere Watt mili kilo Mega Micro Pico Nano frequency .

xiv LIST OF ABBREVIATIONS PLC PIC GUI VB ASK AGC DAM RKE TPM I/O LCD IC RAM CPU RAD TTL CMOS PC TX RX ROM NRZ TDH PCB - Power Line Communication Peripheral Interface Controller Graphical User Interface Visual Basic Amplitude Shift Keying Automatic Gain Control Digital Amplitude Modulation Remote Keyless Entry Tire Pressure Monitoring Input/Output Liquid Crystal Display Integrated Circuit Random Access Memory Central Processing Unit Rapid Application Development Transistor-transistor Logic Complementary-metal-oxide Semiconductor Personal Computer Transmit Receive Read Only Memory Non-Return-to-Zero Total Harmonic Distortion Printed Circuit Board .

xv ADC DC AC LED VPP RMS Analog to Digital Direct Current Alternating Current Light Emitting Diode Peak to peak Voltage Root Mean Square .

xvi LIST OF APPENDICES APPENDIX A B C D E F G H I J K TITLE PIC LED Blinking Test Schematic Circuit PIC Serial Communication Test Schematic Circuit PIC Module Schematic Circuit Transmitter Module Schematic Circuit Receiver Module Schematic Circuit Lamp Control Schematic Circuit Motor Control Schematic Circuit Source Code for PIC LED Blinking Source Code for PIC Serial Communication Source Code for VB parameter setting Source Code for VB Port Setting PAGE 52 54 56 58 60 62 64 66 68 70 87 .

Furthermore. With this additional installation of this Home Automation System Using PLC to the original automatic gate system. For example. closing gates might be a problem for disable people. lamp switches normally located at a high location and it is hard to reach for the switches without help for kids and disable person including people who unable to move a lot due to accident cases. elders and it might be dangerous for kids or ladies for social problems like kidnapping and rape cases in this country increases.1 CHAPTER 1 INTRODUCTION 1. the remote control can be leaved in the car while during at home. paralyzed and wheeled chaired person. user can control the gates by using their personal computer at home besides the remote control. Basically the project is about using the Power Line Communication (PLC) in a home automation system and applying PIC in the system to control and automate . It requires only electricity to run the system. Nowadays. user can also automate the lamps around the house. user can automate the gate using the computer. Hence.1 Introduction In houses. Hence this system is very simple and cheap. most houses already installed the automatic gate system using remote control. Besides the gate. These problems can be overcome by using the Home Automation System Using Power Line Communication (PLC) at home which is user friendly and cost efficient.

To design a controller system using PIC16F877.2 Objectives The objective of this project is to build a home automation system using a PLC modem and applying PIC microcontroller to control and automate variable home appliances (lamps and gates). 1.3 Scopes of Project Several scopes proposed in this project are: i) ii) iii) iv) v) To design and fabricate a transmitter module using TDA5051A modem.2 lamps and gates to make life easy at home where users control the systems only by using the computer. To integrate the GUI with the hardware by using power line communication. To design the Graphical User Interface (GUI) using Visual Basic 6.0. To design and fabricate a receiver module using TDA5051A modem. 1. .

4 Problem Statement In houses. closing gates might be a problem for a disable people. The system is friendly user and required only electricity to drive the system therefore it is a low cost type of system. Literature review for the development of the Home Automation System Using Power Line Communication. Chapter 3: Chapter 4: Methodology of the project. elders and also might be dangerous for kids and women as we heard lots of kidnapping cases happened in this country these years. 1. lamp switches normally located at a high location and it is hard to reach for the switches without help for kids and disable person including people who unable to move a lot due to accident cases such as being paralyzed or wheeled chaired.5 Thesis Overview The Home Automation System using Power line Communication thesis is a combination of 5 chapters that contains and elaborates specific topics such as the Introduction. Methodology. A home automation system using power line communication is proposed to solve these problems. Literature Review.3 1. the limitation of the project based on the performance of the modules fabricated. Chapter 1: Chapter 2: Introduction of the project. Furthermore. Results and Discussions. Conclusion and Further Development that can be applied in this project. . Results obtained. the costing and the commercialization of the project.

4 Chapter 5: Conclusion and further development of the project. .

5 CHAPTER 2 LITERATURE REVIEW 2. systems. the power line is a shared medium that exists in a noisy environment. smart house. power line has distinct advantage in setting up a network without additional line . smart home.1 Power-line Communication in Home Automation Home automation. microwave. power line and fiber optics. Similar to RF. also referred to as home control. although the respective noise sources differ markedly. radio. PLC has been a very important interdisciplinary topic for power. fluorescent ballasts. Power Line Communication (PLC) is called power-line carrier or a mains communication. or intelligent home is actually a collection of devices. such as coaxial-cable. Recently. PLC uses electric power lines to carry information over the power line. switch-mode power supplies. and subsystems which have the ability to interact with one another or function independently [1]. communications. with the explosive growth of the Internet and telecom technology home automation experience an accelerating growth based on different kinds of residential network. Motors. PLC promises to be an enabling home network technology due to its ability to deliver data over existing power lines in homes. and automation engineers and researchers since the 1980s. and other impairments. which generate substantial impulse and wideband noise share power lines [15]. At the present there are several kinds of transmission medium in residential network. It is a technique used in home automation for remote control as it can use the household electrical power wiring as a transmission medium. millimeter wave. Compared with other kinds of transmission medium. industrial.

Every household would be connected at any time and services being provided at real time. 2. Power-line distances measured for signal attenuations given are between 6–30 m [15]. If the power utilities could supply communication over the powerline to the customers it could make a tremendous breakthrough in communication. featuring a . PLC communication signals via main power lines are transmitted from a part of the home and received at the other side. Connectors are placed at the wall between two neighbor divisions at home. Many applications are operating at high speed and a fixed connection is often preferred. the modem will fabricate using the TDA5051A manufactured by PHILIPS. and bathroom. The TDA5051T was the first chip version. including home appliances and information devices. living room. etc. hall. Concerning the former. So PLC rapidly becomes a popular solution to set up residential network [2]. adapted when users have an accident leading to disability or when they get older [4]. wire exists to every household connected to the power line network [3]. we have had the X-10 format power line-based technology but in this project. Connectors are used to deliver power lines in the divisions of homes. Measurements are carried out between general divisions of a home such as kitchen. one should consider that the targets are conventional houses. device power in home automation still can be supplied by power line itself. bedrooms. Connectors are induced an additional attenuation. at a very low cost [2].6 installation and existing digital devices.2 PLC Modem At the other extreme. On the other hand. So power is delivered via these connectors to every division. Signal strength or signal attenuation in home electrical line is important for design of home automation communications circuits. Using the power line as a communication medium could also be a cost effective way compared to other system because it uses an existing infrastructure.

Sign up to vote on this title
UsefulNot useful