Fundamentals Friday
Dave takes you through designing a signal overload detector circuit from scratch and then builds it up on the breadboard.
Window comparators, schmitt inverters, capacitor charging, pulse stretching, common mode input range, tongue angle tweaking, it's all here.
Forum Topic: http://www.eevblog.com/forum/blog/eevblog-471-overload-detector-circuit-design'>http://www.eevblog.com/forum/blog/eevblog-471-overload-detector-circuit-design
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 Where we take a look at a basic Electronics building block circuit. What we're going to take a look at today is a basic circuit that does overload and Peak detection. We're actually going to build up a circuit based on a requirement and then see what solution we can come up with. Yes, there's more more than one way to skin this cat, so we'll show you a couple of variations and then we'll build it up on the breadboard to see if there's any traps for young players as well.

So let's take a look at it. What I've got is an amplifier. Here we're feeding in a signal and we're feeding an output signal. What we want to do here on this output is we want to check to see if this signal is going near the rails or it's going to Peak We want an visual indicator I in Led to light up when the waveform.

This is our output waveform. here. the output waveform goes above a certain voltage threshold here, both positive and negative because you want to get both Peaks not just one side. So we'll build up a circuit to do this step by step.

Now, when you're design a circuit like this, let's start out with the basic requirement of what we're actually trying to do. In this case, it's powered from a split 5vt rail. so plus 2.5 Vols minus 2.5 Vols The value doesn't matter at this stage, but it may matter later when we build the thing up. Wait for it.

Now what we've got here is we want to detect if a signal is above a certain threshold I.E It's getting near the rail it's going to clip because we want a visual indicator. Our product, for example, needs to have a lead on the front panel that lights up when the waveform gets near the maximum Peak at positive or negative like this. So basically, it seems like a pretty, uh, simple requirement. Really, we want to light up a lead when the voltage is above.

For example, 2 volts here and Below min-2 Vols down here. So in this region down here, we want the lead to switch on. Pretty simple: how do you do it? You've probably already thought of it a basic voltage comparator. So let's take a look at our comparator here.

Positive, negative, negative will have our reference voltage V Now let's take the example of just the positive Peak First, let's uh, treat both of these problems separately. Let's just solve this one up here. First, we got 2 Vols Okay, our amplifi is minus 2.5 Vol Plus 2.5 Vol Like this, here's our input, um, signal. and here's our output.

Now we can actually drive an Led directly like this with this if we wanted to. Now, when the it's working as a basic comparator because there's no feedback there, You could use an Op amp or uh, usually you would use a proper comparator designed for the purpose like an LM 311 for example and we'll take a look at this in a minute. The LED just work with me here now. 2 volts reference voltage on this pin here.

So when the input signal goes above 2.5 Vols the non-inverting input is higher than the inverting input down here. So our output goes high like that during this period here. so it'll go up high and then go back down low like that during when the sine wave is above that Peak value up there and our lead will light up for that brief period that it is high like that and that's all there is to it. We've solved that problem, but of course, there's a couple of practical problems here.
The first one is that let's say this is an LM 311 comparator. Your basic, you know, probably the Jelly Bean comparator out there. It's actually got an open collector output, so it can't actually drive a lead directly when it goes. Highlight that because the output transistor inside the thing is only like that inside the chip.

There's the output pin like this. There's nothing inside it like that to. There's no, um, it's not like a totem pole output to actually drive that thing high. So you know when if you used it in this configuration, that lead would never light up.

because this output pin here can only pull low. It can't pull high. So how do you solve that? Easy. You just change those around like that.

that's negative, that's positive. And you put your lead like that. Easy. So all we've done there is just inverted the operation of this comparator so that we can use the open collector output on a uh, typical comparator like the LM 311 or Lm339 So that's great.

We've got a solution for our positive point up there. or kind of. What about the negative Point down here? Well, we need an additional circuit to detect that too. So here's the same circuit we had before I've just uh, erased that, redrawn it now using a dual comparator.

