Designing power-efficient and secure home automation systems -

Designing power-efficient and secure home automation systems

Home automation continues to unveil a new era of innovation by providing sophisticated solutions for home and office environments. Systems using microcontrollers are helping consumers by enabling power-efficient, intelligent, and secure home automation systems with intuitive controls and a variety of connectivity options. The latest advancements in security and home automation systems utilize the latest in sensing, connectivity, and computing technologies. For example, nano-scale IC technology is enabling OEMs to build small, affordable, and energy-efficient solutions.

Home automation helps control appliances in home and office environments.  Earlier systems were only intended for adjusting lights, turning on/off electrical devices, and controlling the temperature. Today, as part of the Internet of Things (IoT), state-of-the-art embedded systems facilitate intelligent power control and advanced security. With a combination of sensors and processors, the IoT connects different appliances to a central network to enable them to complete their tasks without any user interventionThanks to the Internet, Wi-Fi, and Bluetooth, systems can easily be operated using a smartphone, tablet, or computer.

Basic building blocks of home automation
A typical home automation system requires the following subsystems:

  • Central Processing Unit (CPU) –  The CPU features high performance, low power processors or microcontrollers (MCUs) needed for embedded computing. High-end MCUs support multiple communication interfaces to connect to different peripherals such as sensors, temperature controllers, home appliances, entertainment systems, safety alarms, and security systems. A real-time-operating-system (RTOS) runs on the central control unit to monitor and make necessary decisions, day in and day out.

  • Connectivity and Communication –  Microcontrollers in the CPU need to be connected to networks to communicate with peripherals. As per consumer needs, the network can be either wired or wireless. Mainstream home automation applications use PLC or Ethernet for wired deployments and ZigBee, RF, or Bluetooth LE for wireless connectivity.

  • Sensors and User Interface –  In home automation systems, the CPU is connected to different peripherals including sensors to measure or detect temperature, humidity, daylight, or motion. The CPU also turns actuators and electrical appliances on and off, as well as connects to user interfaces to collect allow remote control and display system status. Earlier user interfaces were built using tactile, mechanical buttons. Today’s automation systems provide a contactless experience using capacitive touch interfaces.

  • Data Storage –  Home automation systems need local storage to store sensor data, user preferences, and the system RTOS. MCUs for IoT applications have built-in Flash memory, but this is not sufficient to store the potential large amount of data generated every day. Integrating more memory within the MCU increases die size, adds to system cost, and impacts the system performance. Large home networks need a separate place for installation of the storage devices. Using large server-based storage devices increases operation and maintenance costs. The challenge for developers lies in trading off between storage capacity and operating cost.

  • Power Supply Unit –  Home automation uses different power options such as high voltage AC lines for electrical appliances and batteries for handheld or portable user interfaces. State-of-the-art systems can now harvest energy from light, vibration, or RF transmissions. Based on present needs and trends, different power modes (low power, standby, active) are also included in the power supply subsystem to facilitate low energy consumption based on common usage cases.

Figure 1 System Overview of Home Automation (Source: Cypress Semiconductor)

System Implementation
A home automation system is actually a consolidated system of different peripherals. There are several design challenges and constraints that need to be considered to meet users’ needs and support value-added applications.

Central Processing Unit
The choice of MCU is critical. MCUs available on the market are differentiated based on different performance parameters like power consumption, speed, computation power, number of GPIOs, and compatibility with different communication protocols and user interfaces. Going beyond traditional architectures, MCUs have changed a lot over the decade. They are now packed with multiple cores, larger memories, more peripherals, and smarter features. The line separating MCUs and programmable system-on-chip (SoC) architecture continues to blur.

In the framework of a home automation system, the CPU needs several control subunits based on the complexity of the design. Subunits interact with the CPU and accept its decisions. There are several topologies that can be used for these types of interactions.

A star topology is most commonly used where all the subunits are connected to a single central unit. The subunits send data acquired from sensors to the central unit. The central unit analyzes the information and sends specific action requests to the subunits. Based on the commands received, each subunit controls its peripherals. In this topology, the failure of one subunit does not affect the operations of other subunits. However, failure of the central unit can shut down the entire system. Therefore, highly complex systems that are intended to operate 24×7 should adopt a mesh or grid configuration. In these topologies, there is more than one central control unit and each of them is connected to the others. Decentralization of processes increases the reliability and the bandwidth of operations. Each unit in this constellation of control units possesses equal intelligence and capability to operate independently. And, if one of the control units fails, the others can take over to maintain uninterrupted operation.

