What is "Design by Inspection"
Dave answered what he thought was an obvious forum question, but to beginners it's not so obvious. Rather than build something up and test, let's do design by inspection.
Subscribe on LBRY: https://lbry.tv/$/invite/ @eevblog:7
Forum: https://www.eevblog.com/forum/blog/eevblog-1285-how-to-do-design-by-inspection/
#Design #Tutorial
EEVblog Main Web Site: http://www.eevblog.com
The 2nd EEVblog Channel: http://www.youtube.com/EEVblog2
Support the EEVblog through Patreon!
http://www.patreon.com/eevblog
AliExpress Affiliate: http://s.click.aliexpress.com/e/c2LRpe8g
Buy anything through that link and Dave gets a commission at no cost to you.
Donate With Bitcoin & Other Crypto Currencies!
https://www.eevblog.com/crypto-currency/
T-Shirts: http://teespring.com/stores/eevblog

Hi in my previous video a rather hyperbolic 1 in terms of bad product design in smoke alarms actually drawing like huge amounts of quiescent current over the battery powered solution. I'll link it in if you haven't seen it. and yes, I will be doing a follow-up video on that hopefully about harmonic power factor which is quite interesting and it answers a lot of the questions people had on this video. I suspect.

But anyway I What I wanted to talk about today is an interesting aspect of engineering, one that seems incredibly simple and obvious to any like experienced design engineer. but to beginners out there it it just may not be obvious. and it's a question on the forum. it comes from: hacked Fridge magnet.

he's been on the forum for a while. super contributor, thank you very much. You've got to be on the EEV blog forum, it's all happening. What hack Fridge Magnet asks is nice for a video down the track.

if you could build up those other two solutions that I talked about ie. the the on semi high voltage regulator part and also that specific Texas Instruments one which is specifically designed for direct mains connection. it does active rectification and all sorts of stuff. Really neat little chip for that low-power solution and then measure the difference between the three options ie.

the smoke alarm that we looked at the terrible design with the Zener very wasteful design and zeners. Oh jeez, they went the way of the Dodo in terms of doing regulation in the 70s only for niche applications is it and the odd advantage to them. But anyway, comparing the three different solutions for if I count the full bridge and replied I don't think I'll go that far. It's obvious what results are H V regulator will give in terms of current at vs.

the Zener solution. no need to build and measure to prove that and to me, as an experienced design engineer, it's just really obvious like it did I don't really need to build this up and then get measurements to verify that it's actually going to make a difference as I claimed it would not so obvious to me I will try it myself if when I can and I highly recommend. Yes, you build it up. But what I wanted to talk about today is Design by Inspection as I call it.

it's sort of like an old term in the industry and it does mean various things to various people. But to me, this is a classic case of Design by inspection And let me try and explain what I mean. This is the regulator that we're looking at. of course we had the Zener solution last time.

Focus, you bastard. There's the Dave code reverse engineering Zener diode solution that we had last time and it's a traditional Zener with your dropper resistor here, but it just uses a AC cap here for the mains. But it's basically it's you wasting power in your resistor, your wasting power in your Zener diodes just to get now for current out of the back of that thing and I just said hey, why not replace it with this and you'll get orders of magnitude less current. but just with my knowledge of engineering I Know for a fact that simply changing it to this solution here, using this regulator with just a half wave or a bridge rectifier and the cap and like 240 volts directly, mains in and then the current out is going to be a vastly lower solution.
probably several orders of many orders of magnitude smaller than the Zener solution and this is just immediately obvious bang of top my head I know for a fact it's going to work. How do I know that? Because I my experience but also because if you want to go through, you can build it up of course and measure it. but of course building it up and measuring things while fun and often can find hidden problems and we'll talk about that. But really, if you want to verify something that's relatively simple like this, you can do it by inspection.

And what that means is you can simply look at the circuit, look at the datasheet, calculate where currents flow, and things like that, and be absolutely 100% guaranteed. Sure, or bet your life on it. Except for maybe the odd trap for young players like the regulator might oscillate or you know, something like that, but assuming it doesn't do that, but you're guaranteed to get the solution you want by doing design by inspection like this. just you know, thinking about it just and Johnny down some numbers back of the envelope calculations if you want to call it like that.

but I kind of like the term by inspection so let's take a look at it. Okay, so please excuse the crude D if the model I didn't have time to build it to scale or to paint it here and I had to draw it freehand with my little moose. So not using my tablet. Anyway, this is the Zener circuit.

