Unit2 (SSA)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

2.

1
9602-ARUNACHALA COLLEGE OF ENGINEERING FOR WOMEN

UNIT 2 -HOME AUTOMATION


Home Automation – System Architecture - Essential Components- Design
Considerations: Control Unit, Sensing Requirements, Communication, Data
Security.
2.1 HOME AUTOMATION
Home automation is a method of controlling home appliances automatically
for the convenience of users. This technology makes life easier for the user, and
saves energy by utilizing devices according to strict requirements. Controls can be
as basic as dimming lights with a remote or as complex as setting up a network of
items in the home that can be programmed using a main controller or even via cell
phone from anywhere in the world. Home automation works on three levels:

1. Monitoring: Monitoring means that users can check in on their devices through
an app.For eg, someone could view their live feed from a smart security camera.

2. Control: Control means that the user can control these devices remotely, like
planning a security camera to see more of a living space.

3. Automation: Finally, automation means setting up devices to trigger one


another, like having a smart siren go off whenever an armed security camera
detects motion.

A home automation system can involve switching off electrical appliances like air-
conditioners or refrigerators when a desired temperature has been reached, then
switching on again when the temperature has crossed a certain value. A home
automation system can also be used to secure a house from burglars by sending
alerts to the nearest police station and the homeowner in case a trespasser is
sensed.
2.2
9602-ARUNACHALA COLLEGE OF ENGINEERING FOR WOMEN

Apart from algorithmic automation, devices can be controlled by the user to suit
personal requirements using direct buttons, cell phones, the internet, or infrared
remotes. A network of appliances and sensors can interact with each other and
make decisions for operation.
2.3
9602-ARUNACHALA COLLEGE OF ENGINEERING FOR WOMEN

2.2 ARCHITECTURE OF HOME AUTOMATION

In this star topology-based home automation system consists of two types


of control units,

1. Central control unit (CCU)


2. Multiple Room control unit (RCU)

Figure 2.1: Star topology system architecture of Home Automation

Central Control Unit: The Central Control Unit is the hub and brain of a home
automation system. Common features of a central control unit are:

 Measuring the current environmental conditions using the various sensors and
control the lights and fans of rooms accordingly
 Receiving instructions from a remote user over GSM or Ethernet and controlling
an appliance in a specific room as per the received instructions
 Controlling appliances based on time, such as automatically switching off a
television at a specific time
2.4
9602-ARUNACHALA COLLEGE OF ENGINEERING FOR WOMEN

 Monitoring the current state of power and switch off appliances to protect them
when a power fault is detected
 Informing remote users when an intrusion is detected or when some fault is
detected in the system

Room Control Unit

A Room Control Unit controls the appliances in a particular room. It has a set
of sensors to sense the surrounding environment. Based on the current conditions,
it can decide upon a course of action. Common features of a room control unit are:

 Monitor the current environmental conditions using the various sensors and
communicate this data to the CCU
 Receive instructions from the CCU and control appliances in the room as per the
received instructions
 Control appliances based on inputs from a hand-held remote
 Control appliances based on inputs from user buttons

Central control unit:

This is the main unit responsible for monitoring the complete home
automation system. It interfaces with other system blocks to perform required
tasks. The most common interfaces on a CCU are shown in Figure 2.2. Some of
these interfaces are optional and are used as per the system and user requirements.
2.5
9602-ARUNACHALA COLLEGE OF ENGINEERING FOR WOMEN

Figure2.2: System architecture of Central control unit

Different blocks found in a typical central control unit are:

i) Sensors: Sensors are the eyes of a home automation system. They “see” the
environment and convert what they find into an electrical quantity that can be
measured by a microcontroller or system processor. Basic home automation
sensors include temperature sensors, humidity sensors, light sensors, and gas
sensors. Data in the form of signals from these sensors can be used to control the
various appliances directly without any human intervention. For example, lights
can be automatically switched on upon sunset, an air conditioner can be switched
off automatically when no movement is detected in the house for a half hour, or an
alarm can be raised when the system detects a LPG leakage event.

