Where to Start When Designing Lighting Controls for the Smart Home

Lighting control is often one of the first applications for home automation, typically starting with simple remote controls and timers and motivated by reasons of convenience or security. These applications often snowball with the ability to control multiple lights from a single location, adding dimming and mood controls, even embracing the capability for scene programming. Energy consumption is not always considered initially, but home automation pioneers and enthusiasts soon realize that their expenditure on controls can potentially be recouped through energy savings, particularly coupled with the adoption of low-energy light sources such as LED lamps. In addition, the ability to readily monitor energy usage in the home adds a reward factor to the satisfaction of implementing home automation, as does the possibility for networked control of lighting with remote access.

For the consumer there is a multiplicity of products to enable home automation along with support and encouragement from all sides. Utility companies are being pressured by governments to help their consumers save energy, and as a consequence many have provided home energy monitors, often free of charge. Other service companies are getting in on the act. US cable TV provider Comcast just announced its Xfinity® Home product for its customers who want smart home solutions, including innovative energy management features such as the ability to schedule or remotely access lighting and other controls. All of this is creating opportunities for the development of the various electronic gadgetry that consumers are being encouraged to buy. This article will examine component solutions that build on the capabilities of devices such as power line modems, wireless transceivers and the ubiquitous microcontroller, together with lighting controllers, proximity, and ambient light sensors.

Figure 1: Smart Homes can utilize a variety of communication networking technologies to control domestic lighting automatically or on demand both from within the home and over the Internet.

Wired or wireless?

Understanding where we are coming from is as important as knowing where we want to go. The goal may be to control home lighting from the comfort of an armchair, but deciding how to communicate those commands to the actual light bulbs is a key first step in defining the system requirements before we can start implementing the design. The same considerations apply if we want to automate lighting control with timers and sensors, or if we wish to have remote access to these controls from outside the home, such as over the Internet.

The vast majority of domestic lighting installations are powered by AC line voltage with permanently wired ceiling- or wall-mounted light fixtures (luminaires) mostly operated by in-wall light switches, but with ceiling-mount pull-cord switches used in certain locations or where mandated for safety reasons, for example, in bathrooms. Some supplementary lighting may be connected to wall outlets and individually switched at the lamp itself, including desk and table lamps, and also uplighters and other forms of mood lighting. Low-voltage halogen bulbs, which have become popular in recessed down-lighting fixtures (of the type commonly found in kitchens, bathrooms, and hallways) and for concealed worktop and floor-level lighting in kitchens, can also be considered as AC-line powered for the purposes of this discussion, because they are usually supplied from step-down transformers (either built into the unit or located within the ceiling void adjacent to the lamp). LED lamps, which are rapidly replacing halogen and other types of lamps for reasons of energy efficiency, can also be treated as line powered.

The upshot of this review is realizing that all these lights are connected by the household’s electrical wiring, which gives rise to the possibility of using power-line communication technology as a means of control. Incorporating a power line modem in every light fitting, or at the existing switch location for a number of lights on a common circuit, therefore allows a controller device, similarly connected to the household supply, to manage their operation. This controller may provide a full programming interface with an appropriate user interface such as a touchscreen display, or it may be more of a gateway device, providing connectivity either to a dedicated remote control unit or perhaps to a computer or smartphone running a user interface application.

Figure 2: NXP makes evaluating power-line modem technology very straightforward with its OM13313 kit that includes two TDA5051A demonstration boards with AC power cords attached.

Power line modems clearly allow us to take advantage of existing wiring within the home to control lighting and other devices. However, apart from pre-programmed functions like timed operation or response to sensor inputs, a fixed controller location is not going to provide the convenience users will expect unless they can override default settings and operate lights as required from anywhere within the home. Hence remote controls, in some form or another, have to be part of the total solution and these will need to be connected wirelessly. At their simplest, these may be akin to TV remotes and similar to earlier in-room remote lighting controls, using infrared signals between a handset and a fixed receiver that may be built into a replacement wall switch or plugged into a wall outlet. More robust alternative solutions might use RF technology such as ZigBee for a custom design, whereas Bluetooth and Wi-Fi are clearly compatible with more generic computing platforms.

This raises the question of whether wireless communication is a better way to go, which requires a little more insight into the different technologies and protocols and their pros and cons compared both to one another and to a wired solution. Let us start by dismissing infrared as not really being suitable for anything other than the in-room remote control application described above. Infrared is limited by relatively short range and directional, line-of-sight operation. We have grown used to pointing remotes at our TVs from within a reasonable range, but a light bulb fitted with an IR receiver might be hidden by a lampshade or within a recessed fitting. Interestingly, cable TV companies are upgrading their set-top boxes to include ZigBee, primarily to replace IR remote controls simply because the set-top boxes no longer need to be out in the open and radio signals can penetrate furniture and cupboards.