typical jelly Beam part lm393 and that's the same as we had before. Our input signal our 2vs uh, reference and then our output go into our lead. So that's exactly the same circuit we had before, but now I've added another comparator in here to give us what's called a window comparator or more precisely, an outside window comparator because what this circuit does is it will light up the lead when the voltage is above 2 Vols or it is below minus 2 Vol Like that Exactly what we want. and that's why the uh, these it's or because this output configuration here where you tie the two outputs get to open collector outputs together.

on these comparators, it's called a wired or configuration because this Leb will turn on if this one is Uh meets a its condition or this one down here meets its Condition it's a wired or configuration. Now let's take a look at some real scenarios on our input here. Let's say our input is 0 volts then this comparator down here. the non-inverting input is 2 volts.

so it's higher than the inverting input. Therefore, our output is going to be high or it's not going to below. It would be high if we actually had a pull-up resistor in there like that. It would actually be high if this wasn't here.
Okay, so uh, the same Uh configuration here, but our reference is minus 2 Vols and you'll notice that the input goes to the Uh non-inverting input this time and our reference goes to our inverting input. So if an input is 0 volts, that's actually higher than Min -2 Vols reference. Remember CU it's negative. so this input's actually High higher Bingo Our comparator.

The output here is also going to be high, high and high gives us high. So our lead is also. It was tied to high so our lead will not switch on. So in the case of our Zer volts input here, or anywhere between that threshold of -2 Vol plus 2 Vols and minus 2 Vols that's annoying there.

Then our lead will be off and you can run through the scenario again where it's outside of these thresholds above these Thresh holds. If our input is say 2.1 Vol then the Uh inverting input is going to be higher than the noninverting input. so our output will be low. so our lead will switch on.

and it doesn't matter what this one's doing over here because that's just going to permanently switch on the lead. And likewise, if our input is minus 2.1 Vols So it's uh, lower than this. It's beyond this threshold that we want to detect down here. it's out in this region, then the same scenario.

This output here is going to go low. and it doesn't matter if. well, they can't physically both turn on at the same time. But even if they did, it wouldn't matter.

It's a wired or configuration, so that is a solution for our problem. Brilliant. Or is it now? this Uh. Window comparator is or window detector as it's sometimes called is an absolute Standard Building Block circuit.

You'll find it in any textbook, but usually it's actually designed to detect within a window like that. so it gives a useful output when you're within a window. But in our case, we're actually using it in sort of the opposite effect to detect when we're outside that window there. So you can give it the name outside window Comparator.

It's a bit more descriptive in what it actually does, but really, it's essentially exactly the same thing. and you can actually swap the reference voltages here. This one could become the positive reference. This could be the negative reference depending upon your output configuration that you actually wanted, but we won't go into that now.

I Said we weren't finished yet. we haven't fully solved the problem. Why? Because what if this, uh, the frequency of our waveform is very quick or we have a very short pulse which just goes above, you won't have time to see it? Yeah, the lead will come on. Leads have very fast response times practically instant, but your eye won't see it if it's a, you know, if it's a a 100 microc pulse or something, you won't catch it.

So what we want to do is add an extra circuit on the output here that even if we get a very short pulse which goes above or below our thresholds, we want that to keep the lead on for a certain amount of time. I.E We want a pulse stretcher. So how can we do a pulse stretcher? Well, as always, there's more than one way you can skin that cat and a couple of ways to do it. You can do a triple 5r timer to do a one shot, uh, pulse.
You could use a 74 Hc1 123 Mon retriggerable. Want to stable to generate and stretch that pulse, but we're going to do it a bit simpler cuz these Solutions You know, our triple 5 time. You need a quite a few extra parts on there and stuff like that. 74 Hc1 123 Uh, yeah, it's okay, but it's an extra chip.

you need some extra parts. whereas let's say we had an LM 393 if we went for an LM 339 quad comparator, we got a couple of comparators left over. So let's take a look at that. or more specifically, let's take a look at an RC pulse stretcher.