ii)Analog Front End (AFE): Each sensor converts the change in a physical
parameter such as temperature or light intensity to a similar change in electrical
parameters such as resistance or capacitance. These physical quantities must be
converted to a voltage equivalent so that the microcontroller can identify the
variation in environment. For this purpose, an analog front end (AFE) is interfaced
with analog sensors. The AFE preconditions output signals coming from the
sensors by filtering out noise and providing required gain to the signals. AFEs are
2.6
9602-ARUNACHALA COLLEGE OF ENGINEERING FOR WOMEN

also required to calibrate the system for sensor readings, thus providing a base
value for the system to identify any changes in the environment.

iii) Remote Connectivity: Depending on need and various design considerations,


users may need to be able to control the system and appliances remotely. The two
most common ways of doing this are using GSM-based mobile telephony and the
Internet. GSM, Ethernet, or both interfaces can be used to communicate with the
system from a remote location. The system can also send or “push” useful
information to users such as periodic updates, faults, intrusions, etc. These
connectivity options generally require a serial communication protocol like SPI or
I2C to communicate with the host processor.

iv)Local Connectivity: The Central Control Unit and Room Control Units need to
communicate with each other periodically as well as when events occur. There are
multiple options available to establish communication between the CCU and RCUs
that can be decided upon based on system cost and topology, including Bluetooth,
RF transceivers, and XBEEs, among others. Each of these interfaces has its own
pros and cons, hence system designers need to consider all of a system’s
requirements before selecting a particular interface.

v) Manual Control: In a typical home automation system, there are situations


when the user needs to manually control one or more appliances. Keypads and/or
infrared remotes are most commonly used to provide system control to users.
Manual user control should be authorized by the system to prevent control of the
system by an intruder and the shutting down of intrusion alerts.

vi) Real Time Clock (RTC): Home automation systems must be able to control
appliances based on time. An accurate time source is required to control appliances
using time-based settings. An external RTC can be used to maintain time for the
2.7
9602-ARUNACHALA COLLEGE OF ENGINEERING FOR WOMEN

system and the central controller can access it to receive current time related
information.

vii)NFC Interface: Near Field Communication (NFC) is used for close proximity
communication. This technology is quickly gaining traction in embedded
applications for communications and information sharing. It can be used to at the
main door to lock or unlock the door using the homeowner’s NFC-enabled
smartphone.

viii) Power Monitor: In any house there are many electrical appliances that are
sensitive to voltage fluctuations and need a reliable supply voltage within a
specific range to work as expected. A power monitor block can be added to the
Central Control Unit to check the instantaneous power supply voltage. This block
brings down the voltage level of power supply to a level where the system can
monitor it using an ADC. Using input from this block, the controller can detect low
voltage, high voltage, and voltage fluctuation situations. In extreme cases, this
block can instruct RCUs to switch off sensitive appliances to prevent damage. An
example of a simple power monitor circuit is given in Figure2.3 and can be easily
implemented into automation systems.

Figure 2.3: Power Monitor:


2.8
9602-ARUNACHALA COLLEGE OF ENGINEERING FOR WOMEN

In the power monitor circuit, the potential divider circuit brings down the mains
voltage to a lower voltage which can be safely measured by a microcontroller
ADC. The peak detector circuit creates an envelope on the scaled down voltage
that gets measured. The protection diode protects the microcontroller by limiting
the maximum voltage to its Zener Voltage (Vz).

Room Control Unit (RCU)

The room control unit is responsible for controlling the appliances installed in
a particular room. This unit receives control commands from the central control
unit and also from user buttons that can directly control appliances. The room
control unit can also have various types of sensors built in to locally monitor the
appliances in the respective room. If the RCU has an IrDA interface, the user can
control appliances using an infrared remote. Optionally, if Bluetooth is used for
local communication, then the user can control the system using a smart phone.

An RCU is an auxiliary unit responsible for monitoring local environmental


conditions and controlling local appliances connected to the unit. RCUs are
essential for a large house with multiple rooms. These units communicate the local
environmental conditions to the central control unit, and also control the local
appliances based on commands from the CCU. This unit interfaces with other
blocks in the system to perform the required tasks. A block level diagram and
description of a RCU is given in Figure 22.4.
2.9
9602-ARUNACHALA COLLEGE OF ENGINEERING FOR WOMEN

