You are on page 1of 145

Title Page

Remote Monitoring: A Simulation of a Home Automation System over Broadband with LabVIEW

A dissertation submitted to the Institute of Technology, Sligo in part fulfilment of the requirements for award of Masters (MSC) in Computing

by

Seamus Henry Rooney

Supervisor: Dr Paul Flynn


Submitted to the National Council For education Awards September 2006

Declaration
I hereby certify that the material, submitted in this dissertation, towards the award of Masters (MSc) in Computing is entirely my own work and has not been submitted for any academic assessment other than part-fulfilment of the award named above.

Signature of candidate.

Date.

ii

Acknowledgements
A special thanks to Dr Paul Flynn for his guidance and encouragement to me so as to make the research possible. He offered me the ideas to help me to define a research scope at the project proposal stage. Thanks to my colleagues at the Dublin Institute of Technology for encouragement and support. Finally a special thanks to my wife, Anne for her patience and support throughout the past year.

iii

Seamus Rooney

Remote Monitoring over Broadband with LabVIEW

Abstract
With broadband access, the demand for sending digital voice, video and Internet data within the home will increase continuously. In the ten years time, there will be an inexpensive universal broadband where connections will be entirely fibre optic. There will be no more desktop PCs and every device will have a wireless connection to broadband. Streaming video will be incorporated into camera phones, which will have a broadband connection. The Internet will become more three-dimensional and real time active and eventually broadband connections will be a gigabyte a second. Virtual networking computing is used to access another computer remotely over a broadband connection. A remote computer desktop can be accessed by connecting to its unique IP address from anywhere in the world. The IP camera is used to broadcast video to a remote location without the need for cabling or storage systems. ACHE is a theoretical system, which adapts control of the home to the environment and is the idea of the neural home of the future. Already there is a car surveillance monitoring system called Project54 that can be adapted to monitor devices in the home from a remote location. The electricity power line has been an important home automation system in controlling lights, ventilators, security systems and temperature levels in the home. The main protocols for home automation power line technologies are CEBus, LonWorks, Konnex and X-10. The X-10 protocol enables home appliances to be connected to broadband using the electricity supply line where modules interface data control signals with wall electrical supply outlets. This dissertation addresses the use of virtual networking computing in combination with XML web services to control household devices from a remote location. There is an overview of CGI which is a toolkit to build an interactive interface for the remote computer. LabView remote panels are used to interface and connect to a remote computer over a broadband connection. A sample application to simulate a home central heating system is to monitor a soldering iron heating an aluminium block.

iv

Table of Contents
CONTENT PAGE

Title Page .................................................................................................................. i Declaration .............................................................................................................. ii Acknowledgements................................................................................................. iii Abstract .................................................................................................................. iv Table of Contents .....................................................................................................v Table of Figures........................................................................................................x List of Tables ........................................................................................................ xiii Chapter 1 ..................................................................................................................1 Introduction..............................................................................................................1 1.1 1.2 1.3 Introduction ............................................................................................... 1 Objectives.................................................................................................. 2 Organisation of the Dissertation ................................................................. 3

Chapter 2 ..................................................................................................................5 Accessing Broadband and Virtual Networking.......................................................5 2.1 2.2 Introduction ............................................................................................... 5 Development of Broadband........................................................................ 5 Broadband Topology.......................................................................... 5 Wired Broadband Network................................................................. 6 Wireless Broadband ........................................................................... 6 Optical Fibre ...................................................................................... 6 Digital Subscriber Line (DSL)............................................................ 7 Wireless Local Loop (Fixed Wire Access).......................................... 7 Microwave Broadband ....................................................................... 7 Satellite - Broadband (VSAT) ............................................................ 7 Benchmarking Irelands Broadband Performance ............................... 8 Definition of Wi-Fi .......................................................................... 12 Definition of WiMax........................................................................ 13 Fibre over Cabinet Technology ........................................................ 14

2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3 2.3.1 2.3.2 2.3.3

Wi-Fi and WiMax.................................................................................... 12

2.4

Virtual Networking Computing ................................................................ 15 Origins of VNC................................................................................ 16 The VNC Protocol............................................................................ 16 The Future of VNC .......................................................................... 17 Access-Remote-PC Computer Program............................................ 18 Access-Remote-PC Operations......................................................... 19 Access Control of Access-Remote-PC.............................................. 19 Installing Access-Remote-PC Software ............................................ 19 Access-Remote-PC Screen Resolution ............................................. 19 Access-Remote-PC Security Issues .................................................. 20 Connecting Access-Remote-PC over Broadband .............................. 20 Broadcasting with Access-Remote-PC ............................................. 21 Licensing of Access-Remote-PC ...................................................... 21 LogMeIn Computer program............................................................ 21 Security of LogMeIn and Secure Sockets Layer Protocol ................. 22 Accessing the remote PC using LogMeIn ......................................... 22 Adding a remote computer to the LogMeIn account ......................... 22 Virtual Networking and Accessing Home Appliances ...................... 23

2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.4.10 2.4.11 2.4.12 2.4.13 2.4.14 2.4.15 2.4.16 2.4.17 2.5

Summary ................................................................................................. 23

Chapter 3 ................................................................................................................25 IP Surveillance and Video Conferencing...............................................................25 3.1 3.2 3.3 Introduction ............................................................................................. 25 Development of IP Cameras..................................................................... 25 Wireless IP Surveillance .......................................................................... 27 Setting up an the AXIS MPEG-2 Network Camera........................... 27 IP Address Configuration ................................................................. 27 Configuring TCP/IP and Video on the IP network camera ................ 28 IP Camera Software ......................................................................... 28 Power over Ethernet and 802.11 Wireless LAN................................ 29 Implementing IP Surveillance .......................................................... 29 Configuring an IP camera:................................................................ 29 Installing an IP Camera in the Home ................................................ 30 ATM for Videoconferencing ............................................................ 31 vi

3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.4 3.4.1

Videoconferencing over Broadband networks .......................................... 31

3.4.2 3.4.3 3.5

H.323 over ATM Broadband ............................................................ 34 Videoconferencing over Broadband.................................................. 35

Summary ................................................................................................. 35

Chapter 4 ................................................................................................................37 Broadband over Electricity Supply Networks.......................................................37 4.1 4.2 Introduction ............................................................................................. 37 Electrifying Broadband ............................................................................ 38 Advantages of Broadband over Power lines...................................... 39 Standards for Internet Communication over Power lines................... 39 Digital Communication over Power lines ......................................... 40 Broadband over Power line Communication..................................... 41 QFDM Modulation........................................................................... 41 Communication Channel Characteristics of the Power-line............... 42 Signal Propagation model................................................................. 43 Interference Problem of Broadband over Power-lines ....................... 45 Broadband using G-line Microwave Technology.............................. 46 Overview of Spread Spectrum Technology....................................... 46 Direct Sequence Spread Spectrum (DSSS) ....................................... 46 Frequency Hopping Spread Spectrum (FHSS) .................................. 47 Pseudo Noise Signal......................................................................... 47 Narrowband and Wideband Interference........................................... 48 Message Type and Codes ................................................................. 48 Code Division Multiple Access ........................................................ 49 Multi-path Channels ......................................................................... 49 Evaluation of Spread Spectrum technology ...................................... 50 X-10 Principles ................................................................................ 51 The X-10 Code................................................................................. 52 The ISO Seven Layer Model for an X-10 system.............................. 56 Interfacing the PC to an X-10 network ............................................. 57 Switches and Sensors ....................................................................... 57 Source Code for the PIC16C54 X-10 Appliance Module .................. 59 vii

4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.2.7 4.2.8 4.2.9 4.3 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.3.7 4.3.8 4.3.9 4.4 4.4.1 4.4.2 4.4.3 4.5 4.5.1 4.5.2 4.5.3

Spread Spectrum Technology (SS)........................................................... 46

Controlling Household Devices over Broadband using X-10 Devices ...... 50

Implementing a House Appliance Control System.................................... 56

4.6 4.7

X-10 CM11A Interface ............................................................................ 60 XML Web Services.......................................................................... 62 Summary ................................................................................................. 63

4.6.1

Chapter 5 ................................................................................................................65 Testing and Evaluation with LabView ..................................................................65 5.1 Introduction ............................................................................................. 65 Overview of LabView ...................................................................... 66 LabView Test Program..................................................................... 66 LabView and Internet Protocol (IP).................................................. 66 LabView and User Datagram Protocol (UDP) .................................. 67 LabView and Transmission Control Protocol (TCP)......................... 67 Waiting for an Incoming Connection................................................ 68 Creating a TCP Client ...................................................................... 68 Creating a TCP Server...................................................................... 69 LabView Remote Panels .................................................................. 69 Enabling Remote Panels................................................................... 70 Client Operation............................................................................... 70 Remote Panel Connection Manager.................................................. 70 Web Server Configuration................................................................ 71 Application Security......................................................................... 71 Overview of LabView 8.2 ................................................................ 72 Installing NI-DAQmx driver software .............................................. 74 Sample Application with X-10 Devices ............................................ 76 Sensor (Thermocouple or RTD) ....................................................... 77 Thermistor........................................................................................ 78 X-10 Thermostats............................................................................. 80 X-10 CM11A LabView Virtual Instrument ...................................... 81 Controlling Lights and Switches....................................................... 83 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9 5.1.10 5.1.11 5.1.12 5.1.13 5.1.14 5.2 5.2.1 5.2.2 5.2.3 5.2.4 5.2.5 5.2.6 5.2.7 5.2.8 5.3 5.4

Controlling X-10 Devices using LabView................................................ 72

PIC Microcontroller LabView X-10 Control Program .............................. 84 Summary ................................................................................................. 85

Chapter 6 ................................................................................................................86 Home Automation Project Engineering ................................................................86 6.1 Introduction ............................................................................................. 86 viii

6.2

Common Gateway Interface control of Household devices....................... 86 Overview of CGI.............................................................................. 86 Event driven Computing................................................................... 88 Overview of Project54...................................................................... 89 Configuring the Interface on Project54 ............................................. 92 Overview of Neural Home................................................................ 93 Ache................................................................................................. 94

6.2.1 6.2.2 6.3 6.3.1 6.3.2 6.4 6.4.1 6.4.2 6.5 6.6

Prototype Home Automation Project using Project54............................... 89

The Neural Network House...................................................................... 93

The Future of Home Automation ............................................................. 97 Summary ................................................................................................. 97

Chapter 7 ................................................................................................................99 Conclusions and Recommendations ......................................................................99 7.1 7.2 7.3 7.4 7.5 Introduction ............................................................................................. 99 Other standards for Remote Automation Monitoring................................ 99 Broadband in ten years time ....................................................................100 Future research .......................................................................................100 Ergodic Chaotic Parameter Modulation (ECPM) .............................100 Summary ................................................................................................104

7.4.1

APPENDICES ......................................................................................................106 Appendix 1............................................................................................................107 X-10 House and Unit Code Formats....................................................................107 CM11A Format and Cable configuration ...........................................................109 Appendix 2............................................................................................................111 Configuring a Data Acquisition Board................................................................111 Appendix 3............................................................................................................114 PIC16CR54C ROM based Microcontroller and Data Sheet ..............................114 Appendix 4............................................................................................................117 Source Code for PIC16C54 X-10 Appliance Module..........................................117 References.............................................................................................................127 Bibliography .........................................................................................................130

ix

Table of Figures

CONTENT

PAGE

Figure 2-1 Broadband take up in Benchmark countries Q2 2005...............................9 Figure 2-2 Cost of entry level DSL in Ireland 2002-2005 .........................................9 Figure 2-3 Figure 2-4 Figure 2-5 Figure 2-6 Figure 2-7 Broadband in Europe............................................................................10 International leased line costs ...............................................................11 National leased line costs......................................................................11 VNC Architecture ................................................................................16 Front Panel of Remote-PC-Access ....................................................18

Figure 3-1 Figure 3-2 Figure 3-3 Figure 3-4 Figure 3-5

IP Surveillance Network.......................................................................26 A Wireless IP Surveillance of a Remote Oil Facility.............................27 H321/H320 Interconnection .................................................................32 H.310 Protocol Reference Model..........................................................33 H.323 protocol stack changes for RTP over AAL5 ...............................34

Figure 4-1 Figure 4-2 Figure 4-4 Figure 4-5 Figure 4-6 Figure 4-7 Figure 4-8 Figure 4-9

Power Line Communication Model ......................................................43 Spectral Analysis of simulated power line ............................................44 Fourth Order LC filter as a line coupler ................................................45 M-Sequence Simple Shift Register SSRG.............................................48 Three Phases in the Electricity Supply line ...........................................52 Binary Data Transmission ....................................................................53 Start Code is Two Cycles .....................................................................53 House or Letter Code............................................................................53

Figure 4-3 Time Domain Signal of an Impulse Noise event ...................................44

Figure 4-10 Unit Code............................................................................................54 Figure 4-11 Standard X-10 Transmission................................................................54 Figure 4-12 Command Code...................................................................................55

Figure 4-13 Complete Transmission .......................................................................55 Figure 4-14 PC Interfaced to X-10 using a Stamp Microcontroller..........................57 Figure 4-15 Microcontroller and tuned amplifier signal conditioner........................58 Figure 4-16 PC with CM11A Interface to X-10 Network........................................61 Figure 4-17 Architecture Model..............................................................................62 Figure 4-18 X-10 House Scenario...........................................................................62 Figure 4-19 Typical X-10 Modules.........................................................................64 Figure 4-20 CM11A Transmitter Module ...............................................................64 Figure 4-21 Lamp Module......................................................................................64

Figure 5-1 Figure 5-2 Figure 5-3 Figure 5-4 Figure 5-5 Figure 5-6 Figure 5-7 Figure 5-9 Figure 5-10 Figure 5-11 Figure 5-12 Figure 5-14

LabView 8.2 Startup Window ..............................................................72 Front panel of a temperature Virtual Instrument ...................................73 Block Diagram of a temperature Virtual Instrument .............................73 Instrument Connection diagram............................................................74 Temperature Control Flowchart............................................................77 Thermister Curve using Stein-Hart Equation ........................................79 Circuit to measure temperature using a Thermistor ...............................79 CM11A Virtual Instrument LabView X10 Library software .................81 CM11A X10 Application LabView Front Panel .................................82 CM11A X10 Application LabView Block Diagram............................82 LabView Front Panel to control lights and Switches ...........................83 PIC Microcontroller LabView Front Panel .........................................84

Figure 5-8 TX15-B Remote Temperature Control..................................................80

Figure 5-13 LabView Block Diagram to control lights and Switches ......................83

Figure 6-1

CGI and Ecommerce ............................................................................87

Figure 6-2 Three Steps to Processing a CGI...........................................................88 Figure 6-3 Prototype to control only X-10 devices.................................................90 Figure 6-4 Enhanced system to control Household Devices over Broadband .........91 Figure 6-5 Figure 6-6 Figure 6-8 Default Home Automation Window .....................................................91 Control Automation Window ...............................................................92 ACHE diagram.....................................................................................95

Figure 6-7 Project54 Home Automation components and connections ...................93

xi

Figure 6-9 Figure 6-10

Basic system Architecture of ACHE.....................................................96 Laboratory System Setup....................................................................97

Figure 7-1 Figure 7-2 Figure 7-3 Figure 7-5

Diagram of the proposed Analogue SS Modem ..................................101 Ergodic Chaotic Parameter Demodulator............................................101 Mean Value Estimator, Windowed Integrator as a Demodulator.........102 Signal Waveform at various stages for the ECPM SS system..............103

Figure 7-4 SIMULINK implementation in MatLab of proposed ECPM system ...102

Figure A 1 Configuring a DAQ Board ..................................................................111 Figure A 2 Figure A 3 Figure A 4 Figure A 5 Setting Up a Simulated device in LabView ........................................112 X10 CM11A ON/Off Front Panel ......................................................113 ROM based Microcontroller ..............................................................114 PIC16C54A Microcontroller Integrated Circuit..................................116

xii

List of Tables
CONTENT Table 1-1 Table 2-1 Table 4-1 Table 4-2 Table 4-3 Table 4-4 PAGE Broadband Speed Table ...........................................................................2 Remote Access PC logging of Information ............................................20 ISM Bands.............................................................................................50 House or Letter Code.............................................................................53 Number or Unit Code ............................................................................54 Command Code.....................................................................................55

Table 4-5 House Unit and Function bit Sequence ...................................................59 Table 4-6 CM11A Cable Parameters ......................................................................60 Table 5-1 Thermocouple versus Resistive Temperature Devices.............................78 Table 5-2 Decode Table of X-10 Commands for TX15-B Thermostat ....................81 Table 5-3 Table A 1 Table A 2 Table A 3 Table A 4 Table A 5 Table A 6 Table A 7 Table A 8 Table A 9 LabView Serial Communication Frame Structure ..................................84 X-10 House (Letter) Code Pattern ......................................................107 X-10 Standard Message Format .........................................................107 X-10 Number (UNIT Code) pattern....................................................108 CM11A Cable Connections................................................................109 Format for first Transmission to CM11A Interface .............................109 CM11A Header ..................................................................................109 Defining the X-10 Transmission Code Byte .......................................109 PC to CM11A Codes..........................................................................110 ISO Layer Model for an X-10 System ................................................110

Table A 10 PIC16CR54C Specification................................................................114 Table A 11 PIC16C54A House/Unit Control Signals............................................116

xiii

Chapter 1 Introduction
1.1 Introduction
The concept of remote management of household devices over the Internet from anywhere in the world can be a reality with broadband. Assume a system where from the office desk, the user could log onto the home computer remotely. A control panel would come up. The control panel would contain virtual switches as well as a map of the house. The software would control a PCI card in a computer attached to a control panel containing switches, timers, lights, TV, Alarm, heating or ventilation. By also logging onto the IP address of an IP camera, sophisticated remote surveillance can be incorporated into the remote control system. High speed DSL has provided broadband. The speed is causing advances in technology over the Internet to expand rapidly. The typical household or business is no longer depending on a dial up connection. Technologies such as streaming video incorporating IP cameras can now be used to replace cumbersome wired CCTV systems. The home can be monitored and controlled using the laptop computer, PDA or mobile phone by connecting into a broadband connection anywhere in the world. Today there is a heightened requirement for security and public safety. With broadband, the trend towards using an IP network for video surveillance is part of the larger drive to incorporate Voice over IP, remote control of buildings and video conferencing. The benefits of IP-based networking over broadband include cost over traditional dial up, attracting more subscribers and the delivery of more diverse services. By using wireless networking broadband can be made more available to rural areas. Remote plant monitoring using wireless technologies over broadband can be used for supervision and control in manufacturing environments.

Chapter 1 Introduction

The aim of this thesis is to analyse broadband and find out how broadband could revolutionise remote surveillance and monitoring of a building such as the home. This dissertation will first analyse some of the home automation standards. Investigate the possibility of remote control using LabView and a broadband connection to the Internet to control household devices. There will be an investigation into the use of X10 device modules and how to control them using a LabView program. A remote monitoring surveillance system is incorporated in conjunction with LabView to make a remote control and video monitoring system. 56k ISDN: (64k--128k)
64Kbps (1 B-channel) or 128Kbps (2 B-channels)

The standard modem speed, 56k only on the download side Expensive; being phased out due to inefficiency 2MBPS Affordable; must be within 3.5 miles of a switching station Clean connection; efficient; affordable; rain plays a factor Shared Connection; the more users, the slower the speed Up to 50MBPS for 2GHz Expensive; leased line; point-to-point dedicated line Expensive; leased line; point-to-point dedicated line Very expensive; leased line; point-to-point dedicated line Very expensive; leased line; point-to-point dedicated, digital circuit Table 1-1 Broadband Speed Table

Primary Rate Interface (30B+D)

DSL: (128k--1500k) SATELLITE:


(300k-1500k)

Cable Modem:
(1500k to 3000k)

Wireless E1 2MBPS Europe T1 (1544k) USA T2: (6312k) T3: (44073k)

1.2 Objectives
The main object of the dissertation is to get a clear understanding of broadband and remote surveillance and monitoring technologies. To find out if the technology exists and if it is possible to control and monitor a remote home automation system from the web. Underlying objectives within the project are to: Get a clear understanding of broadband topology and investigate broadband and the benefits of implementation in Ireland. To research for existing remote monitoring packages. To implement and analyse IP surveillance and research videoconferencing technology. 2

Chapter 1 Introduction

Research the sending of data over the electricity supply network. Investigate using the TCP/IP protocol with LabView. To implement a LabView program that will control and monitor a remote device such as a temperature module. Research other methods of remote management and the technology of the neural house. Predict the economic and social impact of remote management over broadband if technologies were implemented in ten years time.

1.3 Organisation of the Dissertation


Chapter 2 accesses broadband and describes broadband topology. There is a definition of the different types of ways of implementing broadband and how to connect to rural areas. There is a composition on Benchmarking Irelands broadband performance which researches the impact of broadband in Ireland and the reasons why broadband is slow to expand to rural areas. There is an investigation into the wireless applications of broadband. The chapter investigates virtual networking computing, an existing technology that allows a user to remotely monitor and transfer files between computers over the World Wide Web. Chapter 3 investigates IP surveillance and the IP camera. There is an overview of the development of the IP camera and how it will replace the traditional CCTV system. The chapter investigates and implements the setting up of a wireless IP camera and describes the configurations involved. Video conferencing is related to the application of the IP camera. The chapter describes the protocol standards for equipment required so as to implement videoconferencing. Chapter 4 investigates broadband over power line transmission and the ways of integrating broadband onto the electricity supply line. The chapter investigates how to eliminate electricity power-line interference. The X-10 protocol is the standard protocol for broadband over power line system. the CM11A X-10 interface module. The chapter outlines the implementation of an X-10 home automation system using the home computer and

Chapter 1 Introduction

Chapter 5 researches LabView, a graphical programming language in which icons are used as building blocks to generate a program. LabView can be interfaced to the outside world using the input and output ports of the PC. LabView remote panels have a TCP/IP application and are a way of remotely controlling and monitoring household devices over a broadband connection. The chapter describes an application of remotely controlling the temperature of an aluminium block using a LabView program to drive an X-10 device so as to simulate the remote control of a home central heating system. Chapter 6 describes other methods that can be used to remotely manage a home automation system. The Common Gateway Interface is researched and there is an overview with LabView. Prototype54 is a system that remotely monitors and controls functions using voice command in police cars. The system can be adapted to remotely manage the home. Usually the GUI is located in the police car. The GUI could be implemented on a PC, PDA or mobile phone to remotely manage devices in the home. The neural home is investigated here and the concept of ACHE, which is a system where a program learns from the history of the occupant in the home. The system theory is to adapt the automation of the home to suit future needs while conserving energy in the home. Chapter 7 investigate the future needs to implement home automation over broadband. There is an investigation into the Ergodic Chaotic Parameter Modulation scheme that can revolutionise the integration of broadband over power lines in the future. There is a summary of the findings of the dissertation and suggestions for future research. conclusions are drawn up as well as

Chapter 2 Accessing Broadband and Virtual Networking


