Hi
I am wanting to create a simple circuit using a Piezo Electric element to generate a voltage when it detects that it is raining or hailing outside. This will be interfaced to an Arduino and PC at a later stage.
The piezo element can product a positive and negative voltage when it picks up a vibration so I am thinking of using a Schottky Diode to rectify the signal so I only get positive voltage values.
The next issue is I am unsure of the maximum voltage that could be induced in the piezo element especially if I amplify the output voltage a little bit. Sometimes hail is very very heavy and may produce a larger voltage than I am expecting.
So my question is:
I want a limit the voltage to a maximum of 5v so even if the piezo + amplifier produced 7v I just want to truncate it at 5v, but the voltage < 5v is left to be what ever it is.
in software c# it would be something like below but I am unsure of the terminology to use when searching and hence my post here.
int Value = (Value > 5 ? 5 : Value)
Any help appreciated.
Chris