Minimize CPU Usage with Hardware-Assisted Touch Key Solutions

Touch-panel and touch-key technology design and implementation are on the rise. Touch panels offer many advantages for embedded-system products, ranging from the ergonomic to the aesthetic, but there are several challenges and trade-offs that must be considered in order to successfully implement these technologies.

Making the optimum design choice is easier when one is familiar with the key technologies, understands the challenges, and follows design guidelines which aid the system development process. While there are several microcontroller (MCU)-based capacitive touch measurement methods currently on the market, hardware-assisted solutions offer engineers the most ideal touch implementation approach to help them overcome the challenges associated with integrating embedded touch technologies.

Integrated hardware-based implementation

Integrating MCU with capacitive touch sensing offers several advantages including:

  • Single-chip solutions
  • Reduced CPU usage for touch function
  • Minimal system resource requirements
  • Reduced development cycles
  • Reduced power consumption

Implementing the touch-key functions in hardware saves a significant number of CPU cycles, which can then be used to implement system control. Additional features can also be added to improve the amount of CPU bandwidth available for system control management.

To support design engineers entrusted with the development of human-machine interfaces, leading MCU supplier Renesas Electronics has developed an integrated solution that combines a 16-bit R8C CPU core with a Touch Sensor Control Unit (T-SCU).

R8C/3xT capacitive touch key solution

The R8C/3xT group of MCUs incorporates a dedicated hardware block called the Sensor Control Unit (SCU) to perform touch sensing while maintaining minimum CPU usage, which helps to significantly reduce power consumption levels compared to traditional solutions. The SCU also provides full programmability to automate the touch detection process and integrates mechanisms that allow for improved noise tolerance.

Sensor control unit

The SCU provides sensing during standby mode and supports up to four electrodes per channel. The SCU handles four key functions: control and error management, automated scanning and measurement, noise counter measures, and data transfer.
Minimize CPU Usage with Hardware-Assisted Touch Key Solutions
Figure 1: Over 85 percent of CPU bandwidth is available.

Control and error management

As illustrated below, the SCU is comprised of a status counter, secondary counter, and primary counter. The SCU controls the ports, the counters, and data transfer to detect the floating capacitance of the capacitive touch electrode.
Minimize CPU Usage with Hardware-Assisted Touch Key Solutions
Figure 2: T-SCU block diagram.

Automated scanning and measurement

The SCU manages the automated scanning, freeing the CPU to focus on system control functions. The SCU features two modes of operation:

  • Single Mode — single-channel touch detection
  • Scan Mode — multiple-channel touch detection, either sequentially or selectively. The scanning can be triggered either in software, using an RC timer or an external trigger

Minimize CPU Usage with Hardware-Assisted Touch Key Solutions
Figure 3: Automatic scanning offloads the CPU.

Noise counter measures and environmental variations

The SCU has the ability to filter out noise from the touch measurement systems, implementing either low-frequency or RF noise cancellation, resulting in accurate touch decisions.

Type
Frequency Band
Noise Source
Filtering Technique
Hardware/Software

Switching
1 kHz-1 MHz
— Inductive heating noise — Magnetic field noise — Power supply — Dimming noise
— Secondary counter method (low frequency noise cancellation)
Hardware (SCU)

— Additional averaging process
Software

RF
100 kHz-900 MHz
— AM wave noise
— Multiple measurement techniques
Hardware (SCU)

Environmental variations
< 1 kHz
— Temperature changes — Characteristic drift over time — Stray capacitance
— Drift correction processing
Software

Table 1: Noise counter measures.

Low-frequency noise cancellation:

The secondary counter sets the number of measurements after the voltage falls below the detection threshold. The SCU can then increment the secondary counter in the event that a detection threshold crossing occurs before the counter goes down to zero, thereby rejecting any kind of spike variations.

Minimize CPU Usage with Hardware-Assisted Touch Key Solutions
Figure 4: The secondary counter is used to eliminate low-frequency noise.

RF noise cancellation:

The SCU implements multiple methods to eliminate RF interference including random measurements, measurement by majority decision and a combination of both.

  • Random measurement: The SCU hardware can randomly vary the sample point of each sensor to minimize the detection effects of radiated and conducted noise sources. This hardware-based method has the advantage of obtaining the desired measurements while minimizing the CPU usage. Users have 16 different timing options to select from, which helps in noise rejection during touch measurement.

Minimize CPU Usage with Hardware-Assisted Touch Key Solutions
Figure 5: One of 16 random sampling points can be used for the measurement.

  • Measurement by majority decision: This method measures the number of times set during the measurement period and judges "H"/"L" from measurement results using decision by majority.

Minimize CPU Usage with Hardware-Assisted Touch Key Solutions
Figure 6: This approach filters out high-frequency noise.

Data transfer

The SCU can also manage the transfer of the measured values to a RAM buffer set up in the memory.

In a selective scan mode, the RAM buffer will contain data for all channels from the start channel to max channel, even if the enable bit for a channel is not set.

Minimize CPU Usage with Hardware-Assisted Touch Key Solutions
Figure 7: The DTC helps transfer the data without CPU intervention.

Lower power consumption

The SCU's touch sensing capability in standby mode also helps minimize the average current draw, for example, by approximately 16 μA in a typical response time cycle of 100 ms.

Minimize CPU Usage with Hardware-Assisted Touch Key Solutions

Minimize CPU Usage with Hardware-Assisted Touch Key Solutions
Figure 8: Sensing in Wait Mode helps reduce the overall average power consumption.

Software architecture

As shown in Figure 9, the Renesas Electronics touch solution consists of four layers.

Minimize CPU Usage with Hardware-Assisted Touch Key Solutions
Figure 9: The Touch API is only ~1.2 KB in size.

  • Hardware Interface Layer — contains the low-level drivers that help configure the SCU block
  • Sensor Layer — handles the processing and makes touch decisions. It also contains:
    • Drift-compensation routines
    • Noise countermeasures (e.g., low-level filtering)
    • Touch Decision — input to higher-level layers
  • Functional Implementation Layer — further interprets the touch decision input as a valid touch on a wheel or slider configuration
  • User Application Layer — translates the data to defined User Interface functions.

Tool support

Renesas Electronics also provides a range of hardware and software tools designed to facilitate rapid device evaluation and help speed the time-to-market of R8C/3xT-based designs. For example, the Renesas Touch Workbench allows engineers to simplify the process of evaluating and tuning hardware and software for optimum touch performance, resulting in time and cost savings benefits. This powerful and simple-to-operate tool can be connected either through the HEW Target Server, via the E8a emulator, or through the serial interface.

The ever-increasing end-user appetite for touch-enabled mobile devices, such as e-readers, tablets, and smart phones, is driving demand for smaller, thinner profile and higher performance touch-key systems operating at lower power for extended battery life — all at lower costs. How do we achieve all of these aspects? While software implementation is an option, MCUs with integrated touch sensing capabilities are the key. MCUs with dedicated touch sensor units, like those provided by Renesas Electronics, offer engineers the required ability for scanning, measurement, noise counter measures, environmental variations, and data transfer while maintaining a low average power consumption — helping them to overcome the challenges of CPU utilization.

  • Minimize CPU Usage with Hardware-Assisted Touch Key Solutions已关闭评论
    A+
发布日期:2019年07月13日  所属分类:参考设计