Hi all
I have been asking before (see
https://www.eevblog.com/forum/beginners/use-tvs-diode-to-clamp-analog-voltage/ ) about how to clamp an analog voltage and with your very appreciated help, I ended up with the following circuit (attached).
The analog voltage source is a piezo sensor (a drum pad which is hit) which I have not much control over. Hitting is softly generates a pulse with low voltage, and trying with a few sensors it seems hitting it hard can make the pulse go to 50Vpp.
Inside the MCU I want to be able to make the difference between a soft hit and a hard hit, for now I am using:
1) a comparator to check if the voltage is above 0.6V
2) the ADC to check if the voltage reaches 3.3V
If 1) is activated I know there is a hit, and then 2) decides whether the hit is soft or strong.
This works fine in theory, and in practice it is actually decent but because the range is so little compated to the 50Vpp of the sensor, you have to hit the pad very softly to make sure the hit is not detected as "strong". In other words, trying to tap a rythm, like "H S S S H S S S H" (H=hard hit, S=soft hit), it is quite easy to make the soft hits just a bit too strong and then they are detected as hard hits.
So I was thinking - to improve the sensitivity I need to scale (with an opamp f.x.?) the analog input from 50Vpp to like 5Vpp - but my whole board runs at 3.3V, from an LDO converting USB 5V. I guess an opamp with rails at 0V and 5V would not like very much a signal that is 50Vpp?
What do you guys think, do you maybe have other ideas on how to detect the soft and hard hits (ideally without too much extra hardware on the board)?
Thank you!!
Simon