So what I'm going to do here is take this output so pretend this lead doesn't exist anymore. We're going to put it somewhere else. We've got our Wied output here and let's actually have a cap going to ground. You'll see why in a minute and then we'll have a pullup That's not a very good resistor, is it? That's pretty crap.

There we go. We're going to have a pull-up resistor and let's make that say 10 Meg Quite a large resistor because we want quite a large pulse time and then C down here we'll be able to work out of value for C. But basically what we want is this output signal. Here, We already know that our Wior output is going to give us a pulse a low pulse.

It's going to with the open collector output. It's going to pull that low or short out the capacitor there. Actually I Made a mistake there that doesn't go to around because it goes down to the negative rail. So let's pull that down to the negative rail.

there. You got to be careful when you're working on these split supplies. You can do little brain farts like that now. Uh, let's I'll do that.

Minus 2.5 volts there, but you can. Actually, you know you can think of this as a single level uh system really instead of a split rail if you want to. But anyway, that's that's just for argument sake. That's the negative terminal there.

now. our Wior output goes low, gives us a pulse when our signal goes outside of that range either positive or negative, so it shorts out. What it does is just shorts out that cap as soon as the it detects that over range or overload indicator. So what happens when you short out that cap? Well, there's no more charge on it, so it's got to charge up.

How does it charge up? Because this is open collector output, it charges up via the 10m resistor. So when we get our pulse, this cap will slowly start charging up until well, it gets to full charge. Now here's where we get into a little bit of math. but stick with me.

Now, where the capacitor is obviously going to charge up. You've seen the capacitor charge. uh, waveform like that charges initially from zero cuz this open collector transistor shorted the cap so it starts from zero and it charges up like that. And the formula for that V at any instant in time is 1 - E to the the power of minus T on RC Nasty little formula.
Thankfully, unless we're really after a precise application, we don't care about this formula cuz all we want to do is light up a lead for a bit. Who cares if it's on for half a second or 3 quars of a second or a second. right? Good enough. Near enough so you can just use the standard um RC time constant formula to.

the time constant is the value at a specific value of 62.3% of that charged voltage and it's equal to easy to remember the time constant. R * C Resistance times capacitance. Simple. So what's a practical lead on time here? Well, I don't know about a second nice round value.

You can see that lights up for a second. Not a problem. What value capacitor do we need with a 10 Meg resistor? Well, you just rearrange that formula. Capacitance equals t on r or 1 second on 10 Meg Resistance 100 Nanofarads.

What a coincidence. 100 Nanofarads is a typical bypass capacitor value, so you're probably already using that up here to bypass your chip like that. Not a problem. so you've already got in your bill of materials.

Beauty So there you have it. This output here is going to have. well, we'll get to that point after 1 second. So all we need is another circuit here which detects that threshold.

It's threshold again and then lights up our LED during. well, that time period there to there. Too easy. How can we do that? Well, a very simple way is with an inverter like that and our inverter can directly Drive our LED like that.

So when this output here is low, this output here is going to go high. Oh sorry, inverter has a knot on the output of course and inverter that once it gets to a certain threshold level, it lights up the lead. But of course you need a Schmid inverter in there like a 74 Hc14 for example, because a Schmid has a very specific defined threshold level so it won't oscillate or do something weird above or below that. it'll just cleanly switch the lead off and on.

And we mentioned before, we've got a quad comparator lm339 so we actually have a comparator left over so we can actually use use that as well. So we don't worry about the Schmid inverter anymore. we can actually use a third comparator up here to switch on the lead. So when this is low, if we have a inverting a non-inverting input up here to a voltage threshold which if you want the exact time period of 1 second, you'd have to set it to 0.623 of the of of your voltage total voltage supply of course to get that exact 1 second threshold there.

and if you did that, then that Led would turn on during that period. There very simple and of course that's the trick. Whether or not you choose to use a third comparator up here, or where you choose to use a Schmid inverter here. Um, getting the exact threshold level for the exact time period you want if you want it really, really precise.
you have to be careful. But because we're just flashing an LED here, it doesn't really matter. We can, you know? Just use that RC It's going to be near enough. Who cares if it's 1.2 seconds or it's 6 seconds or something like that.