I've admitted the second our Zener here and the more protection, they don't matter anyway. I've got a hundred ohms Syrian 240 volts are AC mains in. we've got a Zener diode here and then we've just got a back protection diode here and just another cap and that gives us our V our regulated 15 volts or the Zener voltage minus that 0.6 diode. Drop whatever, right? So in this circuit, as you saw, we actually measured the current through this thing which goes down here and then of course out back down the mains because there's basically no current draw into the load.

Over here, the load draws like 50 micro amps. It's Nephal. it's half Abby's dick right? so you don't worry about all of the current and all that power is being wasted in the Zener diode. In this particular case, the current flowing in here we measured at just under 80 milliamps.

so there's 80 milliamps throw-ins flowing through the hundred ohm resistor there, and also the Zener as well. So that's why they're very wasteful. So you've got a supply that 80 milliamps, you've got to waste that in heat in the resistor. and in the Zener Here, there's no real heat loss except for a tiny little bit of a series equivalent series resistance in the cap.
There, but basically two losses here and here. All that power eel I think it was one point three six watts. We actually real power that we actually measured lost just to provide a little measly 50 micro amps current over here. which is ridiculous.

Now though, a measured current. You could inspect this by inspection as well. or you can simulate it for example. So what we're going to do is just have a look at this replacement circuit which I suggested and we'll do it.

Design by inspection. once again. got the 240 volts in. We've got a half wave bridge rectifier here I've got a 2.2 mic, a filter cap and that's going to generate higher DC voltage in here, but this is a 450 volt device.

It can handle 450 volts DC so it can handle directly rectified 240 volt AC mains as well as that 110 and it gives. They fixed 15 volts out depending on the model you choose here. Now why is this going to be lower solution? Because linear regulators a standard building block and this is where the experience comes in. Or as you'll see in a minute, we can look down in the datasheet to see this.

Okay, so what we're going to get here. Let's just ignore this voltage regulator. From in, let's just look at the half wave bridge rectifier and the cap. here.

the waveform that we're going to get is going to look like this. Okay, let's please excuse the crudity of the model. Terrible. Muriel Let's just say that you start from scratch.

If you actually simulate this, you'll be able to see it. but it's gonna. You're basically going to get like this and then it's going to drop to zero. It's going to be zero current.

and then maybe you'll get some little spikes in here every cycle, but essentially draws nothing unless your load over here starts to draw something. So really, there's not much in the way of our quiescent current here. It's not absolutely perfect, but it's vastly better than the wastage. We're going to get up here with this Zener circuit, right? So you got to find that's going to initially charge up the cap here.

But if you're talking like steady-state it's just going to do that. it's gonna be doing now. fall. So already by inspection, we can determine that this is going to be use vastly less power than over here Like this, which is continuous power wasted in the resistor and the zener.

Now what about the currents actually flowing into the regulator here? Aha, this is where you have to understand voltage regulators and linear voltage regulators like this. How they work is that basically the current flowing in here? let's call that I In This is I I Q which is the quiescent current of the regulator and we'll have a look at that down at the minute because look at the box here right And and the regulator's physically only got three legs. So current if it's going to flow into the regulator at all, it can only flow out of here like this or out of this ground pin like this. So this is going to be a quiescent current that is essentially the just the little bit of current that the regulator itself needs to use to do its function.
and then of course the output current here. There's gonna be none down the cap unless of you know this, transients and things. But don't worry about that, it's gonna be nothing down the cap. It's an open circuit.

That's why the cap has a symbol like that. It's an open circuit. So the current out of the regulator is going to equal the load that you've got. and we've already measured that, Let's say it's 50 micro amps.

Okay, so by inspection of this circuit and of course knowing not only basic building blocks like this linear regulator, but also knowing our standard DC circuit theorems like our Kirchhoff's current laws which I've done a video on I'll have to link that in how these two currents here and here have to equal this one. Here you can say that I in equals IQ plus I out that 50 micro amps there. It's easy. So now we can look at the data sheet to find what IQ is.

We know what I out is quiescent current There It is right there for V in range of 25 volts to 450. So the quiescent current is basically the same regardless of the input voltage because there's an internal constant currents. so it doesn't actually it's It's not linear. it doesn't change with increased input voltage 7.5 My cramps could be as high as 14 microns maximum and you might take that as a worst case cuz that will be over temperature.

What do they say? Yep, this is for these are typical figures for minus 40 to plus 85 for oh I out because the quiescent current here could change with the output current. So there's going 100 microamps just so happens to be pretty close even though it's double. That's like in engineering. you're talking terms of orders of magnitude.

It's not ten times more. It's not 500 microamps. It's a hundred my cram. So it's only double So near enough in terms of our doing these sorts of calculations.

