My musical project Sylvisphere uses contact mics to get great sound out of – among other things – an old desktop lamp.
See how it is done after the break.
Either buy a piezo disk from radio shack or other dealer, or hack one out of an old alarm clock or from the tweeters of an old stereo. My experience is that the bigger the disk the flatter the frequency response. I have used this disk from Farnell, and it sound awsome.
Solder them as I show on the hand written schematics above. Note! You have to be VERY fast when soldering on the inner disk, else the thin metal film will melt away.
The piezo mic works best with a high impedance input as a low impedanse will pull down the signal to much. A balanced XLR-input is a safe bet. The jack version all depends on the specific mixer or guitar pedal you use. Experiment.