Eh, good enough. So this is one of the examples of just backof the envelope calculations that can get your circuit working like this. You don't need to worry about this complex formula in the charging graph. All you got to know is that the time constant is you know going to be roughly R * C and you can pick some you know, Common uh, E12 values or something that are just going to do the job.

And of course, the reason that we're using an extra device here instead of say um, connecting the Led directly on here is because these are High impedance input. so they're drawing no current so our charge time is going to be accurate if we just tried to put Led directly on here another Uh transistor for example, like a Um a you know, bipolar transistor on there, it's going to take base current and or the LED is going to take current and it's just not all going to add up. So you know, really, it's better to use a um proper uh buffer here. they're essentially acting as our buffers on this.

a high impedance buffer on this, r RC to constant point. So whether or not you choose to use that third like a quad comparator for example, instead of the Dual comparator because you can get these in a dual package or a quad package and have one left over. But then you got to generate the voltage. So you got to need a couple of extra resistors up here for example.

So you know it's all bit of a trade-off or whether or not, uh, you might want to use the Schmid inverter because you have five inverters in your package left over might be able to use them somewhere else in your design. It's one of those uh, tradeoff things. It depends on your implementation and how you want to, um, use it. Common values you've got.

You know you might choose a 10 Meg up here because, well, we want to make use of the additional capacitor down here generally. Um, the resistors are going to be, uh, more versatile. So you choose the 10 Meg up here over, say, a very high value cap up here if you didn't have high, suitable, high value caps already in your bomb. And it's going to be cheaper to buy a resist than is to get a high value cap.

So you're better off going 10 Meg in and 100 in there instead of, you know, 100 and you know, tens of microfarads down there, for example. So just an interesting uh trade-off scenario that you typically get in designs like this. So as I said, there's more than one way to skin this cat. We've got a solution here.
It may or may not be suitable for your particular design. People might go for a discrete transistor solution here. They might use something else instead of the window comparator, etc. etc.

If you wanted a cliping uh thing to see that your actually waveform actually distorted and clipped, that's a slightly different requirement. Again, instead of just oh, it's getting near the rail switch on the lead kind of thing. So you know just uh. this sort of basic functionality could be done half a dozen different ways.

eh. All right, Breadboard time will make it very quick. Exactly the same circuit configuration as we had before with the Schmid inverter option instead of the comparative 74 Hc14 rated from 2 Vols to 6 Vols. So perfect for this application.

Uh, Dual comparator LM 393 Jelly Bean Stuff once again rated for 2 volts upwards. Perfect for this application. Uh, our positive and negative uh Supply is going to be 5 Vols total. And here's this meter here is measuring the power supply.

Uh, total. It's a split supply of course. positive and negative. so it's plus - 2.5 Vols relative to this ground Point Here, and uh, then we've got our lead.

On the output, We have our pulse: RC Pulse Stretcher 10 Meg 100 Narad, you know, Time constant. Roughly a second or thereabouts. And then we've got um, a resistor divider here from the rail. uh, giving us a negative uh 1.25 Vols reference and a positive 1.25 Vols reference I Just chose the Uh split values.

It's just nice and even we're splitting the rail in half. So if the input signal which is this pot here goes above or below 1.25 Vols our lead should turn on. Let's try it. Here we go.

Oh, by the way, this is the voltage on the pot here. So this is the voltage on the input. Let's go on the positive side: 1.25 volts. it should.

Here we go very close. Oh, there we go. Wow. Within half a be's dick, very close.

There you go. it's close as you can expect so not a problem. Let's go down negative minus bit faster. minus 1.25 it' be better if I had like a 10 turn pot here.

but I've only got a single turns. bit crusty, but there you go. it just turns on about 1.22 or thereabouts close enough. Look at that.

Perfect. So there you go. Over that full range, it switches and in the middle it switches off of course above 1.25 or the voltage set on those reference pins. it switches off works perfectly.