2.1 Introduction
This chapter introduces broadband and how broadband is implemented in todays world. The technologies being used today to set up broadband are described and how the different disciplines of engineering are used to connect the consumer to broadband Internet. The different ways of implementing broadband are described and methods on how to bring broadband to the remote community. There is also an explanation of why broadband has been slow to take up in Ireland and how broadband can benefit the economy and small business. The next section of the chapter describes Wi-Fi and a new broadband access to the Internet, WiMax. There is also an introduction to Fibre over Cabinet technology. The third section introduces Virtual Networking Computing. This describes remote PC access and monitoring using the VNC protocol. The chapter further describes two remote PC monitoring applications, Access Remote PC and LogMeIn from PC Anywhere. This section describes how to download and install these programs on the home computer and how an application could be used to remote access a home PC to gain access to software that monitors and controls a household appliance.

2.2 Development of Broadband 2.2.1 Broadband Topology


Broadband involves the flow of information from one location to another over telecommunications network at high speed. Speeds of between 256kbps and 2Mbps are being labelled Broadband. Broadband allows businesses to use services such as telecommuting, video conferencing, and file allocation regardless of physical location. Telecommunication engineering requires the skills of civil, mechanical and electronic engineers to design build and operate broadband networks. Broadband networks are similar in structure to service networks such as water, gas and electricity. Broadband networks consist of a high volume, pressure or voltage transmission of data interconnecting population centres together.

Chapter 2 Accessing Broadband and Virtual Networks

The backbone transmission network is extended through towns and cities using distribution networks. These are in turn connected to businesses and residential customers by an access network called a Metropolitan Area Network. National broadband networks are connected to the Internet and to International broadband networks in the same way as the gas network is connected to the European gas network using a gas interconnection.

2.2.2

Wired Broadband Network

Copper, coaxial cables and optic fibre cables physically link the locations on the network together. Implementation of wired broadband requires a multi-disciplined joint civil and electronic engineering team to build a duct and chamber network to run the cable underground. The duct system is structured access and the chamber system connects customers to the network. In metropolitan areas, chambers are used to accommodate access to the fibre cables. The chambers are 250m and 450m apart. In the backbone network the chambers are spaced between one and two kilometres apart. The greater space is attributed to being able to blow the fibre using compressed air pressure up to two kilometres in distance.

2.2.3

Wireless Broadband

The physics of electromagnetic waves at radio frequencies provides the connectivity between points. There is a wireless base station with the exception of a satellite system. The design is a combination of radio and civil engineering. The radio spectrum is equivalent to the fibre optic cable. For broadband, the operator server wireless station must be in line of site of the customers wireless station.

2.2.4

Optical Fibre

Optical fibre systems work by transmitting signals carrying information data through glass or plastic wires. Lasers and Light Emitting Diodes are used to transmit light pulses that have been converted before transmission from electronic digital signals. Fibre optic cables carry much more information than conventional copper wire and are less prone to electromagnetic interference. Optical fibre offers scalability and expansion on demand. The high availability levels and high resilience can be guaranteed to customers. The disadvantage of optical fibre is the cost of laying cable associated with civil engineering.

Chapter 2 Accessing Broadband and Virtual Networks

Optical fibre is generally used to distribute broadband to customers from the local loop connection and to build new networks. Optical fibre can deliver broadband speeds ranging from 2Mbps to 40Gbps.

2.2.5

Digital Subscriber Line (DSL)

DSL provides broadband over existing copper wire such as the existing telephone lines. There is transmission equipment attached to the copper wire to enhance transmission. ADSL in Ireland has up to 1Mbps transmission downstream and 256kbps transmission upstream to the service provider. DSL technologies are limited by distance between the end user and the nearest exchange and by the quality and age of the copper wire. DSL is mainly an access technology to connect customers to the main metropolitan network.

2.2.6

Wireless Local Loop (Fixed Wire Access)

Fixed Wire Access, which is also called Wired Local Loop, connects Internet Service Providers to the customers premises using a method similar to terrestrial microwave. FWA can deliver a cost-effective broadband of 2Mbps. Narrow-band units of 64kbps can service areas where there is no cable such as in rural and underdeveloped areas.

2.2.7

Microwave Broadband

Point to point microwave radio uses a pair of directional antennas to connect the broadband link. A narrow beam focuses the radio frequency signal to reach a distance of up to 60km. The distance covered is governed by radio frequency but realistic distances are only from 3 to 12 kilometres. Broadband speeds of 256kbps to 155Mbps can be achieved. Microwave links are connected as part of the backbone structure of the network ahead of expansion using optical fibre. Microwave broadband links can be a solution to connecting broadband to remote areas.

2.2.8

Satellite - Broadband (VSAT)

A VSAT (Very Small Aperture Terminal) is a communication terminal that is installed on the roof of a users premises and used to broadcast video and to provide Internet access. Vsats communicate using orbiting satellites to relay information to and from gateway stations known as hubs. VSAT systems provide access to broadband that is 35 times faster then the standard telephone link.

Chapter 2 Accessing Broadband and Virtual Networks

Current VSAT system provides capacities of up to 2Mbps to the user in the downlink direction and between 64kbps to 256kbps in the uplink direction. VSAT can connect broadband to remote areas because of the large geographical areas covered by a satellite system.

2.2.9

Benchmarking Irelands Broadband Performance

A Forfs report in 1998 called Broadband Telecommunication Investment in Ireland recommended actions to address the gap of investment and quality of broadband services in Ireland relative to services in other countries. The government has allocated 200 million euros to support regional investment in the National Development Plan 2000-2006. Competition and international capacity have contributed to improved telecommunication investment in Ireland. The experience of multinational companies in Dublin is favourable to broadband services. The experience of small to medium size companies is not as good. This is due to lack of ADSL connection to small businesses. Broadband access is confined to larger companies due to lack of competition for customers. Deployment of broadband in urban areas where there are a lot of customers is more feasible than in deploying broadband in rural areas. Broadband communication price must reduce so that the level of demand will grow and the product can become economic when connected widespread over the country. The report states that widespread availability is essential for development of the economy. The concern is that the wide investment may not be realised and would leave Ireland behind other developed economies in terms of broadband access. The telecommunication infrastructure is operated by a number of state organisations under control of the Department of Public Enterprise ESB, CIE and Bord Gis. The report recommends that the state telecommunication infrastructure be viewed as an asset, which can be deployed in the national interest. The report also recommends that opening and linking these organisations would act as a stimulus for expansion of Broadband in the Irish market. The government can ensure that Ireland can be broadband competitive by ensuring the right environment for private sector investment, ensuring broadband communication needs are met in areas where provision could become uneconomic in the future.

Chapter 2 Accessing Broadband and Virtual Networks

Figure 2-1 Broadband take up in Benchmark countries Q2 2005

Figure 2-2 Cost of entry level DSL in Ireland 2002-2005 9

Chapter 2 Accessing Broadband and Virtual Networks

Figure 2-3

Broadband in Europe

In the private sector broadband can enable e-business and new market opportunities. Companies can realise growth through productivity increases due to improved information exchange. In the public sector there would be more efficiency in health and education services. For consumers, broadband can enhance the quality of life through social and cultural development. In rural areas broadband enables social and economic inclusion. Broadband was initially set up for business because the benefits, efficiencies and cost saving over dial up and leased lines are substantial. Business can access news sites, find out about competition and find out about worldwide opinion about the industry. Broadband makes it possible to use Customer Relationship Management (CRM) packages to move some of the business to hosted services outside the office. CRM is a strategy used by businesses to learn more about customers needs and behaviours in order for the business to develop a one to one relationship with the customer. Broadband makes it possible to avail of online backup, hosted services and security services. With broadband, video streaming and PDF documents can be used to make a business more competitive. According to BT, only 50% of businesses have broadband. This is due to location and resistance to change. Businesses are deterred by having to install the latest firewalls and anti virus software in their PCs. In remote areas, satellite is the only option otherwise the location must have a group broadband scheme that can avail of wireless broadband.

10

Chapter 2 Accessing Broadband and Virtual Networks

Irelands broadband is improving through metropolitan area networks (MANs) and the group broadband scheme. The development of wireless standards such as WiMax is making it more likely that all businesses will be able to receive broadband.

Figure 2-4

International leased line costs

Figure 2-5

National leased line costs

11

Chapter 2 Accessing Broadband and Virtual Networks

2.3 Wi-Fi and WiMax 2.3.1 Definition of Wi-Fi


Wi-Fi stands for Wireless Fidelity meaning 802.11 networking. Wi-Fi indicates interoperability between devices from different manufacturers that are Wi-Fi certified and is a registered trademark. Wi-Fi can connect computers wirelessly up to 30.5 metres using a radio signal similar to the portable bi-directional radio transceiver known as a Walkie-Talkie that was developed in the 1950s for military use. The transceiver transmits and receives in half duplex mode in that it cannot receive and transmit at the same time because it is using only one channel for transmission. There is a push to talk switch to begin transmission and the same switch, release to listen to receive a voice transmission. Whereas the transceiver is used for communicating analogue audio, Wi-Fi communicates information in binary. The binary code is converted to radio waves at the transmitting end and back again to binary at the receiving end. The 801.11b and 802.11g standards for Wi-Fi are 2.4Ghz. The 802.11a standard has a transmission rate of 5GHz. The Walkie Talkie telephone transceiver has only a 49Mhz-transmission rate and is too slow for digital information. Wi-Fi uses Orthogonal Frequency Division Multiplex (OFDM) coding radio technology. This technology is hidden inside a Wi-Fi card installed in a laptop computer. The laptop uses a PCMCIA card and there is an external adapter for the USB slot on a PC. The software must to be configured for the wireless card to connect to a wireless network. Drivers have to be installed so as to access a hotspot, an access point on the wireless LAN (WLAN). The 802.11 device accesses the Basic Service Set (BSS) by searching for the nearest access point that is wired to the network. A Service Set ID (SSID) is a 32 character unique identifier that is attached to the header of packets sent over the WLAN. This acts as a password to the BSS. In Wi-Fi, the SSID is typed in manually and is less than 10 characters long with a channel number from 1 to 11. 802.11 devices use the SSID to sniff for the nearest access point. The SSID is therefore a passkey to the access point. A sniffer is a program that monitors data travelling over the network. Hackers gain access to a network using unauthorised sniffers. Wired Equivalent Privacy (WEP) is an encryption system for Wi-Fi data.

12

Chapter 2 Accessing Broadband and Virtual Networks

There is a 64bit encryption system that uses 40 bits and a 128-bit system that uses 103bits. This is called a WEP key and is entered into the Wi-Fi software so as to gain entry to the network. The channel number is 6 by default but can be set to any number from 1 to 11 so as to not interfere with a neighbours Wi-Fi equipment. The WEP key is disabled by default, but to turn it on a WEP key must be entered with 128-bit encryption.

2.3.2

Definition of WiMax

WiMax means Worldwide Interoperability for Microwave Access and is a standard based technology that can provide broadband access to the Internet. WiMax is not like Wi-Fi because it requires a network plan and sites for base station antennas. Wi-fi can broadcast up to 100metres with a maximum power of 54Mbps, WiMax has a range of 50km with a transmission rate of 70Mbps. WiMax is used mainly for data transmission. Voice transmission requires VoIP as the transmission medium over WiMax. In rural areas WiMax can supplement Universal Mobile Telecommunication systems (UMT). WiMax was developed for home and business use where there is no fixed access to broadband. UMT is a technology that guarantees quality of voice and multimedia to Internet adaptable mobile phones. WiMax provides wireless Internet access for the laptop user within a WiMax radio cell. Future generation laptop computers will have both WiMax and Wi-fi technology built in so that WiMax can complement Wi-Fi. This will gave Personal Digital Assistants, PDAs and laptop computers access to broadband outside the range of Wi-Fi access points. Since 2005, outdoor stations similar to satellite dishes have become available. Second generation indoor installable modems similar to cable and DSL modems are to become available in 2006. Portable modems that can be integrated into a laptop are to become available in 2007. Siemens predicts that WiMax as well as Wi-Fi and bluetooth will be incorporated into chipsets for laptops and PDAs. This will enable delivery of broadband direct to the home, to laptops and to PDAs. Licensed frequencies are necessary to provide WiMax services.

13

Chapter 2 Accessing Broadband and Virtual Networks

The WiMax forum was established in 2004 to establish a working group to promote the allocation of a licensed frequency spectrum for broadband wireless access. The group lined up three frequency bands, a 5.8 GHz band, which is unlicensed in many countries, a 3.5 GHz band, which is unavailable in the USA and Canada but available in Europe and a 2.5 GHz band which is licensed in the USA. Siemens and Intel are working together on the development of WiMax base station infrastructure equipment and user subscriber stations. Intel will market the technology with chipsets for laptop PCs. It is predicted that there will be 3.8million users of wireless broadband connections and this will see growth in Eastern Europe and third world countries such as Africa. The user will have unrestricted access to wireless broadband but the different wireless standards will have to be harmonised into one specific standard.

2.3.3

Fibre over Cabinet Technology

Fibre over Cabinet technology provides a higher bandwidth by decreasing the length of the copper wire in the access network while increasing the reach of fibre optic from the exchange gradually. This is an evolution of fibre-to-the-x (FTTX) technology, where x denotes exchange (E), the cabinet (C), the kerb (K), the home (H) or building (B). The Multi-Service Access Platform (MSAP) supports the provision of multiple telecommunications services from a single switch. The MSAP is a convergence of broadband with multi access multi service network architecture. The remote unit of the MSAP is contained in a roadside cabinet and connected to the MSAP central unit at the local exchange over fibre optic cable. Eircom are testing FTTC in the Dublin area while Siemens provided a surpass MSAP for one location and Teledata Networks (Israel) has provided a Broadband Access 40 integrated MSAP to another location. There are 300 lines and there are multiple locations for roadside MSAP cabinets. The cabinets have to be powered by electricity and power can be provided from the exchange without the need for battery backup. Electrical power can be transmitted over the copper cable that has already been replaced with fibre optic cable as the communication medium. The network consists of two pairs of optical cable that connect the MSAP remote unit to the MSAP central unit at the local exchange.

14

Chapter 2 Accessing Broadband and Virtual Networks

The central unit is linked to the Internet for broadband connectivity and the ISDN/PSDN network for voice connectivity. There is a connection to the network management system that is distributed over several sites for network management functions.

2.4 Virtual Networking Computing


In a virtual network computing system (VNC), server machines generate a desktop environment that can be accessed from any Internet-Broadband connected machine using a network computing software package. When accessing a remote computer using virtual networking, the state and configuration of the remote desktop environment of the remote computer is the same as when it was last accessed. VNC provides an access method to the home computers desktop from anywhere in the world. The Olivetti and Oracle Research Laboratory (ORC) uses VNC to access personal UNIX and PC desktops from any office in their Cambridge building and from anywhere in the world and on any computing infrastructure that is available. VNC provides mobile computing without the user having to carry a device such as a PDA or laptop notebook. Web browsing terminals at airports can be used to access a remote PC. A remote PC desktop can be accessed from several places simultaneously so as to application share in a form of computer supported cooperative work (CSCW). VNC allows for connection and disconnection of the client with no effect on the session at the server. VNC consists of a simple display protocol, which makes the application very powerful. VNC is independent of the operating system. VNC is freely available to download from the ORL Web site at http://orl.co.uk/vnc/. VNC is a thin client system which is a system that reduces the amount of state maintained at the users terminal. A thin client desktop does not have local storage facilities and relies on the server to provide the processing power. A thin client system also limits the desktop users ability to take data files from other PCs and viruses are not easily brought into the system.

15

Chapter 2 Accessing Broadband and Virtual Networks

2.4.1

Origins of VNC

An X-Window system allows applications to be displayed on a remote computer. ORL extended the system to dynamically redirect an X-application to a different display. This is called a teleporting system. The disadvantage with the system is that PDAs can not run because the software overhead is too high and application start up is slow on high latency links. An X-server program is needed to run the display machine. The X-window system is not the standard windows operating system as Microsoft dominates the windows market. Microsoft has developed a protocol called T.Share based on the ITUT120 protocol and is already used in Microsofts NetMeeting conferencing software product. Videotile was built in 1994 by ORL as an experiment of ultra thin client technology. This was a display device and a pen with an ATM connection that displayed quality video and used up a lot of bandwidth. More intelligence was added at the application side and only the parts of the screen that changed were transmitted to reduce the bandwidth required to become the VNC protocol. Sun Microsystems released the alpha version of the Java language and the HotJava browser in 1995. Taking advantage of the thin client paradigm, a VNC Java applet of 6Kbytes was then developed to implement the Videotile mechanism in Java. Any Java capable browser could then access a users desktop using the mobility of the teleporting system.

2.4.2

The VNC Protocol

The VNC protocol is simple for remote access to a graphical user interface. The protocol works with TCP/IP and all operating systems The VNC client is the endpoint where the user interacts with display and input devices. VNC is ultra-thin system requiring few demands of the client and it is a simple task to create new clients to run on a wide range of hardware.

Figure 2-6

VNC Architecture

16

Chapter 2 Accessing Broadband and Virtual Networks

The display protocol is based on placing pixels on x, y co-ordinate positions. Raw Encoding is used where pixel data for a rectangle is sent in a left to right scan line order. VNC clients and servers must support raw encoding. The client activates frame update where the server in response to a request from the client only sends the update protocol for the display. The input side of VNC is based on a standard workstation of a keyboard and a mouse. To establish client-server connection, the server requests authentication from the client. The client gets an update of the desktop screen and a session begins. A VNC viewer uses the TCP/IP transport system and the VNC server protocol is designed to make the client viewer as simple as possible. The VNC server must provide pixels in a format to suit the client. The server mirrors the real display to the remote client so that only a single VNC desktop is available from any one PC. VNC could be extended to control consumer electronics in the home to bring up the controls for the video recorder on a mobile phone while the user is away from the home. The telephone answering machine could be programmed through a graphical user interface to control a household appliance. Controlling the video recorder would require a driver that is designed for the mobile phone operating system. The interface that is already with the remote device could be used and interacted with directly. A GUI protocol allows devices with no physical display to provide graphical information. A variety of GUIs need to be created with the VNC protocol and interfaced with consumer electronic devices and there are standards such as IEEE-1394 Fireware and USB to physically interface household devices. VNC requires a reliable transport mechanism and a simple display capability. VNC can be used to create a standard plug and play interface.

2.4.3

The Future of VNC

The Oracle Research Laboratory is now building VNC software for a variety of desktop platforms. Remote access is not practical for a wide range of devices. A 7segment display could be driven by cheap hardware and the display equivalent sent over a USB or RS232 link. The VNC commands to draw and erase can be stored in ROM as a sequence of bytes and sent over a communications link when the segment switched on or off. Television sets could have VNC viewers built in so that TVs can act as displays for a variety of household devices.

17

Chapter 2 Accessing Broadband and Virtual Networks

2.4.4

Access-Remote-PC Computer Program

Access Remote PC is a computer program that can be downloaded from the Internet and installed on a local host computer. The local PC can access a remote PC over the local area network (LAN), the Ethernet or over the wide area network (WAN), the Internet. The local PC connects to the remote client PC by searching for the IP address of that PC or by using the PC identifier name. The remote PC responds by displaying its desktop as a window on the desktop of the local PC. The local mouse and keyboard can then access the remote desktop. Files on the remote PC can be accessed in the same way as if that PCs desktop is in front of the user and will allow transfer of files between the remote PC and local PC. There is a remote PC (RPC) subscription service optional feature that enables easy access to the remote computer without a requirement of an IP address. Firewalls, routers and dynamic IP addresses can be bypassed. An active Internet broadband connection is necessary to connect to RPC servers.

Figure 2-7

Front Panel of Remote-PC-Access

18

Chapter 2 Accessing Broadband and Virtual Networks

2.4.5

Access-Remote-PC Operations

To access a computer over a LAN network, the IP address is entered in the RPC server window. The server window comes up on the host computer screen when the RPC program is accessed. When a remote PC is to be accessed over the Internet, the subscription service provides a unique number that identifies the remote computer. To access the remote computer the RPC number is entered in the server window message box and a connect icon or button is clicked upon using the mouse.

2.4.6

Access Control of Access-Remote-PC

The server PC, on which the server program is installed, can grant access to any number of clients. Each client has a separate account with username and password. The access rights can be specified such as View Screen, Control keyboard and Mouse, Transfer Sound, Access file system, Display Notification When User Connected and Enforce a Timeout so that the session can automatically disconnect.

2.4.7

Installing Access-Remote-PC Software

Remote PC Server is run on the remote computer so that the computer can be controlled remotely. Remote PC Client is run on the host computer to view and control the screen of the remote computer using the keyboard and mouse. The program that is downloaded is 1.59MB in size when installed and there are no video drivers so as to make the system more stable. A set-up wizard is used to set-up the configuration for LAN access. A subscription service is used to set up a connection over broadband where the RPC number for the remote computer is emailed to the user.

2.4.8

Access-Remote-PC Screen Resolution

Access Remote PC can achieve screen updates of 25-100 frames/second on 512 Kbps connections over a local area network. On a dial up connection, which is 3-6 Kbps, the frame speed is 1-2 frames/second. By default picture quality is favoured over speed but this can be changed manually in the Options Window by selecting the Tools menu.

19

Chapter 2 Accessing Broadband and Virtual Networks

Date-time c-ip s-ip s-port sc-status cs-username cs-method sc-bytes cs-bytes time-taken

Date and time of session started Clients IP address Servers IP address Servers port Authentication Status: 0- authorised; 4 wrong username; 12-wrong password Clients username Clients permissions Bytes sent Bytes received Length of the session in milliseconds Table 2-1 Remote Access PC logging of Information

2.4.9

Access-Remote-PC Security Issues

Access remote PC is controlled by a username and password and uses Secure Remote Passwords (SRP) technology for authentication and key exchange. One time passwords are supported that expire after a period of time after the first use. Windows Integrated Authentication is also supported and allows the use of password management which is built into the operating system. A user account is created and a method of authentication is chosen. A windows username or group name is specified and permissions are granted for access. A domain name is specified as username domain for domain level authentication.

2.4.10 Connecting Access-Remote-PC over Broadband


Access remote PC can connect to any PC with an accessible IP address and the RPC subscription service will provide the unique RPC number for that IP address. If the computer is behind a router, the router IP address and port number must be specified. By default the RPC server listens to TCP/IP port 34012. This port number can be changed on the LAN page of the Remote PC Server window. To access TCP connections from specific IP addresses IP filters can be set up on the LAN page of the RPC Server window. A software licence can be purchased so as to be able to connect to a remote computer where there is a direct TCP/IP connection.

20

Chapter 2 Accessing Broadband and Virtual Networks

2.4.11 Broadcasting with Access-Remote-PC


By default server broadcasts its availability every 2 seconds and cannot be disabled completely. A custom broadcast interval is set up in the registry under the key: [HKEY_LOCAL_MACHINE\SOFTWARE\ACCESSREMOTEPC\<VERSION> \SERVER\SETTINGS] A DWORD value named nBroadcastTimeout, the value in milliseconds A timeout broadcast can be set up to any remote PC between 20ms to once\1000secs. This is approximately 17 minutes. [HKEY_LOCAL_MACHINE\SOFTWARE\ACCESSREMOTEPC\<VERSION> \SERVER\SETTINGS] nBroadcastTimeout DWORD = 00002000 The maximum allowed value is 1000000. By default the nBroadcastTimeout value is not set in the registry. If the value is missing, the default value of 2000 is used.

2.4.12 Licensing of Access-Remote-PC


