Fundamentals Friday.
Designing and measuring basic and precision opamp peak detector circuits.
All EEVblog Opamp related videos are here:
https://www.youtube.com/playlist?list=PLvOlSehNtuHu2FviAaZaiyXwN41G4b1Lf
Forum: http://www.eevblog.com/forum/blog/eevblog-490-peak-detector-circuit/'>http://www.eevblog.com/forum/blog/eevblog-490-peak-detector-circuit/
EEVblog Main Web Site: http://www.eevblog.com
EEVblog Amazon Store:
http://astore.amazon.com/eevblogstore-20
Donations:
http://www.eevblog.com/donations/
Projects:
http://www.eevblog.com/projects/
Electronics Info Wiki:
http://www.eevblog.com/wiki/
Designing and measuring basic and precision opamp peak detector circuits.
All EEVblog Opamp related videos are here:
https://www.youtube.com/playlist?list=PLvOlSehNtuHu2FviAaZaiyXwN41G4b1Lf
Forum: http://www.eevblog.com/forum/blog/eevblog-490-peak-detector-circuit/'>http://www.eevblog.com/forum/blog/eevblog-490-peak-detector-circuit/
EEVblog Main Web Site: http://www.eevblog.com
EEVblog Amazon Store:
http://astore.amazon.com/eevblogstore-20
Donations:
http://www.eevblog.com/donations/
Projects:
http://www.eevblog.com/projects/
Electronics Info Wiki:
http://www.eevblog.com/wiki/
Hi welcome to Fundamentals! Friday Today, we're taking a look at a real basic building block circuit called the Peak Detector. Now what a peak detector is If you've got an analog uh input signal that you want to know what value it Peaks at. As the name suggests, if you've got your, it could be a voltage like that. You want the positive Peak voltage on that or negative.
But let's we're just going to look at the positive case today and you want to detect that value and read it out. Now, why would you want to do that? Well, you know there's many reasons in uh, the audio uh field. For example, you want to, sort of, you know, get a Uh Peak value and hold it there. You might want to drive a some sort of lead display or something like that.
Lots of measurement, uh, scenarios as well where you may want to get this peak detector value. Now you know you may think, well, you could throw sort of Brute Force at this and you can feed your analog input signal into an analog to digital converter and then you can read the values and can get the maximum one. Well, yeah, you can do that sort of thing, but it's much easier to do it with two simple components. Turns out, all you need to do for a peak detector is feed your input signal like this into a diode and a capacitor.
That's it. So what are we going to get out of a simple Diode capacitor Peak detector circuit like this? Well, I've redrawn my input signal here and let's assume that your input signal starts out at zero like this and your capacitor is initially discharged so got zero volts on the capacitor. Well, the output voltage is going to follow the capacitor voltage like that and then it's going to go across here like this. Stick with me for a sec.
It's going to go up there like that and then it's going to jump up there and go like that. It's going to continually track the peak value of that signal. And why is it going to stay a DC signal like that? Well, a value on a charge on a capacitor. If it's if it can't discharge out that way and it can't go backwards through the Dio because your diode would be reversed bias, you know current can't flow through the backwards through diode.
That's why the Diode symbol looks like that. There's an arrow pointing that direction, then the voltage. The charge on that capacitor stays there like that and that is the basis of the Doo capacitor. Peak Detector circuit.
Incredibly simple and Incredibly useful in its own right. But of course you're not fooled because you know that Dodes aren't ideal and they're going to have that Dio drop. They're going to have that loss on there. So the actual value you I hope this shows up on the video is actually going to be somewhere below your actual value.
So in there there's actually going to be a difference of the of your diode voltage drop in there. So it's not an ideal circuit, but it can still be useful in a practical sense for like, a basic uh Peak Audio Level detection or something like that. Well, you don't care about sort of half a volt, you just can't sort of. you know. Oh, it's near enough up the top, or you don't actually need the absolute value. You just need to hold, uh, sort of hold a particular value. And this circuit also effectively works as a very crude sort of sample and hold, as well as a peak detector Where You Know sample. except it only samples.
it continually samples the maximum value, and then holds that maximum value for an indefinite period of time if there's no discharge on that capacitor. But of course, in practice, hey, there's always going to be some load on here. You're going to get self- discharge in the capacitor due to leakage, and then you're going to get back leakage through the DI. There's leakage all over the place, so this value is not going to hold.
We'll get rid of the Blue Wave font. The value is not going to hold steady like that. It's just it's going to droop off like that and eventually discharge all the way down until another the next Peak. And if another Peak value came along of course, like this, boom, it would you know.
Top it, top it back up like that. but assuming that the input C the input signal dropped away, you'd eventually get droop on that capacitor. Yes, droop is a technical term and it would eventually droop down to zero. Now, this particular scenario here is okay.
if you want to sample or measure your Peak DC uh value at you know, a slow rate or something like that. But then what happens when you want to reset the thing? Um, you know you've still got this capacitor charge. It can't flow back out there. It can't do this well.
There's a couple of things you can do. You can either put a common way to do it is to put a resistor across here as well, and then that will of course cause it to droop much quicker. but you at least it gives you a known droop. So then instead of going drooping all the way like that, it may only hold that Peak value for a small amount of time there small amount of time and then really drop off very quickly.
So it's effectively a sort of self-resetting uh circuit. As long as you measure that Peak value right at that time up there. not a problem, it'll self, uh, discharge very quickly and eventually get down to zero. and it effectively resets the peak.
Detect the circuit. But if you're sort of doing uh, like, intelligent measurement on this thing and you got an analog to digital converter, it could be a microcontroller or something. Reading the value out of this, then, well, as soon as you've read your Peak value, it makes sense to reset your Peak detector signal straight away and not just have to rely on a simple resistor to discharge the thing. So what do you do? You replace the resistor with a mosfet like that and you can apply a signal to the gate and short out that capacitor.
Bam. You've reset your Peak detector circuit. So Peak detector circuit is really quite useful. It you know a changing AC input waveform. if you only care about what the maximum value either positive or negative is, you can just use a couple of simple components and it gives you a DC value out that you can read great because it's much easier to, uh, you know, and simpler to read a DC value out than it is to sample this waveform at. you know, a much faster rate than the highest Uh frequency component in there. and then you know, have a processor just churning away in the background trying to detect the positive and negative. Peaks That Brute Force approach is pretty horrible.
It's a pretty elegant, simplistic way to do it. So that's your basic Dio capacitor Peak detector circuit. but of course you're not in practice. While the Doo capacitor uh technique is quite uh, common for very, uh, crude circuits, the absolute value doesn't matter for any sort of like semi-precision or Precision applications, especially where you got analog to digital converter on, hooked on there and trying to read the real value.
Of course you're not going to use a crusty diode in here. Diodes are horrible. They've got an unknown loss based on the Uh current which changes significantly with temperature. really un Precision type components.
So what we actually need to solve this problem here is an ideal diode. If the if the diode's ideal. Well, we can solve a lot of our problems right there. As it turns out, in Practical Electronics you can actually build a an ideal diode or what's called a Precision diode or Uh, sometimes known as a Precision Rectifier.
How you do it. A basic Op amp with an existing crusty diode in it and that forms a Precision diode. Precision rectifier. So how does this work? Well, it's a voltage follower.
Look at it, you're familiar. If we just shorted out that diode, then we've just got a basic voltage. Follow The output voltage equals the input voltage. Well, in this case case, let's say we put a load on there like that, down to ground.
Then what's our output voltage here going to be? Well, it's going to be equal to the input voltage. for those positive values you feeding a positive. if you feed one volt in here, for example, you're going to get one volt out here. But once you start feed if you feed in.
if this is a dual Supply up amp, you feed a negative voltage in here. the diode is going to be reverse biased. You're not going to get anything. All you're going to do that may as well be open cuz no current can flow.
Well, there's no current flowing to the input pin so that resistor you load pulls it down to ground. and bingo, you've got zero output volts. And if you want to see that on the graph here, then well, it's just like your regular diode rectifier that you're familiar with in linear supplies. except we our output voltage is precisely equal to V in. Because the Opamp does what it needs to to keep these value, These input values is the same. Remember, that's one of the golden rules of Op amps. So the output voltage here oh sorry, got to draw my diode back in there. Our output uh voltage here is actually going to compensate.
The Opamp is going to drive this output voltage here to compensate for the loss in the diode. and it's going to do it in real time. and it's going to compensate for temperature and everything else. Regardless of how that diode, how crusty that diode is, you can use a real crap one.
The Opamp will compensate for it so the out works just like a standard uh rectifier. except it's a Precision rectifier cuz there's no diod loss of your output voltage if you feed in a Um AC signal on the input which you know it would have been down here if it was a right, but it cuts that bit off and it rectifies that like that exactly like your regular rectifier. So we've got exactly the same circuit as we had up here, except our diode is now an IDE deal. Perfect diode provided you operate it within the opamp voltage range.
But that's all a given now. Um, you can do exactly the same thing. You can have the resistor uh, load on the capacitor here for example, or you can have your mosfet there, your reset mosfet there to short out the cap on the output. uh provided of course that your Opab can handle that.
Uh, short circuit Uh current and it's not going to cause any damage. Usually not a problem. So we've got now, our perfect Peak detect circuit. Or is it now? This sort of circuit is good enough for sort of, you know, ordinary everyday applications.
When you want to get a relatively accurate uh, you know, quantized value of the peak value, you've got an ADC on here and you want to accurately measure that Peak voltage and then, uh, reset it. However, you want to reset it, and this circuit does a pretty darn good job. but it does have a few limitations. Now, the first limitation is of course, the discharge on the cap.
Now, if if you're driving an ADC for example, this isn't exactly the ideal circuit to be driving an ADC with and I won't go into ADC uh details and stuff like that whole separate video. But for for suffice it to say that um uh, Adcs can actually take um uh input Uh current uh spikes when they're taking the measurement in like in the case of a successive approximation and log to digital converter like I typically used in a microcontroller for example. So you know, want you know a little bit of current to be drawn out of your cap and then it droops and droops and droops. so you don't want your capacitor to droop like that.
So during measurement because that's bad news. So typically you're going to follow that with another opamp voltage follower which is a proper low impedance Source very uh High impedance input here and that can drive your ADC Not a problem at all. Now the second problem here is the recovery of this opamp. Because remember that this opamp is going to do whatever it needs to to make this output follow the input. So let's say we had our Peak value go up there. Very short sharp bang. It went up to Peak and then it dropped all the way down to zero. Well, this opamp is going to try and force this output here to to uh zero.
How is it going to match the input signal of zero here? How's it going to do that? Well, this input, uh sorry. the output signal of the Op Amp here is yeah. it's going to ramp up to the peak value, but then it's going to try and go. It's going to try and instantly go low and it's going to slam right hard against the negative rail.
It's going to go I'm send it low, send it output signal low. But of course it's not going to go low because it the Um Diode is not going to allow that to happen because it's reverse bias. Once this voltage drops down. This output value here is Zero Diode's Revers Bias test.
It can't do anything. The Op Amp has lost control over the ability to force this Um value here back down low because the capacitor is going to hold it so the OPM can't do anything but kick and scream and and pull this output right down low to try and do it. So it's going to saturate right down to its negative rail. either negative rail or ground if you're using a single rail Op Amp.
So what that means here is when the peak value is when another Peak value comes along. If you have a nice fast Peak value jumping up there, then this Um Op Amp is going to of course go right back up or it's going to try to. But it's going to take time to charge up this capacitor. so you're going to have the slew rate of the opamp there.
It's not going to go suddenly high like that. The output voltage here then won't go immediately up to the value. There's going to be some slew rate in there. and if you working on Fast signals for example, the slew rate of the opamp is going to matter a lot.
So you've got that recovery time in there of this opamp and that for a lot of circuit applications can be a real big deal. So naturally that leads to a tradeoff between how fast this opamp is and what value capacity here you use. You can't just arbitrarily choose a super I'm going to put a th000 microfarads in there that'll hold the voltage forever. Fantastic.
That'll solve all my problems. Well, No, it won't because the slew rate of your Op amp to try and charge up that huge capacitance is going to be a real could be a real big deal. So there is a tradeoff there between how much droop you want. So you've got these conflicting requirements: You want to keep the capacitor value small because then, uh, so the slew rate of the opair and charging that capacitor will ensure higher uh, speed and higher performance out of your Peak detector circuit.
But you also want to make it large so that your droop time is you know are not going to affect the Precision of your measurement. So you know it's a real trade-off there between choosing that right value and the choosing the right type of Op amp. And you know that comes down to practical design and what your actual requirements are. Third problem is a bit of a sneaky one. Dialectric Absorption in capacitors. Now I won't go into it. But suffice it to say that uh, capacitors can have a memory, so to speak of the charge that was last on them. and as you saw, we can actually short out the cap here.
Now when you short out that cap, depending on the type of the dialectric material used in the capacitor, then that voltage may not stay at zero. It may actually rise back up due to dialectric. the phenomenon called dialectric absorption. There's a whole bunch of Phys deep physics in that to try and explain how that all works and I won't go into it.
Um, but that is a real problem for these. For a Precision Peak detector, C Not for your just Rough and Ready ones up here, it's fine. but if you're trying to do any sort of precision or Ultra Precision measurements, dialectric absorption and choosing the right type of capacitor, dialectric can be a real big deal. Critical in fact.
So you choose a low dialectric absorption cap like a traditional polystyrene or even better are the Teflon based caps. so that circuit's not bad for you know, semi-precision or Precision uh most Precision applications. But what if you're after an Ult, Ult Ra Precision application we after the utmost in accuracy and you can't afford any droop there at all on your capacitor none. Nada? Zip Well, This circuit you know may not cut the mustard because not only have you got input bias current in there right? but uh, as I've done a whole video on.
But of course you can choose an OP hand with incredibly low you know, Fto amps input bias current so that's not a huge deal. But the diode. Aha. Typically in an ultra Precision application circuit, The leakage of the diode.
The reverse leakage. Remember when this thing when this output voltage here drops down low like that, then this diode is effectively connected down to ground. Here, it's reverse biased. We're going to get some leakage current through that diode and that's going to be that can be higher than uh, you can get in a typical fit input.
Um, you know, really low bias Opamp. Now this rather clever An Elegant circuit does just that. Let's have a quick look at how it works. now.
What we've done is, we've added in two diodes here instead of one. So just ignore this opamp and this feedback resistor here for a minute. It works exactly the same as before. It doesn't matter whether you have one diet in there or two or 10 well apart from your apart from the losses the Op's got to compensate for doesn't really matter. So let's start by assuming that this diode is not here. We've got our buffer. Then this output voltage, of course, equals the peak of the input voltage, the voltage across the capacitor. But when the input drops back low again, then this output, the output of the Opamp is going to try and drag all that low.
But no, you know, and this diode is going to be reverse Vias But if we add this resistor in here, feeding back that Peak output, the voltage on this side, effectively feeding that signal back to here. Then the voltage across that capacitor when it's at Peak value actually becomes zero. There's zero volts across that diode there. What happens when there's zero volts across that diode? Well, there's zero leakage current.
You can't get any leakage current going back through that diode when it's zero like that. So Bingo This clever little circuit has just eliminated the leakage current through that diode. Beauty Now, if you want to get into the nitty-gritty detail of it, yet technically, there's still reverse current flowing through this diode here, because the output here is saturated low. It's gone boom hard negative like that.
So, and you've got a voltage here, so you're still getting leakage through there. But it's not affecting the value on the capacity here. it's just flowing through this feedback resistor here and it's going to be not worth worrying about. negligible.
So your input bias current on your Op Amps is now going to dominate. CU You've eliminated totally the uh leakage through that Diod there. And of course, as we've seen in the Uh tutorial previously on input bias currents, you can get very, very low ones you know in the order of Fto amp opamps and you're going to need two because not only do you have the bias current flowing in there like that, but you've also got the bias current flowing in there cuz that's connected in parallel across the cap. So you're going to want want to choose two pretty Schmick Op amps in there.
So there you have it. That's the basic implementation of a peak detector. Got a fairly Cru Gr one up here, but still quite useful for a lot of practical non-precision applications. Then you got a sort of a semi-precision to a Precision type and then you got your Ultra Precision down one here one down here, which sort of takes into account and eliminates your diode leakage in there.
Brilliant. And you can also reverse these circuits and use them for the negative scenario down here as well. but we won't go into details. It works exactly the same way.
And to the breadboard for a quick verification of that. I've just got a basic little Diode uh Cap one here, crusty 4148, Uh Diode and just A7 microfarad film cap. Let's take a look at the Circ and I'm feeding in a S C waveform. here.
you can see that it's repetitive. It's at about a k at a Kiltz actually. and uh, you can. Channel One is of course the input uh waveform and Channel two the green waveform. There, they're both centered about the middle and uh, there we go our we're getting our one Dio drop in there. You can clearly see that around about that 0 . 6 Vol We're both 1 Vols per division there. and there's no droop at all because there's basically very little load on our capacitor.
The only load of course. um, our uh, 10m input impedance of our scope probe. That's it. And if we drop the frequency down to 100 Herz you can maybe just see a couple of pixels in there.
the scope. The resolution of the scope is not good enough and you see a little bit of a droop little bit of a recovery. If we switch down to 10 HZ we'll see it even more. There we go, we can start to see it, but of course we've got a very small load on here and a reasonable value cap.
I mean 47 Microfarads is no slouch and if we drop that down to a 1 nanofarad cap right back at 1 khz, you can really see the droop. Now there, it is pretty horrible, but that's what you get from one narat. Even with a uh, you know, a 10 Meg uh input impedance from the scope probe, there's no load on there at all. So look, you have very little time in there to actually read your value before it starts to droop off and you get significant error pretty quickly.
Now what I've got here is 100 nanofarad capacitor in parallel with a 10K cap and you can see the droop or the decay in that. And if we have a look at the time period here, this is a 100 htz Um signal by the way. and it decays uh, faster than that before it has time to recover. and it's where 2 milliseconds per division.
So it's taking about 500 milliseconds or uh, sorry, 5 milliseconds or thereabouts to uh Decay back down to zero. and that's really what you expect cu the rule of thumb is about uh, five times the Um RC time constant. So 5 * RC uh, 100 narad 10K There it is. It's about 5 millisecs so that's your effective uh reset time of your signal.
But let's in, increase the frequency here shall we? And you'll notice that once we get in here. I mean it's fully reset. I Mean it's back down to ground. It can't go any lower than ground of course.
So let's increase the frequency. You'll see that it can. We can make it bump back up quicker like that because it's following that input signal like that. so you can see how your uh reset uh time effectively by putting the parallel resistor across.
There is a compromise between the accuracy how quick you're going to actually read out, uh, the peak value, or how you know quickly you're going to use it and the effective reset time because it hasn't had time to reset before Boop it's just, you know, jumped back up there. But anyway, let's get rid of this horrible diode dropping here. Let's go to our Precision rectifier. Now here's where we're going to really see the difference between how things should work on the whiteboard in theory and how they actually work in practice, and how there's lots and lots of traps now. I Could go on all day with this, but we're only going to keep this relatively quick. now. What I've built up here is my Uh Precision rectifier. I'm using a just a bog Stander 1 in 4148 diode here.
nothing special I've actually got no capacitor installed at the moment and my load is 1meg in parallel with my 10 Meg um scope Pro But you know, let's say it's an order magnitude bigger. Let's say it's a 1meg load on here and we've got that uh Precision rectifier uh, configuration in there I've used a TS 912 OPM It's not a bad little railto rail Coss OPM It can drive 40 milliamps. Um, so it's not bad at being able to charge up a decent value of capping there so there's no cap at the moment. So all we're doing is I' I'm powering it from plusus 5 volt rails I'm feeding in a 100 HZ sine wave as you can see in there at 1vt.
um RMS So we're well within our supply rails. Everything's uh, going to work just fine now. Channel one is connected to the input there, so that's the yellow waveform. You can see the sine wave in there and Channel two is the output of the Op Amp, which is going to be the Uh green waveform here.
and Channel three is the blue waveform is our output voltage. Now, as you'd expect, here, it is the Um output voltage. The blue waveform follows the input waveform precisely there because there is no capacitor on here. Otherwise, it would store the vol of the peak value on there.
but we'll have a look at that in a minute. So it follows the input waveform exactly. and then it gets clipped because it's a Precision rectifier gets clipped at that Zvt rail there. All three channels are Z volt in the center, But you can see, as we said, uh, the output of the Opamp here.
the green waveform actually goes down there and saturates down at the bottom rail. That's actually a different voltage scale. 2 volts uh, per division. There, the others are 500 MTS per division.
So two for there's our negative rail 5 Vols there. So you can see that. Um, the Opamp spends a lot of its time saturated down there and then it's got. it.
won't be able to ramp up instantly. You see that? it can't. You know the Op Amp has a certain slew rate. It's got to charge the Uh capacitance, in which case, there's no capacitance at the moment.
So that's why, even with a 100 htz Uh waveform as you can see low frequencies, we're going to run into a few problems here. Now let me install a 1 Nanofarad cap I Will Here we go. I'm going to put a 1 nanofarad cap in there I Still got my load. Okay, so you can see how it's sort of.
You know it. You know it's draining off pretty quick with that load on there. Okay, so the Uh droop basically follows the input uh waveform basically. So let's remove the load resistor now so we'll take out the load the 1meg load resistor and see if that improves it. Bingo Look at that. We've just now so we got a 1 narad um storage cap on here and you can see it drooping down and it droops down. and when the input goes, uh, back up. it follows that and then stores that charge with a bit of droop there.
and as you can see, the Opamp spends most of its time saturated down at thega -5 Vol Rail and only when it starts to uh when it needs to do work again does it ramp back up and then follow that input. But you'll notice that there's a bit of oscillation in there. Look at the output of that Op amp. There we go.
it's oscillating a bit. H This could get even worse now. What I've done is actually installed a one uh, 100n cap here. so 0.1 microfarads and as you can see, you know there's not much droop.
We've got no load at all. Um, on here here. so obviously it stays pretty much at that Peak value all the time. But look at the output of this Opamp here.
it's just dancing around like this and you'll notice that it's even skipped some here or has got very low um value pulses down in here because it skipped it because it's determined the circuit has determined that uh, it hasn't drooped enough in order to Warrant switching on that um and the output of the Op amp again. But say in this case, over here. for example, this one here where it's you know it's almost switched back on and it's well, it it has started right. The output of this Op amp has started to go back up high, but it's determined oh I don't need to do that anymore.
Boom because its slew rate wasn't fast enough in order to charge up that cap again. So you get this effect where you get these missing puls is in there like that. And now if we install a one Meg resistor back in here with our 100n cap, look at this. Now we get two pulses in there and this is rather interesting.
If we go in and have a look at this, look at this. It's sort of. You know there it is Boom It recovers once it droops down. again, it knows and then the circuit goes.
Oh I need to switch back on Boom to ramp back up and there you go. So you get now we get two pulses per waveform to to try and charge it back up because we're getting that droop caused by that 1meg resistor. And if we replace this 1meg resistor with 100K resistor, look at that. We get even more peaks in there because it's got to charge up that cap more times.
Isn't that fascinating? Look at that. and I'm going to start from 200 HZ here and I'm actually going to wind the frequency down and look at this. It just adds more and more pulses in there as we drop down in frequency because the frequency of our input wave form that it's trying to track. you'll see that it tracks more and more times in there because the uh input frequency.
Now we're down at 10 Htz and our input frequency is much much lower than the um, how fast our Op ampers. So it's able to, um, slew fast enough to do all. Let's stop that it's able to slew fast enough to do all of those little to sort of, you know, chop up and track that input waveform like that. And if you start getting up too high in frequency and you have too large a load on here with the Uh discharge, then you can notice that we're actually getting some sort of overshoot on our output voltage here. Now that's at 100 htz. Where is it? Oh, I had it there. Yeah, there it is 100 Htz and if we we bump that frequency up to 1 khz, look at this. We're now starting to get some very large errors and overshoots on our output signal.
But if we take off our that's with 100K load by the way. But if we take off our 100K load Bingo look at that, it's recovered. So as you can see, you really do want to try and keep the Uh value of this capacitance. you know, fairly low in order to get, uh, the performance that you're after.
But then you need a real high impedance. uh, load over here. So at the moment I've got 100n in there. and if I change that 100n back to Tada There we go.
That's a one in there we go. Then we're following that much more nicely and the Opamp is only going berserk at the start here. and then it's you know, then it's acting like you're really really tracking the input very nicely around here. So there you go.
that's you Know that's a sort of tradeoff you're going to to get and this is with uh, no, effectively no load. Well, the load is my scope probe. It's the 10 Meg of my scope probe because the input impedance of uh, the input bias current on this Um Op amp is only one Pico amp. It's a very low one, so you know there's nothing in there.
There's going to be some diode, uh, leakage in there. But uh yeah, we've got our 10 Meg scope probe. and in this case, the leakage of our 1n 4148 diet. It's going to vary a hell of a lot with temperature.
But at room temperature, you know it's going to be in the order of like 25 nanoamps or something like that. So that's like, you know, one4 of our 1 Meg load or something like that. So you know it. it does, Um, add up.
But you know, So we should be using a better diode in here. And of course, in a Precision uh, you know circuit, you would certainly use a better diode than a 1 in uh, Jellybee 1 in 4148. And of course, just remember that the Um input impedance of your scope is not all is not just going to be 10 Meg it's going to be 10 Meg at DC. But as you go up in frequency, of course, the input capacitance on here is going to dominate that thing.
So uh, at at 100 HZ that we're talking about here with our 11 Pea farads input cap of our Uh X 10 probe, we're only talking about 144 Meg So it's you know. It's basically the Uh DC resistance of the probe dominates at 10m. So as you can see, there's lots of tricky AC Behavior going on in this circuit and you can really play around and tweak this thing. uh, to get exactly the performance you want until the cows come home and like I could do a whole one or two hour video on just you know, choosing the right upams, different loads, and uh, different types of dodes and the different values of cap and different values of load and all sorts of stuff. I You can go for hours and hours. There's a lot of traps involved in just a simple Peak DET detector circuit. Like this, it doesn't always necessarily work exactly as you expect on paper and over frequency range as well. There all sorts of traps, so just be careful.
when you're building practical circuits like this, There can be a big difference between the uh whiteboard Theory and what you get in practice. Anyway, this video's uh, gone long enough. It's longer than my usual fundamental Friday So I'm going to leave it up to you to go and play around with a Um Peak detector circuit and precision rectifier like this and try and learn exactly what's going on here by playing around with all the values and trying to understand how it all works. So I hope you like that and uh, if you do like fundamentals Friday Please give it a big thumbs up and if you want to discuss it, the Evev blog forum is the place to do it.
Catch you next time.
Thanks very much. I gain a lot from your videos. Brilliant!!
Hi dear friend.
I need a ZMCT103C detection circuit. can you help me?
I got help from your circuit, but I have a lot of jumps and noise in the output and the ADC value plays a lot. I used a mega16A
Guarding technique … awesome!
I start designing a nonlinear filter. Cut-off frequency must depend on the average amplitude of a signal. Your explanation is very helpful to me!
You are an absolute genius! Thanks a lot for taking the time to make this videos <3 Really helpful
Awesome
Really really good info! Thank you for this!
I came across this as I was looking for a peak detector to detect the time when the peak occurs rather than the value of the voltage. I've got a microcontroller with A-D doing it, but I wanted a simple circuit to generate a pulse, whenever the voltage starts to reduce.
Just to make things more difficult it needs to be immune from noise, but that really just means a LPF on the input.
It's for triggering a TRIAC on the AC mains peak for switching inductive loads. It should be pretty simple with a comparator some resistors and capacitor, so that in effect one comparator input lags the other and the output changes state whenever the input changes from increasing to reducing and vice versa, or something like that. In fact a Google search finds such a concept was even patented in 1969.
i gorgot how much I like this channel. The stupid algorithm didnt pop up any eevblog for over a month and I forgot about it. Why did you tube stop putting eev videos in my que?
Thanks for great video. you deserve every single dollar you make out of this YouTube channel.
The second opamp is in positive feedback loop and could osculate or with the diode could drive the output to positive rail. This could happen when there is a new peak at the input.
Instead of a high quality op you can use a cheap comparator. This makes the system much faster.
Have a nice day to you sir,,can you sent to me a good diagram for a long range metal and gold locator so thar i can use for treasure hunting here in philippines…thanks and more power to you sir..
Man I wish I had these videos 13 or 14 years ago… Would have made college soooo much easier. Sometimes breaking down complex concepts into basic functions is all a bad teacher needs to do to be a good one. Thanks Dave!
Great video! I enjoyed the lecture.. Thank you
It's possible to avoid very high negative oversaturation with just one additional diode and resistor (for the schema with two op amps). This reduces overshoot and switch on time.
Yooo sir thank you very much, plz don't stop sharing
Very good lesson thanks!
So “droop” is like “release” in a compressor?
great stuff
are there ICs you can buy that do this for RF frequencies? The ones that I see seem to measure power when I'm only interested in amplitude.