Envelope filter

Thread Starter

Razor Concepts

Joined Oct 7, 2008
214
I'm trying to make a envelope filter to smooth music coming from a mp3 player.



The web site I found that used a .1uf cap and a 10m resistor to smooth a amplified electret microphone. I tried the same set up w/4148 diode with the mp3 player at max volume, but I got very low ADC readings (~40 with 10 bit adc).

How should I go about changing the values? Trial and error?
 

AdrianN

Joined Apr 27, 2009
97
When you say 40, with 10-bit ADC, means 40 counts, right?

What is the signal level at the OpAmp output? The 10M resistor is called a bleeder. It will not do too much regarding the signal level. If you decrease its value, the cap discharges quicker, and your ripple increases. The advantage is that you "catch" more pulses in the envelope, the disadvantage is increased ripple. If this resistor is too large, the cap will stay most of the time at the highest peaks and will discharge slower. Adjust the bleeder acording to your application.

Make sure the signal level at the OpAmp output, minus 0.6V diode drop, is somewhere close to the ADC reference voltage. I am guessing the signal is too low.

One more thing. Vgnd is a DC level that biases the OpAmp. I an guessing (again) that your OpAmp is powered from a single source, Vdd, so Vgnd brings the OpAmp output at Vdd/2. Your audio signal should ride on top of this DC level.
 
Last edited:
Yes, that circuit linked to in the OP is nasty, as it'll be horribly non-linear with small signals. Better to have the diode in the feedback loop, like in t n k's link above. There's a simpler peak detector circuit on this wiki page that will work well, but watch out for that leakage current budget (diode reverse bias current, op-amp input bias current, and leakage current of the cap) and make the slew rate of the op-amp fast enough that it can whack from rail-to-rail faster than the fastest signal.

Both the Wikipedia circuit and t n k's link assume the output is buffered by an amp with a high-impedance input, usually a single op-amp buffer.

That said, it's probably bias problems that are giving Razor Concepts grief. A probe with a DC voltmeter could reveal a lot.
 
Top