Figure 2 Star and Mesh Network Topology (Source: Cypress Semiconductor)

Sensors are at the heart of home automation systems. Environmental sensors such as temperature sensors, ambient light sensors, humidity sensors, and gas sensors are used to gather data about the room environment. The central unit switches on/off the fans or control the air-conditioner accordingly to maintain the room temperature within a comfort level threshold. The central unit also switches on/off lights and controls their brightness based on user preferences and data from light sensors. The intelligent and intuitive control of home appliances saves energy making the system power efficient and environment friendly.

Besides taking care of the user convenience the system also takes care of home security. It can detect any unwanted intrusion using the motion sensors and alert the inhabitants.  The central unit can also take care of emergency situations. In case of a power fault, the system can switch off appliances to protect them from damage. In an outburst of fire or smoke the central unit raises the alarm and switches on water sprinklers. Gas sensors are useful for detecting fire or smoke.

The selection of sensors depends upon system requirements and compatibility. To detect room temperature, different type of sensors such as discrete elements (thermistor, RTD, thermocouple, and diode as temperature sensors) and integrated circuits (ICs) can be used. Discrete elements such as thermistors, RTD and thermocouples need external signal conditioning circuits. Developers also need to consider the system’s requirement in terms of resolution, range of detection, and operating cost while designing the signal conditioning circuits. Thermocouples are active elements that generate a thermoelectric voltage depending upon the relative ambient temperature. Thermistors and RTDs are passive elements and change resistance depending on the absolute temperature. Thermistors can be of two types: PTC (positive temperature coefficient) and NTC (negative temperature coefficient). A comparison of the different parameters of these temperature sensors are given below:

Table 1 Different Temperature Sensors (Source: Cypress Semiconductor)

RTDs are best in terms of repeatability and accuracy. Temperature sensor ICs come with integrated signal conditioning circuits. Most of them send processed data in a digital format through a common (i.e., UART, I2C, or SPI) interface. Others convey data in an analog format in terms of voltage or current. MCUs with integrated ADCs can process this analog data and detect the temperature.

Figure 3 Temperature Measurement Using Thermistor and RTD (Source: Cypress Semiconductor)

PIR (passive infrared sensor) motion sensors sense motion and are used to detect whether a human has moved in or out of the sensor range. The sensor measures the infrared radiation (IR) from a heated object and therefore can detect the movement of people, animals, or other objects. PIR sensors are generally used with lenses to focus the distant IR onto the sensor surface. As a part of the signal conditioning circuit, filters are used to band limit and filter out unwanted noise.

Humidity sensors are used to detect the moisture content in the environment. They typically rely on some other quantity such as pressure, temperature, or mass which changes due to the presence of moisture. Modern sensors measure the change in capacitance or resistance to measure the change in humidity. Resistive humidity sensors are less sensitive as compared to capacitive humidity sensors and are therefore less commonly used. Capacitance measurements involve complex signal conditioning circuits such as AC bridges. Changes in capacitance can also be measured using the same techniques used to measure changes in phase or frequency. Modern SoCs use state-of-the-art capacitive sensing technology to directly measure capacitance.

Ambient light sensors and proximity detectors are extensively used in home automation systems. Ambient light sensors are primarily light-dependent elements. With resistive light sensors, resistivity changes with the variation of light. Active ambient light sensors such as diodes and transistors can also be used to detect variations of light. The majority of proximity detectors are based on capacitive measurements. However, some proximity sensors use inductive measurements.

Communication Interface
The central control unit needs to communicate with home appliances and sensors either via wire or wirelessly. Wired systems use Ethernet or power line communication (PLC) technology. PLC uses electric wires for communication as well as power distribution. Typically a carrier wave (~20-200 kHz) is modulated with the digital signal and transmitted over household wiring along with the powerline signal. Peripherals are plugged into the regular power outlets to establish the communications link. However, appliances need additional modems to decode received information. Designers using PLC technology must also address issues like “spread spectrum” and “radio interference” in crowded operating environments.