Beautiful. and let's just test the pulse stretcher there. What? I've just got this disconnected so I'll just temporarily just tap that. There we go, Tiny little pulse going in and we're getting our lead for on for basically a second.

Near enough. So that works pretty much perfectly because the Um Schmid inverter threshold, you know, is round about that time constant. Really give or take. so we are going to get a 1 second there.
Fantastic. Now, if we have a look at the data sheet for our LM 393, then um, look you. You know it's pretty much ideal for this application. Voltage range goes down to a tiny 2 volts and that can of course be a a plusus one.

uh, volt rail. The Op amp doesn't really. you know, know the difference between a single Supply Rail and a uh plus M and A. You know, a split Supply like that goes right up to 36 volts.

Yeah, not a problem in this application. We couldn't go that high cuz we're limited via the 6 Vols of the 74 Hc14 inverter. Low input bias current 25 nanoamp. So that means you know it's um, it's basically taking.

you know, nothing from the input. We can have very high value resistors here. I've got 100ks in here. By the way, if you can't read that if you're not watching in HD these 100ks and uh, you know it's there's effectively no input current there, no input current from our input signal.

It's uh, you know, it's really quite nice. Minimum, uh, maximum offset voltage plus- 3 V Mill volts. Yeah, it's not that great, but for this sort of application, oh, doesn't matter a rats. really.

The offset voltage uh, input common mode voltage range includes ground. which means our input can go all the way down to the negative rail. Not a problem. Fantastic.

So let's try and test this down near 2 Vols and see what we get. All right, We've got ourselves a 2v supply now, so plusus 1 Vols Of course our 74 HC can work down to that. Our lead's not going to be very bright, of course got the same value dropper as this. You know it's a red lead 1.8 volts or thereabouts, but we still have enough to light it up because 74 HC is uh, across the jewel.

Um, well across the full Supply So that's working down at 2 volts. this comparator is supposed to be working work to down to 2 volts. Well, let's try it. Our lead is off at the moment.

There's our 2vt supply. Plusus one. there's our input voltage now because, um, our threshold voltage is going to change now. So we expect half of the split rail.

So 0.5 Vols Uh, Well, plus 0.5 Vol - 0.5 Vols So let's go down to minus 0.5 volts and it should switch on at a roundabout. Well, hopefully let's try it. Will it? Will it? Is it still going to be? Yeah, it's still still operational. round about the 0.25 volts.

Yeah, there we go. 0.5 Vols Not a problem, so that works. A treat. You can see it's a little bit dim there of course.

Now what about. on the positive side, let's try it. Zero should turn on at plus O. should have turned on.

it's already switched on. Look, it should have turned on at 0.5 Vols. But it doesn't. It switches on at around about you saw it at around about zero.

There There we hang on. There we go. So you know let's call that zero. It It switched on at zero volts and not the half faults we expected.

Why trap for young players? Now the Trap here here is that this is not a railto rail comparator. It is just your regular stock standard ancient bipolar. uh, comparator. Very simple and it has a um limitation in its common mode input range.
which if we have a look at our electrical characteristics here lm393 down here. So this group over here. where is it? We've got our input common mode voltage range. Here we go.

minim of zero. of course you'd expect that cuz if you remember way back at the front here it said that it could uh sense uh to ground it could sense any ground. Common mode range includes ground. There it is and it the specs actually back up that top level claim it does.

Go there it is. It goes down to zero there. But look at the maximum side of it is V+ minus 1.5 Vols So it's your supply voltage V+ - 1.5 What that means is effectively your input signal on your circuit. here.

This one here can't go above one. Uh, the supply voltage minus 1.5 volts. And that's why with a supply voltage of only + one volts there and minus1 Vols uh, you know, relative to that ground reference point. Uh, when we're feeding in a zero, so that's only 1 volt below the positive rail, So it's a wonder it even worked that well at all.

It should have been actually worse than that. Uh, really, according to the data sheet, but we were lucky enough to get you know, at least up to zero volts there. So that's why it worked. On the negative side, This value.

