[sdiy] Peak Detector [was: Full wave rectifier for audio]

Seb Francis seb at burnit.co.uk
Sun Jan 15 21:59:21 CET 2006


After some very helpful help (thanks Harry!) I am progressing with my 
Noise gate / MIDI gate, and now have a functioning peak detector with 
variable hold.

For anyone interested, here is the schematic of the peak detector part...
http://burnit.co.uk/sdiy/stuff/peak_detect.gif
(the output is the wire from C98 that doesn't go anywhere yet)

The full wave rectifier / abs-value part consists of the 2 opamps and 
the 300K resistors.  This is a really neat little circuit (sent to me by 
Harry).  I've added a peak hold bit on the end (R86, D33 & C98), and a 
constant current sink for the peak hold.

The gain of the abs-value part is 2 (change R73 to 300K for unity gain).

Having a constant current sink for the peak decay means that the 
threshold setting will affect the peak hold time in a linear way.  It 
also means that the louder the peak, the longer the peak hold.

With the peak hold set on minimum (very fast ~10ms), quite a large 
amount of ripple is let through for low frequency inputs (I plan to have 
enough hysteresis in the threshold detect comparator to avoid chattering).

The 3rd transistor in the current mirror halves the current through Q7, 
(almost) doubling the max decay time (it was done this way because 2M 
pots aren't easily available).

The peak decay becomes less linear towards the slower settings because 
of current passing back through the 300K resistors - I didn't want to 
use too large resistors here, and ~600ms peak hold was enough for my 
application.

The MIDI TRIG input comes direct from a PIC I/O pin.

Seb




More information about the Synth-diy mailing list