You are on page 1of 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/254052276

Home appliances management system using Controller Area Network (CAN)

Article · October 2011


DOI: 10.1109/APCC.2011.6152937

CITATION READS

1 17,647

4 authors, including:

Chee Kyun Ng Nor Kamariah Noordin


Universiti Putra Malaysia Universiti Putra Malaysia
121 PUBLICATIONS 1,397 CITATIONS 189 PUBLICATIONS 1,980 CITATIONS

SEE PROFILE SEE PROFILE

All content following this page was uploaded by Chee Kyun Ng on 29 April 2014.

The user has requested enhancement of the downloaded file.


2011 17th Asia-Pacific Conference on Communications (APCC)
2nd – 5th October 2011 | Sutera Harbour Resort, Kota Kinabalu, Sabah, Malaysia

Home Appliances Management System using


Controller Area Network (CAN)
Kent How Teh, Wei Lun Ng, Chee Kyun Ng and Nor Kamariah Noordin
Department of Computer and Communication Systems Engineering, Faculty of Engineering,
Universiti Putra Malaysia, 43400 UPM Serdang, Selangor, Malaysia
{kent5244, william_2909}@hotmail.com, {mpnck, nknordin}@eng.upm.edu.my

Abstract— Smart homes can be a potential application which disabilities [2]. These situations have led to the invention of
provides unobtrusive support for the normal users, elderly or smart home system.
disabled that wants to promote independent living. Generally,
smart home consists of various sensors, controllers and home Smart home system is normally deployed in buildings with
network that are placed around the house. This paper presents a the purpose of enhancing safety, comfort, communication and
simple home networking system by using Controller Area power saving with less human interaction. It usually consists of
Network (CAN) as the main communication protocol to manage sensors and actuators. Sensor is used to collect data from the
multiple home appliances. The proposed management system physical environment while actuators are meant to make
consists of three main components: central controller subsystem decisions based on the information gathered by the sensors [3].
(CCS), CAN module and relay module. CCS is a simple server A network is also required for the purpose of establishing
where a simple graphical user interface (GUI) is built with communication between sensors and actuators [4]. As the
multiple command buttons to obtain the user inputs. The CAN technologies become advances, the current smart home system
module is distinguished as either master CAN node or slave CAN has been developed to be more flexible and adaptable to the
node. The master CAN node is a CAN module that is attached to changing lifestyles [5].
CCS. In contrast, the CAN module that attached to the home
appliance is known as slave CAN node. The user input signal that From the rapid advancement in technology, various type of
contains a CAN data frame broadcasts from master CAN node to information can be shared easily, efficiently, and effectively
all slave CAN nodes via CAN bus. Each data frame consists of an through networking. There are many communication networks
identifier that is compared by each slave CAN node. If the such as local area network (LAN), power line communication,
identifier is not matched, the signal will be discarded by the slave ZigBee and so on are suitable to be implemented as the smart
CAN node. Otherwise, the slave CAN node will decode the data home network. LAN generally provides high-bandwidth
frame and execute the given command. The relay module of this communication over inexpensive transmission media such as
slave CAN node will either switch ‘ON’ or ‘OFF’ the twisted pair, coaxial cable and fiber optic. However, a set of
corresponding home appliances. The proposed management software protocols which is necessary to be implemented in the
system using CAN has the advantages of being simple in its host computers to enable the LAN to transmit and receive the
design which contributes to the overall low cost. Moreover, the
control data from one host or device to another via the
CAN network system is immune from the electrical interferences.
transmission mediums of the network. The software protocols
Finally, the experimental results have shown that the proposed
system is operating accurately and efficiently.
are the integral part which functions at various levels, starts
from low level packet transport protocols to high-level
Keywords- Home appliances; CAN; identifier. application protocols [6].
Traditionally, power lines are only intended for conveying
I. INTRODUCTION electrical power to devices and not designed for delivering
Nowadays, advancement in technologies allows people to high-frequency signals. Although the advancement of signal
conveniently execute complicated or tedious tasks with just a modulation and error control coding techniques have made
simple click. It’s obvious that researcher incorporates these power line communication (PLC) become possible [7], it is not
technologies to ease the daily household chores. Various home suitable for signal transmission due to noise and interference in
appliances are created to help people to complete certain tasks the power line channel. Consequently, power line signal
in providing comfort environment and offering entertainment transmission will encounter variety of characteristic
[1]. Nevertheless, people still needs to manage their home impedances. ZigBee is the first industrial standard using
appliances in order to complete certain tasks as the current wireless personal area network (WPAN) technology that
home appliances are yet “intelligent” enough to be operated provides short range, low power and low data rate
automatically with certain condition. Moreover, the elderly and communication, and also supports mesh networking and multi-
disabled people also request a system that could help them to hopping. However, ZigBee networks are primarily intended for
manage their daily tasks such that the burden for the caregivers low duty-cycle sensors especially for those active for less than
would be reduced. Hence, a “smart” system needs to be 1% of the time [8], [9].
developed and deployed in house in order to improve the living In this paper, a simple and reliable smart home system to
standard of people especially for elderly and people with control multiple home appliances is presented. The proposed

978-1-4577-0390-4/11/$26.00 ©2011 IEEE 899


home appliances management system is using Controller Area
Network (CAN) as the main communication protocol to
operate the home appliances. The developed home networking
system consists of three main subsystems such as central
controller subsystem (CCS), CAN module and relay module.
In the CCS server, the generated commands to control multiple
home appliances are obtained when user click on the provided
options that are available on the developed Graphical User
Interface (GUI).
The CAN module can be either master CAN node or slave
CAN node. The generated signal from CCS will be then
transmitted to master CAN via serial communication bus. The
master CAN node encodes the received signal into CAN data (a)
frame and broadcasts it in the CAN bus. The slave CAN nodes
that are attached to various home appliances will receive the
CAN data frame via the CAN bus. An identifier is then
extracted from the data frame in each slave CAN node. This
identifier will compare with the identifier of each slave CAN
node. If the identifier is not matched, the signal will be
discarded. If it is matched, the slave CAN node will decode the
received data frame and execute the given command. The relay
module of this slave CAN node will switch ‘ON’ or ‘OFF’ the
attached home appliance when it is triggered.
The rest of this paper is organized as follows: Section II
presents the overview of CAN. Section III presents the
proposed system overview by utilizing CAN in a smart home (b)
network. The obtained results and a brief comparison of CAN
to other network protocol are shown in Section IV. Finally, this Figure 1. Data transmission methods; (a) traditional wiring and (b) CAN.
paper is concluded in Section V.
A. CAN Protocol
II. CAN OVERVIEW The CAN system uses carrier sense multiple access with
Controller Area Network or so-called CAN is a serial bus collision detection (CSMA/CD) and arbitration on message
that utilizes broadcast method to transmit messages across all priority as its communication protocol. This communication
CAN nodes. It uses a serial control protocol which provides protocol allows every node in CAN to monitor the network bus
reliable, efficient and economic link between devices to in advance before attempting to transmit a message. When no
support the distributed real time applications by using a bit- activity occurs in the network, each node has the same
wise deterministic collision-resolution mechanism. It was opportunity to transmit a message. Additionally, this
originally developed in the 1980s by Robert Boush as an communication protocol allows collision to be solved by using
alternative data communications for interconnecting the control bit-wise arbitration. It is based on a pre-programmed priority of
components in automotive vehicles [10]. each message in the identifier field of a message. This
configuration allows the messages to remain intact after the
Prior to CAN technology, all manufacturers used to connect
arbitration is completed even if collisions are detected. In order
devices within vehicles using point to point wiring systems.
for the arbitration process to be successful, the logic states need
Wiring started to become more complex, bulky, heavy and
to be defined as dominant or recessive. An example of CAN
expensive as more electronics and controllers are deployed in a
arbitration can be seen in Figure 2 when three nodes are
vehicle. This problem can be seen in Figure 1(a), where the
assumed to be transmitting simultaneously.
abundance of wiring is required which makes the whole circuit
even more complicated. CAN system can solve this problem by
utilizing a twisted pair cable to communicate with each other as
shown in Figure 1(b) [11].
Initially, it was designed to allow the microcontrollers and
devices to communicate with each other within a vehicle
without a host computer. It has been fast gaining wide
appreciation with further applied in various automation
industrial including military, aviation, electronics, factories and
many others due to its high immunity towards electrical
interference, and the ability to self diagnose and repair the data
errors. Additionally, the low cost, performance and
upgradeability to provide tremendous flexibility in the system Figure 2. CAN arbitration.
design add to its many advantages [12].

900
When three nodes start transmitting their start of frame C. CAN bus
(SOF) bits simultaneously, the Nodes 1 and 2 stop transmitting CAN bus is the transmission medium between CAN nodes.
as soon as they transmit bit ‘1’ (recessive level) while Node 3 It is made out of a simple pair of copper wire which can be
is transmitting bit ‘0’ (dominant level). At this instance, Node 3 terminated by a simple 120 Ω resistor. The purpose of the
will continue its transmission when the identifier of bit ‘0’ has termination is to minimize or prevent the signal reflection at
been transmitted while Nodes 1 and 2 are entering into the the end of the bus that would cause interference to the system.
receiver mode which indicated in grey colour. The CAN Hence, the CAN bus can be perfectly implemented in
protocol is defined with the ISO standard of 11-bit identifier environment which produce serious noise. Prioritized messages
that provides for the signalling rates from 125 kbps to 1 Mbps. of up to eight bytes in data length can be sent on a multi-master
This standard is later improved to allow for larger number of serial bus by using an arbitration protocol and an error-
bit with the "extended" version of 29-bit identifier. The 11-bit detection mechanism for a high level of data integrity. The
identifier standard provides 211 or 2048 different message transmission rate is depended on the bus length. For a bus
identifiers while the extended 29-bit identifier standard smaller than 40 meters the transmission rate is up to 1 Mbps
provides 229 or 537 million identifiers. The data format of both [14].
standards can be seen in Figure 3 [12].
According to the ISO-11898 standard, the CAN bus must
be terminated with a characteristic impedance of 120 ohms.
There are three methods to terminate the CAN bus such as
standard termination, split termination and biased split
termination. The standard termination method is the most
(a) common termination method which places a 120 Ω resistor at
each end of the CAN bus as shown in Figure 5(a). The split
termination method is gaining its popularity since it allows
reducing emission. In this termination method, at the end of the
CAN bus is split with 60 Ω resistor as shown in Figure 5(b).
(b) The biased split termination method is similar to split
termination method except that a voltage divider circuit and a
Figure 3. Frame format of (a) standard CAN and (b) extended CAN. capacitor are used at either end of the CAN bus as shown in
Figure 5(c). This method increases the electromagnetic
B. CAN node compatibility (EMC) performance of the CAN bus [14].
CAN consist of several CAN nodes that are linked to each
other through CAN bus. The composition of each CAN node is
similar which included CAN transceiver, CAN controller and
microcontroller. The CAN transceiver is fault-tolerant device
that serves as the interface between CAN controller and CAN
bus while provides differential transmit and receive capability
by using CAN protocol. The CAN controller serves as an (a)
interface between CAN transceiver and microcontroller. It is
responsible for the CAN frame conversion. Microcontroller is
the front end device which interacts with the system controller.
Only one CAN node so-called master CAN node will transmit
its data to the CAN bus at a time, while others which known as
slave CAN nodes will become receiver nodes. Thus, the CAN
protocol is governing the flow of the signal in the CAN bus to
avoid bus conflict. Figure 4 shows the overview of a CAN
node which is attached to the CAN bus [13].

(b) (c)

Figure 5. Can bus termination methods; (a) standard, (b) split, and (c) biased
split.

III. SYSTEM DESIGN OVERVIEW


The popularity of CAN system has been increased due to
the flexibility of its implementation in various automation
applications. The home appliances automation system in smart
home is one of its applications. The CAN system can be
incorporated to become a backbone for all home appliances in
a home networking environment. This system is intended to
Figure 4. Overview of CAN node.
offer a smooth data transmission which allows the home users

901
to monitor and control the home appliances. In this section, we 232 sequence of marks and spaces is not generated in the right
present the system designs in the implementation of home timing.
appliances automation system using CAN home networking.
The overall of the proposed system is divided into three B. CAN module
subsystems; central controller server, CAN module and relay The CAN module functions as the controller of the smart
module as shown in Figure 6. The proposed system is home system. This module is divided into two categories
developed with an assumption that the current home appliances namely master CAN node and slave CAN node. Both master
are mostly controlled by turning it ON and OFF. and slave CAN nodes consist of CAN transceiver (MCP 2551),
As shown in Figure 6, the personal computer (PC) acts as CAN controller (MCP 2515) and microcontroller (PIC
the CCS where a simple developed GUI has been stored into it. 16F877A). The overall CAN module layouts with the master
There are many options available in GUI to be selected which and slave CAN nodes that linked together by a CAN bus are
will produce different commands to control the home shown in Figure 7.
appliances. Initially, the CCS will send the command signals to MCP 2551 is a CAN device that serves as the interface
the CAN module which known as master CAN node through a between a CAN controller and the CAN bus. The function of
serial bus. The received command signal will then trigger the the MCP 2551 is essentially to convert the generated digital
microcontroller in the master CAN node to transmit a packet of signals by a CAN controller to signals that are suitable for the
signal which consists of a few important parameters (e.g. transmission over CAN bus. On the other hand, MCP 2515 has
Identifier, data, etc) to the whole home network via CAN bus. different functionality between master and slave CAN nodes.
All the home appliance CAN nodes or slave CAN nodes In the master CAN node, it helps to encode the signal from PIC
which are connected to the CAN bus will receive the CAN data 16F877A microcontroller to CAN data frame as shown in
frame. The data frame will be decoded by each CAN node to Figure 8(a). In the slave CAN node, the MCP 2515 decodes the
extract the important data which included identifier for CAN data frame received from the MCP 2551 to the signal that
matching process. When the identifier of the data frame signal microcontroller can understand. The transition process is
matches with the identifier that is allocated for the particular illustrated in Figure 8(b).
CAN node, the microcontroller of this CAN node will trigger
events according to the received command data. In this case,
the relay module of this CAN node will turn to ‘ON’ or ‘OFF’
accordingly.

(a)

Figure 6. An overview of the developed smart home system.

A. Central Controller Server (CCS)


CCS consists of a standalone PC with a stored smart home
GUI system to communicate with the master CAN node via RS
232 serial bus. The main function of CCS is to provide
simplicity and convenient for the user to perform certain action
according to the given input. In order for the master CAN node
to receive the command signal from CCS, MAX 232 is
necessary. The MAX 232 IC contains dual driver/receiver in a (b)
same package to adapt the RS 232 signal voltage levels to the
TTL logic. In other words, it converts the command signal in Figure 7. CAN module circuit diagram; (a) master CAN node and (b) slave
RS 232 to a signal that recognized by the microcontroller. CAN node.
Thus, converting voltage signal is the prime function of
MAX232. Since it acts just a driver/receiver, the necessary RS

902
IV. EXPERIMENTAL RESULTS
There are several experiments have been carried out to
verify the system’s accuracy and efficiency. The accuracy test
is carried out in order to determine the deviation of received
signal from the original signal. As for the efficiency test, it is
conducted to determine the time taken for the CAN data frame
to propagate from one end of the CAN bus to another end.
The accuracy and efficiency tests are carried out by using a
(a)
digital oscilloscope to measure the transmission time of CAN
data frame at the master CAN node to the slave CAN node
with different CAN bus lengths during a signal transmission.
The assessment has used five CAN bus with different lengths
of 4m, 8m and 20m as shown in Figure 10.
From the results, the signals on channel 1 and channel 2 for
each CAN data frame transmission are identical. This indicates
that the time delay is insignificant for CAN data frame
transmission over the CAN bus with length ranging from 4m to
20m. Hence, the efficiency for CAN data frame transmission
(b) can be concluded as very high.
Figure 8. CAN data frame codec processes; (a) encoding and (b) decoding.

C. Relay module
The relay module is used as a switching mechanism that turns
‘ON’ or turns ‘OFF’ the home appliances that connected to it.
The input signal of the relay module is come from
microcontroller of the slave CAN node which normally ranged
from 4.5V to 5V. A relay is an electromagnetic switch that is
actuated by an electrical current. Inside a relay there are two
types of circuit: coil circuit and normal circuit as shown in
Figure 9. When a current flows through the coil circuit, an
electromagnetic force will be produced. This force will then
pull the metal piece down in order to close the normal circuit.
This situation will make current to flow from the normal circuit
and thus turning ON an electrical device.

(a)

Figure 9. The working principle of relay module. (b)

903
V. CONCLUSION
In this paper, the home appliances management system
using CAN as the main communication protocol to control
multiple home appliances has been presented. Based on the
experimental results, the proposed system has the capability of
controlling home aplliances acurately and effectively with
minimal time delay. Moreover, the proposed system has the
advantages of being simple in its design which contributed to
the overall low cost. Also, by using CAN, the network system
is free from electrical interferences as it is immune to it.

REFERENCES
[1] M. G. Golzar, and H. Tajozzakerin, “A New Intelligent Remote Control
System for Home Automation and Reduce Energy Consumption,”
Fourth Asia International Conference on Mathematical/Analytical
Modelling and Computer Simulation (AMS 2010), pp. 174 - 180, 26 - 28
May 2010.
(c)
[2] Y. Jasemian, “Elderly Comfort and Compliance to Modern
Telemedicine System at Home,” Second International Conference on
Figure 10. The accuracy and efficiency tests with different lengths of CAN Pervasive Computing Technologies for Healthcare, pp. 60 - 63, 2008.
bus (a) 4m, (b) 8m and (c) 20m.
[3] S. Dengler, A. Awad, and F. Dressler, “Sensor/Actuator Networks in
Smart Homes for Supporting Elderly and Handicapped People,” 21st
On the other hand, Table 1 shows the comparisons between International Conference on Advanced Information Networking and
CAN, PLC and LAN. The price for developing a CAN node is Applications Workshops, vol. 2, pp. 863 - 868, 21 - 23 May 2007.
about RM 60 which is lower compared to the PLC and LAN. [4] V. Ricquebourg, D. Menga, D. Durand, B. Marhic, L. Delahoche, and C.
In terms of transmission medium and rate, CAN uses a twisted Loge, “The Smart Home Concept: Our Immediate Future,” 1ST IEEE
copper pair that is capable to make transmission with a rate of International Conference on E-Learning in Industrial Electronics, pp. 23
- 28, 18 - 20 December 2006.
1 Mbps. Although PLC and LAN provide higher transmission
rate compared to CAN, they have not been selected because [5] T. Yamazaki, “Beyond the Smart Home,” International Conference on
Hybrid Information Technology, vol. 2, pp. 350 - 355, 11 December
low transmission rate is sufficient to control low consuming 2006.
data without significant time delay. [6] D. D. Clark, K. T. Pogran, and D. P. Reed, “An Introduction to Local
Area Networks,” Proceedings of the IEEE, vol. 66, no. 11, pp. 1497 -
Moreover, CAN has added advantages such that it is 1517, 1978.
immune to electrical interference compared to PLC which is
[7] K. S. Surendran, and H. Leung, “An Analog Spread-Spectrum Interface
susceptible to electrical interference. Also, LAN is vulnerable for Power-Line Data Communication in Home Networking,” IEEE
to interference from other transmission source. Nevertheless, Transactions on Power Delivery, vol. 20, no. 1, pp. 80 - 89, Jan. 2005.
the coverage area for CAN is not restricted compared to LAN [8] S. Dagtas, G. Pekhteryev, and Z. Sahinoglu, “Multi-Stage Real Time
and PLC. A home appliance can be controlled as long as it is Health Monitoring via ZigBee in Smart Homes,” 21st International
attached to the CAN node which is connected to the CAN bus. Conference on Advanced Information Networking and Applications
Workshops (AINAW 2007), vol. 2, pp. 782 - 786, 21 - 23 May 2007.
[9] X. H. Li, K. L. Fang, J. G Gu, and L. Zhang, “An Improved ZigBee
TABLE I. COMPARISON BETWEEN CAN, PLC AND LAN. Routing Strategy for Monitoring System (ICINIS 2008),” First
International Conference on Intelligent Networks and Intelligent
Network Systems, pp. 255 - 258, 1 - 3 Nov. 2008.
CAN PLC (old) PLC (new) LAN
[10] R. B. GmbH, “CAN Specification,” version 2.0, 1991.
Cost (RM)
60 150 - 250 150 - 250 100 - 200 [11] K. Pazul, “Controller Area Network (CAN) Basics,” Microchip
per node
Twisted Existing Existing Technology Inc, 1999.
Transmission Twisted
copper wire electrical electrical [12] S. Corrigan, "Introduction to the Controller Area Network (CAN),"
medium pair cable Texas Instrument, Application Report, July 2008.
pair wiring wiring
Transmission Up to 50kbps to Up to Up to [13] M. Farsi, K. Ratcliff, and M. Barbosa, “An Overview of Controller Area
rate 1Mbps 350kbps 14Mbps 1Gbps Network”, Computing & Control Engineering Journal, vol.10, no. 3, pp.
High Susceptible 113 - 120, August 1999.
Susceptible Susceptible
immunity to interference [14] J. Liu, G. Y. Hu, and X. H. Wen, “DSP and CAN Bus Based Induction
Interference to electrical to electrical
electrical from other Motor Control in Electrical Vehicle Application,” Sixth International
interference interference
interference source Conference on Electrical Machines and Systems (ICEMS 2003), vol. 2,
Any area as Any area as pp. 585 - 587, 2003.
Any area as Any area as
long as the long as the
long as the long as the
Coverage device is device is
device is device is
Area connected connected
connected connected
to PLC to PLC
to CAN bus to router
adapter adapter

904

View publication stats

You might also like