up here, it worked at minus 0.5 volt. Our reference worked fine, but this point here, our reference point at Plus 5 Vol it just could not get the common mode input range didn't include right up to the Supply. So that's a trap for young players. that's why it didn't work at all at those lower voltages.

something to watch out for. And if you think about it, it shouldn't have actually worked with our 5V Supply either. Because then we had a supply voltage of uh uh, effectively at 2 and 1/2 volts and our uh, reference voltage down here was 1.25 Well, that's only 1.25 Vols below that positive rail. So it should have actually been one 1 and A2 Vol So it shouldn't have actually worked at all.

But it did because the uh, the Practical uh comparator is. You know, a bit better in this particular application than the data sheet. um says with that nasty trap there common mode input range. This applies to our opamps as well, not just to comparators.

Very key spec for an opamp and a comparator. So what's the solution? Well, we could just use an expensive uh, railto rail. Uh, compar. That just does the business.

Not a problem, but you know it's not a Jelly Bean Part may not be in stock. Whatever. Yada more expensive. Um, we don't need to do that.

We can just solve the problem with some extra resistor dividers. So instead of our input voltage going straight in, we actually divide it by a significant amount. So I've put in a 1meg series resistor and a 270k to ground so that will act as a divider in there. And also the these values I'll change here 100 K and 22k.
so it's a very similar divider ratio. This one's just slightly higher than the others, so that means when we get near the peak uh voltage, you know 90% or something, it'll turn on our lead and likewise down here. So let's change the values and see if it works now. So instead of asking the opamp to sense the input over the full range, what we're doing is just uh, dividing the range down over a much smaller area.

So we always have the Headroom in there there above the positive Supply And just a pro tip here. when you're using breadboards like this and you're getting your resistors from these banders, they can actually have glue inside there that when you pull the resistor out, it gets stuck on the ends there. and when you plug them in, they may not make good contact with the Uh Springs inside. So just trim those off like that and it'll work.

A treat. All right, let's give it a try now. Uh, back up to 5 Vols Again, just to make sure it works at 5 Vols And not sure the exact Uh voltage, but it should be down around 1 Point Uh, Well, near to the full uh rail actually. So oh, there we go.

So not 2.5 so it's around about or negative. there you go around about2 yeah, 2.1 or something like that. So our positive side should be plus 2.1 should be exactly the same. And is it oh yeah, you know, near enough? Good enough.

Okay, not a problem. Now let's wind it down to 2 Vols Now, Unfortunately, at 2 Vols, we're not actually going to get a free lunch here. because we're We're still working around that, uh, that reference that ground reference point so we haven't really shifted that so we're still only going to get that plus one Vols relative difference. So unfortunately, at 2 Volts, it's not going to make any difference.

Let's try the negative side here. it's around about it should be 1 Vol it's going to around about well, one 1 volt is the maximum Supply There it is and it turns on at about yeah, 75 or something like 8 and we expect it to turn on at plus point8 as well. But no it doesn't. It's down near zero again because we got exactly the same issue.

Where this helps though, this divider helps is at um, the higher voltages where you need to sense near the input. You know how we had 100K 100K here before. Well, if we had you know a at 10K and 100K and we're sensing right near the positive or here sensing right near the positive rail. it wouldn't have worked before with those um at even at 5 Vols because it would have tried to sense the input there up near 5 volts.

So this technique doesn't actually help. Down at 2 volts, we'd have to shift everything. It gets real nasty, but at slightly higher voltages, it's always going to help you when you're trying to detect up near the peak range because instead of the input having to detect up here now, it's only got to detect down here. So it gives you that extra voltage margin in there.
And just to prove that what I've done is I've removed my divider there and I've swapped these two resistors and these two around so that the 20 202k is on the top and the 100K is on the bottom. So it should sense with a 5vt rail at around about two. Uh, that 2vt Mark instead of 2.5 Vols Peak does it well. Let's have a look: M that's the full Uh -2 Let's see where it switches off.

