Op amp beginner's questions - Page 1
Forum section: electronics / beginners

author: nForce
author_rank: Frequent Contributor
timestamp: November 25, 2018, 05:08:38 pm
content: 1) Which configurations of op amps are more preferable? (Non-inverting or inverting)? In which cases?2) How did this guy get Vout with the reactance of a capacitor (yellow)? (Picture of the integrator in the attachment)Thanks.

author: rstofer
author_rank: Super Contributor
timestamp: November 25, 2018, 05:35:33 pm
content: Quote from: nForce on November 25, 2018, 05:08:38 pmThe big difference is whether the amplifier inverts.http://pediaa.com/difference-between-inverting-and-noninverting-amplifier/QuoteSuppose the Xc value was just a resistor and called Rf. Then the standard gain equation would -Rf/R. The only change is that the feedback is a capacitive reactance rather than a simple resistance. This assumes we are interested in the circuit as an integrator but it can also be a low pass filter.In the case of the integrator, the equation we care about is the one with the integration. This is the fundamental building block of analog computers and this is a topic that just fascinates me. I know, simple things...The thing is, a second order differential equation like my''+dy'+sy = 0 shows up in so many areas of physics and electronics. It is just fun to model it on an analog computer and watch it run. Better yet, instead of = 0, substitute = A*cos(wt) and watch what happens when wt is less than the resonant frequency, equal to the resonant frequency (watch out!) or greater than the resonant frequency. FWIW: m=mass, d=damping coefficient, s=spring constant Look at equation 1 here and note the similarity:http://www.math.ubc.ca/~feldman/m121/RLC.pdfETA: that little graph after equation 4 shows what happens to any second order differential equation when it is excited at its resonant frequency.What a marvelous little circuit!

author: Audioguru
author_rank: Super Contributor
timestamp: November 25, 2018, 05:46:37 pm
content: If I do not need inverting then I always use a non-inverting opamp since its input impedance is very high or extremely high then the value and cost of an input coupling capacitor can be small. An inverting opamp circuit has a fairly low input impedance.The integrator is a linear lowpass filter that cuts high frequencies.

author: Wimberleytech
author_rank: Super Contributor
timestamp: November 26, 2018, 02:45:50 am
content: A non-inverting configuration has more bandwidth for the same flat-band gain.

author: Zero999
author_rank: Super Contributor
timestamp: November 26, 2018, 09:36:30 am
content: The circuit attached to the original post needs to have some DC negative feedback, otherwise the op-amp's output will probably saturate at one rail or another, due to the bias currents. There should be a high value resistor, in parallel with the capacitor to stabilise the circuit. If you're using a J-FET/CMOS input op-amp, you might be able to get away with it, as the leakage current through the capacitor could be sufficient, but it's still bad practise.

author: nForce
author_rank: Frequent Contributor
timestamp: November 26, 2018, 10:17:39 am
content: QuoteAnd because we get 1/(2*pi*f*RC), then we can say: this expression is equal to that of low pass filter, so it has to be low pass filter in the frequency domain?

author: nsrmagazin
author_rank: Regular Contributor
timestamp: November 26, 2018, 01:46:07 pm
content: Your picture is not in "English". That may make it harder to understand.Operational amplifiers are called "operational" because they perform mathematical operations => summator, integrator, differenciator and etc.There is no preference (someone decided once upon a time that the non-inverting will be used more). But changing the input from inverting to non-inverting can change the purpose of the circuit. You don't need to look at this so "idealistically". The capacitor will get charged until it reaches a certain voltage, with it the output voltage will rise and reach the capacitor maximum. Take a look at "P/PI/PID" regulators.

author: rstofer
author_rank: Super Contributor
timestamp: November 26, 2018, 04:01:33 pm
content: Quote from: nForce on November 26, 2018, 10:17:39 amYes but look at the circuit about 1/2 way down here:https://www.electronics-tutorials.ws/filter/filter_5.htmlThere is a high value resistor in parallel with the capacitor as described above.

