#8 The OpAmp [Post Homework Here]

Talk about the first PyroEDU course here.
ThePyroElectro
PyroElectro Admin
Posts: 1181
Joined: Mon Nov 12, 2007 9:24 pm
Location: Earth
Contact:

#8 The OpAmp [Post Homework Here]

Postby ThePyroElectro » Thu Dec 13, 2012 10:48 pm

A new lesson was posted today:
http://www.pyroelectro.com/edu/basics/opamp/

Post your homework answers here to compare with everyone else!

coresnake
Newbie Pyro
Posts: 12
Joined: Sat Dec 15, 2012 3:14 pm

Re: #8 The OpAmp [Post Homework Here]

Postby coresnake » Sat Dec 15, 2012 3:42 pm

What are two uses for Op-Amps?
A: Comparator circuits and amplifier circuits.

What are the two main types of amplifier configurations used with Op-Amps?

A: Inverting Vo = (-R2/R1)Vi
Non-inverting Vo = (1 + R2/R1)Vi

How can an Op-Amp be used as a comparator?
A: Connect unknown voltage to Vin (pin 3 - non-inverting side), and connect a known voltage to Vref (pin 2, inverting side), then connect battery anode to positive power rail (pin 7) and connect negative power rail (pin 4) to ground. The out pin will produce a voltage (HIGH state) when Vin > Vref.

Of course, the video's schematic has pins 3 and 2 flipped to the comparator shown in formulas.pdf and the amplifier circuits, which is very confusing. It also seems to be using the non-inverting side (+) as Vref. I guess both methods work but I used the above method (high state when Vin > Vref) and it worked in Multisim.
Please let me know if "the right way to do it" is using inverting side (-) as Vin.

What are the 5 main pins of a standard Op-Amp?
A: Vin, Vref, Powerrail +, Powerrail -, OUT

I'm having trouble building the amplifier circuits shown in formulas.pdf, I guess I probably need another voltage source somewhere but I'm not sure how. Here's what I've got so far, help would be much appreciated:

http://i.imgur.com/PkmU1.png

ThePyroElectro
PyroElectro Admin
Posts: 1181
Joined: Mon Nov 12, 2007 9:24 pm
Location: Earth
Contact:

Re: #8 The OpAmp [Post Homework Here]

Postby ThePyroElectro » Sat Dec 15, 2012 4:44 pm

coresnake wrote:What are two uses for Op-Amps?
A: Comparator circuits and amplifier circuits.
...
...
...
I'm having trouble building the amplifier circuits shown in formulas.pdf, I guess I probably need another voltage source somewhere but I'm not sure how. Here's what I've got so far, help would be much appreciated:

http://i.imgur.com/PkmU1.png


Hi Coresnake,

Good answers and thanks for all the feedback, I think my schematic tool had some errors. I'll fix those things.

Regarding which side inverting vs. non-inverting for using the comparator function. There is no right way because each way produces an opposite output from the other way.

When you have Vref at the (+) input and when Vin is at the (-) input:
If Vin is below Vref, output is V+
If Vin is above Vref, output is V-

Alternatively, swap them: When you have Vin at the (+) input and when Vref is at the (-) input:
If Vin is below Vref, output is V-
If Vin is above Vref, output is V+

I don't have the same simulation program (which one is that by the way?) as you so I just modified your image a little:
http://i.imgur.com/q4CFW.png
-Output from Pin 1,
-Pin 7 Connected to a second +5 power supply (V2)
-Pins 1 and 5 don't need to be connected

Hope that helps!

coresnake
Newbie Pyro
Posts: 12
Joined: Sat Dec 15, 2012 3:14 pm

Re: #8 The OpAmp [Post Homework Here]

Postby coresnake » Sat Dec 15, 2012 5:37 pm

I tried your adjustments and I'm still not getting 5x amplification:
http://i.imgur.com/J6cWO.png

This is in Multisim by the way. I'll keep fiddling with it for a bit.

Thanks for your help, the site is great by the way, I was unclear on a lot of basic concepts because a lot of tutorials tend to throw in all the math and advanced stuff together, its so much easier to get a 'feel' for it when the main concepts are standalone (plus the math is easy when learned separately anyway).

Can't wait for more lessons!

coresnake
Newbie Pyro
Posts: 12
Joined: Sat Dec 15, 2012 3:14 pm

Re: #8 The OpAmp [Post Homework Here]

Postby coresnake » Sat Dec 15, 2012 6:32 pm

I experimented with what you said about Vin and Vref for the comparator, and for some reason I'm getting the completely opposite result:
http://i.imgur.com/PpodZ.png

Could this be a bug, or am I doing something wrong?

Switching Vin to the (+) terminal and Vref to the (-) terminal also gives the complete opposite of what it should. :(

ThePyroElectro
PyroElectro Admin
Posts: 1181
Joined: Mon Nov 12, 2007 9:24 pm
Location: Earth
Contact:

Re: #8 The OpAmp [Post Homework Here]

Postby ThePyroElectro » Sat Dec 15, 2012 7:53 pm

coresnake wrote:I experimented with what you said about Vin and Vref for the comparator, and for some reason I'm getting the completely opposite result:
http://i.imgur.com/PpodZ.png

Could this be a bug, or am I doing something wrong?

Switching Vin to the (+) terminal and Vref to the (-) terminal also gives the complete opposite of what it should. :(


It looked good to me. Your volt-meter is measuring the wrong spots and so it looks like your Vref < Vin should actually be Vref > Vin, same with the other one.

Try moving it like this and I think that should clear things up.
http://i.imgur.com/BP6gC.png

Thanks for the good words. I've always wanted to do 'from the basics' kind of stuff, but its harder to teach than you might think ^_^. My projects/tutorials/articles always assume a certain level of knowledge which I know ostracizes a certain group of people who want to learn but need more fundamentals.

::EDIT::

coresnake wrote:I tried your adjustments and I'm still not getting 5x amplification:
http://i.imgur.com/J6cWO.png
...
...
...
Can't wait for more lessons!


So the reason I didn't really go into too much detail about how OpAmps actually do their amplification beyond looking at the two formulas and schematic structures is because it gets really complicated, really fast. When we get to the Analog course on PyroEDU, these details will be explained in the detail you probably desire ;-). I don't have access to a simulation tool at the moment so I used this online one...here are 3 pictures that give you an idea how the amplification would work:

Schematic:
http://i.imgur.com/4e3QB.png

Simulation Details:
http://i.imgur.com/cjnsS.png

Simulation Waveform (Voltage vs. time):
http://i.imgur.com/Pebai.png

In the simulation you'll notice that the peak voltage on input is a little less than 1 Volt and on the output is just under 5 Volts and that the sine-waves are opposite each other. So you can see, 5x amplification and negative each other (phase offset by 180 degrees).

coresnake
Newbie Pyro
Posts: 12
Joined: Sat Dec 15, 2012 3:14 pm

Re: #8 The OpAmp [Post Homework Here]

Postby coresnake » Sat Dec 15, 2012 8:28 pm

That worked for the comparator, thanks.

Will post screenshot of amplification if I ever get it working...

ThePyroElectro
PyroElectro Admin
Posts: 1181
Joined: Mon Nov 12, 2007 9:24 pm
Location: Earth
Contact:

Re: #8 The OpAmp [Post Homework Here]

Postby ThePyroElectro » Sat Dec 15, 2012 8:31 pm

coresnake wrote:That worked for the comparator, thanks.

Will post screenshot of amplification if I ever get it working...


Check my post above, I edited it with some details about the amplification side of things.

coresnake
Newbie Pyro
Posts: 12
Joined: Sat Dec 15, 2012 3:14 pm

Re: #8 The OpAmp [Post Homework Here]

Postby coresnake » Sat Dec 15, 2012 9:13 pm

Wait.. so it only works with AC source?

coresnake
Newbie Pyro
Posts: 12
Joined: Sat Dec 15, 2012 3:14 pm

Re: #8 The OpAmp [Post Homework Here]

Postby coresnake » Sun Dec 16, 2012 1:44 am

This is what I got using AC.. seems to be -5x voltage alright:

http://i.imgur.com/wfkBf.png

ThePyroElectro
PyroElectro Admin
Posts: 1181
Joined: Mon Nov 12, 2007 9:24 pm
Location: Earth
Contact:

Re: #8 The OpAmp [Post Homework Here]

Postby ThePyroElectro » Sun Dec 16, 2012 5:37 am

coresnake wrote:This is what I got using AC.. seems to be -5x voltage alright:

http://i.imgur.com/wfkBf.png
coresnake wrote:Wait.. so it only works with AC source?


Hey,

That's right, only AC signals can be amplified. If you speed up your signal from 1Hz to say, 1 KHz your Transient Analysis will look a lot better.

Glad you got it working!

coresnake
Newbie Pyro
Posts: 12
Joined: Sat Dec 15, 2012 3:14 pm

Re: #8 The OpAmp [Post Homework Here]

Postby coresnake » Sun Dec 16, 2012 2:00 pm

Thanks again for the help!
http://i.imgur.com/9unld.png same circuit with frequency at 1kHz, that was awesome!

jonnyquin
Newbie Pyro
Posts: 11
Joined: Thu Jan 24, 2013 11:28 pm

Re: #8 The OpAmp [Post Homework Here]

Postby jonnyquin » Thu Feb 07, 2013 12:31 am

HOMEWORK QUESTION 1
What are two uses for Op-Amps?
Inverting and summing
HOMEWORK QUESTION 2
What are the two main types of amplifier configurations used with Op-Amps?
Inverting and non-inverting
HOMEWORK QUESTION 3
How can an Op-Amp be used as a comparator?
A ‘comparator’ is an circuit that compares two input voltages. One voltage is called the reference voltage (Vref) and the other is called the input voltage (Vin).
When Vin rises above or falls below Vref the output changes polarity (+ becomes -).
HOMEWORK QUESTION 4
What are the 5 main pins of a standard Op-Amp?
1=offset null, 2=inverting input, 3=non-inverting input, 4=V-, 5=offset null, 6=output, 7=V+,8=NC

ThePyroElectro
PyroElectro Admin
Posts: 1181
Joined: Mon Nov 12, 2007 9:24 pm
Location: Earth
Contact:

Re: #8 The OpAmp [Post Homework Here]

Postby ThePyroElectro » Sat Feb 16, 2013 5:06 am

jonnyquin wrote:HOMEWORK QUESTION 1
What are two uses for Op-Amps?
Inverting and summing
HOMEWORK QUESTION 2
What are the two main types of amplifier configurations used with Op-Amps?
Inverting and non-inverting
HOMEWORK QUESTION 3
How can an Op-Amp be used as a comparator?
A ‘comparator’ is an circuit that compares two input voltages. One voltage is called the reference voltage (Vref) and the other is called the input voltage (Vin).
When Vin rises above or falls below Vref the output changes polarity (+ becomes -).
HOMEWORK QUESTION 4
What are the 5 main pins of a standard Op-Amp?
1=offset null, 2=inverting input, 3=non-inverting input, 4=V-, 5=offset null, 6=output, 7=V+,8=NC


Good answers, you brought up a few things I didn't talk about in the video like summing and the two offset null pins. Wish there was more time to teach it all, but I'll have to save that kind of stuff for a more advanced lesson. Well done!


Return to “Introduction to Modern Electronics”

Who is online

Users browsing this forum: No registered users and 2 guests