RENESAS RA2E1 Capacitive Sensor MCU
Capacitive Sensor MCU
Capacitive Touch Noise Immunity Guide
Introduction
The Renesas Capacitive Touch Sensor Unit (CTSU) can be susceptible to noise in its surrounding environment because it can detect minute changes in capacitance, generated by unwanted spurious electrical signals (noise). The effect of this noise can depend on the hardware design. Therefore, taking countermeasures at the design stage will lead to a CTSU MCU that is resilient to environmental noise and effective product development. This application note describes ways to improve noise immunity for products using the Renesas Capacitive Touch Sensor Unit (CTSU) by the IEC’s noise immunity standards (IEC61000-4).
Target Device
RX Family, RA Family, RL78 Family MCUs and Renesas Synergy™ embedding the CTSU (CTSU, CTSU2, CTSU2L, CTSU2La, CTSU2SL)
Standards covered in this application note
- IEC-61000-4-3
- IEC-61000-4-6
Overview
The CTSU measures the amount of static electricity from the electric charge when an electrode is touched. If the potential of the touch electrode changes due to noise during measurement, the charging current also changes, affecting the measured value. Specifically, a large fluctuation in the measured value may exceed the touch threshold, causing the device to malfunction. Minor fluctuations in the measured value may affect applications that require linear measurements. Knowledge about CTSU capacitive touch detection behavior and board design is essential when considering noise immunity for CTSU capacitive touch systems. We recommend first-time CTSU users to iliarize themselves with the CTSU and capacitive touch principles by studying the following related documents.
- Basic information regarding capacitive touch detection and CTSU
- Capacitive Touch User’s Guide for Capacitive Sensor MCUs (R30AN0424)
- Information regarding hardware board design
Capacitive Sensor Microcontrollers – CTSU Capacitive Touch Electrode Design Guide (R30AN0389) - Information regarding CTSU driver (CTSU module) software
RA Family Renesas Flexible Software Package (FSP) User’s Manual (Web Version – HTML)
API Reference > Modules > CapTouch > CTSU (r_ctsu)
RL78 Family CTSU Module Software Integration System (R11AN0484)
RX Family QE CTSU Module Firmware Integration Technology (R01AN4469) - Information regarding touch middleware (TOUCH module) Software
RA Family Renesas Flexible Software Package (FSP) User’s Manual (Web Version – HTML)
API Reference > Modules > CapTouch > Touch (rm_touch)
RL78 Family TOUCH Module Software Integration System (R11AN0485)
RX Family QE Touch Module Firmware Integration Technology (R01AN4470) - Information regarding QE for Capacitive Touch (capacitive touch application development support tool)
Using QE and FSP to Develop Capacitive Touch Applications (R01AN4934)
Using QE and FIT to Develop Capacitive Touch Applications (R01AN4516)
RL78 Family Using QE and SIS to Develop Capacitive Touch Applications (R01AN5512)
RL78 Family Using the Standalone Version of QE to Develop Capacitive Touch Applications (R01AN6574)
Noise Types and Countermeasures
EMC Standards
Table 2-1 provides a list of EMC standards. Noise can influence operations by infiltrating the system through air gaps and connection cables. This list introduces IEC 61000 standards as examples to describe the types of noise developers must be aware of to ensure proper operations for systems using the CTSU. Please refer to the latest version of IEC 61000 for further details.
Table 2-1 EMC Testing Standards (IEC 61000)
Test Description | Overview | Standard |
Radiated Immunity Test | Test for immunity to relatively high-frequency RF noise | IEC61000-4-3 |
Conducted Immunity Test | Test for immunity to relatively low-frequency RF noise | IEC61000-4-6 |
Electrostatic Discharge Test (ESD) | Test for immunity to electrostatic discharge | IEC61000-4-2 |
Electrical Fast Transient/Burst Test (EFT/B) | Test for immunity to continuous pulsed transient response introduced into power supply lines, etc. | IEC61000-4-4 |
Table 2-2 lists the performance criterion for immunity testing. Performance criteria are specified for EMC immunity tests, and results are judged based on the operation of the equipment during the test (EUT). Performance criteria are the same for each standard.
Table 2-2 Performance Criteria for Immunity Testing
Performance Criterion | Description |
A | The equipment shall continue to operate as intended during and after the test.
No degradation of performance or loss of function is allowed below a performance level specified by the manufacturer when the equipment is used as intended. |
B | The equipment shall continue to operate as intended during and after the test.
No degradation of performance or loss of function is allowed below a performance level specified by the manufacturer when the equipment is used as intended. During the test, degradation of performance is however allowed. No change of actual operating state or stored data is allowed. |
C | Temporary loss of function is allowed, provided the function is self-recoverable or can be restored by the operation of the controls. |
RF Noise Countermeasures
RF noise indicates electromagnetic waves of radio frequencies used by television and radio broadcasting, mobile devices, and other electrical equipment. RF noise may directly seep into a PCB or it may enter through the power supply line and other connected cables. Noise countermeasures must be implemented on the board for the former and at the system level for the latter, such as via the power supply line. The CTSU measures capacitance by converting it into an electrical signal. Change in capacitance due to touch is extremely small, so to ensure normal touch detection, the sensor pin and the power supply of the sensor itself must be protected from RF noise. Two tests with differing test frequencies are available to test for RF noise immunity: IEC 61000-4-3 and IEC 61000-4-6.
IEC61000-4-3 is a radiated immunity test and is used to evaluate noise immunity by directly applying a signal from the radio-frequency electromagnetic field to the EUT. The RF electromagnetic field ranges from 80MHz to 1GHz or higher, which converts to wavelengths of approximately 3.7m to 30cm. As this wavelength and the length of the PCB are similar, the pattern may act as an antenna, adversely affecting the CTSU measurement results. In addition, if the wiring length or parasitic capacitance differs for each touch electrode, the affected frequency may differ for each terminal. Refer to Table 2-3 for details regarding the radiated immunity test.
Table 2-3 Radiated Immunity Test
Frequency Range | Test Level | Test Field Strength |
80MHz-1GHz
Up to 2.7GHz or up to 6.0GHz, depending on test version |
1 | 1 V/m |
2 | 3 V/m | |
3 | 10 V/m | |
4 | 30 V/m | |
X | Specified individually |
IEC 61000-4-6 is a conducted immunity test and is used to evaluate frequencies between 150kHz and 80MHz, a range lower than that of the radiated immunity test. This frequency band has a wavelength of several meters or more, and the wavelength of 150 kHz reaches about 2 km. Because it is difficult to directly apply an RF electromagnetic field of this length on the EUT, a test signal is applied to a cable directly connected to the EUT to evaluate the effect of low-frequency waves. Shorter wavelengths mainly affect power supply and signal cables. For example, if a frequency band causes noise that affects the power cable and the power supply voltage destabilizes, the CTSU measurement results may be affected by noise across all pins. Table 2-4 provides details of the conducted immunity test.
Table 2-4 Conducted Immunity Test
Frequency Range | Test Level | Test Field Strength |
150kHz-80MHz | 1 | 1 V rms |
2 | 3 V rms | |
3 | 10 V rms | |
X | Specified individually |
In an AC power supply design where the system GND or MCU VSS terminal is not connected to a commercial power supply ground terminal, conducted noise may directly enter the board as common mode noise, which can cause noise in the CTSU measurement results when a button is touched.
Figure 2-1 shows the Common Mode Noise Entrance Path and Figure 2-2 shows the Relationship Between Common Mode Noise and Measurement Current. From the board GND (B-GND) perspective, common mode noise appears to fluctuate as noise is superimposed on the earth GND (E-GND). In addition, because the finger (human body) that touches the touch electrode (PAD) is coupled to E-GND due to stray capacitance, common mode noise is transmitted and appears to fluctuate in the same way as E-GND. If the PAD is touched at this point, the noise (VNOISE) generated by common mode noise is applied to the capacitance Cf formed by the finger and the PAD, causing the charging current measured by the CTSU to fluctuate. Changes in the charging current appear as digital values with superimposed noise. If the common mode noise includes frequency components that match the drive pulse frequency of the CTSU and its harmonics, the measurement results may fluctuate significantly. Table 2-5 provides a list of countermeasures required for improving RF noise immunity. Most countermeasures are common to the improvement of both radiated immunity and conducted immunity. Please refer to the section of each corresponding chapter as listed for each development step.
Table 2-5 List of Countermeasures Required for RF Noise Immunity Improvements
Development Step | Countermeasures Required at Time of Design | Corresponding Sections |
MCU selection (CTSU function selection) | Using an MCU embedded with CTSU2 is recommended when noise immunity is a priority.
· Enable CTSU2 anti-noise countermeasure functions: ¾ Multi-frequency measurement ¾ Active shield ¾ Set to non-measurement channel output when using an active shield
Or · Enable CTSU anti-noise countermeasure functions: ¾ Random phase shift function ¾ High-frequency noise reduction function |
3.3.1 Multi-frequency Measurement 3.3.2 Active Shield 3.3.3 Non-measurement Channel Output Selection
3.2.1 Random Phase Shift Function |
Hardware design | · Board design using recommended electrode pattern
· Use a power supply source for low-noise output · GND pattern design recommendation: in a grounded system use parts for a common mode noise countermeasure
· Reduce noise infiltration level at the sensor pin by adjusting the damping resistor value. · Place damping resistor on communication line · Design and place appropriate capacitator on MCU power supply line |
4.1.1 Touch Electrode Pattern Designs
4.1.2.1 Voltage Supply Design 4.1.2.2 GND Pattern Design 4.3.4 Considerations for GND Shield and Electrode Distance
4.2.1 TS Pin Damping Resistance 4.2.2 Digital Signal Noise |
Software implementation | Adjust the software filter to reduce the effect of noise on measured values
· IIR moving average (effective for most random noise cases) · FIR moving average (for specified periodic noise) |
5.1 IIR Filter
5.2 FIR Filter |
ESD Noise (electrostatic discharge)
Electrostatic discharge (ESD) is generated when two charged objects are in contact or located in proximity. Static electricity accumulated within the human body can reach electrodes on a device even through an overlay. Depending on the amount of electrostatic energy applied to the electrode, the CTSU measurement results may be affected, causing damage to the device itself. Therefore, countermeasures must be introduced at the system level, such as protection devices on the board circuit, board overlays, and protective housing for the device. The IEC 61000-4-2 standard is used to test ESD immunity. Table 2-6 provides ESD test details. The target application and properties of the product will determine the required test level. For further details, refer to the IEC 61000-4-2 standard. When ESD reaches the touch electrode, it instantaneously generates a potential difference of several kV. This may cause pulse noise to occur in the CTSU measured value, reducing measurement accuracy, or may stop the measurement due to the detection of overvoltage or overcurrent. Note that semiconductor devices are not designed to withstand direct application of ESD. Therefore, the ESD test should be conducted on the finished product with the board protected by the device case. Countermeasures introduced on the board itself are failsafe measures to protect the circuit in the rare case that ESD does, for some reason, enter the board.
Table 2-6 ESD Test
Test Level | Test Voltage | |
Contact Discharge | Air Discharge | |
1 | 2 kV | 2 kV |
2 | 4 kV | 4 kV |
3 | 6 kV | 8 kV |
4 | 8 kV | 15 kV |
X | Specified individually | Specified individually |
EFT Noise (Electrical Fast Transients)
Electrical products generate a phenomenon called Electrical Fast Transients (EFT), such as a back electromotive force when the power is switched on due to the internal configuration of the power supply or chattering noise on relay switches. In environments where multiple electrical products are connected in some way, such as on power strips, this noise may travel through power supply lines and affect the operation of other equipment. Even power lines and signal lines of electrical products that are not plugged into a shared power strip may be affected via the air simply by being near power lines or signal lines of the noise source. The IEC 61000-4-4 standard is used to test EFT immunity. IEC 61000-4-4 evaluates immunity by injecting periodic EFT signals into the EUT power and signal lines. EFT noise generates a periodic pulse in the CTSU measurement results, which may lower the accuracy of the results or cause false touch detection. Table 2-7 provides EFT/B (Electrical Fast Transient Burst) test details.
Table 2-7 EFT/B Test
Test Level | Open Circuit Test Voltage (peak) | Pulse repetition frequency (PRF) | |
Power Supply
Line/Ground Wire |
Signal/Control Line | ||
1 | 0.5 kV | 0.25 kV | 5kHz or 100kHz |
2 | 1 kV | 0.5 kV | |
3 | 2 kV | 1 kV | |
4 | 4 kV | 2 kV | |
X | Specified individually | Specified individually |
CTSU Noise Countermeasure Functions
CTSUs are equipped with noise countermeasure functions, but the availability of each function differs depending on the version of the MCU and CTSU you are using. Always confirm the MCU and CTSU versions before developing a new product. This chapter explains the differences in noise countermeasure functions between each CTSU version.
Measurement Principles and Effect of Noise
The CTSU repeats charging and discharging multiple times for each measurement cycle. The measurement results for each charge or discharge current are accumulated and the final measurement result is stored in the register. In this method, the number of measurements per unit time can be increased by increasing the drive pulse frequency, thus improving the dynamic range (DR) and realizing highly sensitive CTSU measurements. On the other hand, external noise causes changes in the charge or discharge current. In an environment where periodic noise is generated, the measurement result stored in the Sensor Counter Register is offset due to an increase or decrease in the amount of current in one direction. Such noise-related effects ultimately decrease measurement accuracy. Figure 3-1 shows an image of charge current error due to periodic noise. The frequencies that pose as periodic noise are those that match the sensor drive pulse frequency and its harmonic noise. Measurement errors are greater when the rising or falling edge of the periodic noise is synchronized with the SW1 ON period. The CTSU is equipped with hardware-level noise countermeasure functions as protection against this periodic noise.
CTSU1
CTSU1 is equipped with a random phase shift function and a high-frequency noise reduction function (spread spectrum function). The effect on the measured value can be reduced when the fundamental harmonics of the sensor drive pulse frequency and the noise frequency match. The maximum setting value of the sensor drive pulse frequency is 4.0MHz.
Random Phase Shift Function
Figure 3-2 shows an image of noise desynchronization using the random phase shift function. By changing the phase of the sensor drive pulse by 180 degrees at random timing, the unidirectional increase/decrease in current due to periodic noise can be randomized and smoothed to improve measurement accuracy. This function is always enabled in the CTSU module and TOUCH module.
High-frequency Noise Reduction Function (spread spectrum function)
The high-frequency noise reduction function measures the sensor drive pulse frequency with intentionally added chattering. It then randomizes the synchronization point with the synchronous noise to disperse the peak of the measurement error and improve measurement accuracy. This function is always enabled in the CTSU module output and TOUCH module output by code generation.
CTSU2
Multi-frequency Measurement
Multi-frequency measurement uses multiple sensor drive pulse frequencies with differing frequencies. The spread spectrum is not used to avoid interference at each drive pulse frequency. This function improves immunity against conducted and radiated RF noise because it is effective against synchronous noise on the sensor drive pulse frequency, as well as noise introduced through the touch electrode pattern. Figure 3-3 shows an image of how measured values are selected in multi-frequency measurement, and Figure 3-4 shows an image of separating noise frequencies in the same measurement method. Multi-frequency measurement discards the measurement results affected by noise from the group of measurements taken at multiple frequencies to improve measurement accuracy.
In application projects that incorporate CTSU driver and TOUCH middleware modules (refer to the FSP, FIT, or SIS documentation), when the “QE for Capacitive Touch” tuning phase is executed the parameters of multi-frequency measurement is automatically generated, and multi-frequency measurement can be used. By enabling advanced settings in the tuning phase, the parameters can then be set manually. For details regarding advanced mode multi-clock measurement settings, refer to the Capacitive Touch Advanced Mode Parameter Guide (R30AN0428EJ0100). Figure 3-5 shows an example of Interference Frequency on Multi-frequency Measurement. This example shows the interference frequency that appears when the measurement frequency is set to 1MHz and common mode conduction noise is applied to the board while the touch electrode is touched. Graph (a) shows the setting immediately after auto-tuning; the measurement frequency is set to +12.5% for the 2nd frequency and -12.5% for the 3rd frequency based on the 1st frequency of 1MHz. The graph confirms that each measurement frequency interferes with noise. Graph (b) shows an example in which the measurement frequency is manually tuned; the measurement frequency is set to -20.3% for the 2nd frequency and +9.4% for the 3rd frequency based on the 1st frequency of 1MHz. If a specific frequency noise appears in the measurement results and the noise frequency matches the measurement frequency, make sure you adjust the multi-frequency measurement while evaluating the actual environment to avoid interference between the noise frequency and the measurement frequency.
Active Shield
In the CTSU2 self-capacitance method, an active shield can be used to drive the shield pattern in the same pulse phase as the sensor drive pulse. To enable the active shield, in the QE for Capacitive Touch interface configuration, set the pin that connects to the active shield pattern to “shield pin.” Active shield can be set to one pin per Touch interface configuration (method). For an explanation of the operation of Active Shield, refer to the ”Capacitive Touch User’s Guide for Capacitive Sensor MCUs (R30AN0424)”. For PCB design information, refer to the ”CTSU Capacitive Touch Electrode Design Guide (R30AN0389)“.
Non-measurement Channel Output Selection
In the CTSU2 self-capacitance method, pulse output in the same phase as the sensor drive pulse can be set as the non-measurement channel output. In the QE for Capacitive Touch interface configuration (method), non-measurement channels (touch electrodes) are automatically set to the same pulse phase output for methods assigned with active shielding.
Hardware Noise Countermeasures
Typical Noise Countermeasures
Touch Electrode Pattern Designs
The touch electrode circuit is very susceptible to noise, requiring noise immunity to be considered at the hardware design stage. For detailed board design rules that tackle noise immunity, please refer to the latest version of the CTSU Capacitive Touch Electrode Design Guide (R30AN0389). Figure 4-1 provides an excerpt from the Guide showing an overview of self-capacitance method pattern design, and Figure 4-2 shows the same for mutual-capacitance method pattern design.
- Electrode shape: square or circle
- Electrode size: 10mm to 15mm
- Electrode proximity: Electrodes should be placed at ample distance so that they do not react simultaneously to the target human interface, (referred to as “finger” in this document); suggested interval: button size x 0.8 or more
- Wire width: approx. 0.15mm to 0.20mm for printed board
- Wiring length: Make the wiring as short as possible. On corners, form a 45-degree angle, not a right angle.
- Wiring spacing: (A) Make spacing as wide as possible to prevent false detection by neighboring electrodes. (B) 1.27mm pitch
- Cross-hatched GND pattern width: 5mm
- Cross-hatched GND pattern and button/wiring spacing(A) area around electrodes: 5mm (B) area around wiring: 3mm or more over the electrode area as well as the wiring and opposite surface with a cross-hatched pattern. Also, place a cross-hatched pattern in the empty spaces, and connect the 2 surfaces of cross-hatched patterns through vias. Refer to section “2.5 Anti-Noise Layout Pattern Designs” for cross-hatched pattern dimensions, active shield (CTSU2 only), and other anti-noise countermeasures.
- Electrode + wiring capacitance: 50pF or less
- Electrode + wiring resistance: 2K0 or less (including damping resistor with a reference value of 5600)
Figure 4-1 Pattern Design Recommendations for Self-capacitance Method (excerpt)
- Electrode shape: square (combined transmitter electrode TX and receiver electrode RX)
- Electrode size: 10mm or larger Electrode proximity: Electrodes should be placed at ample distance so that they do not react simultaneously to the touch object (finger, etc.), (suggested interval: button size x 0.8 or more)
- Wire width: The thinnest wire capable through mass production; approx. 0.15mm to 0.20mm for printed board
- Wiring length: Make the wiring as short as possible. On corners, form a 45-degree angle, not a right angle.
- Wiring spacing:
- Make spacing as wide as possible to prevent false detection by neighboring electrodes.
- When electrodes are separated: a 1.27mm pitch
- 20mm or more to prevent coupling capacitance generation between Tx and Rx.
- Cross-hatched GND pattern (shield guard) proximity Because the pin parasitic capacitance in the recommended button pattern is comparatively small, parasitic capacitance increases the closer the pins are to GND.
- A: 4mm or more around electrodes We also recommend approx. 2-mm wide cross-hatched GND plane pattern between electrodes.
- B: 1.27mm or more around wiring
- Tx, Rx parasitic capacitance: 20pF or less
- Electrode + wiring resistance: 2kQ or less (including damping resistor with a reference value of 5600)
- Do not place the GND pattern directly under the electrodes or wiring. The active shield function cannot be used for the mutual-capacitance method.
Figure 4-2 Pattern Design Recommendations for Mutual Capacitance Method (excerpt)
Power Supply Design
The CTSU is an analog peripheral module that handles minute electrical signals. When noise infiltrates the voltage supplied to the MCU or GND pattern, it causes potential fluctuation in the sensor drive pulse and decreases measurement accuracy. We strongly suggest adding a noise countermeasure device to the power supply line or an onboard power supply circuit to safely supply power to the MCU.
Voltage Supply Design
Action should be taken when designing the power supply for the system or onboard device to prevent noise infiltration via the MCU power supply pin. The following design-related recommendations can help prevent noise infiltration.
- Keep the power supply cable to the system and internal wiring as short as possible to minimize impedance.
- Place and insert a noise filter (ferrite core, ferrite bead, etc.) to block high-frequency noise.
- Minimize the ripple on the MCU power supply. We recommend using a linear regulator on the MCU’s voltage supply. Select a linear regulator with low-noise output and high PSRR characteristics.
- When there are several devices with high current loads on the board, we recommend inserting a separate power supply for the MCU. If this is not possible, separate the pattern at the root of the power supply.
- When running a device with high current consumption on the MCU pin, use a transistor or FET.
Figure 4-3 shows several layouts for the power supply line. Vo is the power supply voltage, it is the consumption current fluctuation resulting from IC2 operations, and Z is the power supply line impedance. Vn is the voltage generated by the power supply line and can be calculated as Vn = in×Z. The GND pattern can be considered in the same way. For more details on the GND pattern, refer to 4.1.2.2 GND Pattern Design. In configuration (a), the power supply line to the MCU is long, and the IC2 supply lines branch near the MCU’s power supply. This configuration is not recommended as the MCU’s voltage supply is susceptible to Vn noise when the IC2 is in operation. (b) and (c) circuit diagrams of (b) and (c) are the same as (a), but the pattern designs differ. (b) branches the power supply line from the root of the power supply, and the effect of Vn noise is reduced by minimizing Z between the power supply and the MCU. (c) also reduces the effect of Vn by increasing the surface area and line width of the power supply line to minimize Z.
GND Pattern Design
Depending on the pattern design, noise may cause the GND, which is the reference voltage for the MCU and onboard devices, to fluctuate in potential, decreasing CTSU measurement accuracy. The following hints for GND pattern design will help suppress potential fluctuation.
- Cover empty spaces with a solid GND pattern as much as possible to minimize impedance over a large surface area.
- Use a board layout that prevents noise from infiltrating the MCU via the GND line by increasing the distance between the MCU and devices with high current loads and separating the MCU from the GND pattern.
Figure 4-4 shows several layouts for the GND line. In this case, it is the consumption current fluctuation resulting from IC2 operations, and Z is the power supply line impedance. Vn is the voltage generated by the GND line and can be calculated as Vn = in×Z. In configuration (a), the GND line to the MCU is long and merges with the IC2 GND line near the MCU’s GND pin. This configuration is not recommended as the MCU’s GND potential is susceptible to Vn noise when the IC2 is in operation. In configuration (b) the GND lines merge at the root of the power supply GND pin. Noise effects from Vn can be reduced by separating the GND lines of the MCU and the IC2 to minimize the space between the MCU and Z. Although the circuit diagrams of (c) and (a) are the same, the pattern designs differ. Configuration (c) reduces the effect of Vn by increasing the surface area and line width of the GND line to minimize Z.
Connect the TSCAP capacitor’s GND to the GND solid pattern that is connected to the MCU’s VSS terminal so that it has the same potential as the VSS terminal. Do not separate the TSCAP capacitor’s GND from the MCU’s GND. If the impedance between the TSCAP capacitor’s GND and the MCU’s GND is high, the high-frequency noise rejection performance of the TSCAP capacitor will decrease, making it more susceptible to power supply noise and external noise.
Processing Unused Pins
Leaving unused pins in a high impedance state makes the device susceptible to the effects of external noise. Make sure you process all unused pins after referring to the corresponding MCU Faily hardware manual of each pin. If a pulldown resistor cannot be implemented due to lack of mounting area, fix the pin output setting to low output.
Radiated RF Noise Countermeasures
TS Pin Damping Resistance
The damping resistor connected to the TS pin and the electrode’s parasitic capacitance component function as a low-pass filter. Increasing the damping resistor lowers the cut-off frequency, thus lowering the level of radiated noise infiltrating the TS pin. However, when the capacitive measurement charge or discharge current period is lengthened, the sensor drive pulse frequency must be lowered, which also lowers the touch detection accuracy. For information regarding sensitivity when changing the damping resistor in the self-capacitance method, refer to “5. Self-capacitance Method Button Patterns and Characteristics Data” in the CTSU Capacitive Touch Electrode Design Guide (R30AN0389)
Digital Signal Noise
Digital signal wiring that handles communication, such as SPI and I2C, and PWM signals for LED and audio output is a source of radiated noise that affects the touch electrode circuit. When using digital signals, consider the following suggestions during the design stage.
- When the wiring includes right-angle corners (90 degrees), noise radiation from the sharpest points will increase. Make sure the wiring corners are 45 degrees or less, or curved, to reduce noise radiation.
- When the digital signal level changes, the overshoot or undershoot is radiated as high-frequency noise. As a countermeasure, insert a damping resistor on the digital signal line to suppress the overshoot or undershoot. Another method is to insert a ferrite bead along the line.
- Layout the lines for digital signals and the touch electrode circuit so that they do not touch. If the configuration requires the lines to run in parallel, keep as much distance between them as possible and insert a GND shield along the digital line.
- When running a device with high current consumption on the MCU pin, use a transistor or FET.
Multi-frequency Measurement
When using an MCU embedded with CTSU2, make sure to use multi-frequency measurement. For details, see 3.3.1 Multi-frequency Measurement.
Conducted Noise Countermeasures
Consideration of conducted noise immunity is more important in system power supply design than in MCU board design. To begin with, design the power supply to supply voltage with low noise to the devices mounted on the board. For details regarding power supply settings, refer to 4.1.2 Power Supply Design. This section describes noise countermeasures related to the power supply as well as CTSU functions to be considered when designing your MCU board to improve conducted noise immunity.
Common Mode Filter
Place or mount a common mode filter (common mode choke, ferrite core) to reduce noise entering the board from the power cable. Inspect the system’s interference frequency with a noise test and select a device with high impedance to reduce the targeted noise band. Refer to the respective items as the installation position differs depending on the type of filter. Note that each type of filter is placed differently on the board; refer to the corresponding explanation for details. Always consider the filter layout to avoid radiating noise within the board. Figure 4-5 shows a Common Mode Filter Layout Example.
Common Mode Choke
The common mode choke is used as a noise countermeasure implemented on the board, requiring it to be embedded during the board and system design phase. When using a common mode choke, make sure to use the shortest wiring possible immediately after the point where the power supply is connected to the board. For example, when connecting the power cable and board with a connector, placing a filter immediately after the connector on the board side will prevent the noise entering via the cable from spreading across the board.
Ferrite Core
The ferrite core is used to reduce noise conducted via the cable. When noise becomes an issue after system assembly, introducing a clamp-type ferrite core allows you to reduce noise without changing the board or system design. For example, when connecting the cable and board with a connector, placing a filter just before the connector on the board side will minimize the noise entering the board.
Capacitor Layout
Reduce power supply noise and ripple noise that enters the board from the power supply and signal cables by designing and placing decoupling capacitors and bulk capacitors near the MCU power line or terminals.
Decoupling capacitor
A decoupling capacitor can reduce the voltage drop between the VCC or VDD power supply pin and VSS due to the MCU’s current consumption, stabilizing CTSU measurements. Use the recommended capacitance listed in the MCU User’s Manual, placing the capacitor near the power supply pin and VSS pin. Another option is to design the pattern by following the hardware design guide for the target MCU family, if available.
Bulk Capacitor
Bulk capacitors will smooth ripples in the MCU’s voltage supply source, stabilizing the voltage between the MCU’s power pin and VSS, and thus stabilizing CTSU measurements. The capacitance of capacitors will vary depending on the power supply design; make sure you use an appropriate value to avoid generating oscillation or voltage drop.
Multi-frequency Measurement
Multi-frequency measurement, a function of CTSU2, is effective in improving conducted noise immunity. If conducted noise immunity is a concern in your development, select an MCU equipped with CTSU2 to make use of the multi-frequency measurement function. For details, refer to 3.3.1 Multi-frequency Measurement.
Considerations for GND Shield and Electrode Distance
Figure 1 shows an image of noise suppression using the conduction noise addition path of the electrode shield. Placing a GND shield around the electrode and bringing the shield surrounding the electrode closer to the electrode strengthens the capacitive coupling between the finger and the shield. The noise component (VNOISE) escapes to B-GND, reducing fluctuations in the CTSU measurement current. Note that the closer the shield is to the electrode, the bigger the CP, resulting in reduced touch sensitivity. After changing the distance between the shield and the electrode, confirm the sensitivity in section 5. Self-capacitance Method Button Patterns and Characteristics Data of CTSU Capacitive Touch Electrode Design Guide (R30AN0389).
Software Filters
Touch detection uses capacitance measurement results to determine whether a sensor has been touched or not (ON or OFF) using both CTSU driver and TOUCH module software. The CTSU module performs noise reduction on the capacitance measurement results and passes the data to the TOUCH module which determines touch. The CTSU driver includes the IIR moving average filter as the standard filter. In most cases, the standard filter can provide sufficient SNR and responsiveness. However, more powerful noise reduction processing may be required depending on the user system. Figure 5-1 shows the Data Flow Through Touch Detection. User filters can be placed between the CTSU driver and the TOUCH module for noise processing. Refer to the application note below for detailed instructions on how to incorporate filters into a project file as well as a software filter sample code and usage example project file. RA Family Capacitive Touch Software Filter Sample Program (R30AN0427)
This section introduces effective filters for each EMC standard.
Table 5-1 EMC Standard and Corresponding Software Filters
EMC Standard | Expected Noise | Corresponding Software Filter |
IEC61000-4-3 | Random noise | IIR filter |
Radiated immunity, | ||
IEC61000-4-6 | Periodic noise | FIR filter |
Conducted immunity |
IIR Filter
The IIR filter (Infinite Impulse Response filter) requires less memory and boasts a small calculation load, making it ideal for low-power systems and applications with many buttons. Using this as a low-pass filter helps reduce high-frequency noise. However, care must be taken as the lower the cutoff frequency, the longer the settling time, which will delay the ON/OFF judgment process. The single-pole first-order IIR filter is calculated using the following formula, where a and b are coefficients, xn is the input value, yn is the output value, and yn-1 is the immediately previous output value.
When the IIR filter is used as a low-pass filter, coefficients a and b can be calculated using the following formula, where the sampling frequency is fs and the cutoff frequency is fc.
FIR Filter
The FIR filter (Finite Impulse Response filter) is a highly stable filter that incurs minimal accuracy deterioration due to calculation errors. Depending on the coefficient, it can be used as a low-pass filter or band-pass filter, reducing both periodic noise and random noise, thus improving SNR. However, because samples from a certain previous period are stored and calculated, memory usage and calculation load will increase in proportion to the filter tap length. The FIR filter is calculated using the following formula, where L and h0 to hL-1 are coefficients, xn is the input value, xn-I is the input value previous to sample i, and yn is the output value.
Usage Examples
This section provides examples of noise removal using IIR and FIR filters. Table 5-2 shows filter conditions and Figure 5-2 shows an example of random noise removal.
Table 5-2 Filter Usage Examples
Filter Format | Condition 1 | Condition 2 | Remarks |
Single-pole first-order IIR | b=0.5 | b=0.75 | |
FIR | L=4
h0~ hL-1=0.25 |
L=8
h0~ hL-1=0.125 |
Use a simple moving average |
Usage Notes Regarding Measurement Cycle
The frequency characteristics of software filters change depending on the accuracy of the measurement cycle. In addition, you may not obtain expected filter characteristics due to deviations or variations in the measurement cycle. To focus priority on filter characteristics, use a high-speed on-chip oscillator (HOCO) or an external crystal oscillator as the main clock. We also recommend managing touch measurement execution cycles with a hardware timer.
Glossary
Term | Definition |
CTSU | Capacitive Touch Sensing Unit. Also used in CTSU1 and CTSU2. |
CTSU1 | Second generation CTSU IP. “1” is added to differentiate from CTSU2. |
CTSU2 | Third-generation CTSU IP. |
CTSU driver | CTSU driver software bundled in Renesas Software packages. |
CTSU module | A unit of CTSU driver software that can be embedded using the Smart Configurator. |
TOUCH middleware | Middleware for touch detection processing when using CTSU bundled in Renesas software packages. |
TOUCH module | A unit of TOUCH middleware that can be embedded using the Smart Configurator. |
r_ctsu module | The CTSU driver is displayed in the Smart Configurator. |
rm_touch module | The TOUCH module displayed in the Smart Configurator |
CCO | Current Control Oscillator. The current-controlled oscillator is used in capacitive touch sensors. Also written as ICO in some documents. |
ICO | Same as CCO. |
TSCAP | A capacitor for stabilizing the CTSU internal voltage. |
Damping resistor | A resistor is used to reduce pin damage or effects due to external noise. For details, refer to the Capacitive Touch Electrode Design Guide (R30AN0389). |
VDC | Voltage Down Converter. Power supply circuit for capacitive sensor measurement built into the CTSU. |
Multi-frequency measurement | A function that uses multiple sensor unit clocks with differing frequencies to measure touch; indicates the multi-clock measurement function. |
Sensor drive pulse | Signal that drives the switched capacitor. |
Synchronous noise | Noise at the frequency that matches the sensor drive pulse. |
EUT | Equipment Under Test. Indicates the device to be tested. |
LDO | Low Dropout Regulator |
PSRR | Power Supply Rejection Ration |
FSP | Flexible Software Package |
FIT | Firmware Integration Technology。 |
SIS | Software Integration System |
Revision History
Rev. |
Date |
Description | |
Page | Summary | ||
1.00 | May 31, 2023 | – | Initial revision |
2.00 | Dec 25, 2023 | – | For IEC61000-4-6 |
6 | Added common mode noise impact to 2.2 | ||
7 | Added items to Table 2-5 | ||
9 | Revised text in 3.1, corrected Figure 3-1 | ||
Revised text in 3-2 | |||
10 | In 3.3.1, revised text and added Figure 3-4.
Deleted explanation of how to change settings for multi-frequency measurements and added explanation of multi-frequency measurement interference frequency Figure 3-5e3-5. |
||
11 | Added reference documents to 3.2.2 | ||
14 | Added note concerning TSCAP capacitor GND connection to
4.1.2.2 |
||
15 | Added note concerning wiring corner design to 4.2.2 | ||
16 | Added 4.3 Conducted Noise Countermeasures | ||
18 | Revised section 5. |
General Precautions in the Handling of Microprocessing Unit and Microcontroller Unit Products
The following usage notes apply to all Microprocessing unit and Microcontroller unit products from Renesas. For detailed usage notes on the products covered by this document, refer to the relevant sections of the document as well as any technical updates that have been issued for the products.
- Precaution against Electrostatic Discharge (ESD)
A strong electrical field, when exposed to a CMOS device, can destroy the gate oxide and ultimately degrade the device’s operation. Steps must be taken to stop the generation of static electricity as much as possible, and quickly dissipate it when it occurs. Environmental control must be adequate. When it is dry, a humidifier should be used. This is recommended to avoid using insulators that can easily build up static electricity. Semiconductor devices must be stored and transported in an anti-static container, static shielding bag, or conductive material. All test and measurement tools including work benches and floors must be grounded. The operator must also be grounded using a wrist strap. Semiconductor devices must not be touched with bare hands. Similar precautions must be taken for printed circuit boards with mounted semiconductor devices. - Processing at power-on
The state of the product is undefined at the time when power is supplied. The states of internal circuits in the LSI are indeterminate and the states of register settings and pins are undefined at the time when power is supplied. In a finished product where the reset signal is applied to the external reset pin, the states of pins are not guaranteed from the time when power is supplied until the reset process is completed. Similarly, the states of pins in a product that is reset by an on-chip power-on reset function are not guaranteed from the time when power is supplied until the power reaches the level at which resetting is specified. - Input of signal during power-off state
Do not input signals or an I/O pull-up power supply while the device is powered off. The current injection that results from input of such a signal or I/O pull-up power supply may cause malfunction and the abnormal current that passes in the device at this time may cause degradation of internal elements. Follow the guideline for input signal during the power-off state as described in your product documentation. - Handling of unused pins
Handle unused pins by the directions given under handling of unused pins in the manual. The input pins of CMOS products are generally in the high-impedance state. In operation with an unused pin in the open-circuit state, extra electromagnetic noise is induced in the vicinity of the LSI, an associated shoot-through current flows internally, and malfunctions occur due to the false recognition of the pin state as an input signal become possible. - Clock signals
After applying a reset, only release the reset line after the operating clock signal becomes stable. When switching the clock signal during program execution, wait until the target clock signal is stabilized. When the clock signal is generated with an external resonator or from an external oscillator during a reset, ensure that the reset line is only released after full stabilization of the clock signal. Additionally, when switching to a clock signal produced with an external resonator or by an external oscillator while program execution is in progress, wait until the target clock signal is stable. - Voltage application waveform at the input pin
Waveform distortion due to input noise or a reflected wave may cause malfunction. If the input of the CMOS device stays in the area between VIL (Max.) and VIH (Min.) due to noise, for example, the device may malfunction. Take care to prevent chattering noise from entering the device when the input level is fixed, and also in the transition period when the input level passes through the area between VIL (Max.) and VIH (Min.). - Prohibition of access to reserved addresses
Access to reserved addresses is prohibited. The reserved addresses are provided for possible future expansion of functions. Do not access these addresses as the correct operation of the LSI is not guaranteed. - Differences between products
Before changing from one product to another, for example, to a product with a different part number, confirm that the change will not lead to problems. The characteristics of a micro processing unit or microcontroller unit products in the same group but having a different part number might differ in terms of internal memory capacity, layout pattern, and other factors, which can affect the ranges of electrical characteristics, such as characteristic values, operating margins, immunity to noise, and amount of radiated noise. When changing to a product with a different part number, implement a system-evaluation test for the given product.
Notice
- Descriptions of circuits, software, and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples. You are fully responsible for the incorporation or any other use of the circuits, software, and information in the design of your product or system. Renesas Electronics disclaims any liability for any losses and damages incurred by you or third parties arising from the use of these circuits, software, or information.
- Renesas Electronics hereby expressly disclaims any warranties against and liability for infringement or any other claims involving patents, copyrights, or other intellectual property rights of third parties, by or arising from the use of Renesas Electronics products or technical information described in this document, including but not limited to, the product data, drawings, charts, programs, algorithms, and application examples.
- No license, express, implied, or otherwise, is granted hereby under any patents, copyrights, or other intellectual property rights of Renesas Electronics or others.
- You shall be responsible for determining what licenses are required from any third parties, and obtaining such licenses for the lawful import, export, manufacture, sales, utilization, distribution, or other disposal of any products incorporating Renesas Electronics products, if required.
- You shall not alter, modify, copy, or reverse engineer any Renesas Electronics product, whether in whole or in part. Renesas Electronics disclaims any liability for any losses or damages incurred by you or third parties arising from such alteration, modification, copying, or reverse engineering.
- Renesas Electronics products are classified according to the following two quality grades: “Standard” and “High Quality”. The intended applications for each Renesas Electronics product depend on the product’s quality grade, as indicated below.
“Standard”: Computers; office equipment; communications equipment; test and measurement equipment; audio and visual equipment; home electronic appliances; machine tools; personal electronic equipment; industrial robots; etc.
“High Quality”: Transportation equipment (automobiles, trains, ships, etc.); traffic control (traffic lights); large-scale communication equipment; key financial terminal systems; safety control equipment; etc.
Unless expressly designated as a high-reliability product or a product for harsh environments in a Renesas Electronics data sheet or other Renesas Electronics document, Renesas Electronics products are not intended or authorized for use in products or systems that may pose a direct threat to human life or bodily injury (artificial life support devices or systems; surgical implantations; etc.) or may cause serious property damage (space system; undersea repeaters; nuclear power control systems; aircraft control systems; key plant systems; military equipment; etc.). Renesas Electronics disclaims any liability for any damages or losses incurred by you or any third parties arising from the use of any Renesas Electronics product that is inconsistent with any Renesas Electronics data sheet, user’s manual, or other Renesas Electronics document. - No semiconductor product is secure. Notwithstanding any security measures or features that may be implemented in Renesas Electronics hardware or software products, Renesas Electronics shall have no liability arising out of any vulnerability or security breach, including but not limited to any unauthorized access to or use of a Renesas Electronics product or a system that uses a Renesas Electronics product. RENESAS ELECTRONICS DOES NOT WARRANT OR GUARANTEE THAT RENESAS ELECTRONICS PRODUCTS OR ANY SYSTEMS CREATED USING RENESAS ELECTRONICS PRODUCTS WILL BE INVULNERABLE OR FREE FROM CORRUPTION, ATTACK, VIRUSES, INTERFERENCE, HACKING, DATA LOSS OR THEFT, OR OTHER SECURITY INTRUSION (“Vulnerability Issues”). RENESAS ELECTRONICS DISCLAIMS ANY AND ALL RESPONSIBILITY OR LIABILITY ARISING FROM OR RELATED TO ANY VULNERABILITY ISSUES. FURTHERMORE, TO THE EXTENT PERMITTED BY APPLICABLE LAW, RENESAS ELECTRONICS DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, CONCERNING THIS DOCUMENT AND ANY RELATED OR ACCOMPANYING SOFTWARE OR HARDWARE, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
- When using Renesas Electronics products, refer to the latest product information (data sheets, user’s manuals, application notes, “General Notes for Handling and Using Semiconductor Devices” in the reliability handbook, etc.), and ensure that usage conditions are within the ranges specified by Renesas Electronics concerning maximum ratings, operating power supply voltage range, heat dissipation characteristics, installation, etc. Renesas Electronics disclaims any liability for any malfunctions, failure, or accident arising out of the use of Renesas Electronics products outside of such specified ranges.
- Although Renesas Electronics endeavors to improve the quality and reliability of Renesas Electronics products, semiconductor products have specific characteristics, such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Unless designated as a high-reliability product or a product for harsh environments in a Renesas Electronics data sheet or other Renesas Electronics document, Renesas Electronics products are not subject to radiation resistance design. You are responsible for implementing safety measures to guard against the possibility of bodily injury, injury or damage caused by fire, and/or danger to the public in the event of a failure or malfunction of Renesas Electronics products, such as safety design for hardware and software, including but not limited to redundancy, fire control, and malfunction prevention, appropriate treatment for aging degradation or any other appropriate measures. Because the evaluation of microcomputer software alone is very difficult and impractical, you are responsible for evaluating the safety of the final products or systems manufactured by you.
- Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product. You are responsible for carefully and sufficiently investigating applicable laws and regulations that regulate the inclusion or use of controlled substances, including without limitation, the EU RoHS Directive, and using Renesas Electronics products in compliance with all these applicable laws and regulations. Renesas Electronics disclaims any liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations.
- Renesas Electronics products and technologies shall not be used for or incorporated into any products or systems whose manufacture, use, or sale is prohibited under any applicable domestic or foreign laws or regulations. You shall comply with any applicable export control laws and regulations promulgated and administered by the governments of any countries asserting jurisdiction over the parties or transactions.
- It is the responsibility of the buyer or distributor of Renesas Electronics products, or any other party who distributes, disposes of, or otherwise sells or transfers the product to a third party, to notify such third party in advance of the contents and conditions outlined in this document.
- This document shall not be reprinted, reproduced, or duplicated in any form, in whole or in part, without the prior written consent of Renesas Electronics.
- Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronics products.
- (Note1) “Renesas Electronics” as used in this document means Renesas Electronics Corporation and also includes its directly or indirectly controlled subsidiaries.
- (Note2) “Renesas Electronics product(s)” means any product developed or manufactured by or for Renesas Electronics.
Corporate Headquarters
TOYOSU FORESIA, 3-2-24 Toyosu, Koto-ku, Tokyo 135-0061, Japan www.renesas.com
Trademarks
Renesas and the Renesas logo are trademarks of Renesas Electronics Corporation. All trademarks and registered trademarks are the property of their respective owners.
Contact information
For further information on a product, technology, the most up-to-date version of a document, or your nearest sales office, please visit www.renesas.com/contact/.
- 2023 Renesas Electronics Corporation. All rights reserved.
Documents / Resources
![]() |
RENESAS RA2E1 Capacitive Sensor MCU [pdf] User Guide RA2E1, RX Family, RA Family, RL78 Family, RA2E1 Capacitive Sensor MCU, RA2E1, Capacitive Sensor MCU, Sensor MCU |