This simple circuit is nonlinear passive on low pass frequency filter. It ‘s small size and easy to made for do not used the external power supply, but refuse a lot of noise ripples and need to a input voltage is stable.
The circuit works best, when the signal level is importantly higher than the constant ripple level.
The circuit has specifically related to two peak-detecting sample-and-hold circuits in tandem with a voltage average.
There are parts in figure a few : D1-D4=1N4148, C1=100uF electrolytic ,C2 – 2.2uF ceramic, R1 -100K
I hope this circuit are a little ideas your, to a big project next time.