Building a Capacitive Touch Slider
Overview
This tutorial shows you how to build a capacitive touch slider using tscircuit. Capacitive touch sliders use conductive pads covered by a thin layer of solder mask (solder resist) as the sensing surface. When a finger approaches, the change in capacitance is detected by a touch controller IC.
Basic Capacitive Touch Pad
The key is using polygon shaped SMT pads with the coveredWithSolderMask property set to true. This tells the manufacturer to apply solder mask over the pad, creating an insulating layer that enables capacitive sensing.
5-Segment Capacitive Touch Slider
A slider consists of multiple sensing segments arranged in a line. Each segment connects to a touch controller that measures capacitance changes as a finger moves across.
Key Properties
| Property | Value | Description |
|---|---|---|
shape | "rect" or "polygon" | Pad shape — use rect for simple segments |
coveredWithSolderMask | true | Enables solder mask over the pad for capacitive sensing |
layer | "top" | Place pads on the top copper layer |
How Capacitive Touch Works on PCBs
- Conductive pad: Copper pad etched on the PCB surface
- Solder mask layer: A thin (typically 25-75μm) dielectric coating applied over the pad
- Capacitance change: A nearby finger increases the capacitance of the pad-to-ground system
- Touch controller: An IC (e.g., Microchip MTCH series, Cypress CapSense) measures this change and reports touch position
Tips for Good Capacitive Touch Performance
- Keep the solder mask thin (request thin solder mask from your PCB fab)
- Route sense traces away from high-frequency signals
- Add a ground plane on the bottom layer beneath the pads
- Space segments 0.5–1mm apart to avoid crosstalk
- Connect each pad to a dedicated touch controller channel