SSZTA36 June 2017 CC2640R2F , CC3120
Internet of Things (IoT) technology makes products like thermostats smarter by connecting them to the network and enabling remote user access.
The previous four technical articles - How to build a smart thermostat using an MCU – 7 steps to make it happen!, Step 2 to build a smart thermostat using an MCU– It’s all about the sensing, Step 3 to build a smart thermostat using an MCU – What to do with all the data?, and Step 4 to build a smart thermostat using an MCU – adding HMI of this “How to build a smart thermostat” series have covered key aspects of building a smart thermostat, including analog sensing, analog-to-digital conversion, data processing and human machine interface (HMI). This fifth technical article will discuss how to add network connectivity, a key ingredient to making your thermostat smart.
This technical article will focus on adding connectivity to your smart thermostat end node using one of the LAN communication protocols.
Adding network connectivity to a smart thermostat offers consumers many benefits, including:
Commonly used local area wireless connectivity standards include Bluetooth®, Bluetooth low energy, Zigbee® (based on the Institute of Electrical and Electronics Engineers [IEEE] 802.15.4 standard), 6LoWPAN, radio transceivers, and proprietary protocols using Sub-1 GHz frequency bands and Wi-Fi® (based on the IEEE 802.11 standard).
The wireless connectivity market is rapidly growing because of the IoT. Nevertheless, many IoT applications are connected to the Internet with wires – especially in buildings and factories. Ethernet connectivity, power line communication (PLC), RS-485, and industrial communication standards such as Fieldbus and Modbus are a few examples of wired standards.
For a smart thermostat application, you can opt for wired and/or wireless connectivity. Wireless connectivity has many benefits. It’s easy to install and scale (especially if there’s no existing wiring in place or if you need to cover areas that wiring cannot reach). It’s also cost-effective and has less maintenance overhead. On the other hand, wired connections can achieve higher network communication speeds.
With respect to local area communication security, a wired connection requires that an attacker have physical access to the cables to perform eavesdropping, man-in-the-middle or replay attacks. But wireless communication protocols have advanced encryption methods, offering increased levels of security for communicating data and sharing cryptographic keys.
In the scope of this smart thermostat application, assuming that there is no pre-wiring and no large payload for communication, we’ll focus on wireless connectivity.
Various wireless connectivity standards cater to different connectivity requirements, including:
For more details regarding these standards and a comparison of their characteristics, download the Wireless connectivity for the Internet of Things white paper.
It’s up to you to choose one or even multiple wireless connectivity standards to fit your smart thermostat application. TI SimpleLink™ microcontrollers (MCUs) offer a wide range of stand-alone wireless MCUs and network processors with different connectivity options. Additionally, the SimpleLink MCU software development kit (SDK) enables you to easily develop your application with different connectivity standards. With the SDK, you can add other connectivity options later on if you wish without a huge software redesign effort.
In many scenarios, stand-alone wireless MCUs alone cannot support the application’s memory (code or data), inputs/outputs (I/Os) or processing power. Such cases require a host microcontroller to provide these features and interface to the network processor. For example, as discussed in the fourth technical article of this series, you may opt to include interfacing to segment liquid crystal display (LCD) or dot-matrix displays, or use voice-recognition algorithms. The more features there are in a smart thermostat, the more I/Os, processing power and memory you’ll need, so using a host MCU to offload these functions is the way to go. Figure 2 is an example block diagram of a connected thermostat with a host MCU interfacing to a network processor.
The SimpleLink™ MSP432™ host MCU supports up to 2-MB flash and can operate up to 48 MHz. More importantly, the SimpleLink MSP432 SDK offers software support for interfacing to different SimpleLink network processors. It is up to you whether you go for a Bluetooth low energy CC2640R2F or SimpleLink Wi-Fi CC3120 SDK plug-in.
Finally, here are the key takeaways from our fifth blog post:
Make sure to check out the next article in this series about energy optimization for your smart thermostat.