Continue to Site

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.

  • 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.

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

Status
Not open for further replies.
Analog meters are very useful.

The audio VU meter I built for processing MP3 tracks in my computer has both an analog and LED bar graph displays. The LED display uses peak hold and the analog meter is more average responding and actually gives a much better representation of "loudness" because of the weighting I used for that signal path. Peak display is always useful information but notoriously misleading for adjusting volume levels. Sometimes analog is the best.
Couldn't agree more bounty. :)
spec
 
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.
 
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.
View attachment 98536

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.

Hi Rich,

Happy Easter to you too!

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

spec
 
Hy bounty,

I can't believe I'm exchanging posts with a National Semiconductor applications engineer. At work we used to eagerly anticipate the latest creations and words of wisdom from Nat Semi and I had every data book (blue) and application report they ever published. It was a great shame they were taken over by TI, in my opinion anyway.

spec

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
 
Happy Easter!!!
As for the application, I am specifically going for a peak meter with a long hold time.
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.

Happy Easter!!!

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.
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:
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).

View attachment 98540
Great stuff Mike. :cool::cool:
 
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"?
 
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.

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

spec
 
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.

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

spec

Google found that link for me too. But I'm hoping there might be a more interesting inside story.
 
We need a Bob Pease on our forum...
 
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.
 
It seems perfectly normal if you are wearing platform shoes and listening to the Bee Gees.
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.
 
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.
 

Attachments

  • not a peak detector.png
    not a peak detector.png
    59.6 KB · Views: 332
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.
 
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:
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.
 
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).

View attachment 98540
Hi Mike:
Quite a few of the old National Semi data books are available here:

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

spec
 
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?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top