1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Precision Rectifier...what's going on here?

Discussion in 'Electronic Projects Design/Ideas/Reviews' started by Rich D., Mar 22, 2016.

  1. spec

    spec Well-Known Member Most Helpful Member

    Joined:
    Oct 27, 2015
    Messages:
    5,828
    Likes:
    710
    Location:
    Somerset UK GMT
    Couldn't agree more bounty. :)
    spec
     
  2. Rich D.

    Rich D. Member

    Joined:
    Feb 3, 2014
    Messages:
    252
    Likes:
    20
    Location:
    West Chester, PA
    Happy Easter!!!

    Spec: Thanks, a LOT of useful information. I am a bit afraid to slaughter my baby, since I've much else to do and used up 2 weeks on this already! But I do want to experiment with comparator ideas, I'll post what ever I learn.

    audioguru: Yea.., that noise generator is not really there. I now using it on another part of the circuit. Normally I would wire it as a ground-voltage-follower.

    bountyhunter: I kept upping the value of the "big" cap to get more 'sustain' time. I had a backup plan to add a transistor driver to boost it to more like 100mA, but decided to test the other circuit out first, and it appears fast enough. I attached the back-up schematic if it proves to be to slow.
    Harp12 Meter Exp1.jpg

    The resistor R1 is there to make sure the input cap doesn't fry the op amp input on power down if it is fully charged. If I decide to use a larger cap there, this could be important. Either way 1K should only make about 1% difference in signal level. If I need to later reduce the gain, I can use that as half of an input voltage divider. This will be fed with a signal of about 24 volts peak-to-peak for maximum headroom, normal signal levels should only peak at single-digit volts.

    I'm trying to keep the number of types of op amps down as well as the cost so I am using an op amp that isn't ideal for rectifying but good enough. The LM224's I'm also using because they can put out at least 20, typically 40 mA, enough to drive any LED, and I have a drawer full of them I got real cheap.

    As for the application, I am specifically going for a peak meter with a long hold time. I love analog meters as much as I love the old blue Nat Semi books, but they are hard to see at a distance, expensive, delicate, and seldom show less than about -20 dB unless they are very large. While averaging VU meters are great for mix-down use etc., these meters are specifically for setting a gain level for a preamp that will go into a digital recorder only, where clipping of any sort is not an option. They will not me mixed, compressed or eq'd. All the volume adjustments will be done post-recording. I only want to set the level for a maximum signal without clipping, and occasionally would like to see something around -30 to -40 dB to verify I am getting a signal without going to the mic and tapping it. Having done this a bazillion times using meters on commercial equipment, I think that this will allow me to do this task more quickly and focus on other tasks.
     
  3. spec

    spec Well-Known Member Most Helpful Member

    Joined:
    Oct 27, 2015
    Messages:
    5,828
    Likes:
    710
    Location:
    Somerset UK GMT
    Hi Rich,

    Happy Easter to you too!

    Yes, if you have got a circuit working OK there is no point in changing. :happy:

    spec
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Mikebits

    Mikebits Well-Known Member

    Joined:
    May 24, 2008
    Messages:
    6,217
    Likes:
    175
    Location:
    San Diego, Ca

    I have maybe 3 data books in my library. The first and foremost is the TI TTL databook hardback, then I have the Motorola Small Signal transistor (brown cover) data book, and lastly the Nat Semi, FAST Application Handbook 1987. The FAST book has great notes for high speed board layout, transmission line driving among other things. They got much of their info from the Howard Johnson High Speed Digital Design book (which is also in my library).

    databook.png
     
  6. bountyhunter

    bountyhunter Well-Known Member

    Joined:
    Jul 17, 2009
    Messages:
    1,560
    Likes:
    81
    The easy way to do that is use a FET input op amp on the peak detector, then you can use a reasonable size cap and still have a long hold time. I think I used TLO84 types.

    If a -40 dB range is the objective, I would probably use a pair of LM3914 type devices stacked in series. Or to save money, use a pair of 339 type comparators with resistor ladder. I actually built this exact device about 40 years ago and it has a -45 dB range (3 dB steps) with 16 LED's per channel. Very cheap design, lots of resistors.

    The thing about picking up clipping is the peak detector has to be fast enough to capture a fast transient.
     
    Last edited: Mar 27, 2016
  7. spec

    spec Well-Known Member Most Helpful Member

    Joined:
    Oct 27, 2015
    Messages:
    5,828
    Likes:
    710
    Location:
    Somerset UK GMT
    Great stuff Mike. :cool::cool:
     
  8. ChrisP58

    ChrisP58 Well-Known Member

    Joined:
    Apr 27, 2012
    Messages:
    1,081
    Likes:
    131
    Location:
    Provo, Utah, USA
    Since I was into Audio stuff at the time, I found the Audio/Radio Handbook a goldmine.

    But I must ask. Whence, or from whom, came the term, "Floobydust"?
     
  9. spec

    spec Well-Known Member Most Helpful Member

    Joined:
    Oct 27, 2015
    Messages:
    5,828
    Likes:
    710
    Location:
    Somerset UK GMT
    Hi Chris,

    Floobydust had me foxed for years too, but here is a definition:

    \ floo⋅by⋅dust \ , noun; A contemporary term derived from the archaic Latin "Miscellaneous".

    Some of those crazy engineers at National Semiconductor came up with "Floobydust" in the 70's. Meaning a "mixed bag". It seems perfectly normal if you are wearing platform shoes and listening to the Bee Gees. Believe it or not, you'll find the term Floobydust in the table of contents of the 1976 & 1980 editions of the National Semi Audio/Radio Handbook.

    http://www.aed.pro/floobydust.htm

    spec
     
  10. ChrisP58

    ChrisP58 Well-Known Member

    Joined:
    Apr 27, 2012
    Messages:
    1,081
    Likes:
    131
    Location:
    Provo, Utah, USA
    Google found that link for me too. But I'm hoping there might be a more interesting inside story.
     
  11. KeepItSimpleStupid

    KeepItSimpleStupid Well-Known Member Most Helpful Member

    Joined:
    Oct 30, 2010
    Messages:
    9,970
    Likes:
    1,099
    • Funny Funny x 1
  12. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,139
    Likes:
    566
    Location:
    AZ 86334
    We need a Bob Pease on our forum...
     
  13. KeepItSimpleStupid

    KeepItSimpleStupid Well-Known Member Most Helpful Member

    Joined:
    Oct 30, 2010
    Messages:
    9,970
    Likes:
    1,099
    So does everybody else. Bob Pease and Jim Williams passed away. Two great minds and Bob had a messy desk.
     
  14. Rich D.

    Rich D. Member

    Joined:
    Feb 3, 2014
    Messages:
    252
    Likes:
    20
    Location:
    West Chester, PA
    I spent a little time investigating the use as a comparator for a peak detector. I experimented with this simple & affordable circuit:

    sample.jpg

    It looked promising because of the low parts count and cost. In testing with only a 1μF ceramic capacitor, it showed hold times of maybe 5 seconds. In testing I also found that it indeed could dump a lot of electrons into the holding capacitor, but when a sudden increase in AC signal was input, it over-shot and peaked at a volt or two too high before recovering to a stable DC level a second later. This would indicate a peak that was too high. Maybe a 2nd transistor wired as a current sink could drive it back down quicker. I suspect it happens because the time between the op amp detecting the peak voltage was reached and the actual shutting off of the transistor was too long, most likely as a result of the slew rate limit of the op amp. Another problem I found in testing that there was a big difference between 20 Hz, 2 KHz, and 20 KHz, with the 20K signal being almost 1/2 the output of the 2K frequency.

    I think this simpler circuit would work much better with a good, fast comparator chip, but to save time I am going to stick with the earlier circuit that was verified to work from 20 to 20,000 Hz.
     
  15. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,588
    Likes:
    950
    Location:
    Canada, of course!
    That will be my answer to my wife. Thanks.:p
    She says now that I am older I am not as tall as when I was young. I wore platform shoes when we danced to the Bee Gees.
     
    • Funny Funny x 1
  16. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,588
    Likes:
    950
    Location:
    Canada, of course!
    The newest "peak detector" has a few serious problems:
    1) Its opamp inputs have no DC reference voltages and are floating.
    2) It has positive feedback which causes it to latch.
    3) The input bias currents of the opamps will charge the capacitor but nothing will discharge it.
     

    Attached Files:

  17. Rich D.

    Rich D. Member

    Joined:
    Feb 3, 2014
    Messages:
    252
    Likes:
    20
    Location:
    West Chester, PA
    That is not a circuit I would recommend anybody actually use. It is for illustration purposes only. In the circuit I built, the capacitor discharged just fine (in about 10 or 15 seconds). I used the input to the scope and meter for that. To adjust the hold time there would be a resistor there, perhaps 1Meg(?) to discharge the cap. I think there's potential there, but this example never made it past the solderless breadboard stage.

    The feedback isn't positive because the transistor stage inside the feedback loop is inverting, making the feedback inverting.
     
  18. spec

    spec Well-Known Member Most Helpful Member

    Joined:
    Oct 27, 2015
    Messages:
    5,828
    Likes:
    710
    Location:
    Somerset UK GMT
    Hy Rich,

    You are asking quite a lot of any peak detector, let alone one built from an opamp, to handle 24 p/p input. Around 8V p/p would place less of a demand on the circuit. You could always amplify the peak detector output with the buffer amp to match your bar graph circuit voltage requirements.

    spec
     
    Last edited: Mar 29, 2016
  19. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,588
    Likes:
    950
    Location:
    Canada, of course!
    You are correct, your latest circuit has the first opamp and transistor with negative feedback.
    The datasheet of the MC33078 shows that its inputs have a maximum bias current of 0.75uA so a 1M resistor across the capacitor will allow the capacitor to charge to 1.5V with no input signal.
     
  20. spec

    spec Well-Known Member Most Helpful Member

    Joined:
    Oct 27, 2015
    Messages:
    5,828
    Likes:
    710
    Location:
    Somerset UK GMT
    Hi Mike:
    Quite a few of the old National Semi data books are available here:

    http://archive.org/search.php?query=creator:"National Semiconductor"

    spec
     
  21. Rich D.

    Rich D. Member

    Joined:
    Feb 3, 2014
    Messages:
    252
    Likes:
    20
    Location:
    West Chester, PA
    Yes I am asking a lot of my desired circuit. I always try to do that in engineering, to push the boundries, not just accept them. Sometimes I fail, but sometimes not. Dropping to 8v p/p from 24v p/p will reduce my audio's headroom by about 10 dB, and would therefore increase the noise floor by 10dB. So for better or worse, the design requirement is to handle a 24v p/p signal.
    I could easily scale the input to this detector by 1/3 and restore it later, but that would make my noise floor of the peak detector (which just met -35dB) that much worse also. If the PCB version can do better than that I'll take it.

    I think the better choice for my application is to go with the circuit in post 56(?) which does the job but not much more. (Of course that extra op amp is going to be used elsewhere so it won't be a noise generator.) I can make do with the parts already on hand, and will not need to acquire any unique comparator chip in single quantities.

    I want to thank you all for your help, spec, audioguru, MikeMI, bountyhunter...did I miss somebody?
    Maybe somebody else will read this some day, learn something and make an even better circuit.
    I'm sure I'll be back with another challenge.
    ....maybe that capacitor testing oddity I've been seeing lately?
     

Share This Page