Figure 4 Different Communication Interfaces and Protocols (Source: Cypress Semiconductor)

With Ethernet, peripherals, appliances, and the central control unit are connected through a LAN (local area network). Each unit in the system sends streams of data serially using frames. Each frame contains the source and the destination addresses, data, and error checking information. Sensors send data through UART, SPI or I2C interfaces to the sub control units, and the sub control units send information to the central unit using the Ethernet interface.

Wireless technologies like Wi-Fi, Bluetooth LE, and ZigBee have become very popular because they eliminate the complexity and cost of wiring and installing wires. With Wi-Fi (IEEE 802.11), a local wireless network is created and all the peripherals are connected to the network over the 2.4 GHz or 5GHz frequency bands. Wi-Fi reduces installation costs and is very useful in constricted spaces where cables are difficult to deploy. The main issue with wireless networks is their security because of their simplified access to the network compared to traditional wired access. With wired networking, one needs to have direct physical access to wires to get on the network.  With WI-FI, one merely needs to be within range of the network. Strong encryption and security methods are needed to avoid data security risks in wireless networks.

ZigBee (IEEE 802.15.4) based wireless communication protocols can be used to implement low-power small networks ranging from 10-100 meters. ZigBee uses a mesh network to send and receive data through intermediate nodes from one end to another. ZigBee is typically used in low power applications requiring low speed communications and security, making it useful in home automation systems.

Bluetooth wireless technology is useful for remote sensing and monitoring applications.  Bluetooth is primarily used for low-cost and low-power wireless network. The central unit takes a master role and initiates conversations with other peripherals acting as slaves. At a given point of time, only one slave is allowed to broadcast and communicate with the master. Bluetooth is useful in implementing user interfaces. Users can remotely access the control system and send the inputs.

Future Enhancements in Home Automation
The current trend for home automation is to promote energy-efficiency and secure solutions. With the increasing number of users and their requirements, designers are facing challenges in making systems secure from any kind of intrusion. At the same time they need to reduce power consumption and cost. Smart Cards and OTP (one-time-authorization) based secure access technology are currently being introduced in home automation systems, with more advanced biometric sensors like finger print and retina scanners are used for authorization on their way.

In addition to adding security, OEMs are looking for alternative source to generate power for systems. Newly introduced energy-harvesting devices can generate energy from vibration, body-heat, solar light, and RF (radio frequency) transmissions. Ultra-efficient home automation systems combine state-of-the-art energy-efficient appliances, and devices with commercially available renewable energy systems, such as solar water heating and solar electricity. However these features cost more and OEMs need to consider the trade-offs based on user requirements.

At first glance, home automation appears to be complex and expensive to implement. However, the many benefits of introducing intelligence to home appliances can more than offset these costs. As we move forward, truly automated system will know who you are, where you are, and what you want without requiring direct interactions from us, switching on lights and fans as we enter a room, adjusting the temperature when we leave the house, and raisings alarm in case of a variety of emergencies. Such an intuitive and intelligent method of control can save substantial power while providing a higher level of convenience. This is all in addition to taking care of home security and safety.

With today’s technology, implementing home automation is no longer an intimidating job. The introduction of programmable SoCs in the market has accelerated the implementation of home automation system. Highly integrated MCUs provide flexible configurability with a wide range of capabilities including ADCs, Analog op amps, Flash memory, and digital communication interfaces (UART/ SPI/ I2C). Many MCUs also support Bluetooth technology on the chip itself to further reduce system complexity and development cost.

Ronak Desai is a Staff Engineer at Cypress Semiconductor with nine years of industry experience. He hass a BE in Electronics and Communication from Mumbai University, India.  He is part of the Development Kits Group and is based out of Bangalore, India.  You can reach Ronak at

Arijit Karmakar is a Systems Engineer at Cypress Semiconductor. His responsibilities include defining technical requirements and designing PSoC-based development kits, implementing system validation platforms, debugging technical issues for customers, and technical writing.  He earned his BE in Instrumentation and Electronics Engineering from Jadavpur University, India and completed his post-graduate work with MTech in Electronic Systems from IIT Bombay, India. His interests include embedded systems, bio-sensors/MEMS and Analog/Mixed Signal Circuit Design. He can be reached at .

1 thought on “Designing power-efficient and secure home automation systems

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.