With regard to RF communication options, the various standards offer features and performance that have been optimized for particular applications. Wi-Fi, a wireless local area network (WLAN) technology based on the IEEE 802.11 standard, is widely deployed and familiar to us all as a means of providing wireless access to the Internet in our homes and offices, and in public ‘hotspot’ locations. It offers a high data-rate, broadband connection that is ideal for conveying lots of data. However, Wi-Fi is burdened with the legacy of supporting other computer networking standards such as Ethernet and, while it provides high throughput, it does not provide the responsiveness necessary for real-time control applications. We will return to this limitation later when looking at local and remote access.

Bluetooth and ZigBee are wireless personal area network (WPAN) protocols, covered by the IEEE 802.15 group of standards. Like Wi-Fi, they operate primarily in the 2.4 GHz ISM frequency band and both offer low-power operation. However, where the Bluetooth standard was largely driven by the needs of the mobile phone market for wireless headsets, ZigBee is focused on low power sensing and control applications that only require relatively low data-rates but do demand low latency, which the overheads of protocols like Bluetooth cannot achieve. Another key feature of ZigBee is that it is designed to support a mesh network topology, which supports alternate pathways between controllers and target devices and allows devices to be easily added to or removed from the system with neighboring devices acting as routers (as illustrated by Figure 1).

With the ZigBee Alliance’s focus of providing standards for Home Automation and Smart Energy, it is not surprising to find that ZigBee has been widely adopted in products such as Comcast’s Xfinity Home for lighting and heating controls, as well as security sensors. Also, Philips has used the Alliance’s Light Link specification, targeted at LED lighting applications for its “hue” system, which comprises ZigBee enabled LED lamps and a wireless router to allow brightness and color control from a smartphone.

Building on the 802.15.4 standard, the baseline for ZigBee, is a newer protocol known as 6LoWPAN because it supports IPv6 over low-power WPAN, such as the vastly increased IP address space that enables the Internet of Things (IoT). ZigBee Pro was the first network stack to embrace the IoT, but ZigBee IP is the latest open standard for 6LoWPAN wireless networks.

Figure 3: The JN5148 IEEE802.15.4 modules from Jennic, an NXP company, support ZigBee Pro and JenNet (an enhanced 6LoWPAN networking stack) in a compact surface-mount design that integrates a 2.4 GHz radio with a 32-bit microcontroller in various antenna configurations.

Local or remote access?

This is an aspect of lighting control systems that has already been touched on but deserves further consideration to understand concerns raised in reviews of some of the home lighting automation products already launched on the market. After all, by recognizing these shortcomings you will have the opportunity to design that ‘better mousetrap’!

First let us set aside the question of remote access since typically this only provides a subset of the functionality needed to control the system locally, even if it adds complexity to the overall design requirement. Local control can broadly be divided into those functions that allow the system to be configured and those that implement immediate control, such as directly switching lights on or off. Programming a system so that lights operate at pre-determined times or in response to proximity or ambient light sensors does not require real time control. It can be done through a dedicated control panel, akin to a central heating programmer, which might be hardwired into the system or connected wirelessly via a gateway device.

As discussed already, the gateway approach supports the use of smartphones, tablets, or PCs to provide a control interface, which seems to be the way that many commercial products are going, not just for programming the system but for operating it in real time. This may be fine if you want to dim the lights while sitting watching TV, a simple smartphone app with a slider control could achieve this. However, what if you go to another room that is not lit? Using a smartphone to turn on the lights before you trip over the sleeping dog or child’s toy is hardly as convenient as flipping a wall-switch, especially if you need to unlock your phone with a passcode first. Also, beware of retrofit systems where ordinary light bulbs have been replaced by bulbs containing a power line modem or ZigBee controller. These solutions require the pre-existing lighting circuit to remain switched on since switching that circuit off at the wall-switch will completely negate the benefits of a connected lighting control system.

These potential failings may simply require a bit more thought in terms of the overall system ergonomics along with the use of some additional sensor components. Proximity or motion detectors can switch lights on as soon as someone enters a room, overriding any timer settings or dimmer levels. Similarly, the absence of any movement after an appropriate interval can be used to switch lights off, or at least dim them in the event someone has fallen asleep on the sofa. Additionally, in the way we are used to with exterior security or courtesy lights, the inclusion of ambient light sensors will ensure lights are not switched on unnecessarily.