Figure 2.4: Block diagram of Room control unit

Buttons: These buttons are provided to directly control the appliances, enabling
the user to directly switch on or off any appliance using a switchboard. These
buttons also serve as an emergency control panel incase the CCU system fails.

Infrared sensor & decoder: These blocks provide an interface for commonly
used, handheld infrared remotes.

Relay drivers: The relays needs ~100mA of current to activate, so relay drivers
must have the required drive strength to power the relays. These also protect the
controller from the inductive kick generated in the relays.

Building your system: the programmable SoC approach


SoC architectures can integrate most of the functionality of a system into a single
chip, reducing both time-to-market and bill of materials (BOM) costs. Integrating
in this manner also makes the system more difficult to reverse engineer as the
implementation is hidden within the chip. In addition to accelerating design, SoCs
provide several business-level advantages:
2.10
9602-ARUNACHALA COLLEGE OF ENGINEERING FOR WOMEN

Lower Cost: The total cost of integrated components can be substantially more
than that of a single SoC.

Faster time-to-market: An SoC reduces the time required for a product to reach
market given that designers are able to work with a smaller system with fewer
external components.

Simplifed system modification: Multiple home automation systems can be


designed based on the same SoC because of the availability of different interfaces
and features. This increases the benefit of using a SoC in a system as the
architecture can remain the same, enabling design to become more plug-and-play.
Using a single device can reduce component count to provide a more compact
solution.SoCs offer different levels of integration. For example, the PSoC family
of MCUs from Cypress integrate most of the components a home automation
system needs, requiring only the external sensors and a limited number of passive
components. In addition, Universal Digital Blocks (UDBs) with in the PSoC
architecture provide programmable hardware logic for even greater integration by
enabling designers to integrate custom digital logic in Programmable Logic Blocks
(PLD).

Requirements for the system

 ADC to sample multiple sensors


 SPI communication interface to various peripherals
 I2C communication interface to RTC
 Hex keypad Interface
 IrDA interface for infrared remotes
 Output pin to drive the driver circuitry
2.11
9602-ARUNACHALA COLLEGE OF ENGINEERING FOR WOMEN

System Level Integration:

To aid in developing with SoC architectures, silicon manufacturers offer


specialized tools to facilitate managing communication and data flow throughout
the SoC as well as create reliable firmware and configure programmable logic
resources. For example, Cypress’ PSoC Creator provides a graphical design
interface that allows developers to quickly utilize pre-qualified, production-ready
components with simplified configuration and easy-to-use APIs.

Figure 2.5: Architecture for home automation system as shown in PSoC Creator
The above Figure2.5 shows a complete home automation system design. The
various components used include: ADC: The ADC is used to take the readings
from the temperature and gas sensors, sample the sensors, and provide a digital
value which the CPU can use to make intelligent control decisions.

Thermistor: This component provides an API to convert the digital reading of the
temperature sensor into temperature.
2.12
9602-ARUNACHALA COLLEGE OF ENGINEERING FOR WOMEN

SPI: The SPI component directly interfaces with the various peripherals like NFC,
Ethernet, etc. This interface uses an additional de-multiplexer to address multiple
communication modules using a single host.

I2C: The I2C component interfaces to an RTC and can be expanded to connect to
any I2C slave device.

Hex keypad: This is a custom component implemented inside the design


environment. This component reads a key press detected in a 4×4 keypad using a
state machine designed with UDBs.

IrDA Decoder: This component takes the signal from an IrDA receiver, decodes
the signal, and provides the decoded result to the CPU for evaluation and
action. (Figure2.6)

Figure 2.6: IrDA decoder circuit diagram


Internal circuit of custom components: SoC design tools provide developers
with the flexibility to design custom components using common system blocks as
2.13
9602-ARUNACHALA COLLEGE OF ENGINEERING FOR WOMEN

well as hide the complex of circuits behind a simple-to-use block. The above
design uses two custom components:

IrDA Decoder This block decodes infrared signals encoded using the RC5
protocol. AnRC5 data packet normally has 14 bits, which are sent in the

Manchesteren coded format (Figure 2.7).

Figure 2.7: Manchester encoded remote output


