Designing IoT Sensor Bridges for Smart Buildings

作者:Warren Miller

投稿人:电子产品

Sensors are the eyes and ears of the Internet of Things (IoT). They provide the data needed to understand the environment so intelligent decisions can be made about what activity needs to be taken. Smart buildings, in particular, can benefit from a wide deployment of sensors so that energy use can be controlled for optimum lighting, heating, and air conditioning. Building security can be enhanced by sensors to detect employee security levels and to control building or room access. Safety can be enhanced, in emergency situations, to provide a notice for safe egress and to provide emergency lighting during power outages.

Sensors usually operate on very low power and this can limit their ability to communicate over long distances and at high data rates. Often bridging devices are used to collect and process a variety of local low-power sensor readings and then forward the aggregated data using a long distance protocol. Employed in Wi-Fi® modules, embedded MCUs that are user programmable make it easy to create mid-level IoT bridging systems. This article will look at some of these modules to illustrate, with an example implementation, how a Wi-Fi module/MCU-based design can easily aggregate and communicate sensor data in a smart building IoT application.

Bridging for power efficiency

In smart buildings sensors can generate a very wide range of data bandwidths. Environmental monitors may only transmit a small number of bytes of data a few times a second, while security cameras might have megabytes of data to transmit in the same time period. Even low bandwidth connects can generate significant data traffic when many sensors are aggregated and buffered. Often it is much more power efficient to “burst” data at a higher data rate instead of sending it one small data transmission at a time.

In order to manage the wide range of data bandwidth requirements and the range of distances wireless signals can span in a smart building, bridging devices are required. In addition, bridging devices can be used to optimize the power requirements of autonomous low-power sensors, where battery lifetime, particularly in emergency situations, can be critical. Bridging devices must handle a variety of wireless protocols, from Bluetooth® low energy (Bluetooth LE) to the full range of Wi-Fi connectivity schemes. Additional requirements for a robust smart building design would include local data storage, local energy storage in case of power loss, and perhaps a simple user interface for status, diagnostics, and local control.

Implementation factors

The implementation of a Wi-Fi connection can be a daunting undertaking. Operating the various protocol layers and message processing tasks, if designed from scratch, can require significant resources. Integrated Wi-Fi modules, often with included antennas and certified to specific Wi-Fi standards, can eliminate the vast majority of Wi-Fi implementation tasks. These modules typically provide simple serial interfaces, either via the tried-and-true UART interface or the more modern SPI or I2C flavor. Modules integrate all of the protocol processing tasks, usually with an on-module MCU, so that simple host commands can access all the key Wi-Fi connectivity functions.

An example Wi-Fi module with an integrated MCU is the SPWF01 series from STMicroelectronics (such as the SPWF01SA.11). It is configured around a single-chip 802.11 b/g/n transceiver with an integrated STM32 microcontroller featuring an extensive GPIO suite. The modules also incorporate timing clocks and voltage regulators for a complete and compact solution. Two module options exist based on the integrated Flash memory with either 1.5 MB of Flash or 512 kB of Flash. The module can also be configured with an embedded micro 2.45 GHz ISM band antenna or with an u.fl connector for external antenna connection. With low-power consumption and a small form factor these modules are usable in even battery- based applications. Figure 1 below illustrates the compact nature of these modules.

ST Microelectronics Serial to Wi-Fi Module.

Figure 1: STMicroelectronics Serial to Wi-Fi Module. (Courtesy of STMicroelectronics)

The modules include an integrated and full-featured TCP/IP protocol stack with added web server and additional application service capabilities. The software package also includes an AT command layer interface for simplified access to the stack via the UART serial port.

One of the key advantages of using a Wi-Fi module with a user-accessible MCU is that some of the management tasks typically relegated to the main-control MCU can be offloaded to the module. This helps better partition system functions and can reduce power considerably if the module can operate autonomously while the main MCU is in a low-power mode. Bridging applications, in particular, can make use of this capability when the Wi-Fi connection is receiving data. If the received data can be buffered until a complete message is received, the main processor can stay in a low-power mode until message processing is needed. Conversely, if the Wi-Fi module isn’t required, for example while a BLE message is being prepared for transmission, the module can be put in a low-power state until it is required for message transmission.

Kits accelerate development

One of the fastest ways to evaluate and develop a Wi-Fi design is to use one of the many development kits MCU manufacturers provide. These kits include all the hardware you need as a wealth of software that can be leveraged to create your own design.

A good illustrative example of such a kit is the Atmel SAMW25-XPRO evaluation kit. This kit includes the board shown in Figure 2 below, showing both the front and back of the board. The kit is based on Atmel ARM® Cortex®-M0+ MCU technology. The expansion connectors can be used with a variety of other Atmel boards including sensor IO with a MicroSD card interface, or a display panel with LEDs and mechanical buttons. Example designs that can target the kit include simple user functions such as scanning for access points, connecting to security WPS, and how to start in a specific Wi-Fi mode (station, access point, and client), as well as more complex example applications including protocol processing, and even a complete weather monitoring and reporting demonstration.

Atmel SAMW25-XPRO Evaluation Kit Hardware.

Figure 2: Atmel SAMW25-XPRO Evaluation Kit Hardware. (Courtesy of Atmel)

Example smart-building sensor-bridge design

We can now look at an example implementation of a smart-building Wi-Fi bridge that illustrates how easy it is to use wireless connectivity for aggregating sensor data. Figure 3 shows a block diagram for an example of a smart-building Wi-Fi bridge with Bluetooth LE and Wi-Fi connectivity, local storage, and local power management for emergency backup. A Cypress PSoC 4 SoC (e.g., the CY8C4247LQI-BL483) provides connectivity to local Bluetooth LE environmental sensors. The ST SPWF01 connects to Wi-Fi and the on-module MCU can provide wired connections to co-located sensors that don't use a wireless protocol. In order to continue operation even during a power outage, a solar power source could be routed to the bridge and a Linear Technologies LTC3588 energy-harvesting power-management integrated circuit (PMIC) can be used to optimally capture and store power. For example, a Linear Technologies LTC3225 super-capacitor charger can be used to store energy on a Maxwell Technologies BCAP0050 super capacitor so that even if solar energy isn’t available, the bridge can be minimally powered to provide necessary emergency services for as long as possible.

Smart Building Sensor Bridge Implementation Block Diagram.

Figure 3: Smart-Building Sensor-Bridge Implementation Block Diagram

Much of the low-level implementation of the smart-building sensor bridge is available from the device manufacturers and in particular the data transmission protocols over Wi-Fi and Bluetooth low energy are available as example designs or software libraries. This allows the developer to focus on their unique differentiated features, perhaps for improved capabilities during emergencies, improved low-power operation, or intelligent data aggregation with localized smart algorithms to measure and predict building use patterns for better management of building heating and cooling.

In summary, with the growing demand for smart sensors in just about every part of a smart building, sensor-data aggregation and bridging requirements also will grow. Using MCUs and Wi-Fi modules, and the associated kits and design examples available from manufacturers, will dramatically simplify the implementation challenges posed by these new devices.

For more information about the parts discussed in this article, use the links provided to access product pages on the DigiKey website.

 

免责声明:各个作者和/或论坛参与者在本网站发表的观点、看法和意见不代表 DigiKey 的观点、看法和意见,也不代表 DigiKey 官方政策。

关于此作者

Warren Miller

关于此出版商

电子产品

《电子产品》杂志和 ElectronicProducts.com 网站服务于负责电子设备和系统设计的工程师和工程管理人员。