Basic circuit used to find the highest point/voltage at which a part of a circuit reaches. *Diode has small voltage drop so it won't be exactly that value* It will stay at that point for x time which is determined mainly by your capacitors capacitance and resistor. The time it takes to discharge the cap is found by using this... Time to discharge cap=5*Resistance*Capacitance.... *You could also do it without a resistor and only use the cap and diode*