That's literally the ultimate guide to op-amps. I appreciate your effort in testing every parameter and, furthermore, building your own and improving it. I wish I had such a video a couple of years ago. Even still, the centertap common mode noise idea is brilliant; I still learned something new.
Excellent! You, and those watching this, know more about OpAmps than the vast majority of EEs (and the Perfessors teaching them)! For all you young Techies out there, consider this: Learning to "code" is now rapidly being replaced by AI, learning fundamentals, making them with parts and soldering is becoming more valuable by the day. Kudos from a retired EE in his 70s.
@@AllHandlesHaveBeenTaken Yes, eventually AI can do circuit design and physical implementation. Coding AI can do now; digital design it can (or is already doing inside ICs) in a few years; analog deign is more than an order of magnitude more challenging and will take a while longer (~5 years would be a good guess). Analogous to writing code, there will initially be pieces and modules of circuitry at first, followed by interconnection of them for a specific function. Just as code has become a sprawling monstrosity patched together requiring more performance and memory, so will the advances in silicon make the sub-optimal and often unusable analog designs fit in shrinking, ever more capable, less expensive hardware.
Prof. Lanterman at Georgia Tech has a channel full of really in-depth op-amp and operational transconductance amplifier lectures and experiments, If anyone wants to dive in deeper than this intro. Not for nothing, the professors at Georgia Tech go hard, they know their shit.
The rule is to prevent large gains, staying below 100x. Some people prefer to never exceed 10x. For instance, if you require a 100x gain, you can achieve it by using two op-amps, each with a 10x gain.
Rules are made to be broken. If you want precision and repeatability you have lots of rules to adhere to. If your app is uncritical make your own rules to fit.
Good idea. Keep in mind that chaining two op-amps will have an affect on the frequency response or bandwidth. IIRC, Dave Jones of the EEVblog made a video where he went through the math related to frequency and bandwidth response when chaining op-amps.
I’m 5 years into my self-imposed crash course in electronics, I’m thrilled it all made sense up to CMRR & PSRR, but I’ll take any win I can. Absolutely excellent video.
Douglas Self has a lot to say about op amps for audio (mixers and so on) in Small Signal Audio Design (4th edition due out soon). There are many subtleties when you get into it. Highly recommended if you are doing any analog, especially below 1 MHz. Useful for background at RF.
Right, I'd like his observations brought in when comparing against 70s technology. He calls out the high input bias current on NE5532, low open-loop bandwidth of TL072 and 0.5 V/μs slew rate on UA741. The more modern OPA134 is way better than TL072 for JFET inputs and the 2nd edition has all the noise measurements I'd want.
An AMAZING video, this minimal OpAmp in the beginning helped me so much!! - All other tutorials on UA-cam started "way to high in the sky", the way you replace module by module really fits my brain well.
Solid educational material and video production. Remember to slow your pace, when reading through the scripted material. You started at a good rate, but, by the end, you were going fast, again. Don't beat yourself up about that. Practice makes perfect and it takes a lot of practice. This is your best production, to date. Kudos. We are all proud of you. Oh, and you taught me something new about op amp offset = thanks!
Thank you, I've been working on my reading pace. All of your tips have really helped me improve these videos over time, and I'm grateful for that. Thanks for watching! :)
@@SineLab I also liked your video so much to have written some stuff into my cheatsheet (as I dont need it right now, but will need it later for current sensing). About Slew Rate. Will it help if I use less amplitude output at same frequiency? Would be cool to see you gradually lowered gain while showing that triangle signal.
@@stevenbliss989 I meant that lower amplitude output requires less slew rate to remain undistorted, right? So if you would lower gain twice the could it become sine again at 100kHz?
Very nicely done presentation; Back when I was doing design what ended up being the limit in components choice was in what we had in inventory for making our other products. For better or worse, it was LM324's for most everything and that resulted in other design constraints. To get a new component added to inventory for a different product required going before the bean-counters with sales projections for the new product. It was not my most-favorite part of the job as an EE. I was happier with datasheets, perfboard and a soldering iron.
The thing is to stay away from open loop and set the gain product bandwidth to what you need for the requirements. Keep them stable as much as possible, as without an oscilloscope you won't know if they are hooting away above 20kHz 😞 The best opamp is the one you have. the second best is the one you can get tomorrow, The least best one is the one you need but's it's on 16 weeks back order.
I was looking at prices in my country. The cheapest dual op-amp is the PJ4558CS at 8c USD and the LM358 is 8.3c ea for singles. A pretty good performing op-amp is the LM833 at 40c each. The NJM4580 is $1.04. The OP07 is $1.05.. The MCP6021 is $1.37. The MCP6022 is $2.12. All from the same source so the relative costs can be seen.
That was truly excellent, your explanation of the improvements to your discreet op amp was for me the high point. I also liked your explanation of the offset, and how you managed to discuss all the datasheet parameters and show how to measure them, which is increasingly important now in the world of fakes of even cheap op amps.
@@SineLab The only snag with your improvements to the discrete opamp is that any supply noise is injected directly into the current sinks, thus worsening the PSRR. Not a big deal as long as you decouple your supplies adequately, but I would suggest a TL431 configured as a 2.5V Zener as the source of the drive voltage for your current mirrors. That would effectively remove any coupling from supply variations.
You can get a pair of transistors in the one package to keep the input differential better matched. Also, due to their comprehensive internal regulation, an op-amp like the NE5534 and its variants are able to operate with power rails between 9 and 17+ volts. For the 1980s - 1990s, Motorola made the MC24080 series of of op-amps that -- although noisier than an NE5534 -- had a particularly nice sound, but they are now obsolete :-)
Hi, great video!! Aquestion out of curiosity... in the case of your discrete project, couldn't you correct the offset by adding a DC servo loop? Thank you!
Great video! It brings be back to Electronic School. I like your Oscilloscope, so much can be analyzed with this machine. There are a few good solid state scopes available. I purchased 10 NE5532P Op Amps on ebay for $2. Why, I saw a video which said you can massively improve Op Amp performance by running them in parallel? It was said they get HOT with this configuration so I'm going to add a small heat sink and see how it sounds.
Another important characteristic is the input current. When the circuit is biased with high resistor values, the input current can lead to an extra offset voltage. The input current also has its own offset current and noise figure. A JFET input, like the TL072, has a low input current, but this increases fast with temperature. BJT opamps are often biased with identical resistor values on both differential inputs, to eliminate offset. But this should not be used on OPAMPS with internal current compensation, like the OP27.
Thank you for this. I'd love to see some comparison regarding RF immunity. I've seen problems with the LM358 where it appeared to rectify an RF field which then causes problems in an audio circuit. I'm sure a resigned circuit with better shielding would work, but the quick fix was to switch to a TLO72 or TLO82.
Excellent. I got eyes on that Transistor build. For now I bought the 50 for $5 Op-Amp slab O chips from China, a few LF356H from Bulgaria, and some LM311's from Digikey. These are for bench testing, I just want to understand them. I'm starting with a VCO circuit using the 358. Good video.
@@SineLab The 358 build worked! Now I have time for the transistor thing, because why not? I have way too many transistors and really want a ghetto op-amp. Cool, Thanks.
LM308 and LM324 for old school really good chips. I have a couple tubes of each from way back and still use them, especially the 308 for small signal low noise, and 324 for single voltage supply. They can not compare to modern chips for balance and input current, etc.
@@2001pulsar SO I hear. I have plenty and there are much better choices today but I have not kept up and don't know a good substitute. Do you know of a good in-amp to replace AD521?
@@charlesspringer4709 not without research for the AD521. The biggest feature of LM308 is very low input bias current, which is useful in instrumentation amplifiers for amperometric measurement.
The LM324 is one the worst than you can use... need high voltages to run correctly and have some issue around the zero level. Stay far from it, use modern op amp.
Excellent video that covers a lot of ground about Op Amps. I would just like to mention one more category of Op Amps that I like using and this is Instrumentation high precision Op Amps. Like the chopper Op Amps. They are expensive though, but they offer some really cool characteristics. Like super low drift, noise and voltage offsets. One such Op Amp I used in my projects and like a lot is the LTC1050. There are of course better instrumentation Op Amps, but ltc1050 isn't crazy expensive.
One thing I would like to point out that makes the 358 a very viable option as compared for the 741as an example is that it is capable of "ground sensing" which few opamps can do. it is especially important if you use it as a comparator for low voltages at the input. that is why I base many of my projects on the 358, but it is not very useful for audio circuits due to the higher noise ratio
@@stevenbliss989 yes indeed. I tried making audio circuits with this chip and I got very good audio out of it. But the white noise level is too much for practical use. But for everything else it is a very nice cheap device
@@stevenbliss989 it could probably isolate some of it but I think this is just the nature of these chips that they have this amount of idle noise in the end
It would have been interesting to add a modern high performance OP amp to show what is now available. Offsets of fractions of a microvolt, 300MHZ bandwidths, and 6000 V per uSEC slew are available at very reasonable prices.
Opamps are glossed over by most hobyists when if you go through all the basic theory and such it becomes apparent. I know this as i was scared of them until i realizlzed im not stupid and needed to read, build, measure analyze then rinse and repeat
Very good video, I'll be watching more. As I am an audio enthusiast, let's assume in a class D audio amplifier project that will have a frequency of 20Hz to 20KHz, we will divide it into 3 ways "BASS - MID - TREBLE". So, correctly ideal, an "op-amp"? For BASS, it sounds best at low frequencies. Another one just for the AVERAGES, which would sound better in the middle frequencies. And another for the TREBLE, which will sound better in the high frequencies. Sometimes it may happen that the same op-amp sounds good at all frequencies or how it is used for each group of frequencies?
My all-purpose jellybean tends to the the TL07x (usually the ´074, since sometimes the TL071 or ´072 are actually more expensive!) Cheap enough to buy in quantity and OK specs overall for most of what I do. The biggest drawback is that it isn't single-supply. (But check out the TL97x, which is similar and can sense down to ground). LMV358 - the CMOS version of the LM358 - is full rail-to-rail, but limited to a 2.5-5.5 volt supply. The input offset of a millivolt is just so-so. The NE5532 (SA5532) seems to be everyone's default for audio, but as far as I can tell, the only reason is that everyone else uses it for audio. Also, you have to be really careful with the 5532 in any low-gain configuration; its internal compensation does NOT go down to unity gain and you'll be fiddling with external caps to tame the oscillations. It' is not happy with service as a unity-gain buffer. OP-07 is a pretty cheap choice if you need an opamp with a lower offset voltage (100 microvolt typical). Don't use any of these op-amps as comparators. There are a lot of op-amps that can't be used as comparators at all because they have a low differential voltage range. While the TL07x can be used as comparators - they wont take harm from having their inputs driven to opposite rails - they're slow to recover from being overdriven. You'll get much more speed from an actual comparator. LM311/393/339/2903 have been around since forever and are still kind of a go-to. TS391 has higher specs and has only 200 uA of quiescent current, if you're building a battery-powered device. LMV370x is CMOS so the offset and bias currents are down in the tens of pA. TS3021 has rail-to-rail input voltage swing. LT1016 is probably the cheapest fast comparator if you have the need for speed. If you need programmable gain, the cheapest option is probably the LM13700. The AD633 is twice or 3× the price but a lot easier to work with. SSM2164 and its clones are also worth looking into. A trap for young players is that on virtually all JFET and BJT-input opamps, and some CMOS ones, you can't let the voltage on either input go more than about 200 mV past the negative rail, or the opamp will latch up - its output will swing to a rail and stay there, even if the input voltage returns to the normal level. Even a Schottky-diode clamp won't save you. If you need to handle out-of-range inputs,. the most secure approach is probably a Schottky clamp followed by a voltage divider with a ratio of 1:3 or 1:4, to knock the diode's forward voltage down into the opamp's safe input range. This should cover a decent range of afforrdable options. If you need something better like the INA828 or LTC1052 you'll probably know it already, and know that you can't breadboard the beast because parasitics in the external circuitry and faulty shielding will be the death of you. The same sort of caveats go to gain decompensation for higher speed, boost stages for higher output voltage, opamps with specialized buffer states for higher output currents, and so on - if you need these, you're already beyond the scope of this video.
The 5532 is the standard for audio because it has near-ideal properties for audio. The TL07x family was used in mixers before the 5532 came along but disappeared rapidly. The LM4562 is slightly better, but it took 30 years for it to show up after the 5532. It still costs more, I think. Both of these have high current draw so they are not ideal for battery operation. Some modern op amps come close to the 5532 in consumer battery applications at lower current draw. On unity gain operation, the 5534 (single amp version) is not compensated for unity gain, but from memory the 5532 is OK. Agree about comparators: use a purpose-designed comparator, don't abuse a circuit that was designed for linear operation. The distortion figures of the LM358 (everyone's got some 358s :-) ) can be improved by using a 1k-ish pull-down resistor on the output. Increases current draw though.
Good video! I found your presentation of the CMRR very interesting. Didn't thought your homemade op amp would perform so well (at least on certain characteristics). Regarding the parameter of your ideal opamp i think you should have include size (sometime size matter...)
The 741 op-amp has an offset null adjustment function using a 10K pot. between pins 1 and 5 with the wiper connected to the negative supply rail. This can reduce the offset voltage to virtually zero.
They still sell low cost dual-matched NPN and PNP transistors, although they are in small SMT package, that way the input differential pair will have better characteristics like lower input offset voltage
@@VandalIO NST65010MW6T1G for PNP, and NST65011MW6T1G for NPN, they are available in SOT-363-6 package, it is quite small but you can find adapters to make them DIP and use them on the breadboard.
"5532 popular choice on the internet". It is defacto standard in audio circuit design especially pro audio going back to the late seventies. I have variants in most equipment I have opened up and jrc 55xx variants
Agreed. The NE5532 is the defacto standard, and it is much less expensive that the OPA134 (almost 1/10 the cost). The statement that it has worse specs is not entirely correct. The NE5532 beats to OPA134 in noise performance (nV/√Hz @1kHz). The OPA124 has much better THD specs, but both are quite good for many applications. However, if you want better, the dual opamp LM4562 beats both of them in specs and comes in at a cost of about 1/4 of the OPA134. For a few cents more than the OP134 in production quantities, the OP1611 offers about 1/8 the noise voltage, 14dB lower THD+N, and 20dB better CMRR, .
That was very educational! Could you also show other circuits like a class AB amplifier or class D amplifier with a couple mosfets and how to design such a circuit? Maybe you could show how to work with FETs or how to choose the right BJT. For instance, do I use a BC547, BC517, BC337, BD139, etc? I got a small set of some common transistors a while ago, but I've only used them to switch some LEDs on and off with a microcontroller and there are more interesting ways to use them but then you need to understand the differences more ofcourse.. Other than NPN versus PNP I mean of course. And regarding the FETs, I understand that opamps with JFET input are often better, but why? Is it just because a FET has higher input impedance on the driving pin? (I guess that's called the gate? Normally I only work with BJTs and a couple mosfets for switching purposes so I'm not sure of terminology for FETs). The explanation of that current mirror went a bit fast for me. I think I've seen other circuits for current sources maybe just using one transistor. What's the difference? I know there are packages with matched mosfets on a single die, so there must be packages with matched transistors on a single die as well. How much better could you expect your custom built opamp to work with matched transistors like that? Anyway, great content! I don't expect an answer to all these questions here. But maybe some ideas for future videos.
I have plans for both a class D amplifier and a BJT vs MOSFET video in the works! Stay tuned for those. As for the current mirror, you should think of BJTs as adjustable current sources, depending on the current flowing through the base. In my circuit, I used one NPN as a diode (PN junction) and let the resistor determine the current through it. Since both transistors share bases and emitters, they should both have roughly the same constant base current. Since the base current is constant, the loading transistor will have a constant current draw, hence a current source. Other circuits may use only one transistor and use another method for providing a constant voltage/current to the base of the loading transistor. The end result is still the same. There are indeed packages with matched BJTs. I'd expect these to perform better since their gains are the same. There should be less offset on the output and better CMRR. I hope the explanation made sense! :)
@@SineLab absolutely made sense. I doubt you could not make sense. Lol.. I am interested in learning the above post as well. I have built a few amplifiers from someone else's schematics but would love to sit down with my box of parts and ideas. Understanding impedance and calculating resistor values seems like the nitty gritty for me. Thank you so much for your talent and taking the time to give such detailed responses. I look forward to your future videos.
The single supply op amps asymmetrical clipping might sound good as part of a distortion circuit. Cold biasing a tube so half the wave is cut off is a common technique in guitar amps.
Hi thank you very much indeed for this great video I tried to understand the most but it is very difficult for me I would like to know how important is a high slew rate for an audio circuit The higher the better ? i see opamps with very high SW Are they the best for a preamp ? i have a line preamp issue
@@SineLab Hi thank you very much I asked because i see mentioned opamps with max 20V/us while there are others with 3-400V/us They are very rare in audio circuits
In Offset Measurement, you set 0V to input '+', so what for are 10 Ohms and 10k Ohms resistors, instead connecting directly to ground ? It seems should be the same.
358 output stage work in B class , cheap way to achieve low power with some crossover distortion. B-C class is mainly for transmitters . someone got fake underperforming 358's .
17:17 - OK. i'm no math genius and perhaps I am missing something but... here you show a multiplication, but the noise density is expressed in nV/Sqrt[Hz]. That, to me, looks like a division. Hence, 0.000 000 021V / SQRT(5 000) = 0.3 nV or 300pV. I'm I wrong here?
It's a multiplication to cancel the Sqrt[Hz] units. The value in the datasheet is the noise density per root hertz, so we multiply by the 'amount' of root hertz to get to total noise.
Hendrik Wade Bode, an American of Dutch ancestry, worked at Bell Labs where his co-workers called him BOH-dee, to which he did not object. (in Dutch, it is apparently pronounced Bo-duh, but in my career, I've never heard it pronounced that way.) A Bode Plot uses straight line segments to approximate frequency or phase response. The graphs you show are not Bode Plots, but actual frequency & phase curves.
No. Whilst it is true that Bode did use straight lines on the frequency and phase response charts, these were an approximation and contained error, the fact is that the name "bode plot" for the Frequency and phase response charts has been in common use by electronic engineers for at least 35 years. It is accepted that "bode plot" refers to the type of chart and not the error in the curve plotted on the chart.
@@deang5622 No. "As originally conceived by Hendrik Wade Bode in the 1930s, the Bode plot is an asymptotic approximation of the frequency response, using straight line segments" en.wikipedia.org/wiki/Bode_plot?useskin=vector Bode plots approximate amplitude-vs-frequency and phase-vs-frequency curves with straight line segments. When you draw the actual amplitude-vs-frequency curve, you have an (actual) amplitude vs frequency curve.
@@cheponis No. Listen up idiot. It is common practise to refer to them as bode plots. The accuracy isn't relevant. There is no rule that says a Bode plot MUST be an estimated plot.
@@1pcfred lol, is there a difference ? Can't say of the hundreds i've purchased throughout the years that i've noticed much of a difference !! 5532's is a diff story tho
@@tdtrecordsmusic there are differences. I have some authentic vintage JRC 4558s and they're phat tone in overdrives. I pulled them off an old circuit board myself. So I know they're legit. But in this day and age there's no way to prove it. Still, if it could be done they'd be $100 a pop ICs.
Ive started buying more expensive components since ive gotten into the weeds. I live in a small area so i sell premium components and ics and almost anything anyone would need for a project. If the person is new and cant afford to get the basic parts to learn then i give them a whole lab.
NE5534 and NE5532 are good audio op amps. I think there is in recent years a better one made by Burr Brown, but many analogue large format mixing consoles used in world famous recording studios use/used the NE5534 device. So a considerable amount of music from professional artists has been through filters and dynamics sections on mixing consoles using them.
@@franzliszt3195 I still have to search, since the ADA4899-2 can only handle +/-6 volts supply voltage, the maximum output voltage is limited to +/- 3.1 V = 4.3834 V~. However, this would be completely sufficient for DAC purposes because of the limited level. The ADA4898-2 has ultra low noise, higher distortion and only 55 V/µS. With usual output voltages, the slew rate must be well above 100 V/µS, as there is a gap at 20 KHz at the beginning of the first half-wave in the LTSpice simulation software. But with music (constant superimposition of several frequencies) there is no time for it to settle in, there are always only "beginnings" of oscillations. I've only been using LTSpice since 2023. Audio op amps are too slow, video op amps have too much distortion and noise @ 10 Hz (MC RIAA amp). In between, I still have to look for the best compromise from “1000” op amps.
I only watched the intro to this because it has a seriously misleading title and screen shot and starts off with a words that suggest other things again. To all those watching, there is no ultimate opamp, in the real world there are a bunch of real world trade-offs, a regular minefield that has to be wade through, such that no opamp can be all things to all people. My advice is to look through every single spec in an opamp data sheet and Google every one of them until you understand what they are saying. Then take a long hard look at what your application is trying to achieve and to what extent each property will impact on that. Sounds long and hard? There's reason why engineers go to university for x years.
I found it a bit odd that your ultimate comparison didn't include the L4562, which has been the go-to opamp for low-noise audio applications for the last decade or so. Apart from the input currents (which are obviously greater than for the FET input amps), its specifications better all of the opamps chosen here in almost every respect. It's not rail-to-rail, so is less useful in 5V supply applications, but otherwise would be an automatic choice for me. It does cost around £2, but that's a dual opamp, and it's still cheaper than the OPA134, which is only a single opamp. Incidentally, you didn't mention the input range anywhere. The LM358 is useful because it includes the negative rail, which is actually what makes it a genuine single-supply opamp.
It's an interesting idea, and probably would work. It all depends on the resolutions of the DACs and the ADCs. As well as the speed of the whole system.
op-amp means operational amplifier and he built one. The original operational amplifiers were built with vacuum tubes and modern practice is to use a single integrated circuit. He did neither, but it was still an operational amplifier.
This is not a comparison, this is a full and simple tutorial about OP-AMPs
Absolutely, love it
That's literally the ultimate guide to op-amps. I appreciate your effort in testing every parameter and, furthermore, building your own and improving it. I wish I had such a video a couple of years ago. Even still, the centertap common mode noise idea is brilliant; I still learned something new.
Glad it was helpful!
Excellent! You, and those watching this, know more about OpAmps than the vast majority of EEs (and the Perfessors teaching them)!
For all you young Techies out there, consider this: Learning to "code" is now rapidly being replaced by AI, learning fundamentals, making them with parts and soldering is becoming more valuable by the day.
Kudos from a retired EE in his 70s.
You think AI can't do circiut design?
@@AllHandlesHaveBeenTaken Yes, eventually AI can do circuit design and physical implementation. Coding AI can do now; digital design it can (or is already doing inside ICs) in a few years; analog deign is more than an order of magnitude more challenging and will take a while longer (~5 years would be a good guess). Analogous to writing code, there will initially be pieces and modules of circuitry at first, followed by interconnection of them for a specific function. Just as code has become a sprawling monstrosity patched together requiring more performance and memory, so will the advances in silicon make the sub-optimal and often unusable analog designs fit in shrinking, ever more capable, less expensive hardware.
Prof. Lanterman at Georgia Tech has a channel full of really in-depth op-amp and operational transconductance amplifier lectures and experiments, If anyone wants to dive in deeper than this intro. Not for nothing, the professors at Georgia Tech go hard, they know their shit.
The rule is to prevent large gains, staying below 100x. Some people prefer to never exceed 10x. For instance, if you require a 100x gain, you can achieve it by using two op-amps, each with a 10x gain.
Thanks for mentioning that. You're definitely right about sticking to lower gains.
Rules are made to be broken. If you want precision and repeatability you have lots of rules to adhere to. If your app is uncritical make your own rules to fit.
@pibbles-a-plenty1105
You probly meant "non-critical", but thats okay, you don't know what you're talking about anyway !
@peetgaming
Yep, clean supply and multi-stage, wins ever time. Even if it's a floating transistor on the input.
Good idea. Keep in mind that chaining two op-amps will have an affect on the frequency response or bandwidth. IIRC, Dave Jones of the EEVblog made a video where he went through the math related to frequency and bandwidth response when chaining op-amps.
I’m 5 years into my self-imposed crash course in electronics, I’m thrilled it all made sense up to CMRR & PSRR, but I’ll take any win I can.
Absolutely excellent video.
You certainly have a good understanding op-amps if you got that far into the video! :)
Douglas Self has a lot to say about op amps for audio (mixers and so on) in Small Signal Audio Design (4th edition due out soon). There are many subtleties when you get into it. Highly recommended if you are doing any analog, especially below 1 MHz. Useful for background at RF.
Right, I'd like his observations brought in when comparing against 70s technology. He calls out the high input bias current on NE5532, low open-loop bandwidth of TL072 and 0.5 V/μs slew rate on UA741. The more modern OPA134 is way better than TL072 for JFET inputs and the 2nd edition has all the noise measurements I'd want.
An AMAZING video, this minimal OpAmp in the beginning helped me so much!! - All other tutorials on UA-cam started "way to high in the sky", the way you replace module by module really fits my brain well.
Solid educational material and video production. Remember to slow your pace, when reading through the scripted material. You started at a good rate, but, by the end, you were going fast, again. Don't beat yourself up about that. Practice makes perfect and it takes a lot of practice. This is your best production, to date. Kudos. We are all proud of you. Oh, and you taught me something new about op amp offset = thanks!
Thank you, I've been working on my reading pace. All of your tips have really helped me improve these videos over time, and I'm grateful for that. Thanks for watching! :)
@@SineLab I also liked your video so much to have written some stuff into my cheatsheet (as I dont need it right now, but will need it later for current sensing). About Slew Rate. Will it help if I use less amplitude output at same frequiency? Would be cool to see you gradually lowered gain while showing that triangle signal.
NO, slew rate is CONSTANT regardless of amplitude!
@@stevenbliss989 I meant that lower amplitude output requires less slew rate to remain undistorted, right? So if you would lower gain twice the could it become sine again at 100kHz?
Oh yeah, of course. :) @@TURBOSLAYERPWNZ
Very nicely done presentation;
Back when I was doing design what ended up being the limit in components choice was in what we had in inventory for making our other products.
For better or worse, it was LM324's for most everything and that resulted in other design constraints.
To get a new component added to inventory for a different product required going before the bean-counters with sales projections for the new product. It was not my most-favorite part of the job as an EE. I was happier with datasheets, perfboard and a soldering iron.
The thing is to stay away from open loop and set the gain product bandwidth to what you need for the requirements. Keep them stable as much as possible, as without an oscilloscope you won't know if they are hooting away above 20kHz 😞
The best opamp is the one you have.
the second best is the one you can get tomorrow,
The least best one is the one you need but's it's on 16 weeks back order.
I was looking at prices in my country. The cheapest dual op-amp is the PJ4558CS at 8c USD and the LM358 is 8.3c ea for singles. A pretty good performing op-amp is the LM833 at 40c each. The NJM4580 is $1.04. The OP07 is $1.05.. The MCP6021 is $1.37. The MCP6022 is $2.12. All from the same source so the relative costs can be seen.
What a wonderful video. For a DIY-tinkerer this is gold ! I also like that you used breadboard, makes you more relatable :D
That was truly excellent, your explanation of the improvements to your discreet op amp was for me the high point.
I also liked your explanation of the offset, and how you managed to discuss all the datasheet parameters and show how to measure them, which is increasingly important now in the world of fakes of even cheap op amps.
Thanks for watching! I agree, it's very important to know what exactly the op-amp will do in all circumstances.
nice 'upgrade' to your diy op-amp. good overall effort and educational from a practical point of view for beginners.
Thanks! I'm glad it turned out well :)
@@SineLab The only snag with your improvements to the discrete opamp is that any supply noise is injected directly into the current sinks, thus worsening the PSRR. Not a big deal as long as you decouple your supplies adequately, but I would suggest a TL431 configured as a 2.5V Zener as the source of the drive voltage for your current mirrors. That would effectively remove any coupling from supply variations.
You can get a pair of transistors in the one package to keep the input differential better matched. Also, due to their comprehensive internal regulation, an op-amp like the NE5534 and its variants are able to operate with power rails between 9 and 17+ volts. For the 1980s - 1990s, Motorola made the MC24080 series of of op-amps that -- although noisier than an NE5534 -- had a particularly nice sound, but they are now obsolete :-)
Plenty of 358s, great Error Amp's for PWM's, PSU's, DAC's etc.
Great vid'.
Cheerz.
Hi, great video!! Aquestion out of curiosity... in the case of your discrete project, couldn't you correct the offset by adding a DC servo loop? Thank you!
Great video! It brings be back to Electronic School. I like your Oscilloscope, so much can be analyzed with this machine. There are a few good solid state scopes available. I purchased 10 NE5532P Op Amps on ebay for $2. Why, I saw a video which said you can massively improve Op Amp performance by running them in parallel? It was said they get HOT with this configuration so I'm going to add a small heat sink and see how it sounds.
Another important characteristic is the input current.
When the circuit is biased with high resistor values, the input current can lead to an extra offset voltage.
The input current also has its own offset current and noise figure.
A JFET input, like the TL072, has a low input current, but this increases fast with temperature.
BJT opamps are often biased with identical resistor values on both differential inputs, to eliminate offset.
But this should not be used on OPAMPS with internal current compensation, like the OP27.
Thank you for this. I'd love to see some comparison regarding RF immunity. I've seen problems with the LM358 where it appeared to rectify an RF field which then causes problems in an audio circuit. I'm sure a resigned circuit with better shielding would work, but the quick fix was to switch to a TLO72 or TLO82.
Excellent. I got eyes on that Transistor build. For now I bought the 50 for $5 Op-Amp slab O chips from China, a few LF356H from Bulgaria, and some LM311's from Digikey. These are for bench testing, I just want to understand them. I'm starting with a VCO circuit using the 358. Good video.
Good luck with your VCO!
@@SineLab The 358 build worked! Now I have time for the transistor thing, because why not? I have way too many transistors and really want a ghetto op-amp. Cool, Thanks.
Thanks for taking your time so we can follow along.
Thanks for watching!
LM308 and LM324 for old school really good chips. I have a couple tubes of each from way back and still use them, especially the 308 for small signal low noise, and 324 for single voltage supply. They can not compare to modern chips for balance and input current, etc.
Good luck buying any LM308 these days.
@@2001pulsar SO I hear. I have plenty and there are much better choices today but I have not kept up and don't know a good substitute. Do you know of a good in-amp to replace AD521?
@@charlesspringer4709 not without research for the AD521.
The biggest feature of LM308 is very low input bias current, which is useful in instrumentation amplifiers for amperometric measurement.
The LM324 is one the worst than you can use... need high voltages to run correctly and have some issue around the zero level. Stay far from it, use modern op amp.
This is a spectacular video, and I've learned so much already by taking notes!
I'm glad the video has helped!
Excellent video that covers a lot of ground about Op Amps. I would just like to mention one more category of Op Amps that I like using and this is Instrumentation high precision Op Amps. Like the chopper Op Amps. They are expensive though, but they offer some really cool characteristics. Like super low drift, noise and voltage offsets. One such Op Amp I used in my projects and like a lot is the LTC1050. There are of course better instrumentation Op Amps, but ltc1050 isn't crazy expensive.
One thing I would like to point out that makes the 358 a very viable option as compared for the 741as an example is that it is capable of "ground sensing" which few opamps can do. it is especially important if you use it as a comparator for low voltages at the input. that is why I base many of my projects on the 358, but it is not very useful for audio circuits due to the higher noise ratio
That's probably the LM358's best feature.
Yep, it's the LM358 super power, but for audio, watch out for the horrid crossover distortion from it's output stage.
@@stevenbliss989 yes indeed. I tried making audio circuits with this chip and I got very good audio out of it. But the white noise level is too much for practical use. But for everything else it is a very nice cheap device
Pity about the noise. Would low noise trannies fix that?
@@stevenbliss989 it could probably isolate some of it but I think this is just the nature of these chips that they have this amount of idle noise in the end
It would have been interesting to add a modern high performance OP amp to show what is now available. Offsets of fractions of a microvolt, 300MHZ bandwidths, and 6000 V per uSEC slew are available at very reasonable prices.
Opamps are glossed over by most hobyists when if you go through all the basic theory and such it becomes apparent. I know this as i was scared of them until i realizlzed im not stupid and needed to read, build, measure analyze then rinse and repeat
There aren't as daunting or complicated as they seem at first :)
Very good video, I'll be watching more.
As I am an audio enthusiast, let's assume in a class D audio amplifier project that will have a frequency of 20Hz to 20KHz, we will divide it into 3 ways "BASS - MID - TREBLE".
So, correctly ideal, an "op-amp"?
For BASS, it sounds best at low frequencies.
Another one just for the AVERAGES, which would sound better in the middle frequencies.
And another for the TREBLE, which will sound better in the high frequencies.
Sometimes it may happen that the same op-amp sounds good at all frequencies or how it is used for each group of frequencies?
Great video rich of details and test example never seen in other video.
My all-purpose jellybean tends to the the TL07x (usually the ´074, since sometimes the TL071 or ´072 are actually more expensive!) Cheap enough to buy in quantity and OK specs overall for most of what I do. The biggest drawback is that it isn't single-supply. (But check out the TL97x, which is similar and can sense down to ground).
LMV358 - the CMOS version of the LM358 - is full rail-to-rail, but limited to a 2.5-5.5 volt supply. The input offset of a millivolt is just so-so.
The NE5532 (SA5532) seems to be everyone's default for audio, but as far as I can tell, the only reason is that everyone else uses it for audio. Also, you have to be really careful with the 5532 in any low-gain configuration; its internal compensation does NOT go down to unity gain and you'll be fiddling with external caps to tame the oscillations. It' is not happy with service as a unity-gain buffer.
OP-07 is a pretty cheap choice if you need an opamp with a lower offset voltage (100 microvolt typical).
Don't use any of these op-amps as comparators. There are a lot of op-amps that can't be used as comparators at all because they have a low differential voltage range. While the TL07x can be used as comparators - they wont take harm from having their inputs driven to opposite rails - they're slow to recover from being overdriven. You'll get much more speed from an actual comparator. LM311/393/339/2903 have been around since forever and are still kind of a go-to. TS391 has higher specs and has only 200 uA of quiescent current, if you're building a battery-powered device. LMV370x is CMOS so the offset and bias currents are down in the tens of pA. TS3021 has rail-to-rail input voltage swing. LT1016 is probably the cheapest fast comparator if you have the need for speed.
If you need programmable gain, the cheapest option is probably the LM13700. The AD633 is twice or 3× the price but a lot easier to work with. SSM2164 and its clones are also worth looking into.
A trap for young players is that on virtually all JFET and BJT-input opamps, and some CMOS ones, you can't let the voltage on either input go more than about 200 mV past the negative rail, or the opamp will latch up - its output will swing to a rail and stay there, even if the input voltage returns to the normal level. Even a Schottky-diode clamp won't save you. If you need to handle out-of-range inputs,. the most secure approach is probably a Schottky clamp followed by a voltage divider with a ratio of 1:3 or 1:4, to knock the diode's forward voltage down into the opamp's safe input range.
This should cover a decent range of afforrdable options. If you need something better like the INA828 or LTC1052 you'll probably know it already, and know that you can't breadboard the beast because parasitics in the external circuitry and faulty shielding will be the death of you. The same sort of caveats go to gain decompensation for higher speed, boost stages for higher output voltage, opamps with specialized buffer states for higher output currents, and so on - if you need these, you're already beyond the scope of this video.
The 5532 is the standard for audio because it has near-ideal properties for audio. The TL07x family was used in mixers before the 5532 came along but disappeared rapidly. The LM4562 is slightly better, but it took 30 years for it to show up after the 5532. It still costs more, I think. Both of these have high current draw so they are not ideal for battery operation. Some modern op amps come close to the 5532 in consumer battery applications at lower current draw. On unity gain operation, the 5534 (single amp version) is not compensated for unity gain, but from memory the 5532 is OK.
Agree about comparators: use a purpose-designed comparator, don't abuse a circuit that was designed for linear operation.
The distortion figures of the LM358 (everyone's got some 358s :-) ) can be improved by using a 1k-ish pull-down resistor on the output. Increases current draw though.
Good video! I found your presentation of the CMRR very interesting. Didn't thought your homemade op amp would perform so well (at least on certain characteristics). Regarding the parameter of your ideal opamp i think you should have include size (sometime size matter...)
Size is important for small designs!
Heva you ever performed a test with OPA2164?
Very cool video. Please do more analog electronics videos and comparisons of discrete solutions vs ICs!
Thanks, I plan on making more! :)
The 741 op-amp has an offset null adjustment function using a 10K pot. between pins 1 and 5 with the wiper connected to the negative supply rail. This can reduce the offset voltage to virtually zero.
Yes, that is important if you need 0 offset.
Plenty of good op amps now with Vos trimmed to 0 on the die. No need for trim pots.
Yes.. like the LF411. my personal favorite.
Yes, at one temperature. Only if the pot has the same temperature coefficient as the op amp will the offset stay nulled.
Awesome vid, really helpful in understanding opamps!
Great vid, very clearly presented. Thanks.
Glad it was helpful!
They still sell low cost dual-matched NPN and PNP transistors, although they are in small SMT package, that way the input differential pair will have better characteristics like lower input offset voltage
Can you provide a part number for one ?
Please
@@VandalIO NST65010MW6T1G for PNP, and NST65011MW6T1G for NPN, they are available in SOT-363-6 package, it is quite small but you can find adapters to make them DIP and use them on the breadboard.
I'll have a look at those matched transistors next time I make a discrete op-amp.
"5532 popular choice on the internet". It is defacto standard in audio circuit design especially pro audio going back to the late seventies. I have variants in most equipment I have opened up and jrc 55xx variants
Agreed. The NE5532 is the defacto standard, and it is much less expensive that the OPA134 (almost 1/10 the cost). The statement that it has worse specs is not entirely correct. The NE5532 beats to OPA134 in noise performance (nV/√Hz @1kHz). The OPA124 has much better THD specs, but both are quite good for many applications. However, if you want better, the dual opamp LM4562 beats both of them in specs and comes in at a cost of about 1/4 of the OPA134. For a few cents more than the OP134 in production quantities, the OP1611 offers about 1/8 the noise voltage, 14dB lower THD+N, and 20dB better CMRR, .
Great video. I wish you also included input bias current.
Very informative...great job ! thank you
That was very educational! Could you also show other circuits like a class AB amplifier or class D amplifier with a couple mosfets and how to design such a circuit? Maybe you could show how to work with FETs or how to choose the right BJT. For instance, do I use a BC547, BC517, BC337, BD139, etc? I got a small set of some common transistors a while ago, but I've only used them to switch some LEDs on and off with a microcontroller and there are more interesting ways to use them but then you need to understand the differences more ofcourse.. Other than NPN versus PNP I mean of course.
And regarding the FETs, I understand that opamps with JFET input are often better, but why? Is it just because a FET has higher input impedance on the driving pin? (I guess that's called the gate? Normally I only work with BJTs and a couple mosfets for switching purposes so I'm not sure of terminology for FETs).
The explanation of that current mirror went a bit fast for me. I think I've seen other circuits for current sources maybe just using one transistor. What's the difference? I know there are packages with matched mosfets on a single die, so there must be packages with matched transistors on a single die as well. How much better could you expect your custom built opamp to work with matched transistors like that?
Anyway, great content! I don't expect an answer to all these questions here. But maybe some ideas for future videos.
I have plans for both a class D amplifier and a BJT vs MOSFET video in the works! Stay tuned for those.
As for the current mirror, you should think of BJTs as adjustable current sources, depending on the current flowing through the base. In my circuit, I used one NPN as a diode (PN junction) and let the resistor determine the current through it. Since both transistors share bases and emitters, they should both have roughly the same constant base current. Since the base current is constant, the loading transistor will have a constant current draw, hence a current source. Other circuits may use only one transistor and use another method for providing a constant voltage/current to the base of the loading transistor. The end result is still the same.
There are indeed packages with matched BJTs. I'd expect these to perform better since their gains are the same. There should be less offset on the output and better CMRR.
I hope the explanation made sense! :)
@@SineLab absolutely made sense. I doubt you could not make sense. Lol.. I am interested in learning the above post as well. I have built a few amplifiers from someone else's schematics but would love to sit down with my box of parts and ideas. Understanding impedance and calculating resistor values seems like the nitty gritty for me. Thank you so much for your talent and taking the time to give such detailed responses. I look forward to your future videos.
nice comparison . Thankyou
The single supply op amps asymmetrical clipping might sound good as part of a distortion circuit.
Cold biasing a tube so half the wave is cut off is a common technique in guitar amps.
Hi thank you very much indeed for this great video I tried to understand the most but it is very difficult for me
I would like to know how important is a high slew rate for an audio circuit The higher the better ?
i see opamps with very high SW Are they the best for a preamp ? i have a line preamp issue
A high slew rate is good for audio circuits.
@@SineLab Hi thank you very much
I asked because i see mentioned opamps with max 20V/us while there are others with 3-400V/us
They are very rare in audio circuits
In Offset Measurement, you set 0V to input '+', so what for are 10 Ohms and 10k Ohms resistors, instead connecting directly to ground ? It seems should be the same.
Great work!
there are DISCREET OpAmps like Burson and Sparkos Labs if you want the best
358 output stage work in B class , cheap way to achieve low power with some crossover distortion. B-C class is mainly for transmitters . someone got fake underperforming 358's .
Great content .. keep up the good work ... Cheers :)
Thanks for watching :)
i have to experiment with dual transistors like the bc847 from onsemi in smd
Excellent! Thank You!!
Very nice introduction / summary to opamps 💪
Glad you liked it!
very informative, but 358 is commonly used low cost general purpose op amp
17:17 - OK. i'm no math genius and perhaps I am missing something but... here you show a multiplication, but the noise density is expressed in nV/Sqrt[Hz]. That, to me, looks like a division. Hence, 0.000 000 021V / SQRT(5 000) = 0.3 nV or 300pV. I'm I wrong here?
It's a multiplication to cancel the Sqrt[Hz] units. The value in the datasheet is the noise density per root hertz, so we multiply by the 'amount' of root hertz to get to total noise.
Hendrik Wade Bode, an American of Dutch ancestry, worked at Bell Labs where his co-workers called him BOH-dee, to which he did not object. (in Dutch, it is apparently pronounced Bo-duh, but in my career, I've never heard it pronounced that way.) A Bode Plot uses straight line segments to approximate frequency or phase response. The graphs you show are not Bode Plots, but actual frequency & phase curves.
No.
Whilst it is true that Bode did use straight lines on the frequency and phase response charts, these were an approximation and contained error, the fact is that the name "bode plot" for the Frequency and phase response charts has been in common use by electronic engineers for at least 35 years.
It is accepted that "bode plot" refers to the type of chart and not the error in the curve plotted on the chart.
@@deang5622 No. "As originally conceived by Hendrik Wade Bode in the 1930s, the Bode plot is an asymptotic approximation of the frequency response, using straight line segments" en.wikipedia.org/wiki/Bode_plot?useskin=vector Bode plots approximate amplitude-vs-frequency and phase-vs-frequency curves with straight line segments. When you draw the actual amplitude-vs-frequency curve, you have an (actual) amplitude vs frequency curve.
@@cheponis No.
Listen up idiot. It is common practise to refer to them as bode plots. The accuracy isn't relevant.
There is no rule that says a Bode plot MUST be an estimated plot.
Best is a term better left at the fair. Op amps are fit for purpose.
Great Job dude, great content, you got my like 🙏
I appreciate it!
Superb bro. Excellent.
Thank you.
great video a lot of usefull information an great for lerning
You can learn English too!
4558 is my choice for best all around use in its freq range.
I will only smoke artisanal vintage JRC4558 ICs harvested in an eco friendly fashion.
@@1pcfred lol, is there a difference ? Can't say of the hundreds i've purchased throughout the years that i've noticed much of a difference !! 5532's is a diff story tho
@@tdtrecordsmusic there are differences. I have some authentic vintage JRC 4558s and they're phat tone in overdrives. I pulled them off an old circuit board myself. So I know they're legit. But in this day and age there's no way to prove it. Still, if it could be done they'd be $100 a pop ICs.
No JRC4558? I'm kinda disappointed now.
Which opamp is your favourite
The LM358 is my favorite because of how good it is for the price.
Ive started buying more expensive components since ive gotten into the weeds. I live in a small area so i sell premium components and ics and almost anything anyone would need for a project. If the person is new and cant afford to get the basic parts to learn then i give them a whole lab.
Thanks for sharing Your knowledge. I't simple and usefull 🙂
I'm glad it was helpful :)
mcp6022 is my fave but i also like the mcp6002
Lm6172 is good sounding too and very fast.
i use LM6142 when i need fast aop, a litle bit slower but single suply and rail to rail output
Playbak Speeed 2x's. No issues. Time, is currently, a limited resource.
You can use VNC to screen record Siglent scopes. It would up your production. Also, it's pronounced Bo-day.
Thanks, I'll have a look into VNC.
And all these years I've been corrupting it to "Bo-dee." 😆😅🤣😂
@@pibbles-a-plenty1105 Well, It's actually more like bo-duh, but who the hell can speak Dutch?
Liked the video and subscribed to the channel.
Thanks for watching!
Thanks
Thank you!
27:16 An ideal opamp shall be free. Of course, why not? :) :)
Open loop!!
Ain't no way to be testing an audio opamp... GBW is one thing, but not much use for audio .
Merci
Yes!!
@3:24 the devil said HELLOOOO
LM4562 (€2.30) is the worst I would use for HiFi.
NE5534 and NE5532 are good audio op amps.
I think there is in recent years a better one made by Burr Brown, but many analogue large format mixing consoles used in world famous recording studios use/used the NE5534 device.
So a considerable amount of music from professional artists has been through filters and dynamics sections on mixing consoles using them.
So what's the best?
@@franzliszt3195 I still have to search, since the ADA4899-2 can only handle +/-6 volts supply voltage, the maximum output voltage is limited to +/- 3.1 V = 4.3834 V~. However, this would be completely sufficient for DAC purposes because of the limited level. The ADA4898-2 has ultra low noise, higher distortion and only 55 V/µS. With usual output voltages, the slew rate must be well above 100 V/µS, as there is a gap at 20 KHz at the beginning of the first half-wave in the LTSpice simulation software. But with music (constant superimposition of several frequencies) there is no time for it to settle in, there are always only "beginnings" of oscillations. I've only been using LTSpice since 2023. Audio op amps are too slow, video op amps have too much distortion and noise @ 10 Hz (MC RIAA amp). In between, I still have to look for the best compromise from “1000” op amps.
Now which of these chips were counterfeit Chinese knocks offs? All of them!
nice!
Thanks!
I wonder why didn't you take a look into the specs? So much time was just spent to perform useless activities.
👍
Love the video, but PLEASE PLEASE PLEASE for the love of electronics SLOW DOWN! :) :) :)
I only watched the intro to this because it has a seriously misleading title and screen shot and starts off with a words that suggest other things again. To all those watching, there is no ultimate opamp, in the real world there are a bunch of real world trade-offs, a regular minefield that has to be wade through, such that no opamp can be all things to all people. My advice is to look through every single spec in an opamp data sheet and Google every one of them until you understand what they are saying. Then take a long hard look at what your application is trying to achieve and to what extent each property will impact on that.
Sounds long and hard? There's reason why engineers go to university for x years.
Very interesting, you merit for like, but you should try to remove all the noodles from your mouth when you speak.
I found it a bit odd that your ultimate comparison didn't include the L4562, which has been the go-to opamp for low-noise audio applications for the last decade or so. Apart from the input currents (which are obviously greater than for the FET input amps), its specifications better all of the opamps chosen here in almost every respect. It's not rail-to-rail, so is less useful in 5V supply applications, but otherwise would be an automatic choice for me. It does cost around £2, but that's a dual opamp, and it's still cheaper than the OPA134, which is only a single opamp.
Incidentally, you didn't mention the input range anywhere. The LM358 is useful because it includes the negative rail, which is actually what makes it a genuine single-supply opamp.
Distorted audio.
.
What about a digital Op Amp based on an ARDUINO and 2X ADCs and a DAC
int OP_AMP(int X,int Y)
{
int RESULT;
RESULT=((X+(-Y))*1000);
return RESULT;
}
It's an interesting idea, and probably would work. It all depends on the resolutions of the DACs and the ADCs. As well as the speed of the whole system.
Meanwhile the 4558 is crying in the corner.
you did not build an op-amp. you built the discrete equivalent to an opamp. just saying
op-amp means operational amplifier and he built one. The original operational amplifiers were built with vacuum tubes and modern practice is to use a single integrated circuit. He did neither, but it was still an operational amplifier.
Very good from UK 2E1GZQ
Very nice introduction to op amp fundamentals. 🧺 👍
Thank you!
The small cap for stability doesn't seem that stable!!🫢🫢
Excellent! Thank You!!