Author Topic: Op-amps basics and learning materials  (Read 5855 times)

0 Members and 1 Guest are viewing this topic.

Offline anishkgtTopic starter

  • Frequent Contributor
  • **
  • Posts: 769
  • Country: qa
    • George Hobby
Op-amps basics and learning materials
« on: April 07, 2017, 04:16:17 pm »
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
 

Offline HoracioDos

  • Frequent Contributor
  • **
  • Posts: 344
  • Country: ar
  • Just an IT monkey with a DSO
Re: Op-amps basics and learning materials
« Reply #1 on: April 07, 2017, 05:39:05 pm »
I respectfully recommend you never try to learn something new directly with the mains.

Regarding to your question you can read from http://www.electronics-tutorials.ws/opamp/opamp_1.html
Also download SBOA092B Handbook of Operational Amplifier Applications. Bruce Carter and Thomar Brown.

I recently bought Malvino's Electronic Principles.

I hope this help you
« Last Edit: April 07, 2017, 11:48:54 pm by HoracioDos »
 

Offline anishkgtTopic starter

  • Frequent Contributor
  • **
  • Posts: 769
  • Country: qa
    • George Hobby
Op-amps basics and learning materials
« Reply #2 on: April 07, 2017, 05:46:25 pm »
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 here www.georgehobby.wordpress.com


Sent from my iPhone using Tapatalk
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Op-amps basics and learning materials
« Reply #3 on: April 07, 2017, 05:56:15 pm »
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.pdf

Here'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.
 

Offline HoracioDos

  • Frequent Contributor
  • **
  • Posts: 344
  • Country: ar
  • Just an IT monkey with a DSO
Re: Op-amps basics and learning materials
« Reply #4 on: April 07, 2017, 05:57:13 pm »
I did my diploma in EcE but work in the IT field.

I didn't know your background. I apologize for that. Please ignore everything above.
 

Offline anishkgtTopic starter

  • Frequent Contributor
  • **
  • Posts: 769
  • Country: qa
    • George Hobby
Re: Op-amps basics and learning materials
« Reply #5 on: April 07, 2017, 06:03:53 pm »
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. [emoji4] I would be lost in the wind.


Sent from my iPhone using Tapatalk
 

Offline anishkgtTopic starter

  • Frequent Contributor
  • **
  • Posts: 769
  • Country: qa
    • George Hobby
Re: Op-amps basics and learning materials
« Reply #6 on: April 07, 2017, 06:11:06 pm »

The  Inverter changes the sign of a voltage.  If the voltage input is +5, the output is -5. L
makes 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
 

Offline mtdoc

  • Super Contributor
  • ***
  • Posts: 3575
  • Country: us
Re: Op-amps basics and learning materials
« Reply #7 on: April 07, 2017, 06:36:23 pm »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Op-amps basics and learning materials
« Reply #8 on: April 07, 2017, 06:55:32 pm »

The  Inverter changes the sign of a voltage.  If the voltage input is +5, the output is -5. L
makes 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.


Most 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.
 

Offline w2aew

  • Super Contributor
  • ***
  • Posts: 1780
  • Country: us
  • I usTa cuDnt speL enjinere, noW I aR wuN
    • My YouTube Channel
Re: Op-amps basics and learning materials
« Reply #9 on: April 07, 2017, 07:14:20 pm »
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.


YouTube channel: https://www.youtube.com/w2aew
FAE for Tektronix
Technical Coordinator for the ARRL Northern NJ Section
 

Offline mtdoc

  • Super Contributor
  • ***
  • Posts: 3575
  • Country: us
Re: Op-amps basics and learning materials
« Reply #10 on: April 07, 2017, 07:27:05 pm »
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.

 :-+ :-+ Yes, highly recommended!
 

Offline Cerebus

  • Super Contributor
  • ***
  • Posts: 10576
  • Country: gb
Re: Op-amps basics and learning materials
« Reply #11 on: April 07, 2017, 07:46:19 pm »
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.html

Philbrick'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
Anybody got a syringe I can use to squeeze the magic smoke back into this?
 

Offline anishkgtTopic starter

  • Frequent Contributor
  • **
  • Posts: 769
  • Country: qa
    • George Hobby
Re: Op-amps basics and learning materials
« Reply #12 on: April 07, 2017, 08:03:37 pm »
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
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Op-amps basics and learning materials
« Reply #13 on: April 07, 2017, 09:20:22 pm »
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.
« Last Edit: April 07, 2017, 11:20:01 pm by rstofer »
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7738
  • Country: ca
Re: Op-amps basics and learning materials
« Reply #14 on: April 07, 2017, 09:31:40 pm »
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.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Op-amps basics and learning materials
« Reply #15 on: April 07, 2017, 10:16:20 pm »
Didn't Dave do a video about op-amps? I could swear I saw one at some point.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Op-amps basics and learning materials
« Reply #16 on: April 07, 2017, 11:21:12 pm »
Didn't Dave do a video about op-amps? I could swear I saw one at some point.

Yup!  Just Google for 'eevblog video op amp' (without quotes) and they'll pop right up.
 

Offline TNorthover

  • Contributor
  • Posts: 42
  • Country: us
Re: Op-amps basics and learning materials
« Reply #17 on: April 08, 2017, 01:39:52 am »
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?
 

Offline Cerebus

  • Super Contributor
  • ***
  • Posts: 10576
  • Country: gb
Re: Op-amps basics and learning materials
« Reply #18 on: April 08, 2017, 02:09:08 am »
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?

Short 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 voltage difference between its inputs (i.e. the voltage across the 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).
Anybody got a syringe I can use to squeeze the magic smoke back into this?
 

Offline TNorthover

  • Contributor
  • Posts: 42
  • Country: us
Re: Op-amps basics and learning materials
« Reply #19 on: April 08, 2017, 02:35:28 am »
Quote
Short 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.

Thanks. 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.
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7738
  • Country: ca
Re: Op-amps basics and learning materials
« Reply #20 on: April 08, 2017, 03:15:19 am »
TNorthover, just watch my above video with the 3D graphics...
 

Offline TNorthover

  • Contributor
  • Posts: 42
  • Country: us
Re: Op-amps basics and learning materials
« Reply #21 on: April 08, 2017, 03:53:30 am »
TNorthover, just watch my above video with the 3D graphics...

I'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-.
« Last Edit: April 08, 2017, 03:55:32 am by TNorthover »
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7738
  • Country: ca
Re: Op-amps basics and learning materials
« Reply #22 on: April 08, 2017, 04:30:35 am »
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...
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Op-amps basics and learning materials
« Reply #23 on: April 08, 2017, 04:36:03 pm »
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-.

When 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.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf