A capacitive [touch sensor](https://www.onzuu.com/category/touch-sensors) is a device that detects your finger by measuring a change in capacitance, not by pressure like a button or resistive touch screen. Think of it as a tiny capacitor where your finger becomes part of the circuit. ![8b96b7d0-8705-4f3a-afd6-bccb31cdc2b3](https://hackmd.io/_uploads/HyrJWPYz-l.png) **1. Basic idea** A [capacitor](https://www.onzuu.com/category/capacitors) is formed by: * Electrode (touch pad) – a piece of copper on the PCB * “Other plate” – usually ground or nearby conductors * Dielectric – the PCB, air, plastic, etc. When no one touches the pad, it has some small baseline capacitance (a few pF). When your finger comes close or touches it: * Your body (which is conductive) couples to the pad. * The capacitance increases slightly. * The [sensor](https://www.ampheo.com/c/sensors) electronics notice this change and decide: “OK, that’s a touch.” **2. How does it detect the touch electrically?** The sensor circuit (inside a dedicated IC or [microcontroller](https://www.ampheo.com/c/microcontrollers) peripheral) repeatedly: 1. Charges and discharges the pad, or 2. Measures how long it takes for the voltage to rise/fall, or 3. Measures the effect on an internal [oscillator](https://www.onzuu.com/category/oscillators) frequency. Because capacitance affects these behaviors (RC time constant, frequency, etc.), the circuit can compute a measured value that: * Is stable in idle, * Shifts when a finger is present. The firmware then applies a threshold + filtering: * If measured_capacitance > baseline + margin → register a touch. * It also tracks slow changes (temperature, humidity) as baseline drift. **3. Main types** 1. Self-capacitance sensors * Each pad is measured against ground. * Simple, great for single buttons, sliders, wheels. * More sensitive, but multi-touch is limited (ghosting on big matrices). 2. Mutual-capacitance sensors (used in most modern touchscreens) * One set of transmit (Tx) lines and one set of receive (Rx) lines. * Measuring the capacitance between each Tx–Rx pair. * Allows true multi-touch, used in phones and trackpads. For simple PCB buttons and sliders, you’re usually dealing with self-capacitance. **4. Where are capacitive touch sensors used?** * Touch buttons on appliances (microwave, induction cooker, washing machine) * Touch sliders / wheels (volume control, brightness bars) * Smartphones & tablets (mutual capacitive touchscreens) * Lamps and audio gear (touch-on / touch-dim) * Industrial HMIs where sealed, wipe-clean surfaces are needed Key advantage: no moving parts, easy to seal behind glass or plastic. **5. Pros and cons** **Advantages** * No mechanical wear (no contacts to oxidize or fail). * Can be completely sealed behind glass or plastic → dust/water resistant. * Flexible shapes: circles, triangles, logos, sliders, wheels. * Looks “modern” and premium. **Disadvantages** * Sensitive to noise, PCB layout, ground references. * Needs careful tuning for different panel thicknesses and materials. * Can be affected by water drops, gloves, or very dry fingers. * More complex electronics than a simple mechanical switch. **6. How do you implement one in practice?** Three common ways: 1. Use a microcontroller with built-in capacitive touch * Many MCUs (e.g. [STM32](https://www.ampheo.com/search/STM32), AVR “QTouch”, [PIC](https://www.ampheo.com/search/PIC), [NXP](https://www.ampheo.com/manufacturer/nxp-semiconductors), etc.) have touch channels. * You route copper pads to those pins, and the library handles measurement and filtering. 2. Use a dedicated touch IC * Example: 1–8 channel capacitive touch controller chips. * They output simple digital signals (“touched / not touched”) or send data over I²C. * MCU only reads a pin or I²C → very easy. 3. DIY with basic MCU + RC timing (for learning / hobby) * Charge a pad through a resistor and measure charge time via an [ADC](https://www.onzuu.com/category/analog-to-digital-converters)/comparator or by timing digital transitions. * More work, more sensitive to noise, but good for understanding. **7. How is it different from a resistive touch sensor?** **Capacitive:** * Needs a conductive object (finger) to change capacitance. * Works through thin glass/plastic. * Does not require pressure. **Resistive:** * Two conductive layers are pressed together. * Detects touch via change in resistance / position. * Works with any stylus but needs physical pressure and wears out faster. **In one sentence:** A capacitive touch sensor is a touch input device that detects the presence of your finger by measuring tiny changes in capacitance on a conductive pad, instead of using mechanical contacts or pressure.