Capacitive touch sensing requires careful hardware and software design. This guide covers best practices for Hangshun Touch Control MCUs.

Touch Sensing Fundamentals

capacitive Touch Principle: Sensor pad forms capacitor with ground; Finger touch adds capacitance; MCU measures capacitance change; Threshold detection determines touch.

Hangshun Touch Features: 6-24 configurable channels; Water rejection technology; Self and mutual capacitance modes; Integrated touch library.

Sensor Design

button Design: Circular pads: 8-12mm diameter; Square pads: 8x8mm to 12x12mm; Keep-out from ground: 0.5-1mm; Trace width: 0.2-0.3mm.

Slider Design: Interlocking triangles; 3-5 channels for linear slider; 4-8 channels for circular wheel; Calculate position by interpolation.

Overlay Materials: Glass: Up to 6mm with proper tuning; Plastic/Acrylic: Up to 5mm; Uniform thickness critical; No air gaps between sensor and overlay.

PCB Layout Guidelines

Layer Stackup: Top layer: Sensor pads and traces; Inner layer: Ground plane with hatched pattern; Bottom layer: Components and routing.

Trace Routing: Keep traces short (<100mm); Route on opposite side from touch pads; Maintain 0.5mm spacing between traces; Use guard rings for noise reduction.

Ground Design: Solid ground on layer below sensors; Hatched ground directly under sensors (20% fill); Connect guard ring to driven shield.

Water Rejection

water Rejection Technology: Hardware: Guard ring and driven shield; Software: Multi-channel water detection; Dynamic threshold adjustment.

Implementation: Enable water rejection in touch library; Configure sensitivity for wet conditions; Test with actual water exposure scenarios.

Tuning and Calibration

Sensitivity Tuning: 256 levels per channel (0-255); Higher value = higher sensitivity; Target SNR > 10:1; Auto-calibration at startup.

Threshold Settings: Touch threshold: ~80% of signal; Release threshold: ~60% of signal; Hysteresis prevents oscillation.

Environmental Compensation: Auto-calibration handles drift; Periodic baseline updates; Temperature compensation.

Testing and Validation

Test Procedures: Sensitivity with actual overlay; Water rejection testing; ESD immunity (±8kV contact); Noise immunity in target environment.

Common Issues: False triggers �?Reduce sensitivity, add filtering; Missed touches �?Increase sensitivity, check overlay; Water issues �?Enable water rejection, check sealing.

Development Tools

touch Tuning Tool: Real-time signal monitoring; Sensitivity adjustment; Export configuration; Graphical visualization.

Development Kits: Pre-tuned reference designs; Example touch patterns; Documentation and guides.