SSZTA01 august 2017
Co-authored by Bargain Nisarga, Systems Engineer at TI
In the first five installments of this series, we’ve helped you build a fully featured and network-connected smart thermostat. In this installment, we will focus on how you can best optimize power and energy consumption to extend the battery life of your thermostat.
A battery-powered wireless thermostat gives you “peel-and-stick” flexibility to use the product anywhere, even in the absence of pre-wiring for power or communication. However, if you don’t design your thermostat to have an extended battery life, users will have to change the batteries often, which will affect your product’s overall cost-effectiveness and convenience factor. Let’s take a look at how to address this challenge.
Here are some terms we’ll use in the context of power savings in this blog post:
When you look at a microcontroller (MCU) data sheet, you might be startled – the current numbers may just seem too high for battery-powered applications. But here is how you need to read the numbers: the current numbers specified in a device data sheet show the current consumption assuming that the module is running with a 100% duty cycle. For an analog-to-digital converter (ADC), this means that you are sampling and converting data continuously, this is not realistic for most “real world” applications.
As we discussed in the second installment of this series, you will normally have longer intervals in between two samples; during this interval, the ADC will not be active. Because of its low duty cycle, the ADC will not consume much energy. So to calculate the average current consumption for all modules used in your application (like the central processing unit [CPU], ADC and comparator), you need to calculate the ratio between the on and off time periods and accordingly apply the current numbers specified in the data sheet. That’s how you will calculate the average current consumption. The maximum consumption at a given instant determines the peak current consumption. Normally, the battery will determine the peak-current limit for your application.
Most low-power MCUs offer different power modes to reduce the application’s overall power and energy consumption, typically supported by the following device power modes: active, sleep, deep sleep and shutdown mode. The power modes differ from each other depending on the clock sources available and the modules powered in that specific power mode. In general, lower power consumption in a specific power mode helps keep lesser functions functional and lowers the speed at which the modules operate.
Let’s take a look at what techniques are used in different device power modes to enable power savings:
Keep in mind that the typical current numbers in a device data sheet are specified for operation at room temperature. Current consumption at higher temperatures (especially for sleep and deep-sleep modes) may be much higher compared to typical numbers due to higher leakage current at the transistor level. You will need to consider the maximum current numbers in the device data sheet when calculating current consumption over the product’s operating temperature range.
You should plan to optimize power consumption overall by grouping the on-chip peripherals that the device needs at different points of operation, and use the various power modes to power and clock only those modules that need to be active at a given instant. For example, when your smart thermostat is not actively measuring temperature, updating the liquid crystal display (LCD) or sampling the microphone input, the device can enter deep-sleep mode, where only the low-frequency clock is enabled for operations such as the RTC, periodic interval timekeeping (for temperature measurement) and capacitive touch sensing.
Figure 1b shows the corresponding device level power profile capturing device operation in various power modes including:
You can also incorporate power monitoring and optimization at the application level. Let’s assume that you are measuring the temperature every few seconds and sending the measured values every few minutes. Along with this, you can add a battery monitor using the on-chip ADC peripheral to monitor the battery voltage level. When the battery voltage drops below the monitor threshold, the application can reduce the frequency of temperature sampling and communication over the network. Better still, the application can send a message to the host indicating a low battery level so that the user can change or charge the battery.
Ultra-low power MSP430™and MSP432™ MCUs enable you to design your application power consumption to within your desired limits. Additionally, MSP430™ and MSP432 MCUs offer useful tools to optimize your application for ultra-low power operation.
Here are the key takeaways from the sixth blog post of this series:
Stay tuned for the final part of this blog series.