Co-authored by Bhargavi Nisarga, Systems Engineer at TI
Why HMI? - Adding the interface
In our first three blog posts we helped you to get started with a smart thermostat application. By now, you should be able to sample the temperature data points and get the right temperature values from your acquired data. Your application is running on its own and conducts measurement and data processing independently – for now.
The application is still lacking one basic detail, however: an interface that enables interaction between the user and the application.
Figure 1 shows a typical human machine interface (HMI), including knobs and buttons for user control and a liquid crystal display (LCD) for data/state visualization.
Figure 1: An HMI for a smart thermostat
Let’s focus on the input and output parts of the HMI and how to add them to your smart thermostat application.
Ways to control your application
The HMI enables the user to interact with the system by pressing buttons or turning knobs that can be resistive, inductive or capacitive. Adding buttons and knobs to your hardware designs gives you options for controlling your application. In a smart thermostat application, you can use buttons to control the thermostat settings, start temperature sensing or transfer acquired data to the cloud. This blog post will focus on the use of buttons and knobs and on TI’s CapTIvate™ technology for capacitive touch applications.
One option for a HMI is a mechanical button. Touching the button generates a voltage edge detectable by a microcontroller, which then generates a signal to the processor. The processor can prioritize most emitted signals. This procedure is called an interrupt because it claims immediate attention from the processor.
Another option is a knob. Unlike a button, a knob is normally not configured to generate an interrupt; instead, the central processing unit (CPU) periodically wakes up and checks the current state of the knob. This procedure is called polling.
The general concept of a capacitive touch button is similar to a resistive button. With a capacitive touch button, the touch generates a detectable change in capacitance. To be able to detect changes in capacitance requires constant monitoring. The CapTIvate technology implemented on some MSP430FR2x microcontrollers (MCUs) already includes a controller that monitors the capacitive touch buttons (instead of using the CPU). Meanwhile, the CPU can either sleep or conduct different tasks, thus enabling lower power consumption and better performance.
Haptics technology recreates a sense of touch by applying forces, vibrations or motion as feedback for users. Haptics can help emphasize the feeling of precision in touch controls and give a mechanical-like feel to touchscreens and interfaces, thus increasing the overall user experience in touch-based HMI systems like smart thermostats.
A haptics driver drives the motors or actuators that recreate haptics sensations. TI offers a complete line of haptic drivers to drive different types of actuators with timer pulse-width modulation (PWM) output signals, typically supported by MCU timers. PWM signals at a specific frequency enable varying the duty cycle, which in turn controls the proportion of time the actuator is turned on. This, coupled with the haptics driver and actuator, can create different types of tactile effects. The Advanced haptic driver simplifies tactile feedback design in consumer and industrial reference design from the TI Designs reference library showcases capacitive-touch and motor-based haptics effects.
LCDs are one of the most common ways to display information in a smart thermostat application. In this post, let’s discuss interfacing to segment and dot-matrix LCDs. Segment LCDs are cost-effective options with relatively low power consumption. Integrated LCD segment drivers typically support:
Many MSP430™ MCUs support integrated LCD drivers with the features we’ve discussed. Some device drivers support other LCD features: contrast control, blinking memory to switch between two images and ultra-low power features such as adjustable charge-pump voltage and variable charge-pump duty cycle.
Dot-matrix displays are becoming increasing popular; these displays support both characters and graphics. Dot-matrix displays have pixels arranged in rows and columns, and the number of bits used to represent a pixel determines the number of colors or shades allowed for that pixel. MCUs interface to dot-matrix displays through the Serial Peripheral Interface (SPI) or 8-/16-bit parallel interfaces (if faster drawing or updates are needed). Graphics libraries help simplify and accelerate dot-matrix LCD software development. The MSP432™ MCU is capable of driving color QVGA LCDs at high refresh rates. Check out additional resources below for more details.
Here are the key takeaways from the fourth blog post of this series:
Stay tuned for the fifth blog post of this series, which will cover smart connectivity features.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.