Home Automation Using Powerline

Published on March 2017 | Categories: Documents | Downloads: 53 | Comments: 0 | Views: 514
of 24
Download PDF   Embed   Report

Comments

Content

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

iii

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

iv

ACKNOWLEDGEMENT

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

v

ABSTRACT

In recent years, for its convenient installation and low cost, the power line increasingly become a popular transmission medium in creating residential network. 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. 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. It requires only electricity to run the system. Hence this system is very simple and cheap. 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. 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. The computer operates as a host station, connecting to the PLC modem serially using Recommended Standard 232 (RS232) and a transceiver MAX232. User will automate the home appliance based on the Graphical User Interface (GUI) by selecting the button appeared on their computer screen. The buttons are designed using the Visual Basic 6.0. The PLC modem (TDA5051A) operates by modulating in a carrier wave of between 20-200 kHz into the household wiring at the transmitter. This modem is plugged into regular power outlet. The carrier is modulated by digital signals (Amplitude Shift Keying). The receiver demodulates the carrier wave and sends the signal to the micro controller which is the PIC16F877. The receiver has an address and can be commanded by the signals transmitted over the household wiring and decoded at the receiver. The PIC controls the home appliances to function. In this project, the home appliance specified is the gate and the lamp.

vi

ABSTRAK

Talian elektrik telah menjadi semakin popular sebagai medium pemancar dalam mewujudkan rangkaian perumahan. Dalam sesebuah rumah, 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. Masalah ini boleh diselesaikan dengan menggunakan Sistem Automasi Kediaman yang menggunakan komunikasi talian elektrik (PLC) yang mudah digunakan dan kos efisien. Sistem ini hanya memerlukan bekalan elektrik untuk menjalankannya. Maka, sistem ini sangat mudah dan murah. 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. 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. Komputer berfungsi sebagai stesen utama, menghubungkan modem PLC secara siri dengan menggunakan RS232 dan MAX232. Pengguna akan mengautomasi peralatan elektrik di rumah berasaskan Antaramuka Pengguna Bergrafik (GUI) dengan menekan butang pada skrin computer. Butang-butang ini direka dengan menggunakan Visual Basic 6.0. Modem PLC (TDA5051A) berfungsi dengan mengubahsuaikan gelombang pembawa diantara 20-200 kHz pada pemancar ke pendawaian di kediaman. Gelombang pembawa ini diubahsuai oleh isyarat digital (ASK). Penerima pula mendapat alamat dan boleh diarahkan oleh isyarat yang telah dipanncarkan ke pendawaian dan kod ditafsir pada penerima. Pengawal mikro mengawal peralatan elektrik untuk berfungsi.

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.1 Introduction 1.2 Objective 1.3 Scopes of Project 1.4 Problem Statement 1.5 Thesis Overview

2

LITERATURE REVIEW 2.1 Power-line Communication in Home Automation 2.2 PLC Modem 2.3 Amplitude Shift Keying (ASK) 2.4 Microcontroller

5 5 6 8 8

viii 2.4.1 PIC 16F877 2.5 Graphical user interface (GUI) 2.5.1 Visual Basic 2.6 RS232 9 11 11 12

3

METHODOLOGY 3.1 Block Diagram of the System 3.2 General Description of the System 3.3 Hardware Development 3.3.1 PIC Module 3.3.1.1 PIC16F877 3.3.1.2 PIC LED Test 3.3.2 Modem Module 3.3.2.1 TDA5051A 3.3.2.2 “Bug” Problem 3.3.3 Transmitter Module 3.3.3.1 Transmission mode of TDA5051A 3.3.3.2 Metal Oxide Varistor (MOV) 3.3.3.3 Voltage Regulator 3.3.3.4 Coupler circuit 3.3.3.5 Dual D Flip Flop CD74HCT74 3.3.4 Receiver Module 3.3.4.1 Reception mode of TDA5051A 3.3.4.2 Improve sensitivity circuit 3.4 Software Development 3.4.1 PIC Programming 3.4.1.1 LED Test 3.4.1.2 Serial Test 3.4.2 GUI 3.4.1.1 Visual Basic Design 3.4.1.2 Visual Basic Programming 3.4.1.2.1 VBCom parameter setting
3.4.1.2.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

ix

4

