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.
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
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
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:
- Multiplexing to reduce the number of pins that control the various segments on an LCD screen. A larger LCD screen with more segments requires more controls to drive the LCD. Having higher multiplexing options (like four- or even
eight-mux mode) can help significantly reduce the number of device pins needed to interface with segment LCDs.
- A charge pump that provides a regulated voltage to the LCD that is independent of the device supply voltage. This is especially useful to maintain good contrast in battery-powered systems, even as the battery drains.
- Biasing components generate bias voltages from the regulated LCD supply to generate the necessary LCD waveforms for driving LCD segments.
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:
- HMI provides a control and status interface to smart thermostat applications.
- Control inputs include buttons and knobs realized via mechanical, capacitive or inductive interfaces.
- Haptics effects can provide a mechanical-like feel to touch interfaces.
- LCDs can display application status information.
Stay tuned for the fifth blog post of this series, which will cover smart connectivity features.
Additional Resources
- TI touch solutions:
- Haptics resources:
- More information on MSP430 MCU LCD:
- MSP432 MCUs driving color QVGA LCD at high refresh rates using SimpleLink™ Bluetooth®low energy CC2640 device and SimpleLink MSP432 SDK:
- Bluetooth low energy HomeKit video.
- Access panel with Bluetooth and capacitive touch demo.