The Bit Extractor block shown in Figure 8 recovers the bit and the clock from the
incoming signal from the TSOP IrDA receiver in the following manner: The first
XOR gate recovers the buried clock from the signal. This signal triggers the PWM
component with a period that is ¾ of the serial clock. When the PWM reaches the
terminal count it triggers the second DFF to sample the inverted signal. This
inverted DFF output signal is inverted once again before being transferred to the
shift register. A Lookup Table (LUT) is used to count the number of bits received,
and once the 14th bit is received, an interrupt is triggered. In this interrupt, the
CPU reads the received data stored in the shift register.

Hex keypad: A Hex Keypad (Figure2.8) is a 16-button input divided into four
columns and four rows to give (4x 4 =) 16 unique keys. In the given component,
one of the column pin is driven low and the rows are read.
2.14
9602-ARUNACHALA COLLEGE OF ENGINEERING FOR WOMEN

Figure 2.8:Hex keypad

2.3 DESIGN CONSIDERATIONS

There are several design challenges and considerations involved while


developing a home automation system, many of which are determined by user
needs. Once those have been determined, the designer can choose the appropriate
processor, sensors, and communication protocol for the system.

Type of Interface: The most basic and crucial requirement in a home automation
system, the interface is the basic communication protocol and hardware
combination used for sending and receiving messages between devices and the
user. Designers have many options for executing communication between devices,
the user, and the overall system, depending upon the system, range, size of house,
ease of use, etc. If a user wants to control the home appliances through the Internet,
2.15
9602-ARUNACHALA COLLEGE OF ENGINEERING FOR WOMEN

the designer needs to add an Ethernet/Wi-Fi interface to connect the system to the
home network. If the user wants to control the system using Bluetooth from a cell
phone, the designer needs to add a Bluetooth interface to communicate with the
device. The choice of communications interface also depends upon the topology
used between the central control unit (CCU) and room control units (RCU).

2.4 SENSING REQUIREMENTS

The designer needs to determine the sensing requirements of the user and
decide upon the required sensor to perform the task. He or she also needs to assess
the sensor specifications required for different needs and usability in different
environments. The range of sensors that should be considered include:

 Thermistors can be used to control air conditioners, refrigerators, geysers,


heating system, or in case of fire.
 Humidity sensors sense the moisture level in the environment.
 Gas sensors can be used to detect gas leaks.
 Light sensors can be used to detect the luminous intensity in the house.

The information provided by these sensors (after signal conditioning) is used by


the processor to make several important decisions regarding the appliances and
when to switch them ON or OFF.

Security level

Another major requirement while designing the home automation system is to


make the entire system secure so that it can’t be easily altered to give control of the
house to unauthorized users. It should be able to prevent most types of intrusion.
Even if the system is broken into, it should be able to send signals to the user and
the nearest police station. It also necessary to hide as many components as possible
2.16
9602-ARUNACHALA COLLEGE OF ENGINEERING FOR WOMEN

from direct access via the main control panel, preventing it from being turned into
a black box. It should also be able to send and comprehend encoded data while
communicating with other devices. This will prevent intruders from tapping into
the system and using the same interface to hack devices.

Topology

Topology defines the way home automation control units interact with each
other. A star type topology is the most commonly used as it makes use of a central
control unit (CCU) interacting with all the available remote control units (RCUs)
and taking over decision making responsibilities. The role of the RCUs is to send
data fetched from the sensors back to the CCU. After it has assessed the input from
the sensors and made any necessary decisions, the CCU sends the command back
to the RCU to take a specific action.

Another topology to be considered is a mesh topology, which has no CCU


and makes use of a constellation of control units of roughly equal intelligence and
capability connected with each other. Each unit sends information on the network
which is shared by all the units. Each Unit is independent and makes its own
decisions based on the shared information. The choice of system topology governs
the selection of communication interfaces such as ZigBee, RF, Bluetooth, etc.

Depth of automation: System design is affected by the requirements ranging from


simple control of lights in the house to controlling all appliances and the security
system. Each requirement affects the overall design, and developers need to
determine the most optimized way to perform all the tasks with the lowest cost and
complexity. Despite the internal system complexity, the system should be easy to
use and not pose barriers to its operation by a household user.
2.17
9602-ARUNACHALA COLLEGE OF ENGINEERING FOR WOMEN