RESULT AND DISCUSSIONS 4.1 PIC Module 4.1.1 LED Test 4.1.2 Serial Test 4.2 Transmitter Module 4.3 Receiver Module 4.4 Modem Module 4.5 GUI

32 32 33 33 35 38 39 42

5

CONCLUSION AND FUTURE DEVELOPMENT 5.1 5.2 Conclusion Future Development 5.3.1 Project Coasting 5.3.2 Commercialization

45 45 46 46 46 48

5.3 Coasting and Commercialization

REFERENCES APPENDICES A - K

49 52-93

x

LIST OF FIGURE

FIGURE NO. 2.1 2.2 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 3.10 3.11 3.12 3.13 3.14 3.15 3.16 3.17 3.18

TITLE A binary ASK signal (lower), 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

xi 3.19 3.20 3.21 3.22 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10 4.11 4.12 4.13 4.14 4.15 4.16 4.17 4.18 4.19 4.20 Test RS232.exe Lamp controller.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

xii

LIST OF TABLE

TABLE NO. 3.1 4.1 5.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

1

CHAPTER 1

INTRODUCTION

1.1 Introduction

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. For example; paralyzed and wheeled chaired person. Furthermore, closing gates might be a problem for disable people, elders and it might be dangerous for kids or ladies for social problems like kidnapping and rape cases in this country increases. 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. It requires only electricity to run the system. Hence this system is very simple and cheap. Nowadays, most houses already installed the automatic gate system using remote control. With this additional installation of this Home Automation System Using PLC to the original automatic gate system, user can control the gates by using their personal computer at home besides the remote control. Hence, the remote control can be leaved in the car while during at home, user can automate the gate using the computer. Besides the gate, user can also automate the lamps around the house. 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

2 lamps and gates to make life easy at home where users control the systems only by using the computer.

1.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. To design and fabricate a receiver module using TDA5051A modem. To design a controller system using PIC16F877. To design the Graphical User Interface (GUI) using Visual Basic 6.0. To integrate the GUI with the hardware by using power line communication.

3 1.4 Problem Statement 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 such as being paralyzed or wheeled chaired. Furthermore, closing gates might be a problem for a disable people, elders and also might be dangerous for kids and women as we heard lots of kidnapping cases happened in this country these years. A home automation system using power line communication is proposed to solve these problems. The system is friendly user and required only electricity to drive the system therefore it is a low cost type of system.

1.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, Literature Review, Methodology, Results and Discussions, Conclusion and Further Development that can be applied in this project.

Chapter 1: Chapter 2:

Introduction of the project. Literature review for the development of the Home Automation System Using Power Line Communication.

Chapter 3: Chapter 4:

Methodology of the project. Results obtained, the limitation of the project based on the performance of the modules fabricated, the costing and the commercialization of the project.

4

Chapter 5:

Conclusion and further development of the project.

5

CHAPTER 2

LITERATURE REVIEW

2.1 Power-line Communication in Home Automation

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

6 installation and existing digital devices, including home appliances and information devices, at a very low cost [2]. Many applications are operating at high speed and a fixed connection is often preferred. If the power utilities could supply communication over the powerline to the customers it could make a tremendous breakthrough in communication. Every household would be connected at any time and services being provided at real time. 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, wire exists to every household connected to the power line network [3]. On the other hand, device power in home automation still can be supplied by power line itself. So PLC rapidly becomes a popular solution to set up residential network [2]. Concerning the former, one should consider that the targets are conventional houses, adapted when users have an accident leading to disability or when they get older [4]. Signal strength or signal attenuation in home electrical line is important for design of home automation communications circuits. PLC communication signals via main power lines are transmitted from a part of the home and received at the other side. Measurements are carried out between general divisions of a home such as kitchen, bedrooms, living room, hall, and bathroom, etc. Connectors are used to deliver power lines in the divisions of homes. Connectors are placed at the wall between two neighbor divisions at home. So power is delivered via these connectors to every division. Connectors are induced an additional attenuation. Power-line distances measured for signal attenuations given are between 6–30 m [15].

2.2 PLC Modem At the other extreme, we have had the X-10 format power line-based technology but in this project, the modem will fabricate using the TDA5051A manufactured by PHILIPS. The TDA5051T was the first chip version, featuring a

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close