Envelope filter

Discussion in 'General Electronics Chat' started by Razor Concepts, May 5, 2009.

  1. Razor Concepts

    Thread Starter Active Member

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

    [​IMG]

    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?
     
  2. StayatHomeElectronics

    Well-Known Member

    Sep 25, 2008
    864
    40
    Why don't you include the link to the website? How exactly did you connect your circuit?
     
  3. Razor Concepts

    Thread Starter Active Member

    Oct 7, 2008
    212
    1
    http://www.mshieh.com/Hardware/Projects/AudioMeter/8.php

    One of the audio channels is attached and a 10 bit ADC reads the values (vref at 5 volts). Instead of connecting it to vgnd as the schematic shows I connected it to normal ground. I tried connecting it to vground (made with two 47k resistors) but I got no change in adc readings at all.
     
  4. AdrianN

    Active Member

    Apr 27, 2009
    97
    1
    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: May 6, 2009
  5. StayatHomeElectronics

    Well-Known Member

    Sep 25, 2008
    864
    40
    How are you powering the circuit? Vdd = 5V? Vss= 0V? Vgnd = 2.5V?

    Are you using the same op amp?
     
  6. t_n_k

    AAC Fanatic!

    Mar 6, 2009
    5,448
    782
  7. Darren Holdstock

    Active Member

    Feb 10, 2009
    262
    11
    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.
     
Loading...