So all these typical figures, we're going to get seven and a half my cramps and we can go back up here and plug these figures back in here. Total input current here equals said boy fire my grams plus 50 my cramps 57 half my cramps. Worst case, like you know, 70 my cramps or something like that. And that is our total consumption of this circuit.

not including any sort of little losses in here and stuff like that. But we're already down in the sub 80 micro amp level, so we're already. We knew that this one up here was 80 milliamps. We're already down in 80 micro amp territory.

So we're talking three orders of magnitude ie. naught times 10 naught times 100, but times a thousand divided by a thousand. In this case, three orders of magnitude less A thousand times less quiescent current for this circuit here. Compared to the Zener solution up here, and to any experienced engineer in the industry, everyone knows that these Zener circuits are wasteful.
They always have been. That's why once these are linear regulators that came along, everyone just switched over those. Although the Zener solution, the reason that they use it is because it's cheap. a Zener is still going to be lower cost than linear regulator, especially a higher voltage linear regulator like this.

Even though it might be you know, 20 cents in volume or something like that. So bingo, That's design and by inspection. and you can bet your life that that's the yes and current you're going to use. But as I said before, they can of course be traps.

These linear regulators can actually oscillate if you don't get the output capacitance correct to value the correct type, the correct. You know, placement, distance from their regulator, and things like that. So there are little traps like that. I'm not saying that you could go out and build a million widgets without building this thing up.

I'm not saying that at all. You would definitely build up. Make sure and measure it, make sure it works. But there's really for me.

There was no reason to do a video really actually measuring and comparing these two because it just seems absolutely obvious that you can just do this by inspection. So instead I made a video about design by inspection. No wait. I've come a guts I Stopped the video now and try and figure out the mistake I've made.

It's not huge, but it's subtle and it could make a difference, but we'll see that in a second. So thanks to a patron for pointing this out because if you're a patron you're from, get to see the videos early and you can see me. Oh My. God.

So like this. Anyway, it was just a test that to see if you were paying attention. So stop it now. but download the datasheet, have a quick squeeze and see if you can figure it out.

Alright, you're back. You'll notice that we had 15 volts here. It's 15 volts out that we need to have here. I was using the 3.3 volt V out table Added parameters of a chip can actually vary slightly based on the output voltage.

So if we go down here, Quiescent current is as I said. 7.5 micro Amps Typical 12 volts have different tables for each voltage. Here we go: 15 volts. That's what we're talking about.

and here it is. Quiescent current. It's actually jumped up. Oh, it's more than doubled.

It's 18 micro amps typical now with 22 micro amps and maximum. But that doesn't change anything really. And this is a good thing about doing these. sort of like back-of-the-envelope type of stuff.

Is that this thing here changes to 18. Whoop-dee-doo It doesn't matter. We're still three orders of magnitude lower than the Zener current here and I said that there were two things I didn't notice this because you know it's too busy yapping away and I read the datasheet properly. Usually this is called Hui s sent a current but on Semi seemed to have also ground current here and they've got a note seven.
Always read the notes. A proper heat sinking and or low duty cycle pulsed techniques are used to operate the device within the safe operating area. that's about as clear as mud. but my guess is that that has to do with when you actually load the thing up.

So I think what on semi are doing here is actually splitting up the quiescent current spec. It's still quiescent current, but they've got to call us something different. It's like so it's quiescent current with a load so to speak. but they they call it ground current and you'll notice that the quiescent current here is four I out of precisely zero.

So that's why it's for no load only. they just separate the specs out. It might be important for some reason, but technically speaking, you should use ground current. So that's IR Up to ten milliamps here and it's 25 micro amps.

They don't actually specify a typical figure designing for worst-case it should be 25 micro amps up here for IQ. but even then we're still under that 80 micro amps which is a thousand times lower than this, so it doesn't matter. By the way, out like lower voltage linear regulators that came can be much higher like several milliamps quiescent current. so just be aware of that.

So I Hope you found that useful. And there's many other ways examples of this design. By inspection, you may not even call it. this is just engineering knowledge, engineering, intuition, or whatever it is back of the envelope calculations.

Let us know if you actually use that terminology. leave it in the comments. but you know, like there's other things that we could go into and things like this and we're not going to like. Look at our power factor of this versus this and like that's something that you know.

you might measure it like to build it. You can simulate it of course, but you might actually want to build it up and actually measure it out in the real world. And because I got a as I said might have a video coming up on harmonic power factor. It's not just phase leading leg, it's harmonic is the you know is is the killer.

