Timer-Based Driven Shield

Last modified by Microchip on 2026/03/24 11:27

The purpose of a driven shield is to generate a synchronous signal on the shield pin, like a Y-line bursting signal (capacitance measurement waveform). The Peripheral Touch Controller (PTC) generates three-level waveforms on Y-lines. These waveforms typically have voltages GND, VCC, and VCC divided by two (VCC/2). To achieve robust moisture performance, it is enough to generate a two-level signal that is synchronized with the PTC Y-line signal.

Here is a typical waveform for a self-capacitance sensor, along with a driven shield signal. Refer to the synchronous points: Sync A and Sync B. An offset of less than 1 µs is acceptable for Sync A. Sync B should be perfectly synchronized.

typical waveform for a self-capacitance sensor

Hardware Design Guidelines

The shield waveform from Timer/Counter (TC) or Timer/Counter for Control Applications (TCC) causes a mutual capacitance effect between the shield and the sensor. Due to this mutual capacitance, the overall sensor capacitance value observed by PTC will be significantly less. To compensate for this significant reduction, the sensor should have the ground shield on the bottom layer, as shown in the accompanying image.

  • The sensor is on the top layer, surrounded by a solid driven shield.
  • A hatched ground shield is present on the bottom layer, covering both the sensor and the driven shield.
  • Ensure that the gap between the sensor and shield on the top layer is 0.5 mm ~ 1 mm.

ground shield on the bottom layer

An alternate option to reduce the coupling between the shield and the sensor is to have a guard ring (connected to the Driven Shield pin) surrounding the sensors, as shown in the accompanying image.

  • Ensure that the gap between the sensor and the shield is 2 mm.
  • Since the shield is not present all over the Printed Circuit Board (PCB), other signals need to be routed far away from the sensors so that water does not bridge.
  • The shield can act as an antenna if it is a closed loop. Ensure that a cut is provided as shown to avoid a closed loop.

reduce the coupling

Back to Top

Driven Shield Operation

To implement Driven Shield using timers, the following resources will be used:

  • Direct Memory Access (DMA): 1 channel
  • Event system: 1 channel
  • TC/TCC: as required

This flow diagram represents the typical control when Driven Shield is not used.

typical control when Driven Shield is not used

This diagram represents the flow control when Driven Shield is used.

flow control when driven shield is used

Driven Shield is effective only when the shield signal is synchronous to the PTC Y-line waveform. In order to ensure that the clock difference between PTC and CPU does not affect this synchronization, the shield and PTC waveforms need to be triggered by the PTC itself. This is done by using the event system of SAM devices.

The PTC and shield signals are started by DMA instead of PTC. This is fine as the DMA is started by PTC without CPU intervention.

Back to Top

Driven Shield Plus

In Driven Shield, the shield output is routed only to the dedicated shield present on the PCB. When measuring one sensor, all other sensors will be grounded. In this case, when moisture bridges between the sensor and shield, it does not cause false detection. When moisture bridges between two sensors, it may cause false detection.

In Driven Shield Plus, when measuring one sensor, all other sensors will act as driven shields. Even when moisture bridges between two sensors, it does not cause false detection.

It is possible to implement Driven Shield Plus using TC/TCC. In order to do this, the Y-lines connected to the sensor should have a multiplexing option for TC/TCC. It is possible to identify such Y-lines from the device data sheet. Here is an example from the SAMC21 data sheet:

  • To have an effective Driven Shield Plus solution, all the Y-lines need to have the multiplexing option for TC/TCC.
  • It is acceptable to have Y-lines multiplexed with different TC/TCCs.

Y-lines from the device data sheet

Back to Top

Optimizing Y-Line Selection

TC/TCCs are additional resources used to achieve the Driven Shield or Driven Shield Plus feature. Optimization needs to be done on selecting the Y-lines so that the number of TC/TCC used is less. This is required because:

  • As the number of TC/TCCs increases, power consumption also increases.
  • Fewer TC/TCCs remain available for the application.

Back to Top

Scenario 1: One Timer Vs Multiple Timers

To use the Driven Shield Plus feature on Y20~Y23 lines, there are two options available:

  • Option 1: Use TC2 and TC3 (Two TCs)
  • Option 2: Use TCC1 (One TCC)
    • Option 2 is optimal as it requires only one timer resource. If the application needs TCC and can spare two TCs, then Option 1 can be used.

One Timer Vs Multiple Timers table

Back to Top

Scenario 2: Maximum Y-line for One Timer

Based on the information above, with just TCC0, it is possible to configure Driven Shield Plus for six Y-lines. Select the Timer/Y-line so that the maximum number of Y-lines are covered within the same timer.

Maximum Y-line for One Timer table

Back to Top

Scenario 3: Only One Timer Option

These Y-lines only have one timer option. If these Y-lines are used and the Driven Shield Plus feature is required, then these TCs must be used.

Only One Timer Option table

Back to Top

Scenario 4: Y-lines Without Timer Option

There are cases where Y-lines do not have any timer multiplexing option for TC/TCC. For example, in the SAMC2x devices, Y0 and Y1 (and some additional Y-lines) do not have the multiplexing option for any timer. These Y-lines cannot be driven as a shield when other Y-lines are being measured.

When water bridges between these Y-line (sensors) and other sensors, false detection can occur. To avoid such false detection, the gap between the sensors should be increased. This gives better moisture tolerance in the following ways:

  • Since the gap is greater, water does not easily bridge between sensors.
  • Sensor-to-shield coupling becomes stronger relative to coupling between adjacent sensors, reducing the influence of neighboring sensors compared to sensors placed closer together.

If some of the Y-lines have multiplexing options for TC/TCC and some do not:

  • Ensure that they are physically separated.
  • Increase the gap between the sensors where adjacent driving is not possible.

Sensors with adjacent pin driving capability graphic

Back to Top