Yeah, it switches on around about that -2 volt Mark And we'd expect just like before, it was symmetrical. We'd expect on the positive side to also switch at 2 Vols but you'll find that it won't Will it Make a liar out of me? I Don't think so. There we go. 1 point there it is 1.5 Vols instead of 2 Vols.

So even at a relatively High Supply voltage of plus - 2/2 vol or 5 Vols total, Then um, this thing isn't going. This basic circuit as we saw without this divider isn't going to work at near the rails. there. it worked when we had 100K and 100K and we're only sensing half of the rail voltage or 1.25 volts.

But when we wanted to sense two volts, nahh, sorry we, oh sorry down here. I Keep getting these confused if we want to sense 2 volts here. sorry, our supply voltage is only 2 and A2 that's not. That's um, you know, not within the common mode, uh, input range.

So it only worked as we saw that 1V uh difference. 2.5 minus Uh, 1 - 1 is 1.5 and that's where it's switched on because that is our common mode, operational or our practical operational input range. But if you want to go just by the data sheet of course, where is it then you'd have to allow the 1.5 Vols full. In this case, we're getting around about a volt in uh, practice measured and I'd love to be able to show you the charge waveform on that cap there, but I can't because my scope probe * 10 is 10 Meg input impedance uh 10 Meg 10 Meg uh As you can see look, the lead just stays on permanently unless I who there you go stays off and then once it Triggers on, it just stays on because of the bloody scope probe.

But if I change those values to 100K and uh 470 Nanofarads, then Tada There we go. But of course that won't be entirely accurate as the real circuit. your timing is going to be a bit off because of the 10m still 10 Meg loading of your scope probe, so just be careful. There are practical effects when you probe things, so there you go.

I Hope you enjoyed that. That's another fundamentals. Friday If you want to discuss it, jump on over to the EV blog. Forum That's the best place to do it.

And if you do like this segment, please give it a big thumbs up. Yes, it took longer than I expected Yes I said I'd keep it to 105 minutes. Last week I did for the theory part this one. It turns out the theory is about uh uh, you know, just under 20 minutes I'm not sure how much long the Practical could be 30 minutes.
Ah what the hell, Catch you next time.

Avatar photo

By YTB

