
Here is a reference design from Atmel designed to demonstrate the Qtouch capabilities of the ATtiny40 microcontroller. Only one pin, and a PCB pad is needed to make a capacitive touch button.
The reference design is to demonstrate the capabilities of the Atmel ATtiny40, which supports QTouch, the latest capacitive touch technology. The technology requires only a single I/O pin per touch channel. The reference design supports two analog output channels using PWM, buzzer, and LEDs indicating touch, and TWI or SPI communication interfaces. It also allows complete configurability, and supports off-board QTouch sensors.

extremely good