An end user licence agreement is required to use RPC software. This is freely available to use and redistribute to both server and client. A licence is purchased for either the server or client computer. A free version is available on a months free trial and the user then receives a RPC number by email. The free trail must be cancelled before the end of 30 days otherwise the company will bill the customer a monthly charge of 10. The server decrements a 30-day-use counter until the free server terminates.

2.4.13 LogMeIn Computer program


LogMeIn is a computer program that can access a remote PC over the Internet. It is more robust and reliable than Access_Remote_PC. LogMeIn was developed in 2003 from a remote control and administration software package called PCAnywhere. The LogMeIn headquarters is based in Boston Massachusetts and there is a development centre in Budapest, Hungary. The company offers secure connections between remote computers over the World Wide Web.

21

Chapter 2 Accessing Broadband and Virtual Networks

2.4.14 Security of LogMeIn and Secure Sockets Layer Protocol


Passwords are required to access a LogMeIn account and a remote PCs window login window. There is a 128-256bit-encryption service to protect passwords and data. There is also IP filtering. Secure Sockets Layer is a protocol that is used to encrypt data transmitted over the Internet. The SSL protocol is used by websites that request confidential data such as credit card numbers. URLs that begin with https: instead of http: is the standard indicator of the use of the SSL protocol. A padlock icon appears to indicate that SSL is protecting data transmitted using LogMeIn software. LogMeIn is compatible with known firewalls and broadband routers. A message will ask permission to bypass some firewalls on installation of LogMeIn.exe and LogMeInsystray.exe program files.

2.4.15 Accessing the remote PC using LogMeIn


The free version of LogMeIn can be installed on the computer to allow a local PC to access a remote PC. The LogMeIn Pro version has a subscription fee for each computer that is connected to the server. The trial version is adequate when the user only wants to research the operation of LogMeIn. When LogMeIn is downloaded and installed, 9.75MBs of memory space used up. The software has to be installed on all computers that are to be remotely connected to local computer. Remote computers can be accessed from any local computer with a broadband connection. An account is created by connecting to the www.logMeIn.com website and using an email address and password. The user can add computers to an account by going to each computer and installing the software. The user can then access any of those computers on the network individually by logging into the account and choosing from the list of computers that have LogMeIn software is installed.

2.4.16 Adding a remote computer to the LogMeIn account


The target computer needs to have the LogMeIn software installed. The user is able to log into My Account using the username (registered email address) and password. A computer is added to the account by choosing the script highlighted add computer. The computer identifier or name chosen by the user will be used to represent the computer. The local computer accesses the remote computer by logging into the login website using the username (registered email address) and password. My Account shows the list of remote computers registered in the account.

22

Chapter 2 Accessing Broadband and Virtual Networks

2.4.17 Virtual Networking and Accessing Home Appliances


The server PC can access a client program on a remote PC, which is monitoring and controlling instrumentation. The remote PC desktop has a front panel showing the instrumentation that is controlling the household appliances. The front panel can be accessed remotely and changes can be made to the program. Icons on the front panel can be clicked upon to switch an appliance on or off. The local PC or pocket PC can access the remote PC over a wireless broadband connection to the Internet. LogMeIn software takes up nearly 10Mb in memory space when downloaded, whereas Access-Remote-PC uses up only about 2MB of memory space. The system requirements are: Windows98, 2000, XP, or Server2003. Internet Explorer or Netscape Navigator 4.0 or later. Broadband connection. Administrator privileges to install software.

2.5 Summary
Broadband describes a high-speed connection to the Internet. Bandwidth is the width of the amount of data that can be sent through a broadband connection and is expressed in bits per second. Broadband is a wide bandwidth connection that allows large volumes of data to pass through a medium at the same time. Narrowband is a two-channel ISDN connection with 128kbps in both directions. Mid-band allows 512kbps upload speed and 256kbps download speed. Broadband provides a greater than 512Kbps upload speed and a 256Kbps download speed. Wired broadband networks are implemented using a duct and chamber system. A civil and electronic engineering team implement the system. Metropolitan areas are connected to chambers and onto the main duct network by optical fibre cables. The different ways of connecting the consumer to broadband are, using a cable wire, optical fibre, DSL, microwave, satellite and fixed wire access otherwise known as wired open loop. The three main technologies are fibre optic, cable modem and DSL.

23

Chapter 2 Accessing Broadband and Virtual Networks

Forfs has produced a series of periodic reports that benchmark the competitive position, cost and quality of telecommunications services in Ireland against other EU countries. The conclusion is that Ireland is comparing poorly with overall take-up of broadband. There is a lack of growth in competing technologies and in the DSL market. Wi-Max is a standard based technology that can serve as a wireless connection alternative to DSL and bring broadband to rural areas. It is considered a development from Wi-Fi but has more range and bandwidth. Wi-Fi is an OFDM coding technology meaning high fidelity 802.11 networking. Fibre over Cabinet is a multi-service access platform that uses optical fibre to connect to cabinets. This is implemented by decreasing the length of the copper wire and increasing the reach of optical fibre so as not to have to replace all of the copper wire. MSAP is a convergence of broadband with multi-access network architecture. Virtual network Computing is a thin client system that reduces the amount of state maintained at a user terminal. VNC achieves mobile computing without having to carry any hardware. In a virtual computing system, the entire remote desktop environment can be accessed from any Internet-connected PC using the networking computing software. Access remote PC is a computer program that can be downloaded onto a PC so as to access computer desktops remotely. The remote PC can accept or deny access. Another program is LogMeIn, which is a development from PCAnywhere. This program is more robust and can break through routers and firewalls. The user has to create an account at the LogMeIn website so as to access a PC remotely. The remote PC must have client software installed so that its IP address can be added to the LogMeIn user customer account. Passwords are required to gain access and IP filtering uses the SSL protocol to encrypt data transmitted between the local and remote computer.

24

Chapter 3 IP Surveillance and Video Conferencing


3.1 Introduction
This chapter introduces the technologies of IP surveillance and video conferencing over a broadband network. The first part introduces the IP camera and describes how it is gaining significance over conventional CCTV systems. With the increasing requirement for highly sophisticated security systems, the chapter outlines the benefits of using wireless technology based on the Internet protocol for video surveillance. The chapter continues to outline the benefits and advantages of a Wi-LAN wireless IP surveillance system. The next part of the chapter describes how to setup and install an AXIS MPEG-2 network camera in the home. There is also a description of how to configure and implement the camera with a home computer. The second part of the chapter describes the videoconference protocol and outlines the standards for transmission of video over a broadband network. Videoconferencing has emerged as a new means of communication and has many applications such as telemeetings, remote education and telemedicine. The chapter analyses the different ways of supporting videoconferencing over broadband networks. Finally there is a review of the ITU recommendations, H.321, H.310 and H.323.

3.2 Development of IP Cameras


The IP Camera or Network Camera is gaining significance as a security camera with the development of broadband. A basic IP surveillance system consists of an IP camera and a computer. The IP camera is a development from the webcam where a camera is connected to the USB socket of a computer. IP surveillance systems digitise video streams at the camera onto the network and the digital stream is then transmitted over the Internet. The IP cameras can be wired or wireless where the wired version is simply connected to the LAN using UTP Ethernet cables. The video stream can be accessed over broadband by first typing the IP Address of the IP camera in a configuration message window and searching for the camera on the Internet.

25

Chapter 3 IP Surveillance and Video Conferencing

A decentralised data encoding system that sends binary data over a shared standard IP network is used to transmit the video stream to broadband. This is a standard system used to send email, web pages and to send files over the Internet. A wireless IP camera requires a wireless access point (WAP) to be located within line of sight distance from the transmitted video stream. The wireless access point can be located behind a router or firewall and access requires an administrator username and password. Compressed video can be carried anywhere over a LAN or broadband network so that any PC with a web browser can monitor and control the quality of video stream. The camera can be configured from any location that has LAN or broadband connectivity. The IP camera surveillance system is low cost because the IP protocol adheres to open standards and integration applications continue to develop. Event driven alert and alarm software can be incorporated so that the administrator can set configurations to trigger on events or when certain conditions arise and specific thresholds are reached.

Figure 3-1

IP Surveillance Network

26

Chapter 3 IP Surveillance and Video Conferencing

3.3 Wireless IP Surveillance


Wireless surveillance is based on the IP protocol for video surveillance. IP surveillance involves connecting video equipment to devices that transmit the video signals across a wireless connection to an IP network. The systems consist of five elements: Network video camera; this can be an analogue camera with a digital encoder or a digital camera with an Ethernet port Subscriber unit; this is a device that is located in the house or building that transmits wireless signals to an access point which is normally located outside the building. Access point; relays video signals to other network locations Digital recording device; A PC or server that can store images IP network; the Internet or Virtual Private Network.

Figure 3-2

A Wireless IP Surveillance of a Remote Oil Facility

3.3.1

Setting up an the AXIS MPEG-2 Network Camera

The IP network camera can be placed at the back of a classroom to broadcast a lecture over the Internet. Students can observe and listen to a class remotely over broadband. The AXIS 230 camera is connected to the network using an Ethernet cable. The only other hardware required is the power adapter.

3.3.2

IP Address Configuration

1. The school administrator provides a fixed IP address for the camera. There is a default router address and subnet mask.

27

Chapter 3 IP Surveillance and Video Conferencing

2. A software application installs the IP camera on to the local area network. This software can be downloaded or installed from a CD by the PC administrator 3. The serial number of the IP camera has to be entered in the field along with the static IP address for the camera. 4. When the fixed IP address for the IP camera is received and set on the application software page, the utility prompts to restart the camera and confirms that the IP address is set. To view the cameras home page the IP address is typed into the address bar of the browser window, http: //147.252.238.68/view/index.shtml. The remaining parameters of the cameras configuration can now be set up. The basic configuration page opens with links to settings for TCP/IP, date/time and video settings.

3.3.3

Configuring TCP/IP and Video on the IP network camera

The IP address, default router address and subnet mask can be entered in the configuration table manually. When the camera is set up for DHCP (Dynamic Host Configuration Protocol) the set up is for default automatic IP configuration. This is because the IP camera changes the IP address setting whenever the system resets on power up. This will also depend on the network settings set by the administrator. DHCP means the PC can extract configuration settings from the server. The time zone can be set to automatic for daylight saving time changes. The video settings can be adjusted for quality where the higher the quality, the bigger the file size. A file size is 400 megabytes per hour is sufficient for video analysis. Event configuration sets up timed recording instructions. The Upload Servers link sets the network address, upload path and login information.

3.3.4

IP Camera Software

The Active Webcam Program can capture video at 30 frames per second from any IP camera or another video device. The program can record and broadcast simultaneously from any number of cameras. Images and sound can be sent over a broadband connection to any number of computers using the UDP protocol. The transmitted video and audio can be encrypted and password protected for remote access. The FTP protocol uploads the images for viewing on web browser and the software has its own http server.

28

Chapter 3 IP Surveillance and Video Conferencing

3.3.5

Power over Ethernet and 802.11 Wireless LAN

Power over Ethernet (PoE) and 802.11 Wireless LAN are standards that make IP surveillance attractive over conventional CCTV systems. The IP cameras are powered using external PoE adapters and transmit over RJ45 Cat5 UTP Ethernet cables. There is no need for electrical wiring and cameras can be installed based on needs of application.

3.3.6

Implementing IP Surveillance

Power over Ethernet can be used to centralise power manage the surveillance IP camera network. The IP camera can be protected by UPS battery back up and a centrally managed surveillance system enables remote reset and shutdown. Network switches need to have speeds from 100Mbps to 10Gbps to optimise speeds, storage capacity and server reliability. With a large number of cameras, network speeds need to be 1Gbyte to the management centre and 100Mbps to each camera. Wireless IP cameras can be installed within a cell were there are 802.11g wireless access points. The 54Mbps 802.11g is a standard sufficient for video surveillance applications. The 802.11g wireless standard has inferior quality of service to a wired version because the network is slowed down with high-resolution images. Performance is dependent on resolutions and frame rates that are selected for each camera. There is a security standard called WiFi Protected Access (WPA) for Wired Equivalent Privacy (WEP) authentication and encryption of wireless signals.

3.3.7

Configuring an IP camera:
The service set identifier is made the same as that of the router. The transmission rate is set to 11mbps. Data is set for encryption. Authentication set to automatic. The key length is set to 128 bits. A 26-character key is set the same as that of the router and the rest of the wireless network. All other settings can be set to default.

By setting the SMTP information, the IP camera can send emails to a remote computer. Audio and motion sensing can also be configured.

29

Chapter 3 IP Surveillance and Video Conferencing

3.3.8

Installing an IP Camera in the Home

The D-Link DCS 2100+ IP Camera has software to archive streaming video to the hard drive of the PC. The software can manage and monitor 16 cameras. The camera can be connected to broadband using an Ethernet cable or 802.11b. The wireless version only needs an access point to the Ethernet with access to an AC power connection for the power adapter. The following hardware can be used to test the system:
Broadband Wireless Router based on the Linksys*802.11b/g router.

PC consisting of an Intel Pentium 4 Processor with HT Technology 3.06 GHz running Windows XP.

An 802.11b/g router is 5 times faster, 54Mbps, than the 802.11b and is common on home networks. The router should be Wi-Fi certified with dual-mode access so that it can connect to a PC as well as a laptop notebook simultaneously. The router is connected between the computer and an external broadband connection to the Internet. By typing in the specific router IP address in the URL web browser toolbar, the PC can find the router automatically. The administrator password is used to log into the configuration process and security is set to 128-bit encryption.128-bit encryption strength is gauged by key length which is the number of bits in the key used to encrypt or decrypt a message. Web browsers use the Secure Sockets layer protocol for secure e-commerce transactions. SSL uses a public key for encryption and a private key for decryption of a message. Earlier implementations of SSL used 40-bit encryption, now 128-bit offers 309,485,009,821,345,068,724,781,056 additional combinations. This should be adequate for Internet for the next ten years. The IP camera is connected to a router using the Ethernet cable. If the camera is wireless, an antenna has to be set up. The IP installer software connects the PC to the camera. The Media Access Control address directs the PC to the cameras IP address and an image of the camera will then be displayed on the web browser of the PC. The router is necessary to share cable with other ADSL and satellite Internet connections. Computers speed up the running of applications when monitoring activities are offloaded to a router. Routers have filtering facilities to block access to certain sites and have security features built in to block viruses.

30

Chapter 3 IP Surveillance and Video Conferencing

Routers can have advanced security to allow home users to log onto a business computer remotely. A Virtual Private Network uses virtual connections that are routed over the Internet from the company's private network to the remote site. The router can have its own firewall and create log files showing a history of network use. The router can also send email alarms to the remote PC.

3.4 Videoconferencing over Broadband networks


With broadband, videoconferencing also known as multimedia conferencing has emerged as a new means of communication. There are many applications such as telemeetings, remote education and tele-medicine. The H.320 standard was the first standard for equipment to access videoconferencing. The H.320 standard is an International Telecommunications Union (ITU) standard. It defines equipment and protocols needed to support videoconferencing over narrowband ISDN. With the deployment of broadband networks and advances in techniques for audio and video compression, better quality videoconferencing is possible. Videoconferencing is simultaneous communication for geographical dispersed participants and is a key to development of multimedia co-operative systems. The additional facilities such as electronic white boards transfer of documents and window sharing has increased the potential of video conferencing systems. Multimedia conferencing describes the integration of the different data applications to basic audio and video communication. The H.320 standard provides digital channels at different bandwidths. There are the 64kbps (B-channel), the 384bps (H0 channel) and the 1536/1920kbps (H11/H12 channel). The G.711 is the basic standard for audio coding. The H.261 is the standard defined by the ITU-T for video coding and compression. H.261 works from 64kbps to 2 MBPS in multiples of 64 KBPS.

3.4.1

ATM for Videoconferencing

ATM is used for videoconferencing because of the requirement for high bandwidth. The characteristics make broadband videoconferencing possible are the availability of high bandwidths, the flexibility in bandwidth usage, variable bit-rate capability, service integration, use of cell loss priority, multi-point distribution and flexible multiplexing. The disadvantages of ATM broadband are cell loss, cell delay variation and delay in forming packets.

31

Chapter 3 IP Surveillance and Video Conferencing

H.321 defines technical specifications to adapt H.320 terminals to broadband ISDN. This allows the inter-working of terminals over broadband ISDN and over narrowband ISDN.

Figure 3-3

H321/H320 Interconnection

H.321 focuses on the inter-working of H.320 and uses the same audio and video coding formats and H.221 multiplexing as the recommendation for N-ISDN. There is a limit on bandwidth to 2Mbps. Compression techniques that do not have a limit on bandwidth can give higher quality video. H.221 gives a resolution of (352 x 288) pixels and this is called Common Intermediate Format (CIF). CIF provides a uniform process of receiving CODEC to interpret a compressed video signal and is adequate for many videoconferencing applications. The ATM Adaptation Layer 1 (AAL1) has a constant bit-rate that allows a videoconferencing system to take advantage of the variable bit-rate service that is defined for ATM.

32

Chapter 3 IP Surveillance and Video Conferencing

To take advantage of broadband, the H.310 standard has been approved. H.310 fulfils the requirement for systems to be able to do audio-visual communication over ATM networks. H.310 defines uni-directional and bi-directional terminals and classifies different types of terminals. Video on demand, broadcast TV, messaging, video transmission and surveillance service can also be adapted to the videoconferencing system. H.321 is included in H.310 as one of the operating modes for internetworking with other networks. H.310 solves some of the limitations of H.321 by defining native ATM mode. It keeps the basic H.261 and G.711 as the codings for interoperability in video and audio respectively. H.310 also defines the use of MPEG audio and video which provides better quality native mode operation.

Figure 3-4

H.310 Protocol Reference Model

The H.310 Protocol reference model consists of the following protocol stacks: Out of band network access signalling stack for DSS2 signals. In band communication control stack for H.245 messages, in charge of logical channel signalling and capabilities exchange. H.320/H.321 interoperation modes stack using H.221 multimedia multiplex. H.310 native modes stack using H.222.1/H.222.0 multimedia multiplex. T.120 stack for data applications.

33

Chapter 3 IP Surveillance and Video Conferencing

The H.310 defines different types of terminals on the ATM Adaptation Layer to support videoconferencing. Terminals over AAL1 benefit from the function of the AAL1 convergence sub-layer (CS) because of clock jitter removal, bit error correction, with cell loss recovery and data structure preservation. H.321 is made compatible by the AAL1. AAL5 CS provides less functionality-bit error detection, cell loss detection and data structure preservation. There is a high availability of integrated circuits that implement AAL5 CS as it is already present for User to Network signalling meaning it is recommended for videoconferencing.

Figure 3-5

H.323 protocol stack changes for RTP over AAL5

3.4.2

H.323 over ATM Broadband

H.323 is the ITU recommendation for videoconferencing over LANs and the Internet. H.323 can be applied to a packet switched network regardless of the physical layer. H323 uses H.261 and G.711 as basic audio and video coding formats to provide interoperability with other networks. The delivery mechanism of TCP is used to carry control information. There is the unreliable delivery mechanism of UDP to carry audio and video packets with no overhead and latency of retransmission. ATM uses H.323 by using IP over ATM and ATM is transparent for H.323 protocols. Carrying audio and video in packets using RTP/RTCP over AAL5 and control data is sent using IP over ATM will make the transport of audio and video more efficient The quality of service (QoS) capabilities of ATM can be used if RTP/RTCP was directly over AAL5 and thus solving the problem with IP over ATM methods to provide a better service on demand. A limitation is that a decentralized conference is not possible.

34

Chapter 3 IP Surveillance and Video Conferencing

3.4.3

Videoconferencing over Broadband

Broadband networks offer great potential for applications that make use of videoconferencing because the requirements of real time audio and video communication. ATM is the chosen technology for broadband networks. The different standards for videoconferencing take advantage of the capabilities of ATM such as Variable Bit Rate (VBR) services. VBR allows users to specify throughput capacity and a sustained data rate.

3.5 Summary
This chapter can be divided into two sections, IP camera surveillance and videoconferencing. The IP camera also called a network camera is a development from the webcam. The IP camera does not need the PC USB port as a connection, but has its own IP address and its own microcomputer embedded in the camera. The IP camera can be wired or wireless, but the wireless version is gaining more significance where it can be a cost effective alternative to traditional CCTV systems. Wi-LAN is a leader in wireless IP surveillance and has been perfecting solutions for wireless IP challenges for a long time. Key advantages of wireless IP Surveillance is: Cost effectiveness over traditional CCTV systems. Mix video, voice and data traffic on the one network. Easy integration to existing IP infrastructure. A flexible engineering solution with less effort and risk to the consumer.

To set up an AXIS MPEG-2 network camera, the administrator provides a static IP address with a default router address and subnet mask. If the camera is in the home, the default IP address is used. The PC looks for the IP address of the camera. The cameras configuration page pops up when the PC finds the IP address of the camera. The active IP camera program can then send images back to any PC that logs on to the IP address of the camera. The second part of the chapter describes videoconferencing, which is an application for the IP network camera.

35

Chapter 3 IP Surveillance and Video Conferencing

In videoconferencing users can communicate simultaneously by means of audio, video and using electronic whiteboards. It allows simultaneous communication for geographically dispersed people. Multimedia conferencing describes the integration of audio and video communication. Until recently the H.320 ITU standard described the equipment and protocols needed for videoconferencing over ISDN. Broadband has now advanced audio and video compression to provide better quality videoconferencing. The standards that support videoconferencing over broadband networks are the ITU recommendations H321, H310, and H.323. ATM is the chosen technology for future ISDN broadband because of high bandwidth, variable bit rate capacity, multipoint distribution and flexible multiplexing. There are different standards developed by ITU-T videoconferencing over ATM such as adapting to broadband networks and taking advantage of broadband. H.323 is the ITU recommendation for videoconferencing over the Internet because it is applicable to a packet switched network regardless of the physical layer. H.323 can be used on ATM using the IP over ATM method. Audio and video are sent in packets using the Realtime Transport Protocol/Real Time Control Protocol (RTP/RTCP) over ATM Adaptation Layer 5 (AAL5) while data and control is sent using the IP over Asynchronous Transfer Mode (ATM). The chapter gave an overview of different standards available for videoconferencing over broadband. The opportunities for the use of IP surveillance technology using the IP network camera is brought into more significance by videoconferencing as well as being an alternative to traditional CCTV systems.

36

Chapter 4 Broadband over Electricity Supply Networks


4.1 Introduction
In the beginning of the chapter, Broadband over Power Lines (BPL) is defined as a method to be able to bring broadband to the consumer. By using the electricity supply network, which is the largest existing network in the world, remote monitoring and control of household appliance could be implemented over broadband. The first part of the chapter describes BPL and defines the standards and investigates research and development. The history of BPL is described and the present day methods of implementing a BPL system are analysed. There is an investigation into overcoming narrowband and wideband interference. There is a signal propagation communication model and a description of QFDM, a modulation method. Finally there is a definition of G-line technology, a method of transmitting microwaves over a wire. The second part of the chapter describes methods of interfacing digital information onto the 240V/50Hz AC signal. There is an overview of Spread Spectrum technology, a new method of interfacing data onto the electricity supply line. The coding system of Spread Spectrum (SS) technology using FSK and PSK modulation is defined. Gaussian noise and the Pseudo Random noise are described before finally there is an evaluation of the limitations of SS technology. The third part of the chapter describes the X-10 interface module, the principles and the X-10 code. The seven-layer protocol for X-10 is defined. The final part of the chapter describes a method of implementing broadband over an electricity supply line to control and monitor household devices. The method of interfacing the home PC to X-10 power line interface modules is described. There is a description of a microcontroller interface module and finally there is an analysis of the PC to X-10 CM11A interface module.