author: nForce
author_rank: Frequent Contributor
timestamp: November 26, 2018, 07:29:26 pm
content: Regarding filters, I have an identical question as this guy:https://www.quora.com/Why-it-is-called-a-%E2%80%9Cfirst-order-low-pass-filter%E2%80%9DBut I don't understand the answer, can someone explain to me the concept as to a beginner?

author: Wimberleytech
author_rank: Super Contributor
timestamp: November 26, 2018, 07:41:52 pm
content: His answer was pretty good. Does this help?First order LPF and a second order LPF

author: rstofer
author_rank: Super Contributor
timestamp: November 26, 2018, 11:20:58 pm
content: Or, one pole versus two poles and 20dB/decade versus 40dB/decade rolloff.Look at the two transfer functions given above. Note how the first has a linear denominator (s + ...) and the second has a quadratic denominator (s2+ ...).Poles are determined by the denominator of the transfer function. It the denominator is linear, it is a first order filter. If the denominator is quadratic, it is a second order filter. And so on...We find the location of the poles by solving for the denominator going to 0. Those roots can be real, imaginary or even 0. Root Locus comes to mind and I really don't want to go there.If you want to chase the math down a rathole, you need Calc I, Calc II, Differential Equations and Laplace Transforms. And that's WHY I don't want to go there. Yes, I took the classes, way back when.You might have to throw in the Fourier Transform and the Inverse Fourier Transform to convert between the time and frequency domains and back.

author: Mattjd
author_rank: Regular Contributor
timestamp: November 26, 2018, 11:41:35 pm
content: if the region of convergence of the laplace transform contains the imaginary axis then you can just substitute in the definition of s with sigma = 0.I.e to go from S to frequency set S = sigma+j*omegaBe careful with going backwards, as the converse is not always true.i.e.L{H(t)}|(s=j*w) = H(w) <=/=> H(w)|(j*w = s)butL{H(t)}|(s=j*w) = H(w) <=> Imaginary axis is an element of ROC{L{H(t)}}

author: nForce
author_rank: Frequent Contributor
timestamp: November 27, 2018, 04:32:25 pm
content: QuoteHow do you know, that the first one has 20dB/decade rolloff? How can we calculate this?From this, I can say that we can achieve a low-pass filter programmatically, why should we use then op-amp active filter?

author: rstofer
author_rank: Super Contributor
timestamp: November 27, 2018, 05:59:45 pm
content: Quote from: nForce on November 27, 2018, 04:32:25 pmThere's a fair bit of math involved in proving that so here is a web page. There are MANY others. The roll-off is kind of a universal constant, like 'e' or 'pi' and it is derived from the definition of the Bel and deciBel (dB).https://en.wikipedia.org/wiki/Roll-offHere's a video re: Bode' Plots and is just the first of a series related to drawing the plots by hand. Obviously, we aren't going to do it that way given MATLAB or some other solver like Maxima or Octave.QuoteBut you really can't achieve the true analog nature of any continuous function with a program. The best you can do is create a discrete time function which is, by definition, not continuous. Sure, it's a good rendition if the CPU is fast enough and the ADC and DACs have enough bandwidth but they are still discrete time, not continuous, functions. There a whole field of EE math involved with discrete time and it comes up frequently when building PID loops. Here's a video (one of a series) on discrete time control systems:And every time that DAC value changes, even by one bit, it generates harmonics. Just like a square wave does. They may not be significant but you can't avoid the math. It happens... There is a step change in voltage level in a short period of time. Fourier Series comes up a lot about now!One problem with the passive LPF is the loss of amplitude. That is the big thought behind active filters - restore the output level with an op amp. Nothing much changes in terms of breakpoint and roll-off but the output isn't attenuated.https://www.electronics-tutorials.ws/filter/filter_5.htmlWill every circuit you construct with spare parts exhibit the exact characteristics assumed by the math? Probably not! It isn't that the math is wrong, it's that the parts aren't, and probably can't be, modeled perfectly.We know resistors have inductance, we know capacitors have resistance, we know inductors have resistance and so on.

