Home Automation Thesis
description
Transcript of Home Automation Thesis
-
Auto-MATE:Intelligent Home Automation Using
Mains Power Communications
byWarren Hastings
Department of Computer Science and Electrical Engineering,University of Queensland.
Submitted for the degree ofBachelor of Engineering (Honours)
in the division of Electrical Engineering.
October 2000
-
ii
117 Addison RoadCAMIRA QLD 4300
20 October 2000
The Dean
School of Engineering
University of Queensland
ST LUCIA QLD 4072
Dear Professor Simmons
In accordance with the requirements of the degree of Bachelor of Engineering
(Honours) in the division of Electrical Engineering, I submit this thesis entitled
Auto-MATE: Intelligent Home Automation Using Mains Power
Communications. This work was performed in partnership with Mr Shane
Hingst under the supervision of Dr Mark Schulz.
I declare that the work submitted in this thesis is entirely my own except where
appropriately acknowledged and referenced. This thesis has not been
previously submitted for a degree at the University of Queensland or any other
institution.
Yours Sincerely
Warren Hastings
-
iii
Abstract
This thesis document describes the design, development and successful
prototype implementation of an integrated home automation system titled Auto-
MATE. The Auto-MATE system replaces dumb electrical outlets and switches
found throughout the home with intelligent modules controlled by a central
computer. The new modules connect to form a network using the existing
power lines and the CEBus Protocol. The prototype system contains an
appliance module, a light dimmer module, a motion detector module and
climate sensing modules. The design is unique in that there are presently no
comparable products available in Australia. A set of design specifications and
criteria are developed against which the product implementation is realised. At
the completion of the project the final design is shown to compare favourably
with the specifications and several future directions that the project may take
are suggested. The Auto-MATE system serves as a proof of concept model
for ensuing development.
-
iv
Acknowledgments
I would like to thank the following people who helped to make this thesis
possible.
Shane Hingst for being without a doubt the best possible thesis partner.
Mark Schulz for sharing his enthusiasm and knowledge of home automation.
Geoff Walker for circuit design suggestions.
Graham Vayro of Vayrotec Pty Ltd for design advice and component
donations.
Andrew Sallaway for cunningly providing a television in the lab under the guise
of a thesis project.
-
vFor Justine and Jasmine,
I may not be a smart man but I know what love is.
Forrest Gump
-
vi
Contents
Abstract iii
Acknowledgments iv
Contents vi
List of Figures x
List of Tables xi
1. Introduction 1
1.1 What is Home Automation?...................................................................1
1.2 The Home Automation Maze.................................................................2
1.3 The Auto-MATE Vision..........................................................................3
1.4 Auto-MATE Features.............................................................................4
1.5 Structure and Organisation of this Document........................................4
2. Review of Existing Home Automation Technologies 6
2.1 X-10.......................................................................................................7
2.1.1 The X-10 Protocol.....................................................................7
2.1.2 X-10 Products...........................................................................9
2.1.3 X-10 Summary........................................................................12
2.2 LonWorks.............................................................................................13
2.2.1 LonTalk...................................................................................13
2.2.2 LonWorks Products.................................................................16
2.2.3 LonWorks Summary................................................................17
2.3 CEBus..................................................................................................17
2.3.1 The CEBus Protocol................................................................17
2.3.2 CEBus Products......................................................................21
2.3.3 CEBus Summary.....................................................................23
2.4 European Home Standard...................................................................23
2.4.1 The EHS Protocol...................................................................23
2.4.2 EHS Products..........................................................................23
2.4.3 EHS Summary........................................................................24
-
vii
2.5 Review Summary.................................................................................24
3. System Design Specifications 27
3.1 The Auto-MATE System......................................................................27
3.2 Design Criteria.....................................................................................28
3.3 System Topology.................................................................................29
3.4 Central Controller.................................................................................30
3.4.1Controller Platform.......................................................................30
3.4.2 Modes of Control.....................................................................31
3.4.3 Additional Services..................................................................31
3.4.4 PC to Power Line Interface.....................................................32
3.5 Mains Power Communications............................................................32
3.5.1 Reliability.................................................................................32
3.5.2 Baud Rate...............................................................................32
3.5.3 Transmission Distance............................................................33
3.5.4 Network Communications IC...................................................33
3.5.5 Microcontroller.........................................................................33
3.6 Intelligent Modules...............................................................................34
3.6.1 Minimum Functionality............................................................34
3.6.2 Light Switch / Dimmer.............................................................34
3.6.3 Appliance Module....................................................................34
3.6.4 Motion Detector.......................................................................35
3.6.5 Climate Sensor........................................................................35
3.6.6 Load Sensing..........................................................................35
3.7 Summary of Design Specifications......................................................35
4. Hardware Implementation 36
4.1 Overview of Hardware Requirements..................................................36
4.1.1 Physical Orientation of Subsystems........................................37
4.2 Mains Power Communications............................................................38
4.2.1 Network Communications Transceiver IC...............................38
4.3 Microcontroller Selection......................................................................42
4.4 Load Control........................................................................................43
4.4.1 Zero Voltage Crossing Detection............................................43
4.4.2 Load Switching........................................................................44
4.5 Load Sensing.......................................................................................44
-
viii
4.6 Local Control Buttons..........................................................................44
4.7 Power Supplies....................................................................................45
4.8 Temperature Sensing Circuit...............................................................45
4.9 Humidity Sensing Circuit......................................................................45
4.10Motion Detector Circuit........................................................................45
4.11Three Phase Signal Coupling..............................................................46
4.12Remote Voice Activation......................................................................46
4.13PC Power Line Interface...................................................................46
4.14Hardware Design Summary.................................................................47
5. Software Implementation 48
5.1 Overview of Software Requirements....................................................48
5.2 Central Controller Software..................................................................49
5.2.1 CEBus Conformance...............................................................49
5.2.2 The Common Application Language.......................................49
5.2.3 Internet Connectivity...............................................................50
5.2.4 Speech Recognition................................................................50
5.3 Communications Software...................................................................50
5.3.1 Communications Protocol.......................................................51
5.3.2 Communications Driver...........................................................52
5.3.3 PC to Mains Power Interface...................................................55
5.4 Module Application Software...............................................................55
5.4.1 CEBus Conformance...............................................................55
5.4.2 Appliance Module....................................................................55
5.4.3 Light Dimmer Module..............................................................56
5.4.4 Motion Detection.....................................................................56
5.4.5 Temperature & Humidity Sensing...........................................56
5.5 Software Design Summary..................................................................57
6. Performance Evaluation of the Auto-MATE System 58
6.1 Terminal Status of Project....................................................................58
6.1.1 Hardware.................................................................................58
6.1.2 Software..................................................................................59
6.1.3 Mains Power Communications................................................59
6.1.4 Status Summary......................................................................59
6.2 Comparison with Design Specifications...............................................59
-
ix
6.2.1 Central Controller....................................................................60
6.2.2 Mains Power Communications................................................60
6.2.3 Intelligent Nodes.....................................................................61
6.2.4 Phase Coupling.......................................................................61
6.2.5 Comparison Summary.............................................................62
6.3 Introspective Engineering Performance Evaluation.............................62
6.3.1 Utilisation of Project Tools.......................................................62
6.3.2 Application of Design Techniques...........................................63
6.3.3 Critical Analysis of Personal Performance..............................63
6.4 Performance Summary........................................................................64
7. Future Developments for Auto-MATE 65
7.1 Design Review.....................................................................................65
7.1.2 Voice Command Control.........................................................65
7.1.3 Power Supply..........................................................................66
7.2 Possible Product Extensions...............................................................66
7.2.1 Power Measurement...............................................................66
7.2.2 SMS Text Messaging..............................................................67
7.2.3 Set Top Box............................................................................67
7.3 Summary of Future Developments......................................................68
8. Concluding Remarks 69
References 70
Appendices 74
A. Circuit Schematics and PCB Layouts..................................................75
B. Source Code Listings...........................................................................81
C. CAL Contexts Objects and Methods..................................................101
-
xList of Figures
Figure 2.1: X-10 Signal Transmission.............................................................7
Figure 2.2: X-10 Transmission Start Code ......................................................8
Figure 2.3: X-10 Transmission Cycle..............................................................9
Figure 2.4: Decorator Dimmer.......................................................................11
Figure 2.5: Two Way Lamp Module...............................................................11
Figure 2.6: Appliance Module........................................................................12
Figure 2.7: Eagle Eye Sensor........................................................................12
Figure 2.8: Powerline Interface......................................................................12
Figure 2.9: Leviton Dimmer...........................................................................16
Figure 2.10:Leviton Occupancy Sensor..........................................................16
Figure 2.11:Infinitelan Controller....................................................................17
Figure 2.12:OSI Model...................................................................................18
Figure 2.13:Spread Spectrum Chirp...............................................................19
Figure 2.14:Manager Plus..............................................................................22
Figure 2.15:Smart Switch...............................................................................22
Figure 2.16:Appliance Port.............................................................................22
Figure 2.17: Sensor Port................................................................................23
Figure 2.18:EHS Development Board............................................................24
Figure 3.1: Auto-MATE Block Diagram..........................................................28
Figure 3.2: Star Topology..............................................................................30
Figure 4.1: CEBus Control Board..................................................................37
Figure 4.2: CEBus Power Board...................................................................37
Figure 4.3: Hardware Block Diagram.............................................................38
Figure 4.4: EK P300 Development Board......................................................39
Figure 4.5: Flow Chart of P300 Initialisation..................................................40
Figure 4.6: Domosip......................................................................................41
Figure 5.1: Communications Flow Chart 1....................................................54
-
xi
List of Tables
Table 2.1: Comparison of Home Automation Protocols..................................25
Table 2.2: Comparison of Controllers.............................................................25
Table 2.3: Comparison of modules.................................................................26
Table 4.1: Comparison of Microcontrollers.....................................................43
-
1Chapter 1
Introduction
Home automation is predicted to become a boom industry by technology
pundits including Microsoft CEO Bill Gates [1]. Home automation can provide
additional time for recreational pursuits, monetary savings through power
management and peace of mind that valued homes and contents are being
monitored 24 hours a day. For elderly or disabled people home automation
could prove to enhance their quality of life immensely.
At present, there are still few complete integrated systems available
particularly in Australia, which lags behind other countries in development of
this technology.
There is a potential niche for the development of a reliable, cost-effective
fully integrated home automation system.
1.1 What is Home Automation?
By definition, automation refers to:
The automatic operation or control of equipment, a process, or a system without
conscious thought. [2]
Home Automation provides for the centralised control of lights and
electric devices throughout the home. These devices are controlled by the
occupant or by sensors or timed events. The central controller can also act as
a gateway into the home allowing for remote control and monitoring.
-
Chapter 1
2
Automation Benefits Include:
Personal Convenience
Security
Peace of Mind
Energy Efficiency
Although not a new concept, home automation has long been the realm of
electronics enthusiasts and hobbyists or separate proprietary devices that
control individual sections of the home. Only recently has there been a drive by
industry to develop integrated systems with a focus on connectivity of all
household appliances and fixtures. The ultimate goal is to produce Plug n Play
type appliances that connect directly to the home automation network and
register themselves with the host controller without any consumer intervention.
1.2 The Home Automation Maze
At present, according to Home Toys [3], there are 6 open and 5 proprietary
home automation standards all vying to be the leading industry standard.
These standards operate over a variety of communications mediums1. This
confusing array of protocols and mediums has resulted in appliance
manufacturers being loath to commit to developing Plug n Play type products
until it becomes apparent which of the competing standards will eventually win
consumer support.
As a result specialist home automation companies have been
concentrating their efforts on developing automated versions of traditionally
dumb devices such as light switches, power points and sensors as a method
of easing the consumer into the automated world.
These products are primarily targeted at American markets and are
therefore either unavailable in Australia due to non-compatible voltage and
frequency, or are priced at around five to ten times the equivalent American
price.
-
Chapter 1
3
1.3 The Auto-MATE Vision
The goal of this project is to engineer a home automation system that would be
suitable for integrating into new and existing homes. The product would have to
satisfy three minimum requirements.
Functionality
The system has to provide features that appeal to the mass market and not only
to enthusiasts.
Ease of Use
The system must be able to be used by a broad range of people. As a
benchmark a familiarity with Microsoft Windows environment is assumed.
Cost
While cost at the prototype stage is not of paramount concern a light dimmer
that costs $1000 is probably not a feasible product so some budgetary caution
must be observed.
The Auto-MATE vision is then this:
To develop a cheap, reliable, entry level home automation system
In keeping with this vision the final product is expected to consist of a
central controller with some form of remote access such as a telephone or
Internet connection as well as modules for controlling lighting and power loads
typical of those found in an average home. It will include sensors for motion
detection, temperature and humidity. The controller and the modules will have
reliable, two-way communications over the mains power lines. Thus the Auto-
MATE system will follow a No New Wires policy of implementation.
1 Possible mediums are Powerlines, Infra-red, Twisted Pair, Radio Frequency, Coax, Fibre Optic
-
Chapter 1
4
1.4 Auto-MATE Features
The Auto-MATE vision has been realised over the course of the past nine
months. The details of the design implementation are located in Chapter 4
(Hardware Implementation) and Chapter 5 (Software Implementation). While
full details of the system functionality can be found in Chapter 6 a brief
summary is included below:
Successful adaptation of an existing freeware home automation controller.
Internet access to the system.
Development of a master module to interface the controller to the power
line.
Development of a light dimmer switch with local control and two-way
communication.
Development of a 10A appliance module with local control and two-way
communication.
Development of a climate sensor module with a temperature sensor and
humidity sensor.
Development of a motion detector module.
1.5 Structure and Organisation of this Document
This thesis provides an overview of the design and subsequent implementation
of an integrated home automation system tentatively titled Auto-MATE.
Following this introductory chapter the next section, Chapter 2, explores the
currently available products that are comparable to the desired Auto-MATE
product. From this product review a core set of features common to all home
automation systems is detailed.
Chapter 3 then builds upon this feature set and extends it where
necessary by utilising a top down approach to break the system into
components. Beginning with the highest level and working down a
comprehensive set of specifications is derived.
-
Chapter 1
5
This set of specifications allows for a discussion of the Hardware
implementation in Chapter 4 and the Software implementation in Chapter 5.
Having specified the system and described the implementation it is then
appropriate to describe the status of the project at the end of the thesis period.
As the product has a working prototype it is possible to revisit the original
requirements and provide a comparison with the final working product. This is
presented in Chapter 6.
Chapter 7 provides a design review listing areas of the design that
performed sub-optimally and with hindsight would be changed. Included in this
chapter is a discussion of possible future directions for the Auto-MATE system.
Finally Chapter 8 provides some brief concluding remarks on what may
be considered a successful thesis project.
-
6Chapter 2
Review of Existing Home AutomationTechnologies
As stated in Chapter 1 there are several communications protocols available.
Of these only a few can utilise the mains power as the physical layer for
transmission. Further reducing this only four protocols are sufficiently
developed to the point where actual commercial products have been developed.
These are X-10, LonWorks, EHS2 and CEBus3.
This chapter reviews these mains power communications standards as
well as the associated software and hardware products in order to derive a
suitable specification for the proposed Auto-MATE system. A subset of
available products is presented that is indicative of the range, functionality and
cost of present devices.
The currently available home automation products share some common
attributes. They can all be categorised as one of three distinct sub-systems at
the highest level:
A communications protocol
A central controller/interface
Modules for control or sensing
Each standard and its associated products is evaluated below:-
2 European Home Standard3 Consumer Electronics Bus
-
Chapter 2
7
2.1 X-10
X-10 is the home automation industry incumbent standard [4]. In 1978 Dave
Rye and the design team at Pico Electronics riding high on the success of
projects X-1 to X-94 decided to embark on a home automation project [5]. Their
goal was to develop a system to control lights and appliances over the existing
house power wiring. X-10 was originally designed as a protocol for one way
communications only. Recently a few products with limited two-way capabilities
have become available.
2.1.1The X-10 Protocol
The transmission method used by X-10 is based on a simple data frame with
eight data bits (one byte) preceded by a predetermined start code. The X-10
binary data is transmitted by sending 1ms bursts of 120kHz just past the zero
crossing of the AC waveform. A binary "1" is defined as the presence of a
pulse, immediately followed by the absence of a pulse. A binary "0" is defined
as the absence of a pulse, immediately followed by the presence of a pulse [6].
The X-10 devices all have a zero voltage-crossing detector built in so the
transmitters and receivers can synchronise.
This is shown in Figure 2.1: X-10 Signal Transmission.
Figure 2.1: X-10 Signal Transmission
4 X-1 to X-8 were calculator ICs, X-9 was an automated record changer.
-
Chapter 2
8
The transmitted pulses have a duration of 1ms and the receivers open a
receive window of 0.6ms. The setting of the transmission start point is achieved
by transmitting a sequence beginning with at least 6 leading clear zero
crossings, then a start code of "pulse", "pulse", "pulse", "absence of a pulse" (or
1110). This is shown in Figure 2.2: X-10 Transmission Start Code.
Figure 2.2: X-10 Transmission Start Code
Each device on an X-10 network is described with a house code and a
unit code. The house code is a 4 bit nibble that is given a letter code
designation from A to P. The unit code is also a nibble with a numerical code
designation from 1 to 16. After the initialisation sequence the house code is
transmitted followed by the unit code. Once a receiver has processed its
address data, it is ready to receive a command. As before, all data frames must
begin with a start code then the following nibble gives the letter code. The next
nibble is the command. An additional bit, the function bit, is added to the end of
the second nibble to differentiate between unit code and command. This
function bit takes the value 0 when the second nibble is a unit code and 1
when the second nibble is a command. Since the last bit is the function bit all
the commands end in a binary 1.
All X-10 frames then require a minimum of eleven AC cycles to transmit
one frame consisting of six clear zero voltage crossings, the start code and the
-
Chapter 2
9
required two data nibbles. For purposes of redundancy, reliability and to
accommodate line repeaters, the X-10 protocol calls for every frame of data to
be transmitted twice. In addition whenever the data changes from one address
to another address or from an address to a command or from one command to
another command the data frames must be separated by at least six clear zero
crossings (or "000000"). Therefore the full transmission of an X-10 command
takes 47 AC cycles as shown in Figure 2.3: X-10 Transmission Cycle.
Figure 2.3: X-10 Transmission Cycle
2.1.2X-10 Products
X-10 is the most established of the home automation protocols and as such it
has the largest product base.
2.1.2.1 ActiveHome
ActiveHome [7] is a PC based home automation program that allows for control
of up to 256 X-10 devices. The devices can be controlled in three ways. The
program has a scheduler that controls devices at preset times, there is a
handheld remote control and devices can be controlled at the computer using a
graphical interface. ActiveHome does not support two way communications so
there is no way of polling the status of a device.
ActiveHome retails for US $133 (No distributor in Australia).
-
Chapter 2
10
2.1.2.2 HAL 2000
HAL 2000 [8] is a PC based home automation program similar to ActiveHome.
It too can control 256 devices with one way communications only. HAL 2000
has the ability to be controlled via voice either locally or over a telephone in
addition to preset scheduled control and control at the computer. HAL can
access the Internet to retrieve information such as weather, sports reports etc.
HAL 2000 retails for US $399 ($749 in Australia).
2.1.2.3 HomeSeer
HomeSeer [9] is a PC based home automation program with two way
communication capabilities it incorporates a communication interface that keeps
track of device states when used with devices capable of two way
communications. In addition to scheduling and control of X10 devices from the
computer, HomeSeer offers voice recognition and interaction using Microsoft
Voice Agent, as well as access to X10 devices from the Internet via a web
browser or by using e-mail. HomeSeer allows the user to include scripts written
in Visual Basic or Perl for logic dependant operations.
HomeSeer retails for US $80 (No distributor in Australia).
2.1.2.4 MisterHouse
MisterHouse [10] is a freeware open source home automation that can be run
on a PC under either Windows or Unix. MH is written in the Perl language and
can be extended by the addition of objects and methods. For example, the
following will create an object for a light and turn it on 15 minutes after sunset:
$backyard_light = new X10_Item "C4";
if (time_now "$Time_Sunset + 0:15") {
speak "I just turned the backyard light on at $Time_Now";
set $backyard_light ON;
}
X10_Item, time_now, speak, $Time_xxx, and set are all home automation
related objects, methods, functions, and variables defined in MH.
-
Chapter 2
11
Figure 2.5: Two-Way Lamp Module
MisterHouse executes actions based on voice input, scheduling, file data
and serial port data. There is a web interface to allow control and feedback
from any browser on the Internet. MisterHouse has two way communications
with capable devices. It also shares a modem for caller ID and paging, reads
MS Outlook calendars for event reminders as well as reading and writing e-mail,
HTTP5, and FTP6 files unattended.
2.1.2.5 Decorator Dimmer Switch
The Decorator switch [11] (shown in Figure 2.4:
Decorator Dimmer) is available in 110V version only.
It is capable of local and remote control but is limited
to one way communications meaning that a local
change of status is not updated in the controller.
Retails for US $19.99 (No distributor in Australia.)
2.1.2.6 ActiveHome Two Way Lamp Module
The ActiveHome lamp module [12] (shown in Figure 2.5:
Two way lamp module) has limited two-way control. When
used with a two-way compatible controller the module can
respond to a status request command with an indication as
to whether the module is on or off but not the level of
dimming. The module is capable of local and remote
control. The device can switch an incandescent load of
300 watts and is available in a 110 volt version only.
Retails for US $32.99 (No distributor in Australia).
5 Hypertext Transfer Protocol6 File Transfer Protocol
Figure 2.4: DecoratorDimmer
-
Chapter 2
12
Figure 2.6: ApplianceModule
Figure 2.7: Eagle EyeSensor
Figure 2.8: Power Line Interface
2.1.2.7 Power House Three Pin Appliance Module
The Three Pin Appliance Module [13] (shown in Figure 2.6:
Appliance Module) is capable of being turned on and off using
one-way communication and has no local control. The device
can be purchased in 240 and 110 volt versions with the 240
volt version being capable of switching 10 Amps.
Retails for US $13.99 ($79 in Australia.)
2.1.2.8 The Power House Eagle Eye Motion Sensor
The Eagle Eye [14] (shown in figure 2.7: Eagle Eye
Sensor) sensors motion over a range of 7 meters and
then can transmit a signal to a two-way computer
interface indicating that motion has been detected.
Retails for US $24.99 (No distributor in Australia.)
2.1.2.9 Power House Two-Way Power Line Interface
The Power House interface [15] (shown in
Figure 2.8: Power Line Interface) allows for
two-way communications between a PC
RS2327 port and the power line.
Retails for US $24.99 (No distributor in
Australia.)
2.1.3X-10 Summary
X-10 is the most popular and cheapest form of home automation currently
available. In the USA it is estimated that over 100 million X-10 products have
been sold since its inception in 1978 [16]. X-10 requires nearly a second for a
7 Serial Communications Standard
-
Chapter 2
13
byte to be transmitted in a 50Hz system. In spite of the slow transmission
speed X-10 still suffers from unreliable transmission, as there is no form of error
checking for lost frames from noise or signal collisions. Although some new
devices have two-way communications the command is limited to a simple
status check whereby the device responds that it is either on or off. The X-10
devices then act as slave devices and are not capable of initiating a
transmission when a change of state occurs locally.
2.2 LonWorks
The LonWorks standard was developed by Echelon [17]. The standard consists
of the LonTalk protocol, Neuron chips and LonWorks transceivers. The Neuron
chip is a proprietary device of LonWorks and consists of three resident 8-bit
processors: two processors dedicated to LonTalk protocol processing, and a
third dedicated to the node's application program. The transceivers can only
interface with the Neuron chip which in turn can only be programmed using a
LonWorks proprietary version of the C language known as Neuron C.
Although the standard has been in existence for ten years it was until
October 1999 a closed proprietary standard. LonWorks has been primarily
used in the automation of buildings and factories and is used extensively in
energy management applications. Within the last two years Echelon have
made a push into the home automation market.
2.2.1LonTalk
LonTalk [18] is the communications protocol for the LonWorks system. The
LonTalk protocol design follows the International Standards Organisations
Reference Model for Open Systems Interconnection (ISO OSI), which
prescribes the structure for open communications protocols. LonTalk
implements all seven layers of this model.
Layer 1: Network Physical Layer
This layer addresses the specifics of wiring and connections.
-
Chapter 2
14
Layer 2: Data Link Layer
This layer defines the rules of access to the physical layer. Services provided
by this layer include error detection, flexible allocation of bandwidth, priority
access mechanisms, message collision avoidance and collision detection.
Layer 3: Network Layer
This layer specifies the destination of a message on the network. Services
provided by this layer include the node address information. It provides for
routing of messages to control network bandwidth usage as well as determining
which nodes on the network receive various messages.
Layer 4: Transport Layer
This layer establishes the type of services required for the node messages
depending on the level of reliability required by the application. The services
provided are broadcast addressing, acknowledged service, unacknowledged
service, duplicate packet detection and authentication.
Layer 5: Session Layer
This layer provides the communications to request action from another node.
Layer 6: Presentation Layer
This layer provides translation of the network data for the application.
Examples of services provided in this layer include Input, output, and
configuration variables for the node and standard data representations for
physical quantities. The standard data representations are important to assure
interoperability between products from different manufacturers.
Layer 7: Application Layer -
This layer includes services to simplify development of application programs to
interface to specific sensors, actuators, and external microprocessors.
The LonTalk protocol provides a common applications framework that
ensures interoperability by using network variables and Standard Network
Variable Types (SNVTs) [19]. Network variables communication between
-
Chapter 2
15
nodes on a network takes place using the network variables that are defined in
each node. The product developer defines the network variables when the
application program is created as part of the application layer of the protocol.
Some nodes may send a network variable while others may receive. By only
allowing links between inputs and outputs of the same type, network variables
enforce an object-oriented approach to product development. Whenever a
node program writes a new value into one of its output variables, the new value
is propagated across the network to all nodes with input network variables
connected to that output network variable. This action is handled by the
protocol within the Neuron Chip. The user defines the network variable
connections when the nodes are installed on the network. The use of SNVTs
contributes to the interoperability of LONWORKS products from different
manufacturers.
The following are examples of SNVTs:
Variable Type Units
Temperature Degrees Celsius
Relative Humidity Percent
Device State Boolean
Day of Week Enumerated List (Mon-Sun)
LonTalk Network Management Services are a formal part of the LonTalk
protocol. Support for these services is contained in every LonWorks node. This
guarantees that all nodes, regardless of origin, can respond to LonTalk
commands from nodes designed to perform network management functions.
Each node has a 48-bit unique ID assigned during manufacture.
The Neuron Chip is the heart of the LONWORKS technology. Nodes
contain a Neuron Chip to process all LonTalk protocol messages, sense inputs
and manipulate outputs, implement application-specific functions and store
installation-specific parameters. Neuron chips are programmed in Neuron C,
which extends ANSI Standard C to support an object-oriented approach to
developing distributed applications.
-
Chapter 2
16
Figure 2.9: LevitonDimmer
Figure 2.10: LevitonOccupancy Sensor
Power line transceivers communicate with either a proprietary spread
spectrum or a narrow band technology that provides reliable communications
for up to 2000 meters on a clear line
2.2.2LonWorks Products
As Echelon are relatively new to the home automation industry there are fewer
devices available. It appears that LonWorks has been used to successfully
develop custom industrial automation systems for several years and the devices
being put forward for home automation use are scaled back versions of these.
2.2.2.1 i.LON 1000 Internet Server Starter Kit
The i.Lon starter kit [20] is available through Echelon and includes network
control software and the PC to mains power interface for mains power
communications. The software includes a web browser for complete control
over the Internet.
Retails for US $1975.00 (No distributor in Australia.)
2.2.2.2 Leviton Dimmer Switch
The Leviton switch [21] (shown in Figure 2.10: Leviton
Dimmer) has local and remote control with full two-way
communications. The switch turns on/off and has dimming
increments of 1%.
Retails for US $75.95 (No distributor in Australia.)
2.2.2.3 Leviton Occupancy Sensor
The Leviton sensor [22] (shown in Figure 2.11: Leviton
Occupancy Sensor) is capable of sensing motion up to 30
meters away and reporting this back to the host controller.
Retails for US $35.95 (No distributor in Australia.)
-
Chapter 2
17
Figure 2.11: Infinitelan Controller
2.2.2.4 INFINITELAN Single Phase Meter/Controller
The INFINITELAN controller [23] (shown in
Figure 2.12: Infinitelan Controller) allows for
control of loads up to 30 Amps as well as
the monitoring of the power supplied to the
load. The energy use data can be
transmitted in ASCII format back to the host
controller. This device has no local control.
Retails for US $260.00 (No distributor in
Australia.)
2.2.3LonWorks Summary
LonWorks is still very much a controlled proprietary technology. Although the
Neuron chips required in all LonWorks modules can be purchased from
manufacturers including Motorola, the development tools such as the Neuron
C compiler must be purchased directly from LonWorks. The development
tools are expensive.
2.3 CEBus
The CEBus Standard [24] is an open standard, developed and controlled via the
standards processes of the EIA8 and ANSI9. CEBus is designed specifically for
home automation networks and as such all product developments have been
with the home consumer in mind. Within the EIA the standard has the
designation EIA-600.
2.3.1The CEBus Protocol
The CEBus standard implements four of the seven layers of the open systems
interconnection (OSI) model of the International Organisation Standardisation
as shown in Figure 2.13: OSI Model [25].
8 Electronics Industry Association9 American National Standards Institute
-
Chapter 2
18
Figure 2.12: OSI Model
Layer 1: Network Physical Layer
The physical layer exchanges symbols with the data link layer, encoding and
decoding the symbols to and from the medium states. The states required to
represent the symbols are modulated and demodulated with the medium carrier
by the physical layer.
The CEBus standard defines that there are two different states, superior
and inferior. The inferior state is defined as the idle state. To begin a
transmission, the medium starts in the superior state. It then alternates states
for each successive symbol that is transmitted. The length that each state is
transmitted for determines the transmitted signal. There are four different
symbols, logical one, logical zero, end-of-field and end-of-packet. The
transmission lengths for different symbols are Logical One 100ms, Logical Zero
200ms, End-of-Field 300ms and End-of-Packet 400ms.
For the power line medium the superior state is described as a chirp of
noise. The chirp is defined as a signal that changes frequency from 200kHz to
400kHz, and then 100kHz to 200kHz within the space of 100s. The spread-
spectrum chirp is shown in Figure 2.14: Spread Spectrum Chirp.
-
Chapter 2
19
Fig 2.13: Spread Spectrum Chirp
In order to create the different length states for the different symbols, this
100s chirp is repeated to create the required length symbol. Finally, the
frequency sweep means that the chirp is spread-spectrum, which gives the
signal better noise resistance. All data in the CEBus protocol is transmitted in
packets with a header and a message. The header contains information on the
type of service being provided as well as source and destination addresses with
the total length being nine bytes. The packet message can be up to 32 bytes
long. Using the spread spectrum technology transmission speeds of 10kbps
are standard with a low error rate especially when used in the address
acknowledged modes.
Layer 2: Data Link Layer
The data link layer is responsible for receiving all of the packet types:
ACK_DATA, UNACK_DATA, ADR_ACK_DATA, and ADR_UNACK_DATA as
well as rejecting duplicate packets of type ACK_DATA, ADR_ACK_DATA, or
ADR_UNACK_DATA.
It allows the node to recognise its own system and node address and the
broadcast address (system and/or node address = 0000).
-
Chapter 2
20
Layer 3: Network Layer
The network layer is required to generate an ID_Packet when first configured
(addresses installed), upon power-up after being configured, or after system or
unit address changes and generate an ID_Packet if a request for an ID header
is received.
Layer 4: Application Layer
The Application layer contains the Common Application Language CAL. This is
the language by which CEBus devices communicate. The CEBus Application
Language is a set of common language and data constructs created to enable
inter-operation between products used in residential automation. The reasoning
behind CAL is to provide interoperability between different manufacturers
products without prior knowledge of the products.
An easy way to gain a high-level understanding of CAL command syntax
is to view it in terms of object-oriented design. In the world of CEBus devices,
each control within a device may be thought of as an object. For example to
turn up the volume on a radio by three levels, the CAL Control function would
somehow need to deliver a message -- "turn yourself up 3 notches" -- to the
Volume Control Object associated with the radio in question. Upon receiving
the message, the Volume Control Object would add 3 to the value of one of its
instance variables, such as current_volume_level. This action by the object
would then increase the volume of the radio.
CAL bundles one or more of these messages into an Application Layer
Service Data Unit ASDU, and sends it out over the CEBus network. An ASDU
can be sent to one node, a group of nodes, or all nodes on the CEBus network.
Physically, these nodes are associated with particular devices (television,
stereo, VCR, washing machine, light, air conditioner etc.).
CAL Objects are not organised in a class hierarchy. The exact behaviour
of a CAL Object depends on the device context under which it exists. CAL
supports a hierarchy within a device. A device, characterised by its unique Unit
address, is functionally subdivided into contexts. The Universal Context is
always present and handles device level commands, such as naming, and
addressing. The Universal Context contains instance variables that store node
specifications (manufacturer, model, name, class, etc.) as well as node
-
Chapter 2
21
variables (such as power on/off and device online/offline. As well as the
Universal Context, a device may contain one or more additional contexts.
These other contexts represent functional subsystems within the device. Audio
and Tuning are examples of contexts within a television. Contexts are
subdivided into objects. Objects represent particular controls or functions within
a context. Objects are divided into classes which represent common
functionality. For example, an object class 07 (Analog Control Object) may be
used to represent a volume control, a thermostat, or a light dimmer. The exact
function of an object is solely dependent on the context in which the object is
instantiated.
Contexts other than the Universal Context fall under the heading of
Operation Group Contexts. These contexts represent functional subsystems of
consumer devices. Examples of Operation Group Contexts are Audio Context,
Lighting Context, Security Zone Context, and Environmental Zone Context.
Each context specification consists of the name of the context and its ID
number used to address the context within the product. A general description of
the context is given along with possible applications of the context. The objects
that could make up the context are then listed. Not all objects listed in a context
need be provided in a particular implementation of a product.
Each device on a CEBus network has its own address consisting of a
house code and a device address each of which have 64 thousand (216)
addresses.
2.3.2CEBus Products
As CEBus is a protocol specifically targeted at home automation the developed
products are designed with the home consumer in mind. The most
comprehensive range of products developed for the CEBus protocol is the
SmartGear range by GE-Smart [26]. This range is expected to be available in
the USA in the fourth quarter of 2000. Initially the devices will only be for 110
volt systems.
-
Chapter 2
22
Figure 2.14: Manager Plus
Figure 2.15:Smart Switch
Figure 2.16:Appliance Port
2.3.2.1 GE-Smart Manager Plus
The Manager Plus [27] (shown in Figure 2.15:
Manager Plus) is a stand alone programmable
control panel. Devices connected to the network
can be monitored and controlled using an LCD
display and a menu driven interface. The controller
allows for scheduled events as well as inputs from
sensors such as temperature and motion
detection. A separate RF remote provides control
from up to 30 meters away.
Expected retail price US $900.
2.3.2.2 GE-Smart Smart Switch
The Smart Switch [28] (shown in Figure 2.16: Smart
Switch) is capable of turning on/off up to 500W of load
with dimming functionality. The switch can be
controlled locally or remotely over the home network.
The output state can be queried via the network by the
host controller.
Expected retail price US $175.
2.3.2.3 GE-Smart Appliance Port
The Appliance Port [29] (Shown in Figure 2.17:
Appliance Port) plugs into the existing mains power
point and an appliance such as a coffee maker or radio
can be plugged into it. The port can supply a load of
20 Amps on a 110 volt supply. The port can be turned
on/off locally and remotely by the controller.
-
Chapter 2
23
2.3.2.4 GE-Smart Sensor Port
The Sensor Port [30] (shown in Figure 2.18: Sensor
Port) interfaces between sensors such as motion
detectors, light or temperature sensors that have a
digital or analog output and the mains power line.
The data is then available to the central controller via
the network.
2.3.3CEBus Summary
The CEBus protocol and associated products are well placed to be the front
runners in the home automation industry in terms of functionality and range.
CEBus products are unavailable in Australia at present.
2.4 European Home Standard
The European Home Standard [31] is the European equivalent of the American
CEBus Standard. EHS is an open technology and development requires only a
modem chip and a microcontroller. EHS is behind the other standards reviewed
in terms of product development.
2.4.1The EHS Protocol
EHS specifies a network protocol that covers layers 1, 2, 3 and 7 of the OSI
reference model. It also specifies a Network Management section and uses a
spread spectrum chirp to transmit the data [32].
The protocol supports several media: power-line, coaxial cable, twisted
pair, infrared and radio frequency. Initial efforts have been focused on the
power-line medium at 2400 bits/sec.
2.4.2EHS Products
As stated earlier EHS lags competing standards. The only product available for
comparison is the ST7 Development Board (shown in Figure 2.19: EHS
Figure 2.17: SensorPort
-
Chapter 2
24
Development Board) manufactured by Trialog [33]. This board enables
communications over the power line between two ST7 development boards
when connected to a host microcontroller.
Figure 2.18: EHS Development Board
2.4.3EHS Summary
EHS is several years behind other standards at present and is unlikely to be a
dominant force in home automation without the support of a product
manufacturer.
2.5 Review Summary
In this chapter a subset of available home automation protocols and products
were reviewed. From this review it is possible to identify a set of minimum
products and functionality necessary to provide a useful home automation
system for entry level consumers. The three sub-systems of protocol, controller
and modules are each summarised in table 2.1, 2.2 and 2.3 respectively. From
these tables the following minimum set of desired features has been identified:
-
Chapter 2
25
Two way data transmission at an acceptable speed with error and collision
checking.
Scheduled and sensor triggered events.
Internet connectivity allowing remote control and monitoring.
Light switch/dimmer module.
Appliance module.
Motion detector module.
Climate sensor module.
Modules with full two-way communications and local control were applicable.
The derived list of features represents only a small subset of the possibilities
for a home automation system. It is however sufficient for an entry-level
system. From these features a specification for the proposed Auto-MATE home
automation system can be formalised. The complete specification is presented
in Chapter 3.
Protocol Baud Rate error detection
collision detection
Noise immunity
Proprietry software required?
Number of possible
addresses
X-10 10bps no no poor yes 256LonWorks 10kbps yes yes good yes 64k
CEBus 10kbps yes yes good no 64k
EHS 2.4kbps yes yes good no 64k
Table 2.1: Comparison of Home Automation Protocols
Protocol Product 2-Way Internet Connect-
ivity
Event Scheduling
Voice Control
Hand Held
Remote
Cost $US
X-10 Active Home no no yes no yes $133.00X-10 HAL 2000 no yes yes yes no $399.00X-10 Home Seer yes yes yes yes no $80.00X-10 Mister House yes yes yes yes no Freeware
LonWorks i.Lon yes yes yes no no $1,975.00CEBus Smart Manager yes no yes no yes $900.00
Table 2.2: Comparison of Controllers
-
Chapter 2
26
Protocol Device 2-Way Local Control
Cost $US
X-10 Decorator Dimmer
no yes $19.99
X-10 Lamp Module limited yes $32.99
X-10 Appliance Module
no no $13.99
X-10 Eagle Eye Motion
Detector
n/a n/a $24.99
X-10 Powerline Interface
yes n/a $24.99
LonWorks Leviton Dimmer
yes yes $75.95
LonWorks Leviton Occupancy
Sensor
n/a n/a $35.95
LonWorks INFINITELAN 30A controller
yes no $260.00
CEBus GE Smart Switch
yes yes $175.00
CEBus GE Appliance Port
yes yes unavailable
CEBus GE Sensor Port
yes yes unavailable
Table 2.3: Comparison of modules
-
27
Chapter 3
System Design Specifications
Having reviewed the current state of the home automation market it is now
possible to specify the requirements for a new, low cost, reliable, entry level
home automation system to satisfy the vision statement in Chapter 1. An
overview of the complete system requirements will be presented before
detailing the specifications for each of the sub-sections as listed in Chapter 1.
At each juncture the emphasis will be on satisfying the core functionality derived
from the technology review of Chapter 2.
The specifications developed in this chapter will be sufficiently detailed to
allow for the subsequent design of the hardware and software components in
chapters five and six.
3.1 The Auto-MATE System
The Auto-MATE system is intended as a low cost, entry level product. This
means that the system will have the minimum functionality necessary to be a
useful integrated home automation system. From the previous chapter the
minimum specifications for the complete system are:
Reliable two-way mains power communications at an acceptable speed with
minimum transmission errors.
Controller for monitoring system status and handling timed and sensor
triggered events.
Remote control and monitoring of the system using a web interface and e-
mail messages.
Control and sensor modules with local control and load sensing intelligence
where applicable.
-
Chapter 3
28
This minimum set of specifications leads to the block diagram of Figure 3.1:
Auto-MATE Block Diagram.
Figure 3.1: Auto-MATE Block Diagram
In addition to fulfilling the desired functionality the system must also adhere to a
set of design criteria as set out below.
3.2 Design Criteria
The following criteria are necessary to ensure the Auto-MATE system is a
desirable product and does not become quickly redundant.
Functionality
The system has to provide a level of functionality that appeals to the mass
market and not only to enthusiasts. To ensure this the Auto-MATE system is
initially limited to automating only devices that are common to most homes.
Ease of Use
The system must be able to be used by a broad range of people. There is
however a limit on the minimum level of complexity possible in an automated
-
Chapter 3
29
product. A testament to this is the number of programmable VCRs around the
world flashing 12:00. As a benchmark a familiarity with Microsoft Windows
environment is assumed.
Cost
While cost at the prototype stage is not of paramount concern some budgetary
caution must be observed if the product is to be feasible in the long term. The
present cost of an X-10 appliance module in Australia is $79 ($AUS). The
equivalent Auto-MATE module is expected to have superior features so an
initial prototype cost of twice the X-10 cost seems reasonable.
3.3 System Topology
The basic premise of a home automation system is that the automated devices
be linked together so that the action of one device may be dependent on the
state or action of one or more other devices. The interconnection of similar
devices is commonly referred to as a network.
There are three possible network topologys to be considered, these are
Star, Ring and Bus. In Australia power and lighting circuits are radial wired
which precludes the use of a ring network. The use of a Bus would be an
interesting method of control as each module would need to be intelligent
enough to know what other modules require the information they have as well
as being able to know which node can use the network at any time. The use of
a Bus would however prevent any direct control by the home occupant as well
as being unable to provide a gateway into the home for the purposes of external
control and monitoring. The final topology considered then is the Star. This
type of network is predominant in existing home automation systems and is the
preferred network for the Auto-MATE system. With a Star network (shown in
Figure 3.2: Star Topology) all attached modules are controlled by a central
controller. The advantage of a Star system is that nodes can be added or
removed or malfunction at any time without affecting the network.
-
Chapter 3
30
Figure 3.2: Star Topology
Having derived the system topology to be a star network in this section it is
necessary to now specify the requirements for each of the Auto-MATE sub-
systems.
3.4 Central Controller
The central controller is responsible for monitoring and updating the status of
each connected device. In keeping with the design criteria the controller must
provide a user friendly interface to the system. The central controller also
requires an interface to the power lines to enable the mains power
communications.
3.4.1Controller Platform
From the product review of Chapter 2 it can be seen that the most popular
platform for developers of home automation systems is a PC. The only
competitor to the PC based controllers at present is the stand alone controller
such as the GE-Smart Manager.
The choice of a suitable platform for the system controller is dependent
on a wide range of variables such as useability, reliability, cost and extensibility.
The continuing prevalence of Personal Computers in homes makes them an
ideal choice as they can satisfy the useability, cost and extensibility
requirements. The additional cost can be limited to the required software and
-
Chapter 3
31
the interface module to the power line. Adapting an already familiar device
satisfies the useability requirement and a PC iof capable of being extended with
peripheral devices as needed.
The reliability issue is less easily satisfied with the selection of a PC as
the controller platform. The reliability of a PC suffers from software crashes and
power failures. The software crashes can be limited by the use of a dedicated
PC used only for the home automation system. A back up power supply such
as an UPS10 would be required to keep the system running during power
outages. Both of these solutions would add to the overall cost of the system
[34]. As the Auto-MATE system is not intended to control sensitive applications
such as fire alarms the use of a shared PC is acceptable.
3.4.2Modes of Control
The use of a PC as the central controller allows for several modes of control.
From the product comparison the most useful modes of control are local control
at the computer, remote access to the system via the Internet and control from
within the home using voice commands. A GUI11 should be provided to allow
an easy to use interface between the occupant and the Auto-MATE system.
The controller must initiate events based on time scheduled commands or as a
result of inputs from sensor modules.
3.4.3Additional Services
In addition to the modes of control the central controller can perform other
services to enhance the performance of the automation system. If the system is
to be connected to the Internet for the purposes of remote control the same
connection can be utilised for additional purposes. The Auto-MATE system will
include the ability to retrieve information from the Internet. Such information
may include, but is not limited to, weather reports, sports information and
television guides. This information can then be presented to the home
occupant or used by the controller to make decisions such as turning on a
module that controls an irrigation system.
10 Uninterruptable Power Supply
-
Chapter 3
32
3.4.4PC to Power Line Interface
The selection of a PC as the controller platform requires that a dedicated
module must be included into the design to provide a seamless interface
between the computer and the power line. This interface should be able to
connect directly to the computer using an existing IO12 port as well as
connecting to the power line. This connection should appear transparent to the
end user.
3.5 Mains Power Communications
The mains power communications is an integral component of the automation
system. Some existing systems suffer from unreliable, slow communications. It
is unlikely that a home automation system would become a widespread product
with such problems.
3.5.1Reliability
Reliability is probably the most important criteria for an automation system of
any description. The communications protocol must provide error checking for
transmissions with automatic retries on unsuccessful attempts. As the power
line is a noisy environment the transmitted signal should be either spread
spectrum or multi-channel to maximise successful transmissions.
3.5.2Baud Rate
Although most home automation applications are not time critical the
transmission rate should be the maximum possible to allow for possible future
extensions to the home network. At present the best transmission rates are in
the vicinity of 10kbps [35] so this is the specified rate for the proposed Auto-
MATE system.
11 Graphical User Interface12 Inout/Output
-
Chapter 3
33
3.5.3Transmission Distance
According to the AS30013 [36] the maximum distance for a lighting or power
sub-circuit in a residential installation is 50 meters. Therefore allowing for the
central controller and a module to be at the furthest extremities of different
circuits the maximum transmission distance would be 100 meters. Therefore
this distance is the minimum specification for the Auto-MATE system.
3.5.4Network Communications IC
The mains power communications is not possible without the use of a dedicated
network communications chip. The chip selected must fulfil the following
functionality:
Application programmable or allow connection to a host microcontroller.
Support the power line as the Physical Layer.
Provide for automatic retries of unsuccessful transmissions.
Capable of transmission rates of at least 10kbps.
3.5.5Microcontroller
A microcontroller will be required for the purposes of responding to received
commands as well as initiating data transmissions back to the central controller.
The microcontroller may be a host device or embedded in the network
communications chip depending on the hardware implementation. The
microcontroller will need to comply with the subsequent minimum feature set:
8 bit registers
UART serial communications interface
Two external interrupt pins
Analog to digital converter
8 bit timer
20 IO pins
13 Australian Standard 3000 specifies the rules for wiring in Australian installations
-
Chapter 3
34
Sufficient memory for protocol implementation and device control code
written in a procedural language such as C.
3.6 Intelligent Modules
The level of intelligence of the reviewed products varies from devices that can
simply turn on/off when a command is received to devices with full two way
communications and power measurement capabilities. The Auto-MATE
modules are intended to provide features comparable to existing products.
3.6.1Minimum Functionality
The modules must have full two-way communications. By this it is meant that
the modules can respond to commands sent to them as well as initiating
communications when the status is changed locally. When a command is sent
from the central controller the receiving module must respond acknowledging
that the command has been successfully performed. Each device must have a
unique address as well as a group address to enable commands such as all
lights off. The product review of Chapter two identified the minimum sub-set of
possible devices for an entry-level system to be functional. The individual
specifications for each of these devices is detailed below:
3.6.2Light Switch / Dimmer
The light switch must be rated to control a 240 Volt, 10 Amp load. The switch
needs to be capable of turning the load on/off as well as dimming to any one of
ten levels. The switch must be controlled by the central controller as well as
locally at the switch. The switch should default to a safe off state after a power
down reset.
3.6.3Appliance Module
The appliance module is intended to mimic the functionality of the light switch
module without the dimming capability.
-
Chapter 3
35
3.6.4Motion Detector
The motion detector module should sense motion from a distance of at least 10
meters. When motion is detected the central controller should be alerted. The
detector should be able to be activated and deactivated remotely.
3.6.5Climate Sensor
The climate sensor is intended to provide useful information about the local
conditions within the home. This will enable the central controller to make
decisions such as controlling heating and cooling devices. When requested the
sensor should provide a temperature and a humidity reading with reasonable
accuracy.
3.6.6Load Sensing
Most of the home automation devices available do not provide any means of
sensing whether the load has actually been turned on or off. For a device to be
considered intelligent it is not sufficient that it simply switches the load and then
reports back that the task has been performed it must also ensure that the load
is in fact on. As an example the light switch may turn on but if the bulb has
blown the command was not successful. For this reason it is necessary to
include some load sensing hardware into the light and appliance modules.
3.7 Summary of Design Specifications
In this chapter the specifications for each subsection of the proposed system
have been derived. The specifications have been developed to comply with the
both the required functionality and the outlined design criteria. With the
proposed product now specified it is possible to detail the design and
implementation of the final Auto-MATE product. The hardware implementation
is presented in Chapter 4 and the software implementation in Chapter 5.
-
36
Chapter 4
Hardware Implementation
With a set of design specifications now in place the hardware implementation
can be detailed. The hardware design can be divided into several sub-systems
at the lowest level. These sub-systems are first identified and then the actual
implementation is described as the chapter progresses. Each of the hardware
modules for the Auto-MATE system is made up of these building blocks. The
full hardware schematics and PCB layouts are included as Appendix A.
4.1 Overview of Hardware Requirements
The hardware sub-systems required for implementing all of the proposed Auto-
MATE modules are as follows:
1) Mains Power Network Communications circuit.
2) Load switching circuit
3) Load sensing circuit
4) Zero voltage crossing circuit
5) Power supply circuit
6) Local control buttons circuit
7) Host microcontroller
8) Temperature sensor circuit
9) Humidity sensing circuit
10) Motion detector circuit
-
Chapter 4
37
With these ten hardware blocks all of the proposed features of the Auto-MATE
system modules can be implemented. The only exception is the PC / power
line interface module that will be discussed separately.
4.1.1Physical Orientation of Subsystems
Although not all modules require all of the hardware blocks it was decided early
in the implementation process to build generic printed circuit boards capable of
being implemented as any one of the required modules. The hardware blocks
are separated into being either power or control blocks and are incorporated
onto one of two printed circuit boards depending on this designation. The
CEBus Power Module (shown in Figure 4.2: CEBus Power Module) consists of
sub-systems 1 4. The remaining circuitry is located on the CEBus Control
Module (shown in Figure 4.1: CEBus Control Module).
Figure 4.1: CEBus Control Board
A block diagram of the hardware is shown in Figure 4.3: Hardware Block
Diagram.
Figure 4.2: CEBus Power Board
-
Chapter 4
38
PowerLine
ControlledDevice
CEBus PowerlineCoupling
Load Switching
5V & 15V PowerSupply
Zero VoltageCrossingDetection
Load Sensing
Auto-MATEControl Module
Power Board
Microcontroller
Humidity Sensor
TemperatureSensor
Local ControlButtons
Motion Detector
Control Board
Figure 4.3: Hardware Block Diagram.
4.2 Mains Power Communications
The mains power communications component is an integral section of this
thesis project. As set out in section 3.5 of the specifications the
communications must be inherently reliable and reasonably fast. From the
product review of Chapter 2 the possible choices are LonWorks, CEBus or
EHS. Of these three the chosen protocol was CEBus. This implementation
decision was due to the fact that CEBus is a completely open standard and
therefore requires no proprietary development tools. CEBus has the edge over
EHS in terms of available literature and the fact that it has already been proven
in product development. To implement the CEBus protocol using the mains
power lines as the physical layer requires two components. The first is a
CEBus compliant Network Interface Transceiver and its necessary signal
isolation circuitry. The second is a host microcontroller to implement
transmitted commands and data.
4.2.1Network Communications Transceiver IC
The selection of CEBus as the protocol for the mains power communications
enables the implementation to progress to the selection of a suitable network
communications chip. Three CEBus transceiver ICs were considered. These
-
Chapter 4
39
were the SSC P300 PL Network Interface IC from Intellon Corporation [37], the
IT800 Power Line Modem from Itran Communications [38] and the CEWay PL-
111 Power Line Communication Transceiver from Domosys Corporation [39].
The Itran product was quickly disregarded as it does not become available until
the fourth quarter of 2000.
The initial selection was the Intellon SSC P300. This selection was
based solely on availability as an evaluation kit for this chip had been
purchased the previous year for another thesis project [40]. Attempts over a six
week period to communicate over the power lines using the P300 proved
remarkably unsuccessful. The following sections detail the difficulties
encountered with the use of the P300 and the successful implementation of its
successor the CEWay PL-111.
4.2.1.1 The Intellon SSC P300
The evaluation kit contains two EK P300 development boards (shown in Figure
4.3: EK P300 Development Board) and allows for an interface to the power line
through supplied plug packs.
Figure 4.4: EK P300 Development Board
The development board requires connection to a host microcontroller to
initialise the P300 chip and process the data to and from the chip. The P300
-
Chapter 4
40
communicates to the host microcontroller using the SPI14. The host
microcontroller and the network interface controller have a master/slave
relationship. The NIC15 can not send data to the host until commanded to do
so. The NIC can only request service from a host via an interrupt line. The host
must respond to the interrupt request with a command that allows the chip to
return its data. Commands from the host allow the host to read or write the
internal registers of the NIC [41]. When the P300 chip is first powered up or
after a power down reset it is required that the host microcontroller initialise the
Layer_Config_Info data structure. This data structure consists of 7 bytes and
includes such information as the device address. This register is written to by
first sending a Layer Management Write command (0x03) followed by the seven
data bytes. After each data byte has been successfully received by the NIC it
will generate another interrupt to the host which will then send through the next
byte [42]. This process is shown graphically in Figure 4.5: Flow Chart of P300
Initialisation.
Figure 4.5: Flow Chart of P300 Initialisation
14 Serial Peripheral Interface15 Network Interface Controller
-
Chapter 4
41
Figure 4.6: DomoSIP
Difficulties were encountered when attempting to perform this initialisation
routine. It seemed that the required interrupt was not generated by the NIC
every time that a byte was transferred serially from the host microcontroller to
the P300. On some occasions all seven data bytes were transmitted
successfully but most often they were not. This in turn meant that the
microcontroller had no means of knowing when to send the next byte. Attempts
to isolate the problem using a digital oscilloscope and logic analyser seemed to
indicate that the correct signals were on all of the pins and the failure lay with
the Intellon chip. Technical assistance was sought from the Engineers at
Intellon and screen captures of the generated signals were e-mailed to them but
they were unable to explain the lack of interrupts. A query posted to the
comp.home.automation newsgroup provided no solution but it did provoke a
thread dedicated to the unreliability of the Intellon product. Without being able
to even initialise the P300 chip there seemed little else to do than move on to
another product!
4.2.1.2 CEWay PL-111
Having dispensed with the P300 the next (and
preferred) product was the CEWay PL-111.
This is a power line communications transceiver
that implements the CEBus physical and data
link layers. The CEWay PL-111 includes a
proprietary DSP16 for superior performance in
noisy environments. The PL-111 is available in
a pre-mounted package that includes the
necessary amplification and filtering circuitry for
the CEBus spread spectrum chirp to be
transmitted and received. The pre-mounted
package is labelled the DomoSIP Power Line
Interface (shown in Figure 4.6: DomoSIP).
16 Digital Signals Processor
-
Chapter 4
42
The DomoSIP has a twenty pin SIP17 connector which can be simply plugged
into a matching socket to interface with the Auto-MATE PCB.
DomoSIP package necessitates the use of a host microcontroller to
implement the Auto-MATE modules. The DomoSIP board requires a 5 volt and
a 15 volt supply and it communicates to the host using the serial UART18
interface. The DomoSIP still requires additional circuitry to interface with the
power lines. This circuit is discussed next.
4.2.1.3 Peripheral CEBus Circuitry
Domosys provide the circuit schematic for the interface between the power line
and the DomoSIP board. This circuit was successfully implemented. The
circuit consists of a CEBus 12/12 turn transformer 100-400 kHz supplied by
General Magnetic Technologies, a high pass filter formed by R1 and C1 and on
either side of the transformer is a transient voltage surge suppressor indicated
by V1 and V2. The circuit schematic is included in Appendix A: Circuit
Schematics.
4.3 Microcontroller Selection
The selection of the DomoSIP board means that a host microcontroller is
necessary. A number of possible 8-bit devices were considered. The required
features were outlined in the previous chapter but in terms of hardware
development two additional requirements are availability and ease of
implementation. Considered microcontrollers were
Motorola 68HC11
PIC 16F871
ATMEL 90S4414
ATMEL 90S8535
The comparison of features and cost is presented in table 4.1: Comparison of
Microcontrollers.
17 Single Inline Package18 Universal Asynchronous Receiver Transmitter
-
Chapter 4
43
MCUProgram memory
EEPROM RAMExt
InterruptsIO pins
A/D Converter
UART Cost
68HC11 512 bytes none 128 1 40 8-bit yes $2816F871 4k bytes 128 128 1 32 10-bit yes $2090S4414 4k bytes 256 256 2 40 none yes $790S8535 8k bytes 512 512 2 40 10-bit yes $9
Table 4.1: Comparison of Microcontrollers
Of the reviewed microcontrollers the two ATMEL products had the
greatest range of features for the least cost and were available immediately.
The 4414 is ideal for use on the PC / power line interface circuit as this requires
less code and does not need an analogue to digital converter for the
implementation. The 8535 is suitable for the module development and excellent
development resources are available for the ATMEL products in terms of
product data and software compilers [43].
4.4 Load Control
As the Auto-MATE modules are designed to replace existing light switches and
power points within the home they must be capable of switching the loads that
are commonly connected in homes. All Australian homes use switches and
GPOs19 that are rated to a minimum of 10 Amps. Therefore a circuit capable of
switching this load and being controlled by the output of the host microcontroller
is required. For the purposes of light dimming the commonly used phase
control technique is utilised. For this method the load is switched on at varying
points in the AC waveform depending on the level of current and voltage
required. The time that the load is switched depends on a software delay. The
software requires a reference input corresponding to the zero voltage crossing
of the waveform. This is discussed next.
4.4.1Zero Voltage Crossing Detection
This circuit was implemented using a Sharp PC814 AC input photocoupler. The
input is connected via a resistor to the AC supply and the output stage of the
19 General Purpose Outlet
-
Chapter 4
44
coupler is connected to a 5 volt supply and a pull down resistor. During the
period when the AC waveform passes through 0.7 to 0.7 volts the output stage
does not conduct and an external interrupt on the microcontroller is pulled low.
4.4.2Load Switching
The switching of the 10 Amp load is facilitated by the use of a BTA 16 600B
Triac. The Triac is fired by a micro controller output pin through a MOC3041
Optoisolated Triac Driver. A snubber circuit consisting of a 100 Ohm resistor
and a 0.1 F capacitor enables the switching of inductive loads without damage
to the Triac.
4.5 Load Sensing
The load sensing functionality was included to add an element of intelligence to
the Auto-MATE design. The goal was not to provide a power measurement but
to simply give an indication of whether the load was connected. This circuit was
implemented by placing two power diodes in series with the connected load.
This provides a 1.4 volt drop across the diodes while current is conducting
through the load. A series combination of a Sharp PC814 photocoupler and a
100 Ohm resistor is placed in parallel with the diodes. While the current is
conducting the output stage of the 814 is conducting and a microcontroller pin is
held high.
4.6 Local Control Buttons
The Auto-MATE modules that are used for controlling lights and appliance loads
require local control at the switch or outlet. This was implemented simply using
a pushbutton for each operation (these being on, off, increment & decrement).
Each pushbutton is connected to an input pin of the microcontroller as well as
an input pin to a 74HCT02 CMOS NOR gate. The output of the NOR gate
generates an external interrupt on the host microcontroller then differentiating
between buttons is performed in software.
-
Chapter 4
45
4.7 Power Supplies
The Auto-MATE boards require a 5 volt and a 15 volt rail. These voltages are
supplied from a 240:18 volt transformer through a rectifier and then regulated
using a MC7805 and a MC7815 regulator respectively.
4.8 Temperature Sensing Circuit
As a feature of the Auto-MATE system a temperature sensing module allows for
control of climate sensitive devices to be activated or deactivated. The
temperature sensor selection was based on cost. The most economical sensor
available was the LMM 355 National Semiconductor [44]. This device produces
as linear change in output voltage for a change in temperature and has an
accuracy of 1 degree. The output of this sensor is connects to the A/D
converter input of the microcontroller.
4.9 Humidity Sensing Circuit
The humidity sensor selection was also based on cost. The chosen sensor was
the HU10 from Thermometrics [45]. This sensor provides a linear voltage
output with changes in humidity between 20 and 100 percent.
4.10Motion Detector Circuit