37

Chapter 4 Broadband over Electricity Supply Networks

There are tables showing the coding system and block diagrams showing two typical applications. There is a definition of an XML Web Service, which is a mobile interactive solution for X-10 power line networking.

4.2 Electrifying Broadband


Electrifying Broadband means using the electricity power lines to transmit broadband data and voice at high speeds to households. Since broadband signals cannot pass through a transformer, outdoor devices are needed to combine the voice and data signals with the low voltage supply current in the local transformer stations. Adapters, located in the house, are used to filter out the voice and data signals. The signals are then sent to the PC or network connection as well as the telephone using Ethernet cables. Broadband Power line (BPL) can be used to manage and control the electrical appliances and utilities from remote locations. Power line communication originated in the 1950s where it was used for tele-metering and control of electrical equipment in power utility networks. The first technique used by the power line to control messages was called Ripple Control. Ripple Control was characterised by the use of low frequencies of 100-900Hz with a low bit rate and a demand for high transmitter power of several 10kwh. The system was one-way communication and was used for the management of streetlights, load control and switching tariffs. In the 1980s, there was research into the characteristic properties of the electrical grid as a medium for data communication. The limitations were signal/noise ratio and attenuation of the signal at the grid for frequencies of 5-500 KHz. Power lines were being investigated as a method for SCADA technology (Supervisory Control and Data Acquisition). Bi-directional communication was developed in the 1990s with the present systems coming on market. In the present 21st century, advanced protocol techniques are being used and there are systems for managing robust data transfer. Future development will enable frequencies in the GHz range to be used to provide much higher bandwidth and high data rates in several Mbps.

38

Chapter 4 Broadband over Electricity Supply Networks

At the local network station, communication signals and electricity are carried together on the grid and transported to the home. Once in the home, all power sockets can systematically send and receive communication signals.

4.2.1

Advantages of Broadband over Power lines


No regeneration of data. No changes in household wiring. Broadband connection in every socket in the house. Plug and Play installation. Always on Broadband. Largest Existing Infrastructure in the world. Enables surveillance, Alarming, Meter reading. Remote management of household devices. Remote Maintenance, Automation. E-services (Web Hosting, Email, ASP). Full control allows for high quality of service. Near light speed propagation makes a very powerful fast delivery of video and audio data.

4.2.2

Standards for Internet Communication over Power lines

HomePlug Alliance is a group which includes Intel, Advanced Micro Devices, Motorola, 3Com, Cisco and Texas Instruments. Intellon is a company that designs and sells Integrated Circuits for power line communications and evolved from a group of companies in 1989. Intellon ICs create instant network access for broadband modems to the Internet using the electrical wiring in the home. The group intends to develop a power based home network standard based on power lines. The HomePlug Alliance Group certifies power line devices. The devices plug into an electrical socket and use the Ethernet to connect to computers and IP devices. A simple power line network in the home can consist of a cable modem or DSL router connected to a power line Ethernet Bridge that is plugged into an electrical socket. The PC is connected to another Ethernet Bridge and plugged into another socket. This completes the network.

39

Chapter 4 Broadband over Electricity Supply Networks

Likewise, an 802.11b-enable power line device can receive a broadband signal from the DSL router through the home power grid and pass it wirelessly to an 802.11b adaptable PC. Another group called the R7.3 group of the consumer electronics association (CEA) were formed in 1999 to specify a data-networking standard based on power lines. The group is developing home-networking schemes that use existing power lines to send audio, video and data between devices in the home. Where the HomePlug Alliance group focuses on PC data networking, the R7.3 group concentrates on networking a broader range of devices such as consumer electronic appliances in the home. Homeplug devices are easy to install because of the simplicity of setting up a network because of the Ethernet requirement. There is 56-bit DES encryption. Homeplug 1.0 specifies modulation and transmission on Orthogonal Frequency Division Multiplexing (OFDM). HomePlug 1.0 uses 76 tones within a 4MHz to 21MHz spectrum. With OFDM, the tones have the best signal/noise ratio and are transmitted on a clean portion of the frequency spectrum where noise is filtered out. The throughput is 5Mbps to 8Mbps at the physical layer.

4.2.3

Digital Communication over Power lines

The basis for the HomePlug Power line Alliance standard is Intellons Power Packet technology, which uses an enhanced form of orthogonal frequency-division multiplexing. OFDM has forward error correction, which is similar to the technology of DSL modems. OFDM is a variation of frequency division multiplexing (FDM) used in the telephone network. FDM puts the computer data on separate frequencies from the frequencies that carry voice signals on the telephone line. The signal space is separated into data channels that are of uniform bandwidth. The ranges of frequencies on an electrical system using OFDM is 4.3MHz to 20MHz and are split into 84 separate carriers. The packets of data are sent simultaneously on several of the carrier frequencies to ensure speed and reliability. A Power Packet Integrated Circuit (IC) will sense any noise or power disruption on the frequency and switch the data to another carrier. This is called rate adaptive design that maintains an Ethernet-class connection throughout the power line network and does not lose data. This is a spectrum efficient modulation technique that makes it possible to generate data rates of up to 100Mbps.

40

Chapter 4 Broadband over Electricity Supply Networks

Broadband access for streaming video and audio will require speeds of up to 14Mbps. This is available with the latest PowerPack technology. The technology is scalable and functions reliably on AC power lines. Intelogis is a company that designs computer peripheral equipment. Intelogis developed an older power-line technology that used frequency shift keying (FSK) to send data over electrical wires in the home. Frequency shift keying uses two frequencies, one frequency represents logic 1 and another frequency represents a logic 0. A data stream representing data that is made up of ones and zeros can be sent using the two frequencies between computers on a network. The frequencies are used in narrowband, which is just above the level where most noise occurs. The disadvantage is that it is unreliable because data flow can be disrupted if the frequencies are disturbed. This causes the computer to resend data. The amount of electrical noise has to be reduced by inserting line conditioning power strips between the wall electrical outlet and the computer equipment. The power strips reduce electrical line noise and come with the network kit. The power line network kits are only suitable for 110V AC electricity lines and therefore cannot be implemented in Europe because of the need for a 240V AC power line standard.

4.2.4

Broadband over Power line Communication

Broadband over Power lines (BPL) is the transfer of data through a combination of the power lines in the home or office building and the metropolitan power distribution grid. No new wires need to be installed between the power grid and the house. OFDM divides the available spectrum into narrowband and low data rate carriers called sub carriers. For high spectral efficiency the sub carriers are overlapping and orthogonal hence OFDM. The sub carriers are modulated separately using various formats such as BPSK, QPSK and QAM. In an electrical system, broadband is available on frequencies from 4.3MHz to 20.9MHz and are split into 84 separate carriers. With OFDM, packets of data are simultaneously sent along several carrier frequencies with increased speed and reliability.

4.2.5

QFDM Modulation

High bandwidth digital devices that communicate over power lines need to use a very powerful error correction coding system with appropriate modulation techniques. The desired properties to communicate over the power lines are to overcome non-linear channel characteristics, overcome multi-path spread of the signal and adjust dynamically to carrier conditions and to filter out noise. 41

Chapter 4 Broadband over Electricity Supply Networks

QFDM is a collection of transmission techniques in a wireless environment. When applied to a wired environment it is better known as Discrete Multi Tone (DTM). QFDM divides the available spectrum into paths that are overlapping and perpendicular. Each path has a low data rate put all paths together create a high data rate and make a more efficient use of the spectrum. With small data packets, when there is an interruption in the electricity supply such as electrical devices being turned on and off, only a small amount of data is lost instead of losing the whole signal.

4.2.6

Communication Channel Characteristics of the Power-line

The power-line was never designed for communications transmission. There are variable levels of impedance, signal attenuation and noise. Numerous reflections occur due to structure such as multi-path propagation leading to multi-path fading in the power line medium. A combination of multi-path distortion and complex wiring topology result in a very complex channel transfer function. Power supplies produce harmonics, dimmer switches and halogen lights create coloured background noise. RF and spark plug ignition systems cause interference. The power line is a suitable medium for low speed control applications for home automation systems. Integrated circuits are being developed to send high frequency signals over the power line to the home. The technical challenges governing power line networking to achieve highspeed communication include: Time varying frequency response characteristics of the power channel. Power line noise. Power line network impedance. Telecommunication regulations for permitting communication outside the amplitude modulation frequency band. Modems to modulate the carrier frequency of between 50 and 500 KHz using frequency shift keying or amplitude shift keying require constant tuning. Choosing a good carrier frequency for communications is a compromise between noise and low attenuation at low frequencies to low noise and high attenuation at high frequencies. When data has been generated it needs to be placed on the power line by a coupling network. The signal is superimposed onto the 240V 50Hz power line waveform. There are three possible combinations of lines on which to couple the signal, live to ground, neutral to ground and neutral to live.

42

Chapter 4 Broadband over Electricity Supply Networks

Asynchronous noise

Periodic impulse noise (synch)

Periodic impulse noise (asynch)

Spread Spectrum Transmitter

Time varying linear channel filter

Spread Spectrum Receiver

Coloured noise

Narrowband noise

Figure 4-1

Power Line Communication Model

4.2.7

Signal Propagation model

The main factor that causes a signal to be attenuated is the impedance of the line and the voltage drop as loads are encountered. Attenuation is about 5db over short distances of about 10 meters and increases with distance over the entire frequency range. Attenuation over long and unknown distances is about 25db for frequencies below 60KHz and increases to about 50db at 250KHz. The power line channel can be characterized as a multi-path propagation channel due to signal reflections that are caused by impedance mismatch between connecting mediums. The noise signals that dominate the frequency range between 100KHz and 10MHz are coloured noise, narrowband noise, periodic noise and a-periodic impulsive noise. Background noise is present in the power lines caused by the summation of various low power noise sources. Narrowband noise is due to sinusoidal and modulation amplitudes caused by medium and short wave broadcast stations. Periodic noise is synchronous or asynchronous to the mains frequency and results in a spectrum of discrete lines caused by switching power supplies.

43

Chapter 4 Broadband over Electricity Supply Networks

Figure 4-2

Spectral Analysis of simulated power line

Figure 4-3

Time Domain Signal of an Impulse Noise event

44

Chapter 4 Broadband over Electricity Supply Networks

A filtering technique is used to couple the signal onto the line and to remove the 60Hz AC waveform carrier. The LC coupling and filtering network is the preferred method because it is cheap and the filter response can easily be modified.

Vin Spread Spectrum Modem

L1

C1 L2 C2

Vout Powerline

Figure 4-4

Fourth Order LC filter as a line coupler

4.2.8

Interference Problem of Broadband over Power-lines

Power line communication uses frequencies that would interfere with amateur radio. The HF band is 1Mhz to 30MHz and PLC uses the band 1Mhz to 80Mhz. Very little power is needed to transmit in HF around the world because radio waves in HF bounce of the ionosphere multiple times to get to a destination. The rest of the radio spectrum can only propagate like light in a straight line and so dont bounce of the ionosphere. Electricity power lines, copper twisted pair and coaxial cable are natural low pass filters which mean high noisy frequencies are attenuated. Twisted pair is suitable up to 100Mhz Coaxial cable is suitable up to 3GHz Power-lines are only suitable up to 20 KHz which is audio frequency.

Power lines are high radiators of frequencies used by PLC where the other mediums are low radiators. PLC is a high polluter of the radio spectrum causing a large rise in noise in urban areas. Repeaters that clean up the data signal emit frequencies in the same range as the radio frequencies used by HAM radio operators. Broadcasters of radio can be concerned about interference that would prevent their signal reaching their listeners. There were two competing Power-line Communication Systems (PLC) systems in operation in Crieff, a town on the southern edge of the Scottish Highlands that both interfered with HF reception. Tests done in four locations showed that interference from the main network modem was audible to residents who were able to receive very strong radio broadcasts. Reception was significantly impaired at various locations on a street between a residence and a substation despite the distributor cable being placed underground.

45

Chapter 4 Broadband over Electricity Supply Networks

4.2.9

Broadband using G-line Microwave Technology

This is a method of transmitting microwaves over an electricity power line. Microwave is a technology that could be used because it does not interfere with HF radio. A system has been developed by Corridor Systems in the US using the microwave spectrum that is in the 2GHz to 20GHz range. The speed is up to 216Mbps and is a faster data rate than the HF system that is in the 1.7Mhz to 80MHz range. The microwave system can use 802.11 chipsets to achieve lower cost and avoid HF and VHF frequencies completely. Microwaves can transmit over a wire because HAM radio operators once used a UHF/microwave transmission line to send and receive radio signals. G-line is a technology that uses a cone shaped launcher to transmit a microwave signal along a wire.

4.3 Spread Spectrum Technology (SS)


Spread Spectrum communications is a wideband modulation scheme that is an improvement to the narrowband scheme. A wideband transmission ensures that some portion of the transmitted spectrum is received despite the fading characteristics of the power-line. The advantages are better noise immunity over narrowband systems, robust over non-Gaussian noise and alleviation of multi-path interference using coherent RAKE reception and narrowband interference suppression.

4.3.1

Overview of Spread Spectrum Technology

The Spread Spectrum transmission technique is a pseudo-noise (PN) code that is independent of information data. It is a modulation waveform that is used to spread signal data over a bandwidth that is much greater than the signal information bandwidth. At the receiver, the signal is de-spread using a synchronised replica of the pseudo-noise code. There are two basic principles of SS systems, Direct Sequence Spread Spectrum (DSSS) and Frequency Hopping Spread Spectrum (FHSS)

4.3.2

Direct Sequence Spread Spectrum (DSSS)

DSSS is a pseudo-shift in phase where the PN signal generated at the modulator is combined with PSK modulation to shift the information signal pseudo-randomly. The transmitted bandwidth is determined by the clock rate and by base-band filtering. The maximum clock rate limits the maximum spreading rate. The clock rate is an integer multiple of the symbol rate.

46

Chapter 4 Broadband over Electricity Supply Networks

A short code sequence uses a PN code length that is equal to the data symbol. A long code length uses a PN code that is much longer than the data symbol. A different clock pattern is associated with each symbol.

4.3.3

Frequency Hopping Spread Spectrum (FHSS)

FHSS is pseudo-shift in frequency where the PN signal generated by the modulator is combined with FSK modulation to shift the carrier frequency of the FSK signal pseudo-randomly. The transmitted signal occupies a random number of frequencies at a time. FHSS divides the available bandwidth into N channels and hops between these channels according to the PN sequence. A frequency synthesiser dictates one of 2n frequency positions. Transmitter and receiver follow the same hop pattern.

4.3.4

Pseudo Noise Signal

The pseudo-noise signal does not reject random white Gaussian noise. This zero mean white Gaussian noise (WGN) has the same power spectral density, G(WGN)(f) for all frequencies. White means that white light contains equal amounts of all frequencies within a visible band of electromagnetic radiation. A pseudo random (PN) code sequence acts as a noise-like carrier used for bandwidth spreading of the signal energy. The length of the code sets the bounds on system capability. A PN code sequence is a pseudo noise or pseudo random sequence of 1s and 0s. It is periodic and therefore is not a real random sequence and random signals cannot be predicted. Autocorrelation of a periodic PN sequence is defined as the number of agreements less the number of disagreements in a term by term comparison of one full period of the sequence with a cyclic shift of sequence itself. Autocorrelation of a PN code has properties similar to that of white noise. Pseudo Random is not random but looks randomly for the user who does not know the code. The transmitter and receiver know the periodic signal. The longer the period of the PN spreading code, the closer the transmitted signal is to a true random binary wave and the harder it will be to detect. The statistical properties of sampled white noise are Short code which has the same PN sequence for each data symbol (NcTc = Ts) and Long Code where the PN sequence is much longer than the data symbol (Nc Tc >> Ts).

47

Chapter 4 Broadband over Electricity Supply Networks

The properties of a PN code sequence are the balance property, where the number of binary 1s is different from the number of binary 0s and the run length distribution, where the digital signal has an autocorrelation function that is similar to white noise signals. The frequency spectrum of a PN sequence has spectral lines due to the periodic nature. The lines come closer to each other with increasing sequence length. Each line is smeared by data scrambling which spreads each spectral line and further fills in between the lines to make the spectrum continuous. The zero-one balance of the PN sequence determines the DC component.

4.3.5

Narrowband and Wideband Interference

Narrowband Interference is noise spread by multiplication of the noise with the PN sequence of the receiver. Spreading and de-spreading requires a higher bandwidth in exchange for a reduction of narrowband noise. The signal data is multiplied twice by the PN sequence, but the interfering noise signal is only multiplied once. This is how the SS system rejects narrowband noise. Wideband interference is the multiplication of the received signal with the PN sequence of the receiver. This causes a selective de-spread of the receiver signal and this induces a smaller bandwidth and a higher power density. The interference signal is uncorrelated with the PN sequence and is spread over the frequency band. Wideband noise is due to multiple SS users in the system causing Gaussian noise. There is no increase in SNR of the SS signal and the larger bandwidth increases noise power. This is due to the SS signal having a lower power density than that of the transmitted signal.

4.3.6

Message Type and Codes

M-Sequence is a message type meaning maximum length sequence where the length of the sequence is Nc = 2L- 1. A Simple Shift Register Generator (SSRG) governs the message length.
f(x1,x2,x3,...xn)=c1x1+c2x2+c3x3++cnxn

---

OUTPUT

Figure 4-5

M-Sequence Simple Shift Register SSRG

48

Chapter 4 Broadband over Electricity Supply Networks

PN codes must have an autocorrelation property for good synchronisation and a low cross-correlation (orthogonal code) property for low Multiple Access Interference (MAI). MAI is interference between direct sequence users and is a factor that limits capacity and performance of DS-CDMA systems.

4.3.7

Code Division Multiple Access

(CDMA) is a method for multiplexing wireless users by using distinct orthogonal code. Each user transmits at the same time and each user is allocated the entire available frequency spectrum for transmission. CDMA does not require the bandwidth allocation of FDMA or the time synchronisation of the individual users as in TDMA. A CDMA user has full time and bandwidth available but the quality of the communications channel decreases with the increased number of users. Crosscorrelation is a measure of agreement between two different codes. When the crosscorrelation is zero, all of the codes are orthogonal. With CDMA, multiple users occupy the same RF bandwidth and transmit simultaneously. When the user codes are orthogonal there is no interference between the users after de-spreading of the signal. Privacy of communication for each user is protected. Crosscorrelation between codes increases noise power after de-spreading due to codes not being perfectly orthogonal and limits the maximum number of simultaneous users. Hadamard-Walsh codes are used for synchronous CDMA and Gold codes are used for asynchronous CDMA. Hadamard Walsh codes are generated in a set of N = 2n codes with length N = 2n using a rows and columns HN matrix. Gold codes are product codes achieved by using Exclusive OR gates to exclusive-or the two multi-length sequences that are the same length. The code sequences are added by synchronous clocking. The msequence codes maintain the same phase relationship and the codes generated are the same length as the two base codes that are added together. The autocorrelation function is worst than that of the m-sequence and the change in position of the two msequence codes causes a new gold code to be generated.

4.3.8

Multi-path Channels

In wireless channels multi-path propagation is where there is more than one path from the transmitter to the receiver of a communications network. The causes of multi-path communication are atmospheric reflection or refraction, reflections from the ground and buildings and fluctuation in the received signal called fading caused by each path having its own attenuations and delays. 49

Chapter 4 Broadband over Electricity Supply Networks

4.3.9

Evaluation of Spread Spectrum technology


No interference with conventional systems. Secure and private communication. Code Division Multiple Access (CDMA) (Multi-user). Rejection of multi-path therefore keeps direct path for communication. Protection against intentional interference (jamming of frequency). Protection against unintentional interference (narrowband). Low probability of interception (LPI). Availability of licence-free ISM frequency band.

ISM Bands (Industrial, Scientific and Medical) are frequency bands that are reserved for SS applications. ISM Band 902-928Mhz 2.4-2.4835Ghz 5.725-5.850Ghz Table 4-1 Bandwidth 26Mhz 85.5Mhz 125Mhz ISM Bands

Traditional SS techniques such as direct sequence and frequency hopping have a problem of synchronization because of varying noise and frequency dependent attenuation. It is difficult for the receiver to track a hostile power-line environment. Therefore the traditional SS technique will not work due to complexity and high implementation cost. There is an analogue Spread-Spectrum physical layer interface for power-line data communication that is suitable for home networking. The proposed scheme uses a chaotic system to modulate the information signal onto the AC 240V 60Hz waveform. The system does not need quantization and complex synchronisation and therefore can be implemented at low manufacturing cost.

4.4 Controlling Household Devices over Broadband using X-10 Devices


X-10 is a system for controlling electrical household appliances and lights using signals transmitted over the electricity supply network. X-10 is the term to describe a protocol that was invented by a Scottish company, Pico Electronics in 1978. X-10 modules replace switches that turn on and off lights, electrical sockets and lamp holders. 50

Chapter 4 Broadband over Electricity Supply Networks

Appliances can be controlled locally but appliances can also be controlled remotely using keypads, radio and infrared remote controls, timers and computer interfaces. With a computer interface the appliances can be controlled remotely over the Internet using a broadband connection. The control signals are transmitted over the domestic electrical wiring. Controllers dont have to be connected to each appliance but a single controller connected to the electrical fuse box can control all appliances. The X-10 protocol can provide the controllers with the status of each appliance such as an on or off signal. Appliance modules generally do not have a status indicating facility and this has to be taken into account. The X-10 code format is the excepted standard for power-line carrier (PLC) transmission. The code was first introduced in 1978 for the Sears Home Control System. Original Equipment Manufacturer (OEM) versions of X-10 home control systems were developed for companies such as General Electric. Versions for Germany, France and Switzerland were developed as well as for Japan and Australia. All systems use the code format that is compatible with the original version in the USA. OEM takes advantage of a base of X-10 customers which use X-10 Powerhouse standard modules. OEM signifies that the particular version of that product does not come in a retail box. Installation instructions are loaded using a CD with reference to a printed manual.

4.4.1

X-10 Principles

X-10 compatible signals are coupled to the power line using the transmitter PL513 and transmitter/receiver TW523 interfaces. Power line interfaces and permission is needed from the ESB to transmit code in X-10 format over the power line. This is granted to purchasers of the interfaces. The PL513 is a transmitter and the TW523 is a transmitter receiver and both plug into the standard AC power sockets. They connect to an OEM product using the RJ11 telephone cable. An opto-coupled 60Hz square wave is synchronised to the zero crossing point of the 240AC power line signal. The X-10 codes that are generated by the OEM module are synchronised to the zero crossing point of the AC 240V signal. The OEM drives 1ms envelopes of 120KHz carrier signal to the TX input of the interface. These envelopes must be as close as possible to the zero crossing point of the AC 240V signal. A custom made IC reads and error corrects the X-10 codes from the power line so that the microprocessor in the OEM product does not have to continually monitor the power line and check X-10 codes for validity.

51