author: rstofer
author_rank: Super Contributor
timestamp: November 27, 2018, 08:38:32 pm
content: Remember that roll-off is in terms of dB perdecade(usually). Assume a corner frequency of 1 Hz and let's step away from the corner. Between 10 Hz and 100 Hz is 1 decade but only 90 Hz spread and the attenuation is 20 dB. Between 100 Hz and 1 kHz is one decade but 900 Hz spread and the attenuation is 20 dB. Same between 1 kHz and 10 kHz, 9000 Hz spread, and so on.The reason this looks like a straight line on the Bode' Plot is because the horizontal axis is logarithmic, not linear. We use that scaling because we can use a straightedge to plot the roll-off. And, of course, dB is logarithmic. In the voltage case dB = 20 log10(Vo/Vi). In the power case it is dB = 10 log10(Pout/Pin).https://en.wikipedia.org/wiki/DecibelBTW: 20 dB/decade is 6 dB/octave where an octave is just a doubling in frequency. Sometimes you will see dB/octave in datasheets.

author: bson
author_rank: Unknown
timestamp: November 28, 2018, 05:46:06 pm
content: 20dBV/decade attenuation is a reciprocal response. 1/10 = 0.1 = -20dB. Anything of the form 1/f will exhibit it when f changes by 10x.

author: nsrmagazin
author_rank: Regular Contributor
timestamp: December 03, 2018, 01:48:39 pm
content: This is why Schools and Universities exist. You are not going to learn electronics from a forum.

author: rstofer
author_rank: Super Contributor
timestamp: December 03, 2018, 05:34:56 pm
content: Quote from: nsrmagazin on December 03, 2018, 01:48:39 pmTo a large extent, that is true. The theory and the math all tie together and, due to the sequential manner of study, it can't be learned in some random method. It takes 4-5 years of increasingly more complex math.OTOH, that's for engineering, not messing around on a breadboard. We can easily demonstrate filters with a decent DMM (decent in terms of AC response) and a signal source. My preference for Bode' Plots is the Digilent Analog Discovery 2 but when I was in school, we took individual voltage vs frequency measurements and did the plot by hand. That's how it was done in the early '70s; we just didn't have the tools we have today.We can demonstrate transistor circuits fairly easy and a good number of op amp designs really only take a dual rail power supply and some kind of display. Again, I prefer the AD2 but a scope is workable. Sometimes even a DMM is adequate.One of the really nice things about the Internet era is the availability of tutorials on just about any subject. CalcWorkshop is great (fee required), Khan Academy has an EE track as well as their famous math tutorials and there are a host of other sites (like mathbff or nancypi). For solvers we have Symbolab and for graphing we have Desmos and there are some really nice offline tools like wxMaxima, Mathematica and even commercial products like MATLAB.The modern student has it much easier. All of these tools make learning a lot easier and faster so more time can be spent on theory and less time spent on doing the math.But it still takes about 5 years to get through an engineering program.On this topic: why not build a LPF and measure the output over a couple of decades. Make the corner frequency fairly low, like 1000 Hz and sweep, by hand, from 100 Hz to 100,000 Hz (3 decades) by hand and PROVE that the roll-off is 20 dB per decade. Maybe take 10 measurements per decade. Almost any DMM will handle the low frequency. Even just 1 decade will prove the roll-off. A scope is probably required to see the phase shift.

author: Wimberleytech
author_rank: Super Contributor
timestamp: December 03, 2018, 05:54:02 pm
content: Quote from: rstofer on December 03, 2018, 05:34:56 pmIndeed...I still have a big folder of semi-log paper of varying numbers of decades. Beautiful stuff...a certain elegance in plotting those points with a template using a drafting pencil filled with B lead. But, I am glad we have the tools you mentioned in this modern era.

author: nsrmagazin
author_rank: Regular Contributor
timestamp: December 04, 2018, 06:53:56 am
content: Like this you leave wholes in the knowledge. A lot of people think that they know something, but in truth they don't. Hope this is not tha case.