This very clever circuit only produces an output when the piezo detects two taps. It can be used as a knock-knock doorbell. A PC board containing all components (soldered to the board) is available from talking electronics for $5.00 plus postage. The circuit takes only a few microamp and when a tap is detected by the piezo, the waveform from the transistor produces a HIGH on pin 6 and the HIGH on pin 5 makes output pin 4 go low. This very quickly charges the 47n and it is discharged via the 560k to produce a brief pulse at pin 3.
The 47n is mainly to stop noise entering pin 2. Pin 1 is HIGH via the 2M7 and the LOW on pin 2 causes pin 3 to produce a HIGH pulse. The 47n is discharged via the internal diodes on pin 13 and when it goes LOW, pin 11 goes HIGH and charges the 10n via the 22k and diode.
This puts a HIGH on pin 8 for approx 0.7 seconds and when a second tap is detected, pin 9 sees a HIGH and pin 10 goes LOW. This puts a LOW on pin 12 and a HIGH on pin 8. The LOW on pin 12 goes to pin 1. A HIGH and LOW on the second NAND gate produces a HIGH on pin 3 and the third NAND gate has a HIGH on both inputs. This makes pin 10 LOW and the 4u7 starts to charge via the 2M7 resistor. After 5 seconds pin 12 sees a HIGH and pin 11 goes LOW. The 10n is discharged via the 10M and when pin 8 sees a LOW, pin 10 goes HIGH. The output sits HIGH and goes LOW for about 7 seconds.