Op-amps basics and learning materials - Page 1
Forum section: electronics / beginners

author: anishkgt
author_rank: Frequent Contributor
timestamp: April 07, 2017, 04:16:17 pm
content: I've been trying to learn how to use an op-amp. I've made a spot welder with an arduino so not very new to Electronics either.Would appreciate if anybody would suggest me some materials and some real life examples. I watched daves tutorial on the op-amp but that was too much for me.I learn by examples so to start with, would it possible to use an op-amp to sense if a pcb connected to mains are 120 or 220vac ? I could read some examples talking about using them for mathematical operations that is ok but examples ?Sent from my iPhone using Tapatalk

author: HoracioDos
author_rank: Frequent Contributor
timestamp: April 07, 2017, 05:39:05 pm
content: I respectfully recommend you never try to learn something new directly with the mains.Regarding to your question you can read fromhttp://www.electronics-tutorials.ws/opamp/opamp_1.htmlAlso download SBOA092B Handbook of Operational Amplifier Applications. Bruce Carter and Thomar Brown.I recently bought Malvino's Electronic Principles.I hope this help you

author: anishkgt
author_rank: Frequent Contributor
timestamp: April 07, 2017, 05:46:25 pm
content: I did my diploma in EcE but work in the IT field. The arduino spot welder was my first project and it worked out well. Appreciate your concern but am not that new to electronics. The details to project is herewww.georgehobby.wordpress.comSent from my iPhone using Tapatalk

author: rstofer
author_rank: Super Contributor
timestamp: April 07, 2017, 05:56:15 pm
content: You mention mathematical operations and, of course, this was the intent of the original op amp - operational amplifier.There are a number of op amp circuits to be considered but the easy 3 are: Inverter, Summer and Integrator.Here is a description of a very practical analog computer (in German but the schematics are still helpful) which I built a couple of years ago:http://www.analogmuseum.org/library/vogel_ar_beschreibung.pdfHere's an English page describing the project:http://www.analogmuseum.org/english/homebrew/vogel/So, where to start? Get a +- 15V power supply, a +- 10V reference, a few op amps, some 1M and 100K resistors, a couple of 1 ufd percision (say 1%) capacitors and breadboard the various components.There is a lot to learn with just the Summer. It's kind of neat to see voltages add or subtract. The Inverter changes the sign of a voltage. If the voltage input is +5, the output is -5. The Integrator is the most complex of the 3 because of the need to apply initial conditions.You will also need some potentiometers of the value shown in the schematic. Ideally, they would be precision wirewound units with 10 turn indicating knobs as shown. For a first start, almost anything will work.So, build an inverter, add some resistors to change it to a summer and then change the feedback resistor to a capacitor and you have the integrator.

author: HoracioDos
author_rank: Frequent Contributor
timestamp: April 07, 2017, 05:57:13 pm
content: Quote from: anishkgt on April 07, 2017, 05:46:25 pmI didn't know your background. I apologize for that. Please ignore everything above.

author: anishkgt
author_rank: Frequent Contributor
timestamp: April 07, 2017, 06:03:53 pm
content: That's ok I did not mention it anyway. If I did others would get the impression that am very sound with electronics and it's terms.  I would be lost in the wind.Sent from my iPhone using Tapatalk

author: anishkgt
author_rank: Frequent Contributor
timestamp: April 07, 2017, 06:11:06 pm
content: Quote from: rstofer on April 07, 2017, 05:56:15 pmmakes sense. My next project was to design a power supply. So Daves video about power supply had some influence for my idea.Did some search about op-amps that is how I needed here since most of the tutorials did not have enough info about what I wanted to learn.Sent from my iPhone using Tapatalk

author: mtdoc
author_rank: Super Contributor
timestamp: April 07, 2017, 06:36:23 pm
content: Op Amps for Everyone.

author: rstofer
author_rank: Super Contributor
timestamp: April 07, 2017, 06:55:32 pm
content: Quote from: anishkgt on April 07, 2017, 06:11:06 pmMost of the newer op amp projects will be using a single supply, perhaps as low as 5V or so. This doesn't interest me because my only op amp application is analog computing. I want swings between +- 10V (known as +- 1 Machine Unit) and this requires a +- 15V supply. To that end, you might want to look into building a power supply specifically op amps. I would recommend a linear supply perhaps using the 7815 and 7915 regulators. Like:http://circuitswiring.com/power-supply-regulator-15v-15v-1a-by-ic-7815-7915/You can build a separate 5V supply for logic circuits using the 7805 regulator.The +- 10V reference voltages should be created as shown in the schematics I linked earlier. You buy a 10V reference device and it creates the +10V reference and then you run it through an inverter to get the -10V reference.Once you have a power supply, you can breadboard example projects like inverters, summers and integrators. Look closely at the schematics to see how Dr. Vogel sets the initial conditions for the integrators. It's just a toggle switch, of course, but it's very important that you able to set initial conditions.For these particular supplies, low current, low voltage, I don't see any reason to add the complexity or noise of a switching mode power supply.

author: w2aew
author_rank: Super Contributor
timestamp: April 07, 2017, 07:14:20 pm
content: This video of mine has been pretty well received - it is intended to give you a fairly intuitive feel for how op amp circuits work.

author: mtdoc
author_rank: Super Contributor
timestamp: April 07, 2017, 07:27:05 pm
content: Quote from: w2aew on April 07, 2017, 07:14:20 pmYes, highly recommended!

author: Cerebus
author_rank: Super Contributor
timestamp: April 07, 2017, 07:46:19 pm
content: The ADI equivalent to the TI "Op Amps for everybody" but, I think, an easier read, and it covers some real-world issues that the TI book fails to mention.http://www.analog.com/en/education/education-library/op-amp-applications-handbook.htmlPhilbrick's "Applications Manual for Computing Amplifiers for Modeling, Measuring, Manipulating, and Much Else" from 1966 no less, and still a very helpful and useful introduction to op amps. I read it for historical interest but found a few tips and tricks that I hadn't picked up from anywhere else.http://www.analog.com/en/education/education-library/applications-manual-computing-amplifiers.html

author: anishkgt
author_rank: Frequent Contributor
timestamp: April 07, 2017, 08:03:37 pm
content: Thank you everyone for your valuable suggestions and advise. I remember asking a friend of mine for a solution to auto detect mains supply and accordingly switch a relay. So he suggested to look at comparator and I checked on YouTube and this guy (https://youtu.be/y0Q0ERSP24A) explains it very well. A few questions I power the op-amp as usual and use a resistor to bring down the voltage and feed it to the inverting pin and do I add another resistor to the non-inverting pin or do I ground it ? So if understand the comparator, if the voltage is greater than non-inverting pin the output would be high and that could energize a relay and else the relay would not be. Would I be correct here ?Sent from my iPhone using Tapatalk

author: rstofer
author_rank: Super Contributor
timestamp: April 07, 2017, 09:20:22 pm
content: The device in the video is a comparator, not an op amp. There's a pretty huge difference.You can build a comparator from an op amp buy adding hysterisis by it isn't recommended:https://www.eevblog.com/forum/beginners/comparators-vs-op-amps/Read the second post and follow the link.If you want a relay to energize when mains is present, why not just use a mains powered relay. Or even add a step-down transformer to a lower voltage relay. Just to keep things safe... I don't prefer to work with mains and I certainly don't recommend it.

author: BrianHG
author_rank: Super Contributor
timestamp: April 07, 2017, 09:31:40 pm
content: I know many here will cringe at this video, but, it visualizes the op-amp functioning under different configurations:It may help for the really simplistic view of things.

author: james_s
author_rank: Super Contributor
timestamp: April 07, 2017, 10:16:20 pm
content: Didn't Dave do a video about op-amps? I could swear I saw one at some point.

author: rstofer
author_rank: Super Contributor
timestamp: April 07, 2017, 11:21:12 pm
content: Quote from: james_s on April 07, 2017, 10:16:20 pmYup! Just Google for 'eevblog video op amp' (without quotes) and they'll pop right up.

author: TNorthover
author_rank: Contributor
timestamp: April 08, 2017, 01:39:52 am
content: One thing I've been wondering, if I can piggy-back on this thread. The basic open-loop gain equation is specified as v_out = A(v_1-v_2) but the split-supply op-amps don't have an intrinsic ground.Are they actually using the average of the +ve and -ve supply rails as the 0 point? Or is the gain so high that it could be anything (and the designers don't pay much attention to what it is) and you need feedback to make sensible statements?

author: Cerebus
author_rank: Super Contributor
timestamp: April 08, 2017, 02:09:08 am
content: Quote from: TNorthover on April 08, 2017, 01:39:52 amShort answer, your signal and the supplies must share a common reference point somewhere and that's what sets the voltage from the point of view of the op amp. Most often that reference is labelled 0V and your signal is referenced to it and either your feedback divider (non-inverting amp) or inverting input (inverting amp) is actually connected to it, but it's the shared frame of reference that matters. The op amp knows nothing of 0V or indeed any particular 'absolute' voltage, it's all relative. It doesn't have to be, say, Vcc=+15V, Reference=0V and Vee=-15V, but instead it could be Vcc=+35V, Reference=+20V and Vee=+5V - from the point of view of the op amp both look identical.The reference can even be outside the op amp supply limits, as long as the inputs to the actual op amp are inside them. What the op amp really cares about is the voltagedifferencebetween its inputs (i.e. the voltageacrossthe inputs) with the caveat that the voltages on the inputs stay within the op amps common-mode input limits relative to the supply voltages (usually a volt or so inside the supply voltages).

author: TNorthover
author_rank: Contributor
timestamp: April 08, 2017, 02:35:28 am
content: QuoteThanks. I get the common reference bit, but I don't think that explains the op-amp's output. The reference point is completely arbitrary (as you said) and isn't provided to the op-amp, at least not the chips I've seen.So it must form some other "default" output. The average of the power rails seems mathematically sensible, but I could also see it simply not mattering in practice (it certainly doesn't in the simple +ve and -ve feedback modes) and not being worth the hassle to control.Unfortunately I can't really read the schematics well enough to deduce what's actually going on, or find anything in the datasheets that looks like it might be describing this phenomenon.

author: BrianHG
author_rank: Super Contributor
timestamp: April 08, 2017, 03:15:19 am
content: TNorthover, just watch my above video with the 3D graphics...

author: TNorthover
author_rank: Contributor
timestamp: April 08, 2017, 03:53:30 am
content: Quote from: BrianHG on April 08, 2017, 03:15:19 amI'm afraid I really don't rate that video. It dials the "10 minutes to convey 1 minute of content" that's inherent in visual presentations up to 11.It also doesn't even go near my question, or even a model that's capable of describing it (for a start it assumes infinite gain, or at the very least glosses over any non-ideal characteristics).Edit: having thought more I suspect what I'm thinking about is described by the input offset voltage, with everyone just taking it for granted that ground is chosen half-way between V+ and V-.

author: BrianHG
author_rank: Super Contributor
timestamp: April 08, 2017, 04:30:35 am
content: Ok, now you are dealing with the specifics of the op-amp. I assume what you are asking if you use a rail-2-rail in&out op-amp and you have both inputs at exactly -vee, what will be the output?Note that op-amps do have an internal offset error which means if the inputs are =, wherever the voltage, the output may be full blown vee or vcc. Now tuning the input voltages to perfectly cancel this offset, this will be a very sensitive position since the gain of an op-amp is huge and this perfect offset balance error is affected by the power supply voltage, op-amp temperature output load & aging of the device, and finally, even the exact input voltage location between vee and vcc can have a minute effect for cheap op-amps, you can find a point where the output will be centered inbetween vee and vcc.Now, this is going beyond the scope of this beginner's question & you should really start a thread of you own with the exact question so the op-amp specialists here at the eevblog community will answer you question much better than I. Remember, the advanced op-amp masters at eevblog aren't reading this basic topic looking for your specific related question hidden inside...

author: rstofer
author_rank: Super Contributor
timestamp: April 08, 2017, 04:36:03 pm
content: Quote from: TNorthover on April 08, 2017, 03:53:30 amWhen we connect +15 and -15 to an op amp, we have to wonder + and - relative to what? Well, let's just call it ground or 0V, whatever... I can just as easily connect the op amp to +30 and 0V but if I want to get the output centered, I am going to have to bias the signals up to Vcc/2 or 15V. And this is exactly what is done with single supply op amps and we call the bias voltage a virtual ground. Ground, virtual or real, is always the reference voltage.