Most PCs have have option that enable booting it on keyboard input. This gives ability for interesting hacks like knock enabled PC power up. Joonas have built a simple Attiny45 device that detects knock and sends PS/2 command to PC to turn it on. Knock is detected with piezo buzzer that is used as knock sensor. Since circuit is connected to PS/2 interface, it also provides power supply.
knocks are detected by reading piezo sensor with microcontroller ADC input. ADC is implemented to sense signal level that is over threshold. And in order to to detect three successive knocks there is a timer based counter implemented. This is really simple implementation that can impress your friends.