So there's differences in there in terms of apparent power. But as far as solving the real, the real power which is the power dissipated, the actual heat dissipated in these components compared to these components here. Yeah, it's gonna be like three orders of magnitude guaranteed by the laws of engineering. So there you go.

I Hope you found that quick video useful. If you did, please give it a big thumbs up. And as always, discuss in the comments down below. tell us about your you know, classic or have you goofed by doing a design by inspection for example and you've come a guts up.
And as I said I wouldn't build up a million of these go straight into production without actually building up. Comparing this one up here you can because like Zener diodes they guarantee you know it's just practically guaranteed to work. These are you know, complex little chippies. They can have little traps and police so there's more risk in going for.

You know, a solution like this then this dumb solution up here? But anyway, let us know if you've come a gun sir. So I hope you liked the video and check out my new Lb Ry on Library. Our channel over at Direct Link is: Eevblog TV it's easy to remember. Well I think I just surpassed Khan Academy in terms of subscribers route the Eevblog Audience: Trump's they come Khan Academy Audience Absolutely.

Phantom Library Anyway, how many YouTube subscribers Lily got I don't know. Tens of millions Anyway, hope you liked it. Catch you next time you.

Avatar photo

By YTB

28 thoughts on “Eevblog #1285 – how to do design by inspection”
  1. Avataaar/Circle Created with python_avatars david cureton says:

    dave, could it be that the smoke alarms uses the wasted heat to generate convection to move air into the unit with no moving parts? i suspect so.

  2. Avataaar/Circle Created with python_avatars virus insfecting says:

    I wish you can speak slower. I can’t hear everything from you. But the material is quite awesome. If you speak slower, i might understand all material. Thanks anyway!!!

  3. Avataaar/Circle Created with python_avatars topquark22 says:

    It's obvious that Zeners are wasteful. Like, if say you want to drop 12V to 5V, then you have to dissipate 7V. If you want to not burn out the Zener, then you need a large current-limiting resistor, which limits the current available to your circuit.

    I am playing around with the adjustable Zener, such as the TL431, but these are just learning experiments at this point.

  4. Avataaar/Circle Created with python_avatars Steve says:

    Could you make another PCB ECAD War video but this time on LibrePCB for Windows? Also, which PCB software besides KiCad do you recommend for low budgets, starters, etc.?

  5. Avataaar/Circle Created with python_avatars Jay Brown says:

    Thank you, Dave! It's so so so valuable to understand the thought process.

  6. Avataaar/Circle Created with python_avatars Upcycle Electronics says:

    Is there any difference between "design by inspection" and datasheet metrics that say "verified by design?"

  7. Avataaar/Circle Created with python_avatars Necessaryevil 86 says:

    It's a luxury being able to have a prototype! Try to do that if you 're a chemical engineer for example…

  8. Avataaar/Circle Created with python_avatars James Wong says:

    Dave, need your another vblog : use a breadboard for AC240 input for a load of 5V 10mA using both circuit to see to get the higher input power. True power, not apparent power.

  9. Avataaar/Circle Created with python_avatars ivykoko1 says:

    More videos like this!!

  10. Avataaar/Circle Created with python_avatars Adam Siwek says:

    Interesting video lacks practical example though.

  11. Avataaar/Circle Created with python_avatars Erickson Engineering says:

    I too have wondered how to build a low power line-voltage supply capable of driving LEDs, small processors, or other loads in the 0-50mA range. It is a non-trivial problem. Using a capacitor to drop the AC voltage plus a shunt regulator (or a constant load) is appealing.

    In the case of smoke detectors, I'd guess the major design considerations are: low parts cost and good parts sourcing in the millions, high reliability, low power during standby, and enough power to wake you up from a dead sleep when the alarm goes off. I'm guessing 100 or more mW of sound power. 15V at 10mA is 150mW. Is that enough to wake up a sound sleeper? As others have shown, your design won't provide 10mA continuously.

    These designs take advantage of the low-cost and high-reliability of modern safety-rated caps. As far as the power factor on the grid, these cause capacitive power factor. Industrial, transformer, and motor loads are all inductive, and the power grid has to add extra giant capacitors to compensate for all the inductive loads. So millions of smoke detectors may actually improve the power factor of the entire grid in a small way. Just a hunch.

    0.5W * 6 units per house = 3 Watts to protect a large home for many years. Sounds like a reasonable trade-off to me considering how many lives are saved by these things. Sure it would be better if they drew 1/4 that standby power. So far I haven't seen a design that can improve these requirements.
    If someone can design a better smoke-alarm power circuit, I'd like to hear about it. So would Kidde, First-Alert, and the other manufacturers.

    I live in New England. We have wood-frame houses, oil and gas heat, and old bad wiring. The local news has a couple of house fires every single morning with many deaths each year. People need to take smoke detectors very seriously.

  12. Avataaar/Circle Created with python_avatars KX36 says:

    In the series linear regulator, I_in = I_q + I_out as Dave says, and it's the same in a Zener shunt regulator. It's just that in a shunt regulator the quality of the regulation is proportional to the ratio of I_q to I_out. I_q (Zener current) might be 5x or 10x I_out in a good design. Whereas in a series regulator the regulation is independent of this ratio. It just happens that the shunt regulator in these smoke alarms is so poorly matched to the load that I_q is massively excessive. Capacitive droppers work best when there is not too much difference between V_in and V_out and they are ubiquitous in LED lightbulbs where the LED string might run on >100V DC.

    Shunt regulators are still useful, just in lower power applications. Page 2 of the NCP785A data sheet in the video shows an internal block diagram that includes one to power itself.

    P.S. A shunt regulator is a still linear regulator. Doesn't have to be a series regulator like the IC discussed to be a linear regulator.

  13. Avataaar/Circle Created with python_avatars KX36 says:

    My brain post night shift just can't handle a video of Dave picture-in-picture over a video of Dave picture-in-picture. Really weird feeling.

  14. Avataaar/Circle Created with python_avatars Foxy rollins says:

    Khan academy is gold.. eev blog is e-soft porn. Lets get in depth into time and frequency domain transformations. Half the time spent on your channel is listening to you giggle like a school girl. You gotta stay off the meth…

  15. Avataaar/Circle Created with python_avatars Foxy rollins says:

    What are the capacitors for? Are they soley to smooth out the voltage in and out?

  16. Avataaar/Circle Created with python_avatars shawnmccori says:

    when I designed my ground device I found a very bad relay. It was some how shorting to 120 volts and 12 amps from the outlet despite there being a transformer LOL. Some dude who stole my ID used the bad relay and got a very bad ear deafening problem. So his friends message never got to him. He couldn't hear them.

  17. Avataaar/Circle Created with python_avatars Piotr K says:

    Original circuit with Zener diode is capable of delivering twice as much current as your design. This current is necessary to power a buzzer when smoke is detected. You should connect two of those regulators in parallel or find a bigger one.

    Paper endures all. It's a trap for every engineer.

  18. Avataaar/Circle Created with python_avatars Nicks says:

    I would refer to this as design by common good sense, rather than design by inspection.

  19. Avataaar/Circle Created with python_avatars Nikki Carlson says:

    Great video, I'd love to see more like this.

  20. Avataaar/Circle Created with python_avatars Bo Stout says:

    "… by inspection", "… by analysis", and "… by test" is standard terminology in my previous engineering field. They are used in contractual, technical specifications for product. I think the term "design by inspection" is quite common and used throughout engineering, not just electrical engineering. They have very precise definitions so that the scope of the work to be done is clear to all parties.

  21. Avataaar/Circle Created with python_avatars Sid Harth says:

    how about something a little more elegant (expensive) like ST's VIPER115XSTR or the MP100LGN from Monolithic Power?!!

  22. Avataaar/Circle Created with python_avatars Thomas Galiana says:

    Sir, I love your videos!

  23. Avataaar/Circle Created with python_avatars Stormbringer Workshop says:

    Will the new hammer help?

  24. Avataaar/Circle Created with python_avatars Simon A says:

    Looking at the zener circuit with capacitor dropper I wonder: why dont reactive impedance dissipate power like a resistor?

    Is it fair to consider the caps reactive impedance at 50hz as the 'impedance to charging' while the ESR at 50hz is like the 'impedance to discharging'?

    I guess this comes to the question 'does current flow though a capacitor?'

  25. Avataaar/Circle Created with python_avatars Nicolai R. Klaksvig says:

    Heya what about tearing down iphone charging cable ? How do they detect if its a copy cable or a real one ?

  26. Avataaar/Circle Created with python_avatars Piergiorgio Buongiovanni says:

    Thank you very much Dave!!! I follow you from Italy and your videos are very interesting for me.

  27. Avataaar/Circle Created with python_avatars ClockPulse says:

    喵啊 喵啊 好喜欢看这个人讲的

  28. Avataaar/Circle Created with python_avatars FruitMuffin says:

    Love it Dave — as a electronics hobbyist I don't have any of the formal engineering education. Always nice to learn something new 🙂

Leave a Reply

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