Finally, returning to the aspect of remote access, having an application running on a smartphone or PC, typically connected by Wi-Fi to the lighting system’s gateway device, is only a small step to enabling Internet access. Indeed with protocols like 6LoWPAN providing light bulbs with individual IP addresses, it is only necessary to connect the gateway device to the home’s normal broadband router. If you are returning later than planned from work, you may choose to delay the pre-programmed switch-on of lights that would normally welcome your arrival. Conversely, if you are staying away unexpectedly, you may wish to activate lights to provide the illusion that someone is home in order to deter burglars.

Key elements in the design of lighting controls

Having examined the requirements for home lighting control systems, and hopefully appreciating the advantages of the various technologies but also understanding the potential pitfalls, it is now time to look at some design solutions.

Power line communication is now quite a mature technology, and highly integrated devices, such as NXP Semiconductors' TDA5051 home automation modem, provide a simple-to-use solution specifically designed for operation over the home power-supply network. This IC uses Amplitude Shift Keying (ASK) signaling at 600- or 1200-baud data rates and operates from a single 5 V supply, which can be readily derived from the power line it is attached to, as can be seen in the application circuit shown in Figure 4. A particular advantage of power line communication can be its extended range, up to 3000 feet with this device, compared to wireless technologies whose signals attenuate more severely with distance or when passing through the fabric of a building.

The microcontroller shown in the application circuit can be a simple and inexpensive device. NXP recommends its LPC1114 MCU which, while it is based on the 32-bit ARM® Cortex™-M0 processor core, is specifically targeted at low-cost 8/16-bit applications where it can offer low power, a simple instruction set, and reduced code size compared to existing 8 - 16-bit architectures. Reinforcing that recommendation is the availability of power-line modem software specifically written for the LPC1114, which features a redundancy protocol that uses zero crossing detection to ensure robust operation in noisy environments. As seen already in Figure 2, NXP offers the OM13313 evaluation kit that includes two TDA5051A demonstration boards with AC power cords attached.

Figure 4: The TDA5051A IC together with a simple microcontroller provides the basis for a complete power line modem with relatively few external components. The application circuit shown here includes full power line insulation both for the IC supply and Tx/Rx data interface.

Of the wireless communication technologies considered, ZigBee and its derivatives and extensions, whose protocols build on the IEEE802.15.4 standard, are most obviously optimized for sensing and control applications including home lighting and the broader Internet of Things. The Jennic/NXP JN5148 wireless transceiver module shown in Figure 3 is based on an integrated circuit that comprises a fully-compliant 2.4 GHz radio together with a 32-bit microcontroller that implements ZigBee Pro and JenNet (6LoWPAN) networking stacks along with the customer’s application. Depending on the radio environment and required range, three module options are offered; an integrated antenna, a simple external antenna connection, or an external antenna connection with the addition of power and low-noise amplifiers to provide increased transmit power and greater receive sensitivity for operation up to 4 km.

To address some of the pitfalls identified with respect to local control, the Silicon Labs Si1142 light sensor IC provides both an ambient light-sensing solution combined with short-range infrared proximity detection. With its adjustable range from under 1 cm to over 50 cm, this device could ideally be located near doorways, perhaps adjacent to or in place of existing light switches. This way it would detect people entering or leaving the room, enabling lights to be switched on or off as required with the ambient light feature preventing operation during the daytime. Proximity detection with the Si1142 is based on signals reflected from IR LEDs driven by the device itself, and this is what limits its range. Conventional passive infrared (PIR) sensors will provide greater range but suffer from the problem that they can only detect room occupancy if there is movement that affects the received IR signal.

Everything we have considered so far has been about how to provide networked control of home lighting, rather, ways in which we can send signals to our light bulbs and fittings to turn them on, off, or dim them, either automatically or on demand. What we have not covered is how to actually switch the power in those lighting circuits. If the circuits are AC line voltage, then a solid-state relay (SSR) like the PR3BMF51NSKF from Sharp provides a simple solution. This device combines an output Triac to switch the AC line with an optically coupled input to provide up to 4 kV isolation from the low-voltage control circuit. Other types of lights, particularly LED lamps, require specialized driver circuits that provide constant-current or constant-voltage DC outputs to supply the required bias to the LED, or more usually, to multiple LEDs in a string. These LED drivers often have low-voltage control inputs that can be directly interfaced to the lighting control network.


The concept of a Smart Home means different things to different people, but most would accept that it means imbuing some level of intelligence into the home environment to provide a clear benefit, perhaps for energy saving, convenience, or security. Our focus has been on lighting control as one area of home automation and presumes that to be truly effective, a networked solution is necessary, allowing any light in the home to be controlled from anywhere within, or even from outside, the home.

Consequently, this article has focused more on the networking aspects of providing lighting control rather than on the devices that implement those controls. Its aim has been to understand the options available and their relative merits, while also identifying some of the key components applicable to designing lighting control systems.