Chapter 4 Broadband over Electricity Supply Networks

4.4.2

The X-10 Code

The X-10 code is applied in envelope form to the OEM product. There is a start code (1110) to alert the module that an X-10 code is to follow. A 1 bit from the TW523 interface appears as a negative pulse 1.1ms long beginning approximately 100s after the zero crossing point. The OEM samples the data between 500s and 700s after the zero crossing point. A LED on the TW523 interface gives a visual indication that X-10 codes are being received. If a code received is different from a code transmitted there is the assumption that corruption has occurred by noise on the power line or a data collision. This is achieved by the X-10 device reading from its own output. There is a line monitoring facility to ensure that there are no X-10 signals already on the power line before an X-10 signal is transmitted. A transmitter waits for a random number of power cycles before transmitting an X-10 signal. The signal envelope carrying the X-10 code is a 120KHz burst with a delay of 50s. The PL513 or TW523 power line X-10 interface generates a 50Hz square wave with a maximum delay of 100s from the zero crossing point of the 50Hz AC 240 signal.

Figure 4-6

Three Phases in the Electricity Supply line

52

Chapter 4 Broadband over Electricity Supply Networks

All X-10 transmitters send out three pulses for each signal for a 3-phase system. The transmitter releases a pulse every 60 to concede with each zero crossing point of a 3phase electrical system.

Figure 4-7

Binary Data Transmission

Figure 4-8

Start Code is Two Cycles

Immediately after the Start Code, a house or letter code is sent

Figure 4-9 A = 0110 B = 1110 C = 0010 D = 1010 E = 0001 F = 1001 G = 0101 H = 1101 Table 4-2

House or Letter Code I = 0111 J = 1111 K = 0011 L = 1011 House or Letter Code 53 M = 0000 N = 1000 O = 0100 P = 1100

Chapter 4 Broadband over Electricity Supply Networks

A binary 1 is represented by 1 ms burst of 120 KHz at the zero crossing and a binary 0 is represented by an absence of a 120KHz signal. The 1ms bursts are transmitted three times to concede with the zero crossing point in a three phase distribution ESB system. A complete code takes up eleven cycles of the 240Volt 50Hz AC waveform. Immediately after the House (Letter) Code a number or Unit code is sent

Figure 4-10 Unit Code 1 = 01100 2 = 11100 3 = 00100 4 = 10100 5 = 00010 6 = 10010 7 = 01010 8 = 11010 Table 4-3 9 = 01110 10 = 11110 11 = 00110 12 = 10110 Number or Unit Code 13 = 00000 14 = 10000 15 = 01000 16 = 11000

Figure 4-11 Standard X-10 Transmission While transmitted pulses are 1ms in duration, the receiver opens a window of only 0.6ms.A complete code transmission is eleven cycles of the AC electricity supply

54

Chapter 4 Broadband over Electricity Supply Networks

line. The first two cycles represent a Start Code, the next four cycles represent a House Code and the last five cycles represent a Unit (number) Code. Data is transmitted twice to allow for redundancy, repeaters and for reliability. Whenever the data changes from one address to another address, from address to a command or from a command to an address, the data frames must be separated by six zero crossings (or 000000). When a receiver has processed its address data, it is ready to receive a command code. A start code and the house code are sent first followed by a command code.

Figure 4-12 Command Code On = 00101 Off = 00111 All Lights On = 00011 All Lights Off = 00001 Table 4-4 Command Code Bright = 01011 Dim = 01001

Figure 4-13 Complete Transmission A standard X-10 transmission takes duration of 47 cycles of AC signal. Each eleven cycles of one start code, house code and one unit or function code is known as a frame. The transmission begins with a start code (1110) followed by four cycles of house code and then by five cycles of number or function code. Apart from the start code, the house and function code data is transmitted in true and complement form on alternate half cycles. This adds up to 18 bits. If a 1ms 120KHz burst of signal appears on a half cycle, this will represent logic 1. The absence of a 1ms 120KHz burst of signal will represent a logic 0 and this is on the next half cycle. There are 16 different house codes and there are 32 different key codes (function or number codes).

55

Chapter 4 Broadband over Electricity Supply Networks

The key code 00000 is not used. This makes up 256 X-10 devices represented by different house and key codes. House codes are represented by a specific sequential four-bit pattern. Bit 0 is transmitted first. The bit sequence does not correspond to ASCII codes. The codes are unique for X-10. The bit pattern of 4 bits is transmitted in true and complement form hence 8 bits are used to send a 4-bit house code and 10 bits are transmitted for every 5 bit key code. The X-10 code and message format is displayed in appendix 1.

4.4.3

The ISO Seven Layer Model for an X-10 system

The physical layer transmits the data over the power lines. A simple scheme is to use a tone of 120Khz or the absence of a tone of 120Khz to convey a binary 0 or a 1 bit data transfer. The data link layer implements the start code framing sequence transmitted on alternative half cycles. The start code is a code that cannot occur within a message; this tone is a tone-tone-tone-no tone (1110) signal. The presentation and application layers define the content of the message and how to interpret the code. The codes are made up of house codes and key codes. X-10 does not implement the network, transport or session layer.

4.5 Implementing a House Appliance Control System


X-10 modules are available to switch heavy duty loads such as fans, pumps and motors. The typical module plugs into the standard three pin electrical socket. There is a three pin output for connecting the appliance and no extra electrical wiring is needed. The three pin electrical socket in the wall can also be replaced with an X-10 version of the socket. Lamp modules are connected between the lamp holders and light bulbs and respond to X-10 codes to switch the lamps on and off. A light switch module replaces the wall mounted switch. This module contains a controller that generates control codes that match the house/unit codes of the lamp modules. Some modules do not have a neutral connection and are intended for fluorescent lights that can dim as well as switch on and off. Motorized devices have built in X-10 support such as a Swish Curtain puller. X-10 controlled sirens and strobe lights switch on and off using X-10 codes.

56

Chapter 4 Broadband over Electricity Supply Networks

Passive infra-red motion detectors issue control codes when movement is detected. X-10 security floodlights are controlled like an ordinary lamp. Relay modules control electronic devices. X-10 controllers for light and temperature level detection. Plug in control keypads from units that control single code devices to multiple code devices on the same unit code to large desktop multi-channel units. These units require a neutral connection.

Telephone-based receivers convert touch tone telephone key presses to X-10 signals.

4.5.1

Interfacing the PC to an X-10 network

A microcontroller board can be used to interface the PC to the X-10 network. The onboard processor can read sensor signals and send X-10 signals to the power-line interface module, TW523. Analogue sensors are interfaced to the microcontroller using A/D converters. To support remote software development, the microcontroller can be simulated using LabView front panels.

Figure 4-14 PC Interfaced to X-10 using a Stamp Microcontroller

4.5.2

Switches and Sensors

A relay can be used to switch high-powered loads such as a lamp or a motor, low power loads, isolated loads and slow toggling devices. A triac can be used to switch medium power non-isolated loads and where rapid control is required such as the dimming of lights.

57

Chapter 4 Broadband over Electricity Supply Networks

Lighting, fountains and pumps in a garden can be controlled using a triac. A TIC206D is a device that can trigger with low gate current. It is a 4-amp device, which will switch a 500Watt 240V load. Phase control and the dimming of lamps can be achieved by programming a triac to switch on at a certain points in the half cycle. Burst fire control is where devices are switched on and off for a number of half cycles of the power-line AC signal.Burst Fire control is ideal for central heating systems because time constants are long compared to the power-line frequency but unsuitable for lamps because of flickering. Logic Intelligence is where the X-10 device is controlled by central intelligence. The PC runs an environmental control program to monitor the interface to the power-line. The microcontroller can think for itself as if it is built into the household appliance. A digital sensor, DS1621 can measure temperature. Burst fire control can be used to set up a temperature control system for a green house where X-10 extended commands remotely set the target temperature. A photo sensor or a light dependent resistor, ORP-12 with a 47ohm pullup resistor can be used for day and night detection. RS232 Port RJ11 Telephone Jack X10

PC Software Control

PIC Microcontroller Board

Tuned Amplifier and signal conditioner Lamp Fan Heat Appliance

To USB Port Broadband Router Broadband Connection

Door Sensor Light Sensor Motion Sensor Temperature Internet

Figure 4-15 Microcontroller and tuned amplifier signal conditioner The household appliances can be divided into categories and form a lookup table in the software such as appliance controller, lamp controller, movement sensor, temperature sensor and light sensor. A sample application is to interface a PIC 16C54A microcontroller IC from the PC to an X-10 household device.

58

Chapter 4 Broadband over Electricity Supply Networks

The house and unit address is multiplexed onto four input pins by using eight diodes. Applications such as a garage door or a window blind opener require current limit switches. Other I/O pins can be used as switch inputs to sense when a door or blind is fully opened or closed so as to switch a motor on or off. Security can be improved by using a non-standard coding scheme. A control driver for all X-10 data coding and timing drives the TW523 from the software on the PC. A control driver can be modified to send non X-10 data so that a personal set of commands can be created. Non-standard coding ensures appliances cannot respond to a neighbours coding scheme or react to an interfering RF signal.

4.5.3

Source Code for the PIC16C54 X-10 Appliance Module

The source code is version 1.3 of the Microchip MPASM assembler. The PIC16C54 does not support hardware interrupts so the program flow has to be arranged in a loop. The manual push button switch and the zero crossing detectors need to continually poll for the signal. The power line is sampled at each the zero crossing point and a test is made to detect the code format of 1110 which indicates the start of the X-10 sequence. When a code of 1110 is detected after the zero crossing, subsequence cycles are sampled to extract the X-10 signal data. An MC563 mini-controller reads the X-10 data. There is a MT522 mini-timer and an SH624/ND561 RF remote/security console. There is an extra blank cycle produced by the ND561 security console, which generates a gap between the house and unit data sequence and the house and function data sequence. The software recognises the gap and resynchronises with the data. The X-10 data stream has all addresses and data duplicated for error checking. (Data sheet and source code for the PIC16C54A microcontroller are listed in Appendices)
start code 1110 house addr 8bit unit addr 10bit start code 1110 house addr 8bit unit addr 10bit gap start code 1110 house addr 8bit 10bit func start code 1110 house addr 8bit 10bit func

Table 4-5 House Unit and Function bit Sequence The house address is transmitted in an 8-bit sequence where each pair of transmitted bits corresponds to one bit of house code. A 01 sequence transmitted corresponds to a 0 and a 10 sequence corresponds to a 1.

59

Chapter 4 Broadband over Electricity Supply Networks

A house code C is 0010 is transmitted as 01011001. The unit and function codes are transmitted in 10-bit sequences. The last two bits are 01 for a unit address and 00 for a function code. When the house address, unit address and function code is captured from the data stream the address is compared to the setting of the house/unit address switches. When there is a match, the transmitted function takes place on that address. Look up tables are used to convert the bit pattern from the address switches to the transmitted data in the address sequence. To increase the input/output capability of the PIC microcontroller, the house/unit addresses can be coded into the firmware of the PIC16C54. There is no need for an address switch and there will be eight extra pins on the PIC12C54 available for use. It is necessary to monitor X-10 data on the power-line to control appliances over the power-line. Instead of a triac being used to turn on the appliance, an opto-isolator can be driven with RS232 data. At each zero crossing point on the AC power line, an ASCII 0 or a 1 is transmitted to indicate the absence or presence of the 120KHz carrier. The X-10 data can be captured and displayed on the PC that is running a terminal program.

4.6 X-10 CM11A Interface


The X-10 CM11A is a two-way communication interface to connect a PC to X-10 devices. The CM11A can send and receive X-10 commands through the power line. The CM11A connects to the PC through the serial RS232 port and fits between the AC power outlet and the PC's mains power plug. Baud Rate: Parity: Data Bits: Stop Bits: 4,800bps None 8 1

Table 4-6 CM11A Cable Parameters CM11A cable connections, header and transmission code byte are displayed in appendix 1. Header byte 0x04 is represented by binary 0100 and signals the CM11A that the following transmission is an address command with standard transmission method. The second transmission byte is 0x66 and is address, A1. A checksum is sent to the PC and the PC returns 0x00 to indicate transmission is correct, the interface then replies with 0055 to say it is ready for another transmission.

60

Chapter 4 Broadband over Electricity Supply Networks

Header byte 0x06 is represented by 0110 and signals the CM11A that the following transmission is a function. The function commands the CM11A to switch on or off an appliance in a house coded A. The PC is attached to the power line via the CM11A interface from the RS232 port. The household appliances are attached to the power line using PCS04/TW513 receivers and PCS05/TW513 transceivers. Remote control can be over a broadband connection or from a control panel communicating with the RF transceiver interface directly. The CM11A can be wired or wireless and each transmitted command is synchronized and sent within 200s of zero crossing point of AC power line. A command packet requires eleven cycles of the power line to transmit and the CM11A serial interface controller handles this functionality independent of the PC. The PC controls the system in real time and remotely over the Internet. System behaviour is programmed in advance and status of the system can be continually monitored.

Remote Controller

Water Sensor

RF Transmitter Sensor Signal Transmitter Power Line

CM11A Interface

PCS04/PL513 Receiver

PCS05/TW523 Transciever

RS232 Connection

Lamp

Iron

To USB Port Broadband Router AC Power

PC with Interface Software


Internet

Figure 4-16 PC with CM11A Interface to X-10 Network

61

Chapter 4 Broadband over Electricity Supply Networks

4.6.1

XML Web Services

XML web services are an infrastructure for presenting services to mobile computing devices such as PDAs or mobile phones. The infrastructure uses an X-10 communication protocol and the web services paradigm as the core technology for accessing household appliances across a network. X-10 services consist of a software layer that is able to translate requests of diverse mobile clients versus the X-10 devices. The X-10 communication protocol has a lower level of the architecture with a CM11A X-10 transmitter module that is connected to the computer via the RS232 port. Communication to the sensor devices is by way of the electricity supply network where the appliances are plugged into electrical sockets.

Figure 4-17 Architecture Model

Figure 4-18 X-10 House Scenario

62

Chapter 4 Broadband over Electricity Supply Networks

4.7 Summary
Broadband over Power Lines (BPL) means delivering broadband internet data to homes and businesses using the electricity supply network, the largest existing network structure in the world. Other methods are the telephone lines, cable TV, wide area microwave, DSL and cable. BPL uses radio frequency energy to carry data and has a variety of modulation schemes. There are advantages to using the electricity power lines to supply broadband. There is no regeneration over long distances and no re-wiring of buildings. Remote monitoring and plug and play can be implemented since every electrical socket in the house can be a broadband connection. The limitations are unpredictable noise, security, narrowband and wideband interference. QFDM is a modulation method that divides the spectrum into paths which overlap. QFDM creates a high data rate with small data packets and if packets get lost only part of the signal is lost. Research is ongoing on Spread Spectrum (SS) technology as a method to interface data signals to power lines. SS spreads an FSK or a PSK modulation waveform over a bandwidth that is greater than the signal information bandwidth, a limitation is that it does not reject Gaussian noise. G-line technology is where a microwave signal is transmitted over a wire and the same principle can be applied to sending high speed broadband over an electricity supply line. The X-10 system uses modules that plug into the electrical sockets in the home to interface data signals from appliances to the electricity supply network. A 120KHz burst of data is superimposed and synchronized to the 240V 50Hz signal at the zero crossing points. The X-10 signal consists of a Start code, House Code and Unit Code so as to be able to address a device within a building. The PC can be used to transmit X-10 code to devices over the electrical wiring. The PC can be interfaced to the X-10 network using a PIC microcontroller or a CM11A X-10 interface. By accessing the PC remotely using virtual networking computing, household appliances, such as the alarm system, washer dryer, audio video equipment, heating and ventilation can be controlled and monitored over the Internet. The appliance module would have to send back status signals so that remote operation is possible. A number of software packages are commercially available to download from the Internet to drive X-10 transceivers.

63

Chapter 4 Broadband over Electricity Supply Networks

Figure 4-19 Typical X-10 Modules

Figure 4-20 CM11A Transmitter Module

Figure 4-21 Lamp Module

64

Chapter 5 Testing and Evaluation with LabView


5.1 Introduction
Inherent in an application to implement an X-10 remote control application there is a need for software to test a system and to evaluate the performance. A sample application is used to test LabViews webserver and simulate a CM11A X-10 module on a LabView front panel. The application would allow a user to change the temperature setpoint for an aluminium block connected to a soldering iron. The application can represent the control of a central heating system. The first part of the chapter describes the LabView test program and TCP/IP and UDP applications. The chapter describes how to set up a TCP server and a TCP client. There is a description of LabView remote panels and how to enable remote panels. This section moves on to describe client operation, remote panel connection manager and the web server configuration. Finally this section closes with a description of web server visible virtual instruments (VIs) and application security. There is a reference to the use of an IP camera to provide visual feedback from a remote site and how there are present day applications in Universities for remote education. The second part of the chapter describes the latest revision of LabView, LabView 8 which was launched in October 2005. There is an overview of LabView 8 and a data acquisition program is described on how to measure temperature from a temperature control sensor. There is a description on how to install Data Acquisition (DAQ) hardware. This section also describes the flowchart on a sample application of controlling temperature of a block using a thermistor. The next part evaluates the use of a thermocouple, resistive temperature devices and the thermistor to measure temperature remotely using LabView. There is a description of the TX15-B model thermostat for an X-10 application that can be used for remote control. The chapter closes with a desktop view of a CM11A virtual instrument and LabView program to drive the CM11A X-10 interface device from the PC

65

Chapter 5 Testing and Evaluation with LabView

5.1.1

Overview of LabView

LabView by National Instruments can be combined with the Web to provide remote control of instruments over the Internet. It is a software tool that uses graphical programming to produce virtual instruments on the PC. LabView has its own web server with built in software for Internet connectivity such as TCP/IP and UDP functions. By opening the web browser, a Java applet interface is used to remotely connect to an instrument running LabView at another location, Using PC remote software, the instrument can be controlled over the Internet. A client program can communicate remotely with a distant computer to remote control and monitor instruments and devices. LabView has a graphical user interface that saves time and effort in programming. LabView is continually being upgraded for broadband application. The latest version, LabView 8 dramatically simplifies the development of distributed systems by delivering distributed intelligence. These are a collection of technologies that simplify the development of processes running across remote devices and applications. The protocol needed to transmit LabView data through the Internet is called the TCP/IP (Transmission Control Protocol/Internet Protocol). The DSTP (Datasocket Transfer Protocol) was developed as a sub protocol for data communication through the Internet. Various DSTP functions can be used with LabView.

5.1.2

LabView Test Program

In programming using LabView there are two windows called a Block Window and a Control Window. The block window is for programming and the control window is the graphical user interface. The graphical user interface window controls experimental parameters and monitors data. To control a remote device over the Internet, LabView uses the TCP/IP protocol. LabView has TCP and UDP VIs, and also functions that can be used to create client and server VIs. TCP/IP is uses to communicate over single networks or interconnected networks. Large geographical distances can separate individual networks. TCP/IP routes data from one network to another and is available on most computers.

5.1.3

LabView and Internet Protocol (IP)

IP performs a low level service of moving data between computers. IP packages data into components called datagrams. A datagram contains the data and a header that indicates the source and destination addresses. 66

Chapter 5 Testing and Evaluation with LabView

IP specifies the destination and determines the correct path for the datagram across the network to that destination. IP cannot guarantee delivery of a datagram and does not retransmit the datagram if a failure in delivery occurs.

5.1.4

LabView and User Datagram Protocol (UDP)

UDP is a low-level communication process between computers. Processes communicate be sensing datagrams to a destination or port. (A datagram is a selfcontained, independent entity of data carrying sufficient information to be routed from the source to the destination computer without reliance on earlier exchanges between this source and destination computer and the transporting network. A port is a location to which data is sent. IP handles the computer-to-computer delivery). After a datagram reaches the destination computer, UDP moves the datagram to the destination port. If the destination port is not open, UDP discards the datagram. UDP is used were reliability is not critical. UDP is not a connection-based protocol and there is no need to establish a connection between source and destination. The destination is specified, and UDP socket or port is opened using UDP open Function in LabView. The UDP open function returns a network connection reference that defines the port or UDP socket. The UDP write function is used to send data to the destination and the UDP read Function is used to receive data from a source address. Each read operation contains the source address and a port number. UDP can be used to send short datagrams, but because it is not reliable large datagrams are sent using TCP. The UDP close Function finishes all communication on a port to free system resources. UDP functions communicate with a single client on a subnet by broadcast. UDP functions must be configured to iterate through a list of clients.

5.1.5

LabView and Transmission Control Protocol (TCP)

TCP ensures reliable transmission across the Internet. The datagram is retransmitted until there is an acknowledgement received. TCP/IP is built into Windows and UNIX and LabView requires no additional set-up. With the Apple Mac operating system, LabView requires that Open Transport is included in Mac OS 7.5 or later. TCP is a connection based protocol. Sites must establish a connection before transferring data. Multiple and simultaneous connections can be made using TCP. A connection is made by seeking a specified address to establish a connection or to wait for an incoming connection. The address and port number at that address must be specified. 67

Chapter 5 Testing and Evaluation with LabView

A number between 0 and 65,535 represents the port. Where there is more than one port at a given address with different numbers, this represents more than one service. UNIX reserves port numbers up to 1024 for privileged applications. In LabView, the TCP open Connection function established a connection with a specified address and port. When the connection is successful, the function returns a network connection refnum that uniquely identifies the connection. Subsequent VI calls can use this refnum as a reference to this address and port.

5.1.6

Waiting for an Incoming Connection

The TCP Listen function creates a listener and wait for an accepted TCP connection at a specified port. If the connection is successful, the VI returns a connection refnum which references the address and the port number of the remote TCP client. The TCP Create Listener function creates a listener and uses TCP Wait on Listener function to listen for and accept new connections. The TCP Close Connection function closes the listener to finish waiting on a new connection. It is not possible to read or write to a listener. When a connection is established the TCP Write function or TCP Read function is used to read and write data to the remote application.. The TCP Close Connection function terminates the connection to the remote application. TCP is used for reliable data transmission. UDP is used for higher performance but this does not ensure reliable data transmission.

5.1.7

Creating a TCP Client

The TCP Open Connection function opens a connection to the server where the Internet address of the server and the port number for the server are specified. The address identifies the computer on the network. The remote port identifies a communication channel on the computer that the server uses to listen for communication requests. The port must be specified so that the server can use this port for communication. The TCP Write Function is used to send a message to the server. The TCP Read function reads a message from the server but the number of bytes to be read must be specified. The TCP Close function closes the connection to the server.

68

Chapter 5 Testing and Evaluation with LabView

5.1.8

Creating a TCP Server

The TCP Listen function is used to wait for a connection. The port, which is the same port as that of the client is attempting to access, must be specified. Once a connection is established a TCP Read function is used to read from that port to retrieve the message. The TCP Write function is used to return data in a form that the client accepts which is the number of bytes specified by the client to read. The TCP Close function is used to close the connection. If there is a server or client crash, the network application must be able to handle time outs and errors. To allow for this each client VI function has a timeout. When there is a failure, the client continues to try and establish a connection and eventually reports an error. The client can shut down the application.

5.1.9

LabView Remote Panels