20 thoughts on “Eevblog #471 – overload detector circuit design”
  1. Avataaar/Circle Created with python_avatars baghdadi abdellatif says:

    Thank you. god bless you

  2. Avataaar/Circle Created with python_avatars John Dunn says:

    Dave you need to take your hobbyists on a long range project. Why not design and build an oscilloscope!!! Yay !

  3. Avataaar/Circle Created with python_avatars kei otake says:

    I remember Ben Eater using that T = R•C formula for a clock pulse iirc – so cool to see different engineering YouTubers mention the same things!

  4. Avataaar/Circle Created with python_avatars Little Clem says:

    Serms like you took the long way to the barn. ?

  5. Avataaar/Circle Created with python_avatars Serg Ivaschenko says:

    1. Common mode voltage range of LM339 ends around Vcc -2V, so other comparator is needed here.

    2. LM339 has bipolar transistor output, so our capacitor should discharge very slowly around "Low-level output voltage" 150-400mV, as listed in the datasheet.

    3. Its a better idea to ground third comparator's positive input and change resistor value to achive desired delay.

  6. Avataaar/Circle Created with python_avatars Georgy Farniev says:

    I think this channel deserves more subs

  7. Avataaar/Circle Created with python_avatars Tony DiMichele says:

    Hey Dave, good vid. I was going to make a circuit using the LM339 to drive LEDs but found the output max sink current of only 20ma to be too low for me to feel comfortable using a setup like this. I need the circuit to work out in the desert where it is bright and hot out so I was worried sinking max current to drive a green LED at 20ma would run into thermal runaway issues, and running less that 20ma into seemed undesirable as the LED might not be bright enough to easily see.

  8. Avataaar/Circle Created with python_avatars Matteo C says:

    Top… as usual!!!

  9. Avataaar/Circle Created with python_avatars Michael Love says:

    my understanding is for the window comparator circuit, you omitted two diodes right at the output of the two opamps, right?

  10. Avataaar/Circle Created with python_avatars Trevor van Bremen says:

    The old '339 is quite a useful beast!
    I just used it in an automotive device that has several 0-5V analog input signals.
    I needed to include a voltage clamp on the micro-controller analog inputs in case some IDIOT (that'd be ME) accidentally shorted the input direct to the 12V battery.
    With 100% negative feedback (inverting input directly connected to the output), and a simple resistor pull up to the +5V micro controller power rail, the output will (fairly) accurately follow its input in the 0-5V range. If the input exceeds 5V (due to the IDIOT), the comparator will saturate at 5V since the pull up cannot pull the inverting input high enough to match the non-inverting input.
    One of the beauties of the venerable '339 is that it doesn't have the pesky input protection diode to the positive supply rail so the input can be 'over driven' right up to the CE breakdown voltage of the input transistor (>30 volts).
    Since there ARE no voltages below chassis ground in the car, I shouldn't have to be worried about the input pins being driven below 0V. (However, a resistor + diode clamp to ground on the input pin would almost do it)
    I included positions for external pull up resistors on the PCB, but I am hoping that simply enabling the MCU pin internal pullup resistor (around 50k) will be enough.
    The comparator output should cause the MCU input pin pull up resistor to be loaded just enough such that the voltage follows the comparator input (unless it exceeds 5V)

    It wouldn't have been quite as easy if I had to use a 3.3V based microcontroller as I would have had to scale down the input signal first!

  11. Avataaar/Circle Created with python_avatars model rogers says:

    Thank you again for your walkthroughs. The best ive ever listened to. Thank you for helping us understand!

  12. Avataaar/Circle Created with python_avatars David _1 says:

    yay

  13. Avataaar/Circle Created with python_avatars MGC says:

    What if you use a rectifier and take into consideration both positive AND negative parts of the signal?

  14. Avataaar/Circle Created with python_avatars Kemal Çavdar says:

    please speak slower, not everyone is as good in understanding english. Thanks a lot for your fantastic work!

  15. Avataaar/Circle Created with python_avatars Industrial Tools Station says:

    hi , i need your help to Build Short-circuit protection circuit for IGBTs , i want the best way to do that for DC-AC inverter , I have read many of the references available on the Internet that talk about the same subject and I tried one of the proposed methods but it's not in the required level, most of the references talk about VCE Desaturation Do you have any suggestions ..

  16. Avataaar/Circle Created with python_avatars RezK Elhelw says:

    You mean over voltage not over load

  17. Avataaar/Circle Created with python_avatars John Opalko says:

    My father was an engineer and a real perfectionist. The phrase "good enough" was never allowed to be uttered in our home. As a result, I grew up to be a real perfectionist. It does me a world of good to hear someone whom I respect say, "What the hell, it's close enough." Thanks!

  18. Avataaar/Circle Created with python_avatars LUIZ VISION says:

    OK MY DEAR. MANY TKS ABOUT MORE THIS LESSON, I AM ONLY ELETRICAL ENGINERING, 60 YEARS, AND I LOVE DIGITAL ELETRONICS
    THE BEST FOR YOU
    LUIZ
    RIO DE JANEIRO
    BRASIL

  19. Avataaar/Circle Created with python_avatars Star Gazer says:

    The point of adding the extra bits on the circuit is to stretch the duration that the LED lights up to make it visible even on short pulses.  Is there any possibility of the pulse being so short that it cannot discharge the cap in time?  How to address that?  I would think you'd want the cap as small as possible.

  20. Avataaar/Circle Created with python_avatars wondras says:

    Great to see something like this done with real hardware, instead of whacking in a microcontroller.

    Why does the datasheet say you can power it on +- 1V when the inputs have to be at least 1.5V away from the rails?

Leave a Reply

Your email address will not be published. Required fields are marked *