Hi,
I'd like to make a vibration sensor. I was thinking of using one of those weighted piezos to wake up the microcontroller when there's vibration.
I found a pretty good reference for that here, and I want to make sure I understand it correctly.
This is the simpler one of the suggested circuits. Because the piezo generates high voltages, this design uses zener diodes to clamp the voltage to safe levels. In my case, I would use 3.3V zeners.
A more complex alternative is this one, that uses an op-amp comparator and voltage divider to generate a digital signal for wakeup based on the pot's voltage:
My understanding is that the simpler circuit will generate some signal between 0 and 3.1V (whatever zener diode voltage will clamp it at). If the vibration is high enough, the generated signal will be high enough to wake the microcontroller, but if it's only a slight vibration, the voltage generated may not be high enough to wake the microcontroller. So that's the downside of the simple circuit. But the piezo voltage can be ... like 2.7V, and the zener diodes in the circuit will let 2.7V translate through to the microcontroller pin? I'm checking my understanding that the two zeners in this circuit only act as positive clamps.
The more complex circuit has the advantage of allowing you to use a very low voltage for the comparator, so that you can make any small piezo voltage generate a Vcc level interrupt.
Is that correct? Since this is a battery powered sensor, I also want to know what the op-amp circuit would consume. Is the current consumption of the op-amp circuit just Vcc / R_Potentiometer?
Third question: What is the 320Mohm R4 resistor doing in that circuit? What'll happen if you leave it out? And what will happen if you add a large resistor in that same spot, but on the simpler circuit?