Electronic and electrical equipment in the home or commercial buildings have largely been discrete and independent systems – control and management of lighting, temperature, access as well as various alarms have been carried out by separate control mechanisms. The field of domotics deals with the automation of these systems and recently has been receiving increasing attention:
* HVAC control is used to manage temperature and humidity in various parts of a building at various times through, for example, a thermostat accessible over the Internet
* Lighting control systems automatically turn on or off lights in a room, or control brightness and color to create various ambiences
* The operation of appliances such as washers, dryers, and sprinklers can be controlled to take advantage of variations in the cost of utilities
* Data read from sensors monitoring for gas leaks, breakage of glass, intrusion, movement, and smoke can be used to quickly meet required safety measures while raising an appropriate level of alarm
Overall, domotics provides not only greater degrees of comfort and safety but also savings in energy cost. Core to domotics is connectivity, which has evolved to encompass various different methods. Today, the most prevalent are mostly hard-wired with proprietary signaling, including dedicated cables carrying discrete digital data, standardized RS-232 or RS-422 serial cable, Ethernet, and powerline. Emerging wireless methods include Wi-Fi, Zigbee, and Bluetooth.
Connectivity in Automation
The installation of a means of connectivity is only part of the solution to the problem of automation. The profusion of devices and appliances in the home has resulted in a large number of individual remote control units that are hand-held, wall-mounted, free of user intervention, or linked to other appliances. The greater goal of universal automation is the ability to control devices from a common unit. This is not just a centralized controller but rather the ability to control the system from a multitude of devices, as shown in Figure 1.
For example, a smartphone may run applications that control lighting and heating while displaying any security alerts. A TV remote may be used to turn on sprinklers. The home computer may be the nodal point for the collection and display of energy consumption information.
For all this to be possible, a measure of standardization is required in many tasks related to connectivity. For example, while individual data formats that are used by an appliance may be different from those used by other appliances, it is desirable that the method of transferring that data across a network be commonly implemented.
One of the most prevalent means of providing for a common data transport method is through the use of the IP protocol. IP is natively available on networks based on many physical mechanisms – Ethernet, DSL, wireless, and optical fiber. The connection-less, packet-switching nature of the TCP/IP protocol makes it ideal for use in heterogeneous networks spanning multiple hops from source to destination. TCP/IP based transport is the basis of emerging home networks that service high speed data transfer needs like file transfers, video streaming, and wireless audio as well as low-speed data for applications such as sensor monitoring and control.
These networks are comprised of individual segments of multiple types, including powerline (HomePlug), Ethernet, coaxial (MoCA), and wireless (Wi-Fi). Along with meeting the needs of data networking, these networks will also provide the backbone for automation traffic, resulting in a near-universal network. The increasing number of controllable devices in homes and the adoption of smart energy have in part been fuelling the rapid growth of home automation.
Wi-Fi and its Integration
Among wireless methods, the IEEE 802.11 family of standards, popularized, branded, and enhanced in interoperability by the Wi-Fi Alliance, has several unique advantages as the choice of wireless link for use in automation applications. It is a direct extension of the Ethernet-based LAN and supports TCP/IP natively. It is already found in a majority of offices and homes where electronic appliances exist in significant numbers so there is no need to incur new investment or effort to plan and deploy the wireless infrastructure. Wi-Fi also has adequate operational range that minimizes the number of access points required. At client devices, Wi-Fi provides both high throughput when needed and low energy consumption. Properly designed Wi-Fi devices make maximum use of the power-save methods defined in the 802.11 protocol.
Highly integrated modules available from several vendors enable a low cost of adding Wi-Fi to an embedded system. Wi-Fi, however, was mainly targeted towards high-capacity computing platforms that need to be on the local network. The devices used in automation, however, are largely based on low-cost and application-specific embedded controllers. In fact, the control of devices through electronic means has been made prevalent by the availability of low end 8-/16-/32-bit embedded controllers. Current embedded system-on-chip devices that contain MCUs may also integrate memory, digital peripherals, and precision analog peripherals that reduce the number of components in a system and enable quick design of end-products. Embedded MCU and SoC vendors, in conjunction with third-party specialist software houses, provide powerful and easy-to-use software development environments. The entire hardware and software development process thus becomes predictable in schedule and low in cost.
Interfacing a WLAN subsystem to an embedded MCU-based system requires the consideration of several factors including the physical and electrical specifications, choice of interface, host load, the software architecture, power-save mechanisms, wireless performance, and certification.
The main components of a WLAN subsystem are the Medium Access Controller (MAC), the Baseband Processor (BBP), the analog front-end, the RF transceiver, power amplifier and other RF front-end components.
RF transmission is through an antenna that may either be mounted on the board itself or may be located externally. The integration effort can be minimized by choosing a WLAN module that is fully self-contained. This approach offers several benefits:
* The WLAN module is already verified for wireless performance and calibrated
* Since all critical RF circuitry is present in the module, and often enclosed in a shield, no performance degradation is expected during integration into the embedded system
* Board layout and assembly are simplified
* Even in cases where an external antenna is used, the connection to the module is of low complexity – typically using a miniature coaxial connector and RF cable
* The self-contained module can be certified independently of the end product. FCC and certification authorities permit ‘modular certification’ where a wireless module may be certified and then used directly in a system without the need for further certification.
Figure 3 shows an example of a self-contained Wi-Fi module from Redpine Signals. In essence, the entire integration of Wi-Fi connectivity can be as simple as adding an embedded MCU peripheral.
Figure 3: A Self-contained Wi-Fi Module
There are several possibilities in the choice of interface to the embedded MCU. Interfaces such as USB, PCI ,or PCIe are used in systems where high data throughput is required such as storage devices, wireless routers, and laptops. In appliances and devices prevalent in domotics, however, the interface is generally one of several low-power options including SDIO, SPI, and UART. High-end embedded MCUs provide SDIO interfaces, almost always in conjunction with a resident operating system, while common general purpose 16-bit or 8-bit microcontrollers do not. In the latter cases, WLAN integrators choose between the Serial Peripheral Interface (SPI) and the serial UART interface. SPI is a serial interface with synchronous data clocking that can be used to transfer blocks of data in a byte-oriented ‘address followed by data’ format. SPI is a low power interface and can provide fairly high application level data throughput of up to 15 Mbps or more.
The Development Environment
The development challenges of automation systems involve designers having to juggle an array of tasks including board design, selection of components, configuration of subsystems, defining performance expectations, creating validation environments, and planning for certification, among many others. Embedded MCU vendors help ease this effort through the supply of versatile and flexible evaluation or development kits. These kits provide the ideal development platform where design, performance, and integration issues are resolved. WLAN integration should also, naturally, fall into this path. Design engineers can, today, use evaluation boards from WLAN vendors that integrate the target wireless module and provide a ready interface for directly plugging into their chosen embedded MCU development kit. These evaluation boards are accompanied by example projects and libraries already ported, or easily portable, on to the chosen embedded MCU platform. Shown in Figure 4 is a development kit from Cypress for the PSoC devices with a compatible Wi-Fi Expansion board from Redpine Signals.