I want to connect the piezo buzzer as a sensor to the microcontroller.
It fact it should be an input device for a simple electronic drumkit
for my son (8 Piezos -> USB MIDI -> Linux PC -> ZynAddSubFx or FluidSynth).
I'd like to use the USB MIDI based on:
http://cryptomys.de/horo/V-USB-MIDI/index.html
I've taken some measurements of the signal provided by the 27mm piezo
buzzer, and finally I've decided to use the following scheme to connect it:
(ASCII diagram, use non-proportional font to see it).
| X | Graetz bridge R1
.-+ X +-----o-->|--o------o--+===+--o---> Output
| | X | | | | |
| piezo .--+-->|--. --+-- .+.
| | | --+-- C1 | | R2
.--------o .--|<--. | | |
| | | .+.
| | | |
.-----|<--o------o---------o----> GND
For R1=10k R2=33k and C1=330nF I get the signal with amplitude up to 3.3V
when
reasonable force is applied to the piezo, and I can easily evaluate the
strength of the hit just by finding the maximum of the voltage at 1ms
sampling period.
Now I'd like to connect it to the ADC input in the microcontroller.
(First I'll use the AVR as in the above link, but finally I'd like to port
it to one of USB enabled PICs, to have more standard compliant USB).
The question is if the output resistance of the above circuit and the
clamping diodes on the ADC input are sufficient protection measures?
Is there any latch-up danger when someone hits the piezo too strong?
Of course I can also connect the Zener diode in parallel to C1, but I'd like
to avoid it...
--
TIA & All The Best in the New Year 2010
Wojtek