A standard feature of LabView is labView remote panels. A user can quickly and easily publish the front panel of a LabView program for use on a standard web browser. Once published, any user on the web with the proper permissions can access and control an application from a PC with LabView installed. An application to control a device in the household such as a washing machine can be run locally using LabView were the device is connected to the computer through a standard interface. Labview can be interfaced with devices in the outside world using the Universal Serial Bus (USB), the General Purpose Interface Bus (GBIB) or Data Acquisition Hardware (DAQ) which is a serial or parallel interface board connecting external devices to the host computer. The client can be any computer running a web browser and connected to the Internet. Once connected, the client computer can log onto the remote computer, which is the server and observe the LabView front panel on the local PC. An application of LabView remote monitoring is set up at the Swiss Federal Institute of Technology. Mechanical engineering students are able to watch in a classroom as the professor uses a laptop computer to control a remote mechanical system. Visual feedback is provided using video conferencing software. Both video and LabView servers run in parallel, independent of the local host computer.

69

Chapter 5 Testing and Evaluation with LabView

5.1.10 Enabling Remote Panels


To set up an application to work remotely with LabView, a VI must be loaded into LabView memory and the web publishing tool option in the tools menu is used to set up a window for interactively creating and publishing the remote application. Selecting Start Web Server Button activates the built in LabView webserver. The front panel images can then be published and controlled from the Internet. When the web server is activated, the html document has to be created and saved so that it can be accessed remotely. Document Title.htm is saved into a LabView folder called www. This is done using a SAVE to DISK option. Remote Panels html documents are saved in this folder so that the server can find them. Once saved a new panel called Document.html pops up with a message box containing the URL address of the enabled LabView application. By clicking OK in the document URL window and then DONE in the web Publishing Tool window, the application is ready to be accessed by remote clients. The remote client types in the http address in URL box to show the route to the remote computer www folder. The remote panel will pop up right away once the address of the remote panel is accessed.

5.1.11 Client Operation


The free LabView run-time engine must be installed on the client computer to operate a LabView program using remote panels. The LabView front panel appears in the browser when the viewer logs in with the appropriate URL address. To request control of the site the user must right click on the panel and select Request Control. When another user has control, the message displayed is Waiting for Control otherwise the message displayed is Control Granted. Once the user has been granted control, all icons and controls will be active and running the LabView program as if the application is running on the local client desktop. By right clicking and selecting Release Control, the client can relinquishes control of the remote system.

5.1.12 Remote Panel Connection Manager


Remote Panel Connection Manager is a tool to manage client traffic to a specific front panel. This window logs all network traffic and displays a graph with the network throughput for visible VIs and specific VIs. Clients can also be disconnected using this tool

70

Chapter 5 Testing and Evaluation with LabView

5.1.13 Web Server Configuration


The NI License Information window is accessed by the Remote Panel Connection manager and displays a list of clients denied by the server. This depends on the maximum number of clients allowed by the licence. The window displays the time, date, computer name and IP address of every connection denied by the LabView web server. There is a configuration tool called webserver within tools: options menu in LabView. This tool can be used to enable or disable the LabView webserver. The tool can specify a port to use for http normally port 80 and enable or disable the log file. The tool can also set the webserver time-out, which has a default of 60secs, and specify the LabView webserver root directory. The Web server: Visible VIs tool is accessed from the tools menu in LabView. This specifies the VIs that will be visible for remote viewing and the control time limit for each VI. The control time limit is defaulted to 300secs and this is the time limit the client has to continue to monitor and access the remote site.

5.1.14 Application Security


The Web Server: Browser Access tool is located in the Tools: Options menu in LabView. This configures the browser to allow viewing and controlling, allow viewing only or to deny the client access completely. These options can be applied to a specific computer name or IP address. A VI can prompt for a user name and password and look up access times in a database to determine whether to allow access to the remote panel. For visual feedback, an IP Camera can be used to monitor the appliance or application system. The remote panel is only a visual model of a theoretical system. An IP camera can send back video or images, which can be published on the server. Live images can be embedded into an actual front panel. The image can be placed on a webpage using LabView or a separate webpage can be set up to display the image. By embedding live images into a LabView front panel, the computer can be an image hosting server, but this will slow down program execution. Live webcam or IP camera images can be embedded on a webpage with the LabView program front panel and image side by side. LabView remote panels are used exclusively in the academia. In engineering and science, remote laboratories are set up to bring the classroom to the home. Students can access a remote laboratory over a broadband connection.

71

Chapter 5 Testing and Evaluation with LabView

5.2 Controlling X-10 Devices using LabView 5.2.1 Overview of LabView 8.2
LabView 8 is the most up to date graphical programming language that can be used to control X-10 devices over the Internet. The graphical icons incorporated as a set of functions and controls can be used to build a software graphical program to control the X-10 interface to the PC. The X-10 interface can either be the CM11A interface or a PIC microcontroller. No lines of text need to be written to build the software. There is a robustness and speed in writing programs and debugging can be done easily. Most X-10 devices have software that can be downloaded to control devices. The software is not available to control X-10 devices over the Internet. LabView has a TCP/IP application software built in and therefore can be implemented to control and monitor X-10 devices over broadband Internet. A typical LabView program consists of a front panel and a block diagram. Each program is called a virtual instrument (VI) and a sub program is called a sub-VI. A LabView program to measure temperature can be set up on the PC that is interfaced to a temperature control sensor.

Figure 5-1

LabView 8.2 Startup Window 72

Chapter 5 Testing and Evaluation with LabView

Figure 5-2

Front panel of a temperature Virtual Instrument

Figure 5-3 Block Diagram of a temperature Virtual Instrument 73

Chapter 5 Testing and Evaluation with LabView

Figure 5-4

Instrument Connection diagram

DAQ Assistant can be used to show the connection diagram for the Data Acquisition Hardware (DAQ) device. A task or virtual channel is selected by clicking on Connection Diagram tab. The virtual channel in the task can be viewed with terminal numbers for connections to a connection block.

5.2.2

Installing NI-DAQmx driver software

The data acquisition hardware is installed in the PCI slot of the computer and is detected. The drivers for the DAQ card are installed from CD or downloaded from the National Instruments website. If no DAQ hardware is available the program can be simulated using a virtual instrument. National Instruments measurement devices are packaged with NI-DAQ driver software, which is a library of VIs and ANCI C functions that can be implemented into a LabView program from application software. These devices are signal conditioning modules and switch modules.

74

Chapter 5 Testing and Evaluation with LabView

Driver software has an application-programming interface (API). There is a library of VIs, functions and properties for creating applications for interfacing devices. NiDAQ7.x is a development from the older traditional NI-DAQ software for configuring and programming DAQ interface boards to graphical user interfaces. The newer version software has two additional NI-DAQ drivers and each has an applicationprogramming interface with hardware and software configuration. Ni-DAQ7.x is the most recent version with LabView 8. It has advantages over the traditional NI DAQ software. DAQ Assistant is a new graphical way to configure virtual channels and measurement tasks for a device. N1-DAQmx code is generated based on virtual channels for use with LabView, LabWindows/CVI, measurement studio and a VI logging facility. NI-DAQmx simulation is available for devices for testing and modifying applications without having to install equivalent hardware on the computer. There are intuitive APIs for creating DAQ applications which use fewer functions and VIs that are an earlier version of NI-DAQ. LabView is one of the software packages that can be used to implement the application of NI-DAQ. A CD comes with the driver software for the DAQ device. The Ni-DAQ installer detects NI software installed on the PC and automatically selects latest versions of a driver, application software and language support files from the CD. PCI devices are plugged into the PCI slot of the computer motherboard. It is advisable to discharge static from the chassis of the PC. This is done by touching the metal part while being statically grounded on an anti static mat while physically attached to a wristband earth cable. The best way to insert PCI DAQ card in the PCI slot is to rock the device into place gently. PCMCIA devices can be installed in a TYPE 11 PC Card slot. A PCMCIA bus connector of the device is inserted in a slot of the laptop PC. PXI card devices are available for a PXI chassis under same procedure as installing PCI card devices in the PC chassis. USB/IEEE 1394 Devices are connected to the computer USB or IEEE 1394 port using a cable to a similar port on the device. The PC recognises a USB or IEEE 1394 device when the power LED on the devices flashes or lights up. Accessories and terminal blocks are installed by referring to instruction manuals. Windows will detect any new hardware and install the driver software by default. To confirm a device is recognised, the Measurement and Automation icon is double clicked on the desktop to open MAX, and Devices and Interfaces is expanded to locate NI-DAQmx devices. 75

Chapter 5 Testing and Evaluation with LabView

To simulate a DAQ when there is no plug in device, Devices and Interfaces is right clicked upon, a list of devices appears and a device is chosen. Right clicking on the device and then selecting properties will configure devices. The window in properties is configured to set up the application.

5.2.3

Sample Application with X-10 Devices

A sample application can show the capabilities of X-10 devices and the LabView web server. The application is to maintain the temperature of an aluminium block at about 45C. The temperature of the block can be obtained using a Thermister. The block can be heated using a soldering iron connected to an X-10 device. Controlling the temperature of an aluminium block heated by a soldering iron simulates the CM11A X-10 interface control scheme of a central heating system. The control scheme for heating the aluminium block is described in the flowchart. An initial decision box ensures there is enough temperature range to simulate the process of heating and cooling a soldering iron. If there is no initial set up, it is impossible to control the temperature. A temperature reference is chosen to be 18 C. A decision box determines if Tsp (Ti + 5) <13 then Ta =13C. Otherwise Ta = Tsp (Ti +5) where Ta = Tsp Ti and Ti is the initial temperature of the iron. Tsp is a set point temperature and Ta is temperature difference Tsp Ti. The soldering iron will be on when: Tc = current temperature, is less than or equal to (Tsp - 13C) or when ( Tsp (Ti + 5C)). When the initial temperature is set up, the flowchart moves to a second phase to control the heating scheme. When the temperature of the soldering iron is between (Tsp 1.42) and (Tsp 1.6), the soldering iron is turned on. The temperature of the soldering iron is maintained between a Tsp of 2C.

76

Chapter 5 Testing and Evaluation with LabView

Start

Yes

Tsp - (ti+5) <13

No

Ta = 13

Ta = Tsp (Ti +5)

Yes

Tsp -Tc <= Ta

No

Tsp -Tc >= 1.42

Yes

No

Tsp - Tc <= 1.6 No

Yes

Solder Iron OFF

Solder Iron On

Tsp = Temperature Set Point Ti = Initial Temperature Tc = Current Temperature Ta + Temperature Difference ( Tsp - Ti )

Figure 5-5

Temperature Control Flowchart

5.2.4

Sensor (Thermocouple or RTD)

Thermocouples and Resistive Temperature Devices (RTDs) are used in applications where a temperature needs to be monitored. Thermocouples are the most widely used sensor in industry. They can be used to monitor temperatures from subzero to 2000C. A Thermocouple takes advantage of the voltage induced between two different metals as both metals are heated. By connecting a Thermocouple, there are three different metals used in the circuit.

77

Chapter 5 Testing and Evaluation with LabView

The junctions between the metal and measurement device produce thermoelectric voltages that are proportional to the temperature at the device terminals. Cold junction compensation is used to remove an unwanted effect of having three different metals causing thermoelectric voltages. A Thermister is used to measure the coldjunction temperature and then this adds to the appropriate value of measured voltage. RTDs dont have this problem of parasitic thermocouple effects and there is no thermovoltage produced at the junctions to the device. RTDs are precision temperature sensors and are more accurate than Thermocouples.
Sensor Thermocouple Resistive Temperature Devices (RTD) Advantages Simple and rugged Wide operating range Passive Fastest response to temperature change No resistance lead wire problems Most stable over time Most accurate Most repeatable Resistant to corrosion No CJD required High Cost Slow response time Vibration Sensitive Decalibration if used beyond temperature range Disadvantages Least stable Low sensitivity to small temperature changes Low Accuracy Requires CJD which introduces error into system

Table 5-1 Thermocouple versus Resistive Temperature Devices

5.2.5

Thermistor

A Thermistor can be used to measure the temperature of an aluminium block because it is more sensitive than a Thermocouple or a RTD device. A Thermistor is a temperature sensitive resistor and the resistance temperature relationship is negative because the resistance decreases with increasing temperature.

78

Chapter 5 Testing and Evaluation with LabView

Figure 5-6

Thermister Curve using Stein-Hart Equation

The thermistor curve can be approximated using the Stein-Hart equation; 1/T = A = Bln(R) + C (ln(R)) 3 T = temperature in degrees Kelvin, R = resistance of the Thermistor in K. A,B,C = curve fitting constants found by selecting three data points from the manufactures published data curve and solving three simultaneous equations. To measure temperature the Thermistor is connected to a power supply with a current limiting resistor. The circuit can be connected to the PC using a data acquisition card to measure voltage and LabView can be used to convert the measured voltage to temperature data. The purpose of the Thermistor is to imitate a thermostat where accuracy is not important but to achieve accuracy a Thermocouple or a Resistant Temperature Device is required.
R1

DC

Thermister

To Data Acquisition card on the PC

Figure 5-7

Circuit to measure temperature using a Thermistor

79

Chapter 5 Testing and Evaluation with LabView

5.2.6

X-10 Thermostats

The TX15 and TX15-B model is a thermostat for an X-10 system and can be used for remote control, The TX15 model is a standard model and can receive X-10 commands, while the TX15-B can receive and transmit X-10 commands. The TX10 consists of two wall units, a wall display and a control unit. The wall unit is the traditional thermostat that monitors the current temperature and changing set point. The control unit is connected to the central heating, ventilation and air-conditioning system. The control unit receives X-10 commands to control setpoints and thermostat modes. The setpoint and fan mode settings are sent to the control unit by X-10 commands. The control unit turns on the heating when the temperature falls below a setpoint or the cooling system when the temperature rises above a setpoint. The control unit is connected to the power line using an external PSC05 X-10 interface module. The Thermostat has a house code and a unit address for X-10 communication. When reading temperatures in Fahrenheit, the Fahrenheit column is used and when reading temperatures in Celsius, the Celsius column is used. There is no relationship between the two columns.

Figure 5-8

TX15-B Remote Temperature Control

80

Chapter 5 Testing and Evaluation with LabView

Device Code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 F 72 73 74 75 76 77 78 79 80 81 82 83 84 86 88 90

On Command C 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32

Off Command Degrees F Degrees C SYSTEM OFF HEAT MODE COOL MODE AUTO MODE 40 5 60 6 62 7 63 8 64 9 65 10 66 11 67 12 68 13 69 14 70 15 71 16

Table 5-2 Decode Table of X-10 Commands for TX15-B Thermostat

5.2.7

X-10 CM11A LabView Virtual Instrument

The X-10 CM11A is an important communication device between the computer and the X-10 devices. The device can receive and send commands over the power line. The Virtual Instrument can be displayed on the desktop of a laptop or PC remotely using LabView remote panels. Remote control and monitoring can be implemented using the TCP application of LabView remote panels or by using an application of virtual computing such as Remote-PC-access, or LogMeIn from PCAnywhere. The following CM11A library software can be downloaded from the National Instruments website, the link of which is direct to a message forum listed in the references at the back of dissertation.

Figure 5-9

CM11A Virtual Instrument LabView X10 Library software

81

Chapter 5 Testing and Evaluation with LabView

The following front panel and block diagrams are examples taken from the VIC_X10 library that can be downloaded from the National Instruments website. An ON/OFF LabView front panel and block diagram for CM11A X-10 interface are displayed in appendix 2 of the dissertation.

Figure 5-10

CM11A X10 Application LabView Front Panel

Figure 5-11

CM11A X10 Application LabView Block Diagram

82

Chapter 5 Testing and Evaluation with LabView

5.2.8

Controlling Lights and Switches

Sensors and signal lines are attached to terminal blocks and accessory terminals on the data acquisition board or to a PIC Microcontroller/CM11A board for control of X-10 devices. DAQ assistant and automatic code generation is used to control digital I/O lines to either send or receive a 5V TTL signal. The light control is an array of numeric controls. The outer white number and the up/down arrows control the index of the array. There is only one digital port therefore there is only one element in the array (element 0). The inner grey numeric control changes the value of element 0 in the light control array.

Figure 5-12

LabView Front Panel to control lights and Switches

Figure 5-13 LabView Block Diagram to control lights and Switches

83

Chapter 5 Testing and Evaluation with LabView

5.3 PIC Microcontroller LabView X-10 Control Program

Figure 5-14

PIC Microcontroller LabView Front Panel Data Bits Stop Bits Parity Bits Stop Bits Baud Rate 8 1 0 1 19200

Table 5-3

LabView Serial Communication Frame Structure

The program reads ASCII values from the RS232 communication port and stores the values in a "read buffer" in the form of an array. The values are converted into decimal form and stored in a buffer array called a Resultant Array. A single value from this is then calculated and placed into a time delay variable. There is a calculation to obtain a velocity and frequency measurement that can be then converted to decimal form. A "Count Value" determines the number of characters to be read in a loop.

84

Chapter 5 Testing and Evaluation with LabView

5.4 Summary
There is a sample application to test the LabView 8 webserver and the CM11A X-10 interface module. The aim is to adjust the temperature setpoint of an aluminium block connected to a soldering iron. LabView is a chosen programming language for the application because it is easy to program and debug. LabView is a graphical programming language where there is no need for codes or lines of text. A typical LabView program has a front panel and a block diagram. Each program is a virtual instrument (VI) and a sub program is a sub-VI. LabView has added on software to implement a webserver. The webserver is based on the common gateway interface (CGI). Java and ActiveX can also be used to control VIs through the Internet but extra software is required. X-10 devices can be controlled using the LabView Internet toolkit. The programming required is to set up a set of macros to perform tasks such as the switching on and off of lights. Web security is protected by authentication and by using logging information to account what a user is doing. A Thermistor is used instead of a Thermocouple or an RTD device because it is the most sensitive. A Thermistor is a temperature sensitive resistor. The CM11A communication device is an important communication device to interface a PC to an X-10 device. The CM11A is connected to the serial port of the PC. The LabView program for driving the CM11A module is a simple program that can be built on the LabView block diagram using sub-VIs. It will then become a virtual instrument. The VI can also be found by searching the National Instruments website. There is a forum on this site in which users can communicate and exchange ideas about implementing certain applications. The model TX15B Thermostat has an X-10 bidirectional protocol that allows a range of commands to implement information feedback to the remote controller. This module can be used with a CM11A interface to a LabView program on a PC. The webserver remote panel application of LabView can enable control and monitoring from a remote location. The protocol needed to transmit data through the Internet is TCP/IP. This can be achieved by logging onto the IP address of the remote PC and enabling remote panels to communicate with the client computer. 85

Chapter 6 Home Automation Project Engineering


6.1 Introduction
This chapter investigates other methods in remote surveillance and monitoring of the home over broadband. The technology of the Common Gateway Interface is described. This is where there is interactive graphics on the computer screen and forms which ask for feedback and registration information. The section describes how to set up a CGI in LabView. The second part describes an existing method where a police car remote monitoring and surveillance system can be adapted for remote control and monitoring of the home over a broadband connection. The final part of the chapter gives an indebt overview of the Neural home and the technology of ACHE which is an important method in creating an intelligent home automation system.

6.2 Common Gateway Interface control of Household devices 6.2.1 Overview of CGI
When writing a program to control and monitor a household device in LabView a CGI toolkit can be used to build an interactive interface for the remote computer. The program screen can be accessed over broadband using virtual computing software. A dynamic form with image maps and counters can process and record status history. The CGI standard specifies how http servers run external programs on the server machine. There is a mechanism to pass parameters to external programs and send an output in the form of an html page to the web browser. CGI takes an input and produces an output so as to process e-commerce and authenticate credit card numbers when purchasing items over the Internet. The CGI does not define a language to be used in external programs but only defines the interface between the http server and the external code. Code can be written in C, C++, Perl and Visual Basic to run a CGI application.

86

Chapter 6 Home Automation Project Engineering

Figure 6-1

CGI and Ecommerce

A CGI can provide forms that ask for feedback from the user that is surfing the Internet. The feedback can be house status or registration information. A CGI can provide an image map of the house. House appliances can be activated and deactivated by mouse clicking within the image map. A counter can display the number of users that accessed the image map. Utilities can be used to search a database for a particular device. There are three steps to processing a CGI application, firstly the web browser sends a http request to the webserver. The http server then calls an external CGI application and finally when the CGI application has finished executing, it returns the output to the web browser. LabView has an Internet Toolkit of VIs to create, write and read from client and server side cookies. Internet Toolkit>>CGI VIs>> Cookie VIs A cookie is a token that uniquely identifies some information. Client side cookies store a small amount of data of about a 4K limit on the browser. Server side cookies keep this information on the server but the information is deleted after a period of time. Cookies maintain state information across Internet connections. Cookies remember the parameter values as a client navigates a website. Http is a stateless protocol because each time a client wants a document from the server a new connection must be established. The server receives the request and returns a reply and the connection is then closed.

87

Chapter 6 Home Automation Project Engineering

Figure 6-2

Three Steps to Processing a CGI

6.2.2

Event driven Computing

Event driven computing are programs that run systems that have interactive human computer interfaces, client server architectures and embedded systems. Programs adapt to an environment with concurrent processes and uncertainties. A CGI can be used to run a program on an application to control and monitor a device or interface on a computer using a web browser over a broadband connection. Java and Active X are other technologies that can be used with LabView to monitor and control information remotely. The Internet toolkit in LabView provides a complete set of CGI VIs that can be used in CGI applications. A LabView program using CGIs can load and run a VI dynamically from the web browser. The information on an html form is fed to the inputs of a VI. The results are then published back to the web browser. Security can be set up using schemes to access VIs with user authorization and authentication. A dynamic web page can be set up like a web counter using LabView.

88

Chapter 6 Home Automation Project Engineering

Image maps can be used so as to click on a part of a VI panel image to simulate the behaviour of a VI as if it were inside the web browser. Html forms gather information from the client side for a CGI application. Forms are built with html and contain text input boxes, radio buttons, checkboxes, pull down menus and clickable images that are all nested in a form tag. <form name = MyForm action = /cgi-bin/process_form.vi method = GET></form> An imagemap is a snapshot image of a VI front panel. The image is clicked upon to send information to the CGI application. Image input<INPUT TYPE=image> creates a push button image. The x, y co-ordinates of the mouse pointer are included in the form that is submitted to the server. A hotspot is a hyperlink on a particular part of the image defined on an image map. An image map could be a map of the house showing the location of all the appliances. An appliance can be activated or deactivated by clicking on the image of that appliance within the image map of the house. Client side image maps are best created using a HTML editor such as Dreamweaver or Microsoft Frontpage.

6.3 Prototype Home Automation Project using Project54 6.3.1 Overview of Project54
Project54 Consolidated Advanced Technologies Laboratories is a design to integrate electronic devices such as radar, video, lights and an alarm into a common control system. This was designed in the US for police cars so that equipment could be centrally controlled from a windows based computer program. The project54 system provides control of functions through voice commands, an LCD touch screen and a keyboard. Many systems do not create a complete home automation system because of limitations in the hardware and software. Documentation of home automation systems have to be found and the drawbacks analysed. A judgment is then made on how to improve the system. A Project54 software program with hardware prototype can be built to help solve limitations. 89

Chapter 6 Home Automation Project Engineering

The GUI that has been created for a police car could be adapted for a house automation system. Functions to be implemented are control of lamps, control of a heating system and the control of a burglar alarm. The PC interface must allow control of these devices and visualize a state in real time. A vocal control device can send feedback to the user on the state of each device. The function of the PC interface is to allow the remote client to control the system over a broadband connection in real time. The client can program the system behaviour in advance and send back the status of the system. The system needs three types of devices, X-10 devices control lamps, Weeder technology devices to control light sensors, a motion detector, a sprinkler system and iButton devices to detect temperature. The Intelligent Transport Data Bus (IDB) allows the use of the RS232 port to control peripherals. The IDB bus consists of IDB boxes. The IDB boxes are networked using a CAT5 network cable with an RS232 port to each box and connected directly to the PC.

Figure 6-3

Prototype to control only X-10 devices

The system hardware consists of a centralized PC controlling and monitoring the system, two IDB boxes connected in series to the PC and onto a CM11A module to the network. The CM11A interfaces to the house electrical powerline to control the X10 devices appliance modules, an X-10 2-way appliance module and an X-10 2-way lamp module.

90

Chapter 6 Home Automation Project Engineering

Figure 6-4

Enhanced system to control Household Devices over Broadband

Figure 6-5

Default Home Automation Window

91

Chapter 6 Home Automation Project Engineering

6.3.2

Configuring the Interface on Project54

Going to Define devices window configures devices. The House Status window displays Show all Devices and verifies that all devices are configured properly. The House Control window sets devices on or off. The House Status window displays Show Current Device Status for a particular house/unit address. Other devices can be added to the system by adding another IDB box and a new application can be created. Control of X-10 devices can be distributed on different computers using the proxy application of Project54. A microphone in the room or building connected to a voice recognition system can be added so that the user can control a device using voice encoding. The system can recognise that the user has a licence to activate the system. Voice over IP could be used to remotely activate a device over TCP/IP using a broadband connection.

Figure 6-6

Control Automation Window

92

Chapter 6 Home Automation Project Engineering

Figure 6-7

Project54 Home Automation components and connections

6.4 The Neural Network House 6.4.1 Overview of Neural Home


Since the 1940s, home automation technologists have promised to revolutionise the home living environment. By watching science fiction such as Star Trek in the 1960s, we could envisage the 21st century living environment being full of intelligent devices. The stereo would switch on when occupants entered the room; the volume of the TV would lower when the phone rings. A clothes dryer would make an announcement over the intercom that the cycle is complete. Since this has not become a reality it has become accepted that home automation has failed to be an accepted technology. Software has to be adapted to the home and family as lifestyle changes. This makes programming complicated and there is a requirement to update programs regularly. Maintenance costs outweigh the benefits. The occupants have to learn to operate the system. Technology will only become accepted if the benefits outweigh the cost. For the system to become useful, programs can be written only to do various functions. The aim would be for the home automation system to program itself by observing the lifestyle and desires of the occupants. A standard system needs to be able to control heating and ventilation, the immersion water heater, lighting and save on bills. The system could monitor the environment and observe actions of the occupants such as turning on the immersion and adjusting the thermostat to the switching on and off of lights. The program could predict these actions and anticipate and perform the actions automatically.

93

Chapter 6 Home Automation Project Engineering

The problem with the system is that conserving energy can conflict with the occupants preferences such as controlling heating and lighting. The control of lights is complicated because of light pattern and intensity. It is not adequate for lights to go on only when motion is detected, lights have to stay on when the person is sitting still on a chair reading a book. It takes 700ms for an X-10 device to react to a sensor sending a signal to that device and therefore X-10 is an insufficient protocol for generating commands for lights. The range of time scales involved in the control of lights spans many orders of magnitude and control decisions must respond within fractions of a second to changing environmental conditions. A control system can be based on a neural network reinforcement learning and prediction technique. Neural networks are artificial learning devices inspired by the workings of the human brain. These networks are made up of hundreds or thousands of simple neuron like processing units, which through their interactions, achieve complex behaviours and have the ability to learn from experience. A neural network could predict when the occupant returns home, determine when to start heating the house and detect statistical patterns of water use so as to turn on and off the immersion at certain times. An information database can be created listing the occupants behaviours and the system can learn to control the light patterns and intensities as well as to turn on and off the TV and stereo. Inferring the occupancy and usage pattern of the utilities in the house, the system can make life comfortable for the family while conserving energy in the home.

6.4.2

Ache

Ache means adaptive control of home environments. A system can be designed to manage all comfort aspects of a home, including air, water temperature, ventilation and lighting. The objectives of Ache is the anticipation of the persons needs, in that lighting, air temperature and ventilation are maintained to the inhabitants comfort need and hot water is available on demand. Lights have to be maintained at minimum intensity required and water maintained at a minimum temperature to satisfy demand so as to conserve energy. To achieve a conservation of energy objective the system has to be able to anticipate activities and work within tolerances.

94

Chapter 6 Home Automation Project Engineering

Figure 6-8

ACHE diagram

Ache specifies the intensity of lighting setting that, which affects the state of the environment. This in turn serves as an input to ACHE. The training signals of ACHE are the actions taken by the occupants of the house and the energy costs. Data from the sensors can be sent to the PC using data acquisition boards or a micro-controller interface board. The PC detects the changes in sensor values and sends the data over the RS232 interface to a DEC 3000/600 UNIX workstation. On the workstation a server is running that maintains the current state of the house and computes a statistics table on the state of the environment. The server communicates with clients on the network so as to perform the operation of ACHE. When a client needs to control a device, the server passes the message to the PC. The PC then communicates directly to low voltage devices or by using a microcontroller. The microcontroller sends the commands over the AC power line to the device to be controlled. The electricity supply line can also send back status signals via the microcontroller to the PC when the inhabitant physically changes the state of a device such as dimming the lights or resetting the alarm. The DEC 3000/600 UNIX server can be remotely located outside the home. The PC can communicate with the server anywhere in the world by sending and receiving data over a broadband connection to the Internet. Traditional techniques of control theory and artificial intelligence is hard to implement because the behaviour of the occupants is not stationery and controlling devices are non linear. Multiple interacting devices have to be controlled simultaneously and there are only incomplete models of the environments and controlling devices.

95

Chapter 6 Home Automation Project Engineering

Figure 6-9 Basic system Architecture of ACHE There are three control domains, lighting, heating and ventilation that represent the architecture of ACHE. The instantaneous environmental state is fed through a state transformation that computes statistics and averages, minima, maxima and variances in a window. The result is a state representation that provides information about environmental and instantaneous values. The instantaneous value is sent to an occupancy model. The occupancy model is governed by motion detectors and determines occupancy status when there is no motion detected. Predictors take the current state and forecast the future states of devices. Control decisions are then made concerning energy devices in the home. A set-point generator determines a set point profile for a lighting level or a temperature setting. A device regulator controls the physical devices to achieve the set-point. The control of the set-point generator and the device regulator is to achieve knowledge about habitual preferences. The set-point generator and device generator are built on a combination of look up tables and neural networks. They are trained in Q learning, a reinforcement learning technique. A control task for each zone is treated independent of other zones. A Q learning controller is implemented as a pair of look up tables, one for a zone being occupied and another for a zone being unoccupied. The components of ACHE are an occupancy predictor, a zone anticipator and a lighting set point generator.

96

Chapter 6 Home Automation Project Engineering

6.5 The Future of Home Automation


A home that adapts to the occupants needs and the environment can be extended to control TVs, stereos and the DVD player/VHS recorder. The problem with adapting such a system is that the occupant generally only decides on impulse to switch on an entertainment system. The office PC, PDA or mobile phone could be used to send information to the home computer automation system to record a TV program or to set up a DVD so as to watch later. Calendar entries in PDAs and messages can be sent to the home computer to simplify the departure and return times for the occupant. Home automation can rapidly develop to a more reliable communication system with more devices to control household appliances. The appliances if controlled properly can lead to an efficient energy management system and thus reducing the bi-monthly bills for gas and electricity.

Figure 6-10

Laboratory System Setup

6.6 Summary
When surfing the web there are interactive processes that ask for feedback and registration information. There are image maps that allow various parts of an image to interact with the mouse and counters that display the number of users of a document with utilities that allow the user to search databases. The effects are achieved using the common gateway interface (CGI). A CGI produces an interactive website and can be implemented with LabView to generate an interactive remote monitoring system using the LabView TCP application. 97

Chapter 6 Home Automation Project Engineering

CGI lets http servers run other programs on server machines. A CGI consists of an input that produces an output to the browser. Code to handle a CGI includes C, C++ and Visual Basic. The CGI defines the interface between the http server and the external code. A simple CGI application would be a calculator, a CGI that can be written in LabView. The CGI application takes the input data through a web browser and performs the calculations in LabView before sending the results back to the browser. There is a vision that household devices such as appliances, multimedia entertainment audiovisual equipment as well as temperature and lighting units will have microprocessors that will enable interactive communication. Project54 is a remote monitoring system for police cars and the principles can be adapted to implement a home automation system. Neural networks have potential for intelligent control. A home can be equipped with sensors to provide information about environmental conditions such as temperature, lightning and motion within a room. The sensors can interact with the home PC, remote laptop or PDA to provide a communication medium over broadband. ACHE is a system that controls a home automation by adapting to the inhabitants needs while conserving energy in the home.

98

Chapter 7 Conclusions and Recommendations


7.1 Introduction
The main goal of the dissertation was to investigate the concept of remotely monitoring and controlling a household appliance over the Internet. One of the main achievements was to discover that this could be done using a combination of using the electricity supply network and the PC with LabView to interact with a domestic household device. From carrying out research it was discovered that there are already techniques being marketed to overcome the complexity of setting up a remote control system. A complete network solution can be built using remote PC monitoring, LabView and the infrastructure of the electricity supply line. Remote surveillance can be achieved using the IP camera. Developing technologies for video conferencing and wireless broadband communication can be used to combine with a neural house to complete a sufficient remote home automation system. This chapter will provide a summary of the dissertation, draw conclusions and make suggestions for future work. The chapter will conclude with a review of the research into a proposed new system for broadband communication over the electricity supply network.

7.2 Other standards for Remote Automation Monitoring


Other standards can be used as an alternative but are more suitable to controlling office buildings. Lonworks is a standard developed by Echelon and is a complete solution to automate a building. Lonworks can control up to 32,000 devices and can be a networked controlled system or a non-networked controlled system. A neuron integrated circuit is the heart of a Lonworks system. The neuron IC has three 8-bit processors. A protocol is used to send and receive messages without a need to know the topology of the system. The system is expensive to install and more suited to business applications. The CEBus network is an open system interconnection (OSI) layered architecture. The OSI network has seven layers, Physical, Data, Network, Transport, Session, Presentation, and Application. With CEBus only physical, data link, network and application layers are used.

99

Chapter 7 Conclusions and Recommendations

There are six mediums of communication, power line, twisted pair, infra red, radio frequency, coaxial and fibre optics. Power-line communication uses amplitude shift keying with 120 KHz bursts on the line. The presence of a 120KHz burst represents a superior state and the absence of a 120Khz burst represents an inferior state. The unit symbol time (UST) of 1ms is used where a logic 1 is one UST and a logic 0 is two USTs. An end of frame (EOF) is 3ms long and end of packet (EOP) is 4ms long.

7.3 Broadband in ten years time


The expansion of broadband connections will make it possible for voice and video to be transmitted anywhere in the world. Voice over IP (VoIP) will have expanded to take over from the telephone. There will be inexpensive universal broadband where the technology will be fibre-optic telephone connections. There maybe no need for a desktop PC as the market will be flooded with wireless access devices, the size of a USB pen drive. Broadband streaming video using camera phones will be common place. There will be free wireless connections for laptops and personal digital assistants. Satellite broadband will allow for a greater expertise to be available in rural areas and in the third world. There will be interactive biometrics, instant communication and medical treatment via broadband at home. Movies and games will be available using video streaming over a wide area network and broadband will exceed a gigabyte per second. The negative issues will be security and new methods of cryptography will become a major issue. The customer may not consider broadband value for money when security issues are compared to the benefits involved.

7.4 Future research 7.4.1 Ergodic Chaotic Parameter Modulation (ECPM)


An analogue non-coherent spread spectrum communication system based on Ergodic Chaotic Parameter Modulation (ECPM) is the future for powerline communication. The chaotic SS scheme is robust against synchronization errors and signal distortion effects. It is easy to implement in hardware and has efficient analogue error control coding that can be easily incorporated with the ECPM-SS scheme. There is low signal to noise ratio in the presence of strong powerline noise and there is a guarantee of a satisfactory communication performance. 100

Chapter 7 Conclusions and Recommendations

Figure 7-1

Diagram of the proposed Analogue SS Modem

The proposed chaotic SS scheme directly modulates the analogue multimedia signal onto a bifurcation parameter, of a chaotic system. Chaotic Parameter Modulation (CPM) modulates the information symbols, Si [0, 1]. By setting i = g (si) and keeping in the chaotic regime, the transmitted signal is chaotic and has a broadband spectrum. The resultant chaotic signal is converted to the RF band in the RF unit and coupled to the powerline network using the line coupler. The modulated chaotic signal then propagates through different paths in the powerline that is characterised by different attenuations and phase delays before reaching the receiver. At the receiver, after RF demodulation, the channel-distorted signal containing powerline noise is sent to the ergodic demodulator. The demodulation process of CPM is a parameter estimation problem of from noisy observations of the received signal.

Figure 7-2

Ergodic Chaotic Parameter Demodulator

101

Chapter 7 Conclusions and Recommendations

S C Input R

R Output S/H Sample and Hold Circuit

Figure 7-3 Mean Value Estimator, Windowed Integrator as a Demodulator The proposed ECPM-SS can be implemented using a SIMULINK package in MATLAB. The performance of the proposed chaotic SS scheme can be compared with conventional direct sequence SS (DS-SS) in realistic power-line environments. The transmitted signals from all devices are combined together and passed through a time varying power channel. The power channel is corrupted by power line noise. Each communication link has a gold sequence that is used to spread the information signal and the receiver uses the same gold sequence for signal recovery. The analogue multimedia signal is quantized before transmission in DS-SS. A tent map is used to generate the chaotic signal.

Figure 7-4

SIMULINK implementation in MatLab of proposed ECPM system 102

Chapter 7 Conclusions and Recommendations

Figure 7-5

Signal Waveform at various stages for the ECPM SS system

(a) (b) (c) (d) (e) (f)

Original Waveform. Transmitted wideband chaotic waveform. Received waveform. Integrator output. Recovered waveform. Squared error signal.

103

Chapter 7 Conclusions and Recommendations

7.5 Summary
Virtual networking allows a remote user to access a PC remotely from anywhere in the world. VNC is thin client system in that it does not need an operating system and is available to download. The software allows a PC to be set up as a server and the remote PC to be set up as a client. Any software on the remote PC can be accessed locally on another PC by logging onto the IP address of the remote PC. If the remote PC has a program such as LabView that is interfaced to devices in the home, the remote software can be accessed and run as if on the users local desktop. WiMax is a wideband method of connecting broadband to remote areas. WiMax has a range of 50Km with a transmission rate of 70Mbps. It is suitable only for data and VoIP. The IP camera can be used to replace CCTV. The IP camera has its own built in IP address and can be accessed remotely by installing installation software on the local PC. The IP camera can be used for videoconferencing that uses ATM as the technology to communicate video over a broadband connection. Broadband over electricity supply networks can be a reality when the noise suppression techniques are sufficient to compensate for the deficiencies and interferences problems this will encounter. Appliances are interfaced to the home PC over the house electricity supply network using X-10 modules. Communication over the power lines uses the physical layer of the ISO model where a tone of 120KHz is a 1 and the absence of a tone of 120Khz is a 0. The tones are superimposed onto the zero crossing point of the 240V/50Hz AC signal. There is a 120KHz pulse at three intervals on a three-phase system because there are three zero crossing points instead of one. A CM11A adapter interfaces the PC to the electricity mains network. LabView has a TCP/IP application with Remote Panels so as to communicate over a broadband connection. In this way a local PC with LabView installed can communicate over a broadband connection to a remote PC with LabView running. The host PC can request and gain control of the LabView program on the remote PC. A program can be created using virtual instruments to control a CM11A interface connected to the remote computer. The CM11A X-10 device communicates over the AC power line network to the household appliances by sending instructions from the remote PC and relaying status data back to the remote PC.

104

Chapter 7 Conclusions and Recommendations

Data acquisition software is used to communicate a LabView program to a measurement device. PCI devices are connected to the computer motherboard and communicate with the outside world to external devices. DAQ software can be downloaded from the National Instruments website. A home central heating system can be simulated in LabView. A soldering iron is interfaced to the PC using a data acquisition board and a temperature sensor such as a Thermistor or Thermocouple. A program written in LabView, Visual Basic or C tests and makes decisions on whether to switch on or off the soldering iron so as to maintain the temperature of the aluminium block at approximately 45. A common gateway interface is where interactive graphics on computer screens are generated. CGI is a standard specification that lets http servers run other programs on a server machine. It defines the interface between server and code. The code can be LabView, Visual basic, C, or C++. Project64 is a system used in the US to interface a remote police station to a police car. It can be used to interface household devices to a computer. A GUI is used to simulate the device and functions can be implemented to control an alarm system, heating or the TV in real time with voice feedback. ACHE is a system model for remote control of household devices while conserving energy in the home. A microcontroller interfaces the PC to the electricity supply network to send control signals to appliances as well as relaying status signals back to the PC. Communication has always been based on hearing and vision corresponding to communication of voice and video over broadband Internet. Video resolution for delivery to the human eye has to be uncompressed at a data rate in gigabytes per second. The data rate for DVD quality has to be 10Mbps and for broadcast needs to be 40Gbps using compressed video. Broadband has to take 100Mbps for high definition video delivery to a household and broadband over optical fibre is an only realistic interface to the home. The Ethernet will be a dominant standard for the next ten years and PCs with 1GHz speeds will have the capacity to transmit and receive high data rates. Technologies already exist to carry broadband over installed telephone lines and house electrical wiring. Wireless broadband is too slow for video but is useful within the home to connect broadband to the nearest wired access point.

105

APPENDICES

106

Appendices

Appendix 1
X-10 House and Unit Code Formats
Code A B C D E F G H I J K L M N O P H1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 H2 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 H4 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 H8 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0

Table A 1
Start Code 1110 1110 2 Cycles Start Code H1 /H1 0 1 0 1 0 1 H2 /H2 H4 /H4

X-10 House (Letter) Code Pattern


H8 /H8 0 1 0 D1 /D1 1 0 1 D2 /D2 1 0 1 D4 /D4 1 0 1 Bit/Bit Inverse 5 Cycles Key Number 2 D8 /D8 0 1 0 D16 /D16 0 1 0

1 0 1

Bit/Bit Inverse 4 Cycles House Code A

Table A 2 X-10 Standard Message Format

107

Appendices

Code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Units Off Lights On On Off Dim Bright Lights Off Ext. Code Hail Req Hail ACk Pre-Set Dim Ext Analog Status = on Status = off Status Req

D1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1

D2 1 1 0 0 0 0 1 1 0 1 0 0 0 0 1 1 0 0 0 0 1 1 1 1 0 0 0 1 1 1 1

D4 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 0 0 1 1 0 0 1 0 0 1 1

D8 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 1 0 1 0 1 0 1 0 1 X 0 1 0 1

D16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Table A 3

X-10 Number (UNIT Code) pattern

108

Appendices

CM11A Format and Cable configuration


Signal SIN SOUT GND RI DB9 Connector Pin 2 Pin 3 Pin 5 Pin 9 RJ11 Connector Pin 1 (Yellow) Pin 3 (Red) Pin 4 (Black) Pin 2 (Green) Serial Input to PC (Output to Interface) Serial Output from PC(Input to Interface) Signal ground Ring signal (input to PC) senses a power-line command or status signal

Table A 4 Number of bytes 2 1 1 1 Table A 5 7 6

CM11A Cable Connections PC Header: Code Checksum Acknowledge Interface ready to receive Interface

Format for first Transmission to CM11A Interface 5 4 3 2 1 CM11A Header 1 F/A 0 E/S

Number of DIMS Table A 6

Dims define the dimming function of a lamp X-10 module. The number of Dims is between 0 and 22 (22 is 100% of lamps are dimmed). Bit 2 is for synchronization. F/A = (0), the code to follow is an address. F/A = (1), the code to follow is a function. E/S = (0), following byte is standard transmission. E/S = (1), following byte is extended transmission. Code: Address Function H1/bit7 H2/bit6 H4/bit5 H8/bit4 D1/bit3 D2/bit2 D4/bit1 D8/bit0 House Code House Code Table A 7 Device Code Function

Defining the X-10 Transmission Code Byte

109

Appendices Function only operates with devices addressed with the same house code. When the CM11A interface receives data from the PC, all the bytes are summed and a checksum byte is returned. The PC acknowledges by returning a value hex 0 (0x00) if the checksum is correct or will retransmit the data and look for a new checksum if incorrect. When an X-10 transmission takes place, the CM11A interface sends 0x55 to the PC to indicate that the CM11A is ready for another transmission. PC 0x04, 0x66 0x6A 0x00 0x55 0x06,0x62 0xEE 0x06,0x62 0x68 0x00 0x55 Table A 8 7 6 5 4 3 2 1 Application Presentation Session Transport Network Data Link Physical Table A 9 PC to CM11A Codes CM11A Interface Description Address: A1 Checksum: ((0x04 +0x66) & 0xFF) OK for transmission Interface ready Function: A ON Incorrect Checksum Re-transmit function Checksum: ((0x06+0x62) &0xFF) Ok for transmission Interface ready

Specifies interactions between applications Controls formatting for display, Print & Encryption Security, Logging and Administrator Functions Ensures error free transmission of Data Ensures data arrives at correct destination Defines rules for sending & receiving data Implements physical transfer of Data between computers ISO Layer Model for an X-10 System

110

Appendices

Appendix 2
Configuring a Data Acquisition Board
Configure a DAQ board and an SCC (signal conditioning carrier) in Measurement and Automation Explorer (MAX)

Figure A 1 Configuring a DAQ Board The DAQ SC-2345 Connector Block has terminals J1 to J21 and configured by selecting the modules that are attached from a list in drop down menus. SCC-FT01 feed through module for analogue input. SCC-TC02 thermocouple module. SCC-SG03 stain gauge module. An additional SCC-FT01 for analogue input.

111

Appendices

Figure A 2

Setting Up a Simulated device in LabView

If there is no hardware available, a device can be simulated by clicking on Devices and Interfaces and clicking New, select Simulated Device and then Finish. A simulated device for any application from Thermocouple, Thermister or Strain Gauge can be selected. The devices can be programmed to simulate a physical device being present.

112

Appendices

Figure A 3

X10 CM11A ON/Off Front Panel

X10 CM11A ON/Off Block Diagram

113

Appendices

Appendix 3

PIC16CR54C ROM based Microcontroller and Data Sheet

Figure A 4

ROM based Microcontroller

The high performance RISC CPU has 33 single word instructions where all instructions are single cycle (200ns) except for program branches which are two cycle. The operating speed is DC-20Mhz and DC-200ns instruction cycle. Device PIC16CR54C Pins 18 I/O 12 ROM 512 RAM 25

Table A 10 PIC16CR54C Specification 12-bit wide instructions. 8-bit wide data path. 7/8 special function hardware registers. 2-level deep hardware stack. Direct, indirect and relative addressing modes for data and instructions.

Peripheral Features: 8-bit real time clock/counter (TMRO) with 8-bit programmable prescaler. Power on Reset (POR). Device reset timer (DRT). Watchdog Timer (WDT) with on-chip RC oscillator for reliable operation. Programmable code-protection.

114

Appendices Power saving SLEEP mode. Selectable oscillator options: RC: Low-cost RC oscillator. XT: Standard crystal/resonator. LP: Power saving, low-frequency crystal.

CMOS Technology: Low power, high speed CMOS ROM technology. Full static design. Wide operating voltage and temperature. ROM commercial/Industrial 3.0 V- 5.5 V < 2mA typical @ 5V, 4 Mhz. 15A typical @ 3V, 32 KHz. < 0.6A standby current. (WDT disabled) @ 3 V, 0C to 70 C. Low Power consumption.

115

Appendices
VCC RA1 RA0 OSC1 OSC2/CLKOUT VDD RB7 RB6 RB5 RB4 18 17 16 15 14 13 12 11 10
1

1 2 3 4 5 6 7 8 9

U2 RA2 RA3 RTCC /MCLR VSS (GND) RBO RB1 RB2 RB3

RP1 100K
2 3 4 5 6 7 8 9

PIC16C54A

16 15 14 13 12 11 10 9

SW2

Figure A 5

PIC16C54A Microcontroller Integrated Circuit Switches 5 - 8 (House Address) are read on inputs RB4 RB7 Switches 5 - 8 (Unit Address) are read on inputs RB4 RB7

RB2 = LOW RB3 = HIGH RB2 = HIGH RB3 = LOW

Table A 11 PIC16C54A House/Unit Control Signals

116

Appendices

Appendix 4
Source Code for PIC16C54 X-10 Appliance Module
; X-10 Receiver ; Client: ; File Name: ; File Date: ; Target Device: ; Clock Type: ; Watchdog: ; Code Protection: ; Customer ID Code: ; Assembler: ; Code Revision: TITLE LIST In House X10RX128.ASM 16 August 1996 PC 16C54A 4MHz Xtal, 1uS Instruction Cycle On Off 'ABAC' MPASM version 1.30 1.28 First released version

"X-10 Receiver" P = 16C54

;Generic Definitions W F EQU H'0000' EQU H'0001' ; Result Destination = W Register ; Result Destination = F Register

; Standard Register Files INDF EQU H'0000' ; Indirect Addressing Register RTCC EQU H'0001' ; Counter PC EQU H'0002' ; Program Counter STATUS EQU H'0003' ; Status Register FSR EQU H'0004' ; File Select Register PORT_A EQU H'0005' ; Port A Input/Output Port PORT_B EQU H'0006' ; Port B Input/Output Por ; STATUS Register Bits #define CARRY STATUS, 0 ; Carry Bit #define DIGCARRY STATUS, 1 ; Digit Carry Bit #define ZERO STATUS, 2 ; Zero Bit #define NOT_PD STATUS, 3 ; Power Down Bit #define NOT_TO STATUS, 4 ; Watchdog TimeOut Bit #define PA0 STATUS, 5 ; Page Preselect #define PA1 STATUS, 6 ; Page Preselect #define PA2 STATUS, 7 ; Future use

117

Appendices ; OPTION Register Bits PS0 PS1 PS2 PSA RTE RTS EQU EQU EQU EQU EQU EQU H'0000' H'0001' H'0002' H'0003' H'0004' H'0005' ; Prescaler divide ratio Eight divide ratios: ; Prescaler divide ratio WDT 1:1 to 1:128 ; Prescaler divide ratio RTCC 1:2 to 1:256 ; Prescaler Assignment 0=RTCC 1=WDT ; RTCC Pin Signal Edge 0=Rising 1=Falling ; RTCC SIgnal Source 0=Clock 1=RTCC Pin

; Fuse Definitions and Configurations _CP_ON EQU H'0FF7' _CP_OFF EQU H'0FFF' _WDT_ON EQU H'0FFF' _WDT_OFF EQU H'0FFB' _LP_OSC _XT_OSC _HS_OSC _RC_OSC EQU H'0FFC' EQU H'0FFD' EQU H'0FFE' EQU H'0FFF' ; 32kHz ; 100kHz - 4MHz ; 4MHz - 20MHz ; 100KhZ - 4MHz

__FUSES _CP_OFF&_WDT_ON&_XT_OSC __IDLOCS H'ABAC' __MAXRAM H'01F' ; Input/Output Port Assignments #define TRIAC PORT_A, 0 ; Triac Gate Drive #define ZEROX PORT_A, 1 ; Zero-Crossing Detector Input #define CARRIER PORT_A, 2 ; Mains Carrier Detect #define BUTTON PORT_A, 3 ; Push Button Input #define UNIT3 PORT_B, 0 ; Unit/Function Code 3 #define UNIT2 PORT_B, 1 ; Unit/Function Code 2 #define UNIT1 PORT_B, 2 ; Unit/Function Code 1 #define UNIT0 PORT_B, 3 ; Unit/Function Code 0 #define HOUSE0 PORT_B, 4 ; House Code 0 \ #define HOUSE1 PORT_B, 5 ; House Code 1 | 0 to 15 #define HOUSE2 PORT_B, 6 ; House Code 2 | re-assigned as #define HOUSE3 PORT_B, 7 ; House Code 3 / A to O

118

Appendices ; Register File Variables FLAGS EQU H'0008' ; Bits used as status flags COUNT EQU H'0009' ; Counter used by Wait routines HOUSE EQU H'000A' ; House code, 0 - 15 == A - P UNIT EQU H'000B' ; Unit code, 0 - 15 == 1 - 16 RXHOUSE EQU H'000C' ; Received House code, 0 - 15 == A - P RXUNIT EQU H'000D' ; Received Unit code, 0 - 15 == 1 - 16 RXFUNC EQU H'000E' ; Received Unit code, 0 - 15 == 1 - 16 #define LOAD Define Macros TriacOn macro BCF TRIAC endm TriacOff macro BSF TRIAC endm GetBit macro locn CALL ReadBit RLF locn, F endm FLAGS, 0 ; 0=Load is off, 1=Load is on;

119

Appendices ;X-10 COMMAND FORMAT ; ; start unit house gap house start function ; house start unit start function house ; ;NB: Total of 94 zero-crossings used, 95 with ND561 (*) ; Control console/RF remote produce one extra blank half-cycle; ; (7 instead of 6) in gap: ; ;Control console ND561 via SH624 RF remote; sending A1 ON: ; (*) ; 1110 01101001 0110100101 1110 01101001 0110100101 0000000>continued ; 0110 01100 0110 01100 > ; S A 1 S A 1 GAP > ; ; >1110 01101001 0101100110 1110 01101001 0101100110 ; > 0110 00101 0110 00101 ; >S A ON S A ON DONE ; ; ;Mini-Controller MC563 or Mini-Timer MT522; sending C1 ON: ; ; 1110 01011001 0110100101 1110 01011001 0110100101 000000> ; 0010 01100 0010 01100 >continued ; S C 1 S C 1 GAP > ; ; >1110 01011001 0101100110 1110 01011001 0101100110 ; >0 0 1 0 0 0 1 0 1 0010 00101 ; >S C ON S C ON DONE ; ORG 00H

120

Appendices ; Program starting point Start MOVLW B'00001110' TRIS PORT_A ; Set Port A as Inputs & Outputs MOVLW B'11111111' TRIS PORT_B ; Set Port B as Inputs TriacOff ; Set Load off CLRF FLAGS CLRF HOUSE CLRF UNIT CLRF RXHOUSE CLRF RXUNIT CLRF COUNT MOVLW B'00000111' ; RTCC Prescaler, divide by 256 OPTION ; gives 256uS per count MainLoop CALL Wait500mSec Wait1110A CLRWDT BTFSS LOAD TriacOff BTFSC LOAD TriacOn ; Continuously re-assert load status

BTFSS BUTTON ; Check if manual button pressed, GOTO Manual ; if so do manual routines CALL BTFSS GOTO CALL BTFSS GOTO CALL BTFSS GOTO CALL BTFSC GOTO ReadBit ; Wait for Start Sequence 1110 CARRY ;1 Wait1110A ReadBit CARRY ;1 Wait1110A ReadBit CARRY ;1 Wait1110A ReadBit CARRY ;0 Wait1110A

121

Appendices GetBit RXHOUSE ; Read first house address GetBit RXHOUSE GetBit RXHOUSE GetBit RXHOUSE GetBit RXHOUSE GetBit RXHOUSE GetBit RXHOUSE GetBit RXHOUSE GetBit RXUNIT GetBit RXUNIT GetBit RXUNIT GetBit RXUNIT GetBit RXUNIT GetBit RXUNIT GetBit RXUNIT GetBit RXUNIT MOVLW D'0024' MOVWF COUNT BitCount1 CALL ReadBit DECFSZ COUNT, F GOTO BitCount1 MOVLW D'0011' MOVWF COUNT Wait1110B DECFSZ COUNT, F GOTO W1110B GOTO MainLoop W1110B CLRWDT CALL ReadBit ; BTFSS CARRY GOTO Wait1110B CALL ReadBit BTFSS CARRY GOTO Wait1110B CALL ReadBit BTFSS CARRY GOTO Wait1110B CALL ReadBit BTFSC CARRY GOTO Wait1110B MOVLW D'0008' MOVWF COUNT ; wait a maximum of 10 zero-crossings ; for next start sequence ; Read first unit address

; ignore last two bits ; as always 0 1 == 0 ; wait 24 zero-crossings, ie ; to start of 'gap'

; Abort as problem with data sequence Re-synchronise with pre-function ; 1 start sequence ; 1 Can not just count bits as gap ; length varies with transmitter type ;1 ;0 ; ignore next 8 bits = ; house address again

122

Appendices BitCount2 CALL ReadBit DECFSZ COUNT, F GOTO BitCount2 GetBit RXFUNC GetBit RXFUNC GetBit RXFUNC GetBit RXFUNC GetBit RXFUNC GetBit RXFUNC GetBit RXFUNC GetBit RXFUNC ; Read command function

; ignore last two bits of function ; as always 1 0 == 1 ; and ignore rest of data (22 bits)

CALL ReadDIPSwitches MOVF HOUSE, W SUBWF RXHOUSE, W XORLW 0 BZ GoodHouse GOTO MainLoop GoodHouse MOVF UNIT, W ; Received House code matches DIP switch SUBWF RXUNIT, W XORLW 0 BZ GoodUnit GOTO MainLoop GoodUnit ; Received Unit code matches DIP switch MOVLW B'01011001' ; On function 0010 1 SUBWF RXFUNC, W XORLW 0 BZ PowerOn1 MOVLW B'01011010' ; Off function 0011 1 SUBWF RXFUNC, W XORLW 0 BZ PowerOff1 GOTO MainLoop PowerOn1 TriacOn BSF LOAD GOTO MainLoop PowerOff1 TriacOff BCF LOAD GOTO MainLoop

123

Appendices Manual CALL BTFSC GOTO BTFSS GOTO ; Manual operation, de-bounce switch Wait100mSec ; by reading again after a delay. BUTTON ; Re-check if manual button pressed. MainLoop LOAD PowerOn2

Poweroff2 CLRWDT TriacOff ; Manual switch load off BCF LOAD ; Clear 'load on' flag BTFSS BUTTON ; Wait here until button released GOTO Poweroff2 GOTO MainLoop PowerOn2 CLRWDT TriacOn ; Manual switch load on BSF LOAD ; Set 'load on' flag BTFSS BUTTON ; Wait here until button released GOTO PowerOn2 GOTO MainLoop ReadBit CALL ZeroCross ; Call & return after zero crossing CALL Wait250uSec ; Wait so sample into carrier burst BTFSS CARRIER ; Check for presence of 120kHz carrier GOTO GB1 BSF CARRY ; Carrier present so set carry flag RETLW 0 GB1 BCF CARRY ; Carrier absent so clear carry flag RETLW 0 ZeroCross BTFSC ZEROX ; Check present +ve/-ve status of 50Hz GOTO Z1 ; power then wait for it to change Z0 CLRWDT ; Is low BTFSS ZEROX ; Loop until goes high GOTO Z0 RETLW 0 Z1 CLRWDT ; Is high BTFSC ZEROX ; Loop until goes low GOTO Z1 RETLW 0

124

Appendices Wait100mSec MOVLW D'0006' MOVWF COUNT GOTO WaitLoop Wait500mSec MOVLW D'0030' MOVWF COUNT WaitLoop MOVLW D'0192' MOVWF RTCC Wait16 CLRWDT MOVF RTCC, W BNZ Wait16 DECFSZ COUNT, F GOTO WaitLoop RETLW 0 Wait250uSec CLRF RTCC W0 CLRWDT ; Measured at about 273uSecs MOVF RTCC, W BZ W0 RETLW 0 ReadDIPSwitches SWAPF PORT_B, W ; Read DIP switch high nibble = house address MOVWF HOUSE ; and complement for true-logic COMF HOUSE, W ; Save in HOUSE variable ANDLW H'000F' ; 0 -> 15 == A -> P CALL HouseTable ; Look up bit pattern MOVWF HOUSE MOVF PORT_B, W ; Read DIP switch low nibble = unit address ANDLW H'000F' ; Unscramble bits and complement for true-logic CALL UnitTable ; Look up bit pattern & save in UNIT variable MOVWF UNIT ; 0 -> 15 == 1 -> 16 RETLW 0

; 6 x 16.384msec = 98.304msec

; 30 x 16.384msec = 491.52msec

; 256-64=192, 64 x 256usec = 16.384msec ; Time delay inner loop

125

Appendices

HouseTable ADDWF PC, F ; RETLW B'01101001' RETLW B'10101001' RETLW B'01011001' RETLW B'10011001' RETLW B'01010110' RETLW B'10010110' RETLW B'01100110' RETLW B'10100110' RETLW B'01101010' RETLW B'10101010' RETLW B'01011010' RETLW B'10011010' RETLW B'01010101' RETLW B'10010101' RETLW B'01100101' RETLW B'10100101' UnitTable ADDWF PC, F ; RETLW B'10100101' RETLW B'10100110' RETLW B'10011010' RETLW B'10011001' RETLW B'10010101' RETLW B'10010110' RETLW B'10101010' RETLW B'10101001' RETLW B'01100101' RETLW B'01100110' RETLW B'01011010' RETLW B'01011001' RETLW B'01010101' RETLW B'01010110' RETLW B'01101010' RETLW B'01101001' ORG 1FFH GOTO Start END Unit Code Look-up table: ;0>0>F = 16 = 1100 0 Flips bits 0 with 3, ;1>8>7 = 8 = 1101 0 and 1 with 2 and ;2>4>B = 12 = 1011 0 then complements result. ;3>C>3 = 4 = 1010 0 Bits must be twisted ;4>2>D = 14 = 1000 0 to undo twisting ;5>A>5 = 6 = 1001 0 on PCB layout. ;6>6>9 = 10 = 1111 0 ;7>E>1 = 2 = 1110 0 ;8>1>E = 15 = 0100 0 ;9>9>6 = 7 = 0101 0 ;A>5>A = 11 = 0011 0 ;B>D>2 = 3 = 0010 0 ;C>3>C = 13 = 0000 0 ;D>B>4 = 5 = 0001 0 ;E>7>8 = 9 = 0111 0 ;F>F>0 = 1 = 0110 0 House Code Look-up table: ; A = 0110 ; B = 1110 ; C = 0010 ; D = 1010 ; E = 0001 ; F = 1001 ; G = 0101 ; H = 1101 ; I = 0111 ; J = 1111 ; K = 0011 ; L = 1011 ; M = 0000 ; N = 1000 ; O = 0100 ; P = 1100

; RESET vector

126

References
Access and Control your PC from anywhere in the world: http://www.access-remote-pc.com/ 2006 Axis 216FD Fixed Dome Network Camera: http://www.axis.com/ 2006 Broadband Investment in Ireland: http://www.forfas.ie/publications/ 1998 Broadband for business: Report published in the Irish Independent Thursday 27th April 2006 Broadband Telecommunications Benchmarking Study: http://www.forfas.ie/publications/ November 2004 Benchmarking Irelands Broadband performance: http://www.forfas.ie/publications/ December 2005 Broadband over Power Lines-BPL Primer: CQ Magazine, May 2004 Broadband in Rural and Remote Areas www.oecd.org 2004 Broadband Last-Mile Technology: The National Academies of Science, Engineering and Medicine, http://www7.nationalacademies.org 2006 Broadband over Power-line (BPL) Frequently Asked Questions: http://www.qrpis.org/~k3ng/bpl.html#4 2006 Broadband Over Power-lines http://computer.howstuffworks.com CM11A Interface Communication Protocol http://mywebpages.comcast.net/ncherry/common/protocol.html 2006 CGI with LabView http://www.jeffreytravis.com/books/Ch9.pdf 2006 DAQ Getting Started Guide: http://www.ni.com/pdf/manuals/373235g.pdf Event-Driven Computing Projects for Software Engineering Education Computer Engineering & Science Dept, University of Missouri-Columbia http://www.cs.missouri.edu/~skubic/Papers/skubicASEE2002.pdf Ergodic Chaotic Parameter Modulation http://ieeexplore.ieee.org/iel5/61/30033/01375079.pdf? January 2005 Home Automation : Lessons from an Adaptive Home, Michael C. Mozer University of Colorado http://www.iee.org/OnComms/PN/controlauto/ LogMeIn Home Page: https://secure.logmein.com/ 2006 Learn LabView 8 in 3 hours: http://zone.ni.com/ 2006

127

References LabView six hour course: http://www.csee.umbc.edu/ 2006 LabView graphical programming course: http://cnx.org/content/col10241/latest/ 2006 LabView Tutorial: http://www.ece.mtu.edu/labs/EElabs/EE3305 2006 LabView to control X10 devices, Message board forum, 2006 http://www.perceptiveautomation.com/phpBB2/viewtopic.php?p=4022 Mobile Computing, Virtual Network Computing: http://ieeexplore.ieee.org/iel3/ January-February 1998 Making WiMAX the platform of choice for broadband wireless access: http://www.wimaxforum.org/ 2006 Microcontroller interface with LabView: http://zone.ni.com/devzone/cda/epd/p/id/4554 2006 Manuals: ftp://ftp.x10.com/pub/manuals/ Neural Network House: An Overview : Dept of Computer Science, University of Colorado http://www.cs.colorado.edu/ 2006 Power-line communications Electrifying the broadband PC Magazine: April 2004: http://www.pcmag-mideast.com/reviews/ Power-Line Communication on Broadcast reception http://www.rac.ca/regulatory/BPL/BBC%20White%20Paper.pdf Sept 2003 Prototype home automation project using the Project54 system http://www.project54.unh.edu/Documents/TechnicalReports 2004 Project54 Home Automation Project, July 21st 2006 http://www.project54.unh.edu/Reference/Download.pm/2335/Document.PDF Remote Control of Heating, Ventilation and Air Conditioning system with LabView: http://www.ece.msstate.edu/academics/gradprog/thesis/ Dec 2003 Surveillance IP Cameras; Texas Instruments: http://focus.ti.com/docs/solution/folders/print/207.html 2006 Serial communication protocol discussion forum with link to CM11A Virtual Instrument:http://search.ni.com/nisearch/nisearchservlet?nistype=default&ddo wn=3&filter=+taxonomy:"Discussion+Forums"&q=x10+cm11A 2006 Search Engine for University Sites: www.searchedu.com 2006 Spread Spectrum A Tutorial http://www.sss-mag.com/ 2006

128

References Spread Spectrum: An Analogue SS Interface for Power-Line Data Communications in Home Networking; http://ieeexplore.ieee.org/iel5/61/30033/01375079.pdf? January 2005 Virtual Laboratory for Distance Science and Engineering Education, Carl Steidley and Rafic Bachnak, Department of Computing and Mathematical Sciences Texas A&M University-Corpus Christi http://ieeexplore.ieee.org/iel5/10436/33131/01560227.pdf 2005 Virtual Network Computing: http://en.wikipedia.org/wiki/VNC 2006 Virtual Network Computing: The Olivetti & Oracle Research Laboratory http://computer.org/internet/ January-February 1998 Videoconferencing over broadband networks, Luis Bellido - Universidad Politcnica de Madrid, Dpto. de Ingeniera de Sistemas Telemticos. Spain http://greco.dit.upm.es/~leverage/conf1/bellido.htm 2006 WiMax: The Real Impact http://www.gartner.com ID Number G00125543, February 2005 WiMAX Unwiring the Last Mile: http://www.siemens-mobile.de 2006 WiMax The Broadband Mobile future? http://www.iei.ie/sectorpapers/ 2004 Wi-Fi Offers Viable Broadband Access for Europe's Rural Communities http://www.gartner.com/ 2003 Wireless Home Automation Using .NET and X10: http://www.15seconds.com/issue/040413.htm X10 Thermostats: http://www.resconsys.com/products/stats/x10.htm 2006 X10 to control computers: http://www.eng.auburn.edu/~doug/x10.html 2006 X-10 Compatible Appliance Module: Philip C Plunkett, ABACUS ELECTRICS, London http://www.cix.co.uk/~pplunkett/x10.htm Document Revision-May1997, Source Code Revision 1.28-August 1996 XML Web Services mobile interaction solution for X-10 Power-Line Networking: http://dienst.isti.cnr.it/ Technical Report 2005 European Research Consortium for Information & Mathematics (ERCIM Reference Digital Library)

129

Bibliography
Useful Articles: Electronics Today International March 1996 Driving Triacs with PIC Micro-controller Bart Trepak Everyday and Practical Electronics February 1995 Transformerless Power Supplies Andy Flind Distance Learning Solutions Guide - National Instruments http://www.ni.com/academic/distance_learning.htm Glossary of Computer/Internet terms http://www.isat.ie/Glossary/glossary.htm LabView: Introduction to LabView: Brian Bowe Centre for Industrial and Engineering Optics, School of Physics, Dublin Institute of Technology, 1999 Brian Bowe Centre for Industrial and Engineering Optics, School of Physics, Dublin Institute of Technology, 1999 Remote Plant Monitoring using Wireless technology Irish Engineers Journal volume 57:10th December 2003 SGS-Thomson ST6210/ST6215/ST6220/ST6225 data book Application note: Micro-Controller and Triacs on the 110/240V Mains X-10 Powerhouse Technical Note: The X-10 powerhouse Power Line Interface Model # PL513 and TwoWay Power Line Interface #TW523, Revision 2.4 Dave Rye http://x10ideas.com/articles/displayx10article.asp?articleid=29 X10 Home Automation Knowledge Base http://www.geocities.com/idobartana/ X-10 Manuals and Guides www.x10.com

130

Bibliography Books: Building Broadband Networks by Marlyn Kemper Littman Ph.D Published by CRC Press LLC, Email orders@crcpress.com 2002 Broadband Networks, A Managers Guide By Robert P. Davidson, Published by John Wiley & Sons, Inc. 1996 Internet Applications in LabView: http://www.jeffreytravis.com/books/ialv.html 2006 Mobile Internet Enabling Technologies and Services By Apostolis K. Salkintzis, Published by CRC Press LLC 2004

131

132

You might also like