Cost: This is the most important aspect of system design as system complexity and
depth of automation determine the cost. A highly complex – and thus costly –
system can deter customers from purchasing and installing it in their house.

The cost of the system is directly linked with the number of components,
interface used, and complexity of design of firmware and hardware. While there
should be no compromise on the quality of hardware and software, the number of
components in the system can be decreased to reduce the overall cost and system
size as well. Rather than the traditional component-based approach, lower cost can
be achieved using System-on-Chips (SoC) that integrate multiple peripherals and a
processor into the same IC.

2.5 COMMUNICATION:

Home automation comes with many benefits, but it also brings new challenges
when it comes to communication protocols

Home automation wired communication protocols:

Wired communication protocols have been around since 1880 when the first
telephone systems were installed in home to allow for phone conversations via
landlines. Home automation protocols that used wired wiring are more reliable
than wireless one. Still they require significant installation work and planning.

Eg: Ethernet, KNX, C-bus

In wireless communication, signals are transmitted through air without


using any cable, wires or other electrical conductors. Wireless communication
technologies include infrared (IR), mobile phone, radio frequency (RF), Wi-Fi,
Bluetooth, Li-Fi, ZigBee, Z-Wave, laser, ultrasonic, etc. These find many
applications in diverse fields. Home automation is one of them.
2.18
9602-ARUNACHALA COLLEGE OF ENGINEERING FOR WOMEN

Some wireless communication devices used in home automation are:

Infrared: Here, information is shared between devices or systems through IR


radiation. In the electromagnetic spectrum, IR radiation lies between microwaves
and visible light. It is used in many consumer electronics including security
system, TV remote control and short-range communications.

Mobile phones: It can be used to turn on/off various electrical appliances in


homes. So, it works as a remote for home automation system. Most control signals
from the mobile phone are sent either using Bluetooth or GSM (Global System for
Mobile communication) mode in India. In GSM mode, it is possible to control
home appliances from very far off as cellular networks have a wide range of
coverage.

Wi-Fi: Appliances can be controlled using a personal computer through Wi-Fi.


Most Wi-Fi devices use 2.4GHz frequency and implement frequency division
multiplexing technology.

Bluetooth: Bluetooth devices are easily accessible for wireless control as these
exist in many electronic products including mobile phones. Bluetooth provides a
range of about 10 metres at the speed of 1Mbps.

Zigbee: It is a low-power, wireless mesh network that operates in the following


radio bands: 868MHz, 915MHz, and 2.4GHz.

Z-Wave: It is a relatively new wireless home automation protocol. It uses


extremely less power and runs on a mesh network. The device communicates in a
sub-gigahertz frequency range, around 900MHz.
2.19
9602-ARUNACHALA COLLEGE OF ENGINEERING FOR WOMEN

Li-Fi:Light Fidelity or Li-Fi uses the visible region of the electromagnetic


spectrum for communication. It can be easily used in places where Bluetooth, IR
and Wi-Fi are banned, because it uses light instead of radio waves.

2.6 DATA SECURITY

Smart home security devices are an integral part of a modern smart home
setup, designed to enhance the safety and security of homeowners. These devices
encompass a range of technologies, including smart cameras, smart locks, and
various types of sensors. Smart cameras are equipped with advanced features such
as high-definition video recording, motion detection, and night vision capabilities.
They can be placed indoors or outdoors to monitor specific areas around the house.
With real-time video streaming and remote access through mobile apps,
homeowners can keep an eye on their property from anywhere. Smart locks
provide an alternative to traditional key-based locks by allowing homeowners
to control access to their homes digitally. They can be remotely locked and
unlocked through mobile apps, providing convenience and eliminating the need for
physical keys. Some smart locks also offer features like temporary access codes for
guests or delivery personnel. Smart home security systems include a variety of
sensors that detect different types of events. Motion sensors can identify movement
in specific areas and trigger alerts or actions, such as turning on lights or activating
alarms. Door and window sensors can detect unauthorized entry attempts, while
smoke and carbon monoxide detectors provide early warnings in case of potential
hazards.

You might also like