True. Luckily today you can get high brightness LEDs that will put your eye out with 5 mA.One thing to watch with the LMx39 comparators is the low sink current: worst case 6mA, although you can generally squeeze around 10mA out of most of them. So long as 6mA LED forward current would give sufficient brightness that would not be a problem.
spec
As I recall, I selected it because I needed one with near zero input bias current that ran on only one rail. It was probably a part just released so I found something to use it in to make the Marketing guy happy.....I saw that but didn't want to hurt your feelings.
True. Luckily today you can get high brightness LEDs that will put your eye out with 5 mA.
Just remember that the op amp's input bias current drains the peak detect cap so make sure it isn't too high. I think the LM358 is typically a couple of hundred nano Amps because the input is a darlington. If you use a FET op-amp it will be close to zero. Some NPN input op amps have pretty high input bias current.I think bounty hunter wins the contest for economical. Looks like a pretty clever design. Since I already have dual supplies and voltage references distributed across the whole system, those wouldn't cost me anything per channel.
I would want to upgrade the '358s though for faster response.
The TI OPA192 would be my choice of op amp both for the precision rectifier and any summer/ buffer- might be a bit pricey for this application though.Just remember that the op amp's input bias current drains the peak detect cap so make sure it isn't too high. I think the LM358 is typically a couple of hundred nano Amps because the input is a darlington. If you use a FET op-amp it will be close to zero. Some NPN input op amps have pretty high input bias current.
It was a great shame they were taken over by TI, in my opinion anyway.
Agree. The databooks were fun to read. Although the TI TTL databook was a nice piece of work. Precision Monolithics was a cool company too. AD and PI really had to merge tp be able to use all the intellectual properties of each.
There was another side of AD that's gone now. I did a design using their uMAC 4000 series https://www.datasheetarchive.com/uMAC4000-datasheet.html DAQ products. The datasheet was impressive at the time, BUT it failed to tell you that the inputs had to be configured in groups of 4. So, four R,S,K or K TC's and no auto-range. The serial port was a bit slow too.
When I asked for a manual to look at for the $5,000 USD system we needed, AD said no one has ever asked for that before.
But they were expensive to print and there was always a political civil war inside the company to get a printing paid for. And the irony is that we in Applications usually couldn't get any books. They were used as "leverage" to get into see people at companies where the sales guy would deliver the books and bend somebody's ear as the price.Agree. The databooks were fun to read. .
We actually did have the best customer service. What was hilarious was when somebody would be trying to get a Linear Technology part to work and couldn't get through to them and they would call me and say:Yeah, I always had a soft spot for National. They looked after us engineers
But they were expensive to print and there was always a political civil war inside the company to get a printing paid for. And the irony is that we in Applications usually couldn't get any books. They were used as "leverage" to get into see people at companies where the sales guy would deliver the books and bend somebody's ear as the price.
The most prized book of all was the audio-radio handbook, of which I ended up with two copies by guile and cunning.
The first set of books I got was obtained by theft when I plundered the ofice of a laid off senior Apps engineer named jay Scolio. I also took his desk since I have been working off a folding table since being hired (seriously).
Jay pulled the funnies practical joke I ever saw: he was immediately hired by maxim who was our competitor one block down. Jay still remembered everybody's mailstop and he had Maxim ship us all complete sets of their data books as kind of a tweak to say:
"Hey! The new place actually prints data books!"
We actually did have the best customer service. What was hilarious was when somebody would be trying to get a Linear Technology part to work and couldn't get through to them and they would call me and say:
"I'm trying to design in your LM2087 and I need...."
I'd listen and say:
"We don't make any such part. Just because you put LM in front of it, doesn't mean we make it."
Then the guy would beg for help and I would usually do it just for customer good will.
Truth is that Apps was the great dumping ground of all the other departments. We had weak managers and the other managers siezed on that like how a lion senses the weakest gazelle. As for "well run", it was a zoo. Every level of management lied to the level above and below it. But the company survived despite itself.....It is surprising what goes on the other side of the fence. I got the impression that Nat Semi was very well run and that the apps engineers were sort of demi Gods who only had to snap their fingers to get what they wanted.
spec
OMG not National Semi tooTruth is that Apps was the great dumping ground of all the other departments. We had weak managers and the other managers siezed on that like how a lion senses the weakest gazelle. As for "well run", it was a zoo. Every level of management lied to the level above and below it. But the company survived despite itself.....
I LOVE those National Semiconductor books!
It seems simple to me: if you show engineers how to use your chips they will use them, if you don't, you won't sell any.
Spec, thanks for the interesting circuit idea. I'll have more to say about that but I think that's a very good way to do this.
...but...
I thought I got it figured out:
View attachment 98502 View attachment 98503
I have a buffer / isolation amp on the input to avoid loading down the audio signal. It is AC coupled with a pretty big cap, and the 1K will ensure that any charge on the cap can not damage the op amp on power down. Next it goes into a R-D-R network that I think helped the circuit perform faster, it clips the positive peaks with a Schottky diode that I believe keeps the following stage from driving itself far into the negative output. Without that R-D-R it takes a while for the output to return to positive, so some of the fast peaks are lost while the op amp output recovers. Without it, I could easily see the start of the positive sine waves clipped like how an AC dimmer circuit works, and the response falls off a lot at 20KHz, even though its a 15 MHz op amp.
The middle stage has a cap for negative feedback. I didn't need it, but I will put that in the PCB; I might need it to kill oscillations. (I don't think I have any, but on the solderless breadboard there is a lot of noise that could be hiding something.) The middle stage does the hard work of rectifying. D3 is the main rectifier and it's in the feedback loop to effectively null out most of the errors of the 350mV diode drop. I had to loose the transistor rectifier/driver because it was pointed out by audioguru that it couldn't handle the reverse voltage. (In hindsight, I guess I could have just added a diode before the base.) I looked into a Darlington transistor, which could just handle a reverse 12 volts but that was pushing it, and I'd have speed-killing 1.2 volt diode drop that the op amp's slew rate had to compensate for. I also looked into MOSFETs, they could also handle the voltage but I didn't have any PMOSFETS available and not sure how I would have hooked that up.
Either way, this version responds fast enough. D4 is in there so whatever is left of the positive input peak (which is negative here) will be cut down to a lower gain after 350mV is reached and will help prevent the op amp from going hard negative, again for speed.
From the rectifier, it drives a fairly big 33uF cap so there will be a loooonnnng peak hold time. Again I was worried about a big charge on the cap when the power goes off (when audio may likely pop), so D17 will drain most of that charge through the dying +15 supply, and whatever's left has to get through the 10K resistor before it can damage the final op amp stage.
I drew up a clever (at least I thought) idea to enhance the drive current to the big cap using a transistor so it could respond faster, but I thought I should test this out first and apparently it didn't need any more work. Worst case, using a 24 volt peak-to-peak input signal at 20,000Hz, I was catching the peaks. The charts I attached show the response from 20 Hz to 20,000 Hz, and it's fairly flat. Yes, you can see some variation there but 1) I don't have fancy lab equipment in my basement and 2) we are looking at a chart with linear data. If you convert it to a log scale (which a dB meter is supposed to be), the variation seen converts to a small fraction of a dB - far too small to be noticed by the output meter with 4dB resolution. (For reference, I used a 22uF cap, didn't have 33uF with enough voltage rating.)
So the frequency response is good at the worst-case maximum input. The other concern is reasonable accuracy at the lower levels. That is where the precision of the rectifier is critical. At 8, 2.4, and 800mV it appears pretty much the same, with a bit of rolloff at 20KHz, but still a fraction of a dB. By the time I got to the 240mV level (about -35dB), I was running into the noise floor of my solderless breadboard. I'm hoping for a -40dB reading that is valid, but I'll have to wait until I can test a soldered version.
So I was 'scoping it out and playing with the audio input levels, and saw a pretty cool thing going on. When the audio is at a high level, I can see the output of the op amp (pin 8) driving the rectifier and cap. It produces a steady stream of pulses that start at just before the next peak comes along as the cap has lost a little juice. As soon as it charges the cap back to full value, the op amp shuts off and the pulses disappear. If I turn the output down lower, for the next two or three seconds there are no pulses at all, until the op amp "decides" that the decaying voltage is getting too low. Then the pulses start up again. It's like there is a digital processor in there making PWM signals to control this thing. (OK, I am a nerd if I found this interesting).
So getting back to where I started, I think the circuit that spec has shown (post#40) is quite interesting. Whenever the comparator sees the input is higher than the output voltage, it turns on a transistor to dump more current into the cap. When it's satisfied, it turns off. I don't really know what could be simpler!
Maybe now I have to scrap this whole thing and start with that #40 post...
(sigh) I was going to start working on a voltage tripler for 48V phantom power.
(8) Have you thought about using a moving coil meter as a display. A suitable moving coil meter is available on Ebay for around £3 UK. This is just a thought- retro is all the rage at the moment.
spec
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?