# Multisim Op-Amp simulation

1. Feb 12, 2014

### Maylis

1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution
I am working on the prelab for my class right now, and I am having difficulties understanding how to get my Multisim to work. Sadly we have not learned about Op-Amps, and by design our instructor has us do problems involving things not taught in class in order to force us to do research and such, so I am pretty lost with this.

On page 2, my pin diagram is the same as the pin diagram on the 1st page of the datasheet at the top left for the TLC227 (D, JG, P, or PW Package)

For page 3, I have the ''Positive Supply Label'' as Pin 3 and 5. The ''Negative Supply Label'' is pins 2 and 6.

I was able to prove the relationship on page 4, but now I'm stuck on the part about simulating the circuit. First of all, the diagram on page 3 has only 3 connections leaving the op-amp, and the one on multisim has 5 connections, so I don't really know what to do with the other 2.
I'll attach the lab, but I am working on page 4, asking for the R_f and R_in.

Here is my inverting amplifier, it won't actually run at the moment, something is messed up with this circuit.

#### Attached Files:

File size:
319.4 KB
Views:
351
• ###### Inverting Amplifer.pdf
File size:
38.1 KB
Views:
172
Last edited: Feb 12, 2014
2. Feb 12, 2014

### Staff: Mentor

Pins 2 & 6 are negative inputs to the amplifiers, while 3 & 5 are the positive inputs to the amplifiers. They are not power supply connections. Power is applied at pins 4 and 8.

The power connections are often left off of an op-amp circuit diagram in order to reduce clutter. However, it is understood that they be connected appropriately in the real circuit in order for the components to function. Your "missing" connections in the page 3 diagram are these power connections.

Check your power connection pins. You seem to have their polarity reversed (note the negative sign on the V2 magnitude. That makes V2 negative with respect to V3). Here's your circuit diagram with the pin labeling fixed.

You'll probably want to reduce the V1 supply value. The output of the amplifier can only swing between the power supply values, so +/- 5V in this case, and you're hitting the input of the amplifier with +5 volts; there's no way the amplifier can produce an output of Gain multiplied by 5V when Gain is greater than 1.

#### Attached Files:

• ###### Fig1.gif
File size:
9.9 KB
Views:
1,835
3. Feb 12, 2014

### Maylis

How is the positive power supply pin 8? There is a negative right there at the top of the op-amp. Is the positive power supply label Vdd (pin 8) and GND (pin 4) the negative supply label?

4. Feb 12, 2014

### Staff: Mentor

Yup. Vdd and GND are as specified on the pinout diagram. The "+" and "-" on the op-amp symbol are to distinguish the inverting and non-inverting signal inputs.

5. Feb 12, 2014

### Maylis

Okay, now I switched the polarity. It is weird to me that the positive power supply has a negative voltage and the negative power supply a positive voltage.

Also, it looks like my simulation is not producing an output voltage that is -5Vin, it is -4.88Vin. Why would the resistances matter, as long as they are in a ratio of 5/1? The question implies to me that there are specific resistances.

#### Attached Files:

• ###### Inverting Amplifer 2.pdf
File size:
39.5 KB
Views:
80
6. Feb 12, 2014

### Maylis

Also, I am now working on page 5, and I was able to prove the relationship.

Now I am running multisim for the noninverting amplifer and when I set R1 = R2, my V_out is not twice the V_in, its actually less than V_in

#### Attached Files:

• ###### Non Inverting Amplifer attempt 1.pdf
File size:
39.3 KB
Views:
59
7. Feb 12, 2014

### Staff: Mentor

Huh? You have +5V on pin 8 and -5V on pin 4. That's correct, and not reversed

It could be that the op-amp is not capable of driving all the way to the supply rails. This is often true of real op-amps. You might want to look through the spec sheet to see how closely it can drive its output to the rails. Also, check the amplifier response to smaller inputs to see if it is linear if you avoid driving the output close to the rails.

Yes, it's the resistor ratio that matters and you can choose any sizes within reason. If they are too small your amplifier may load down the signal source by trying to draw too much current (that is, your amplifier's input impedance will be too low), or if they are too high then the amplifier may be affected by thermal (shot) noise in the resistors producing enough current to generate voltages across the resistors that will be amplified and seen at the output.

8. Feb 12, 2014

### Staff: Mentor

Check your power supplies. Pin 8 should be connected to the positive supply and pin 4 to the negative supply. Always refer to the pinout diagram on the spec sheet.

#### Attached Files:

• ###### Fig2.gif
File size:
2.7 KB
Views:
1,406
9. Feb 12, 2014

### Maylis

Ok I see now. Well, I changed the voltage polarities, and now all I get is the same output as input, not twice as much

#### Attached Files:

• ###### non inverting attempt 2.pdf
File size:
39.4 KB
Views:
57
10. Feb 12, 2014

### Staff: Mentor

In your circuit diagram I don't see a "dot" at the junction of the feedback path resistors. The other obvious junction in the circuit does have one. Can you check to make sure that the connection is really established?

11. Feb 12, 2014

### Maylis

Okay great, that was the problem. Now I see it is 2V. I'll work on page 6 and 8 of the prelab, and if I run into a problem I'll come back. Thank you very much.

12. Feb 12, 2014

### Maylis

I'm working on the derivation of the non-inverting Schmitt trigger, and I don't know how to get the formula wikipedia has for V+

http://en.wikipedia.org/wiki/Schmitt_trigger#Non-inverting_Schmitt_trigger

This phrase ''For instance, if the Schmitt trigger is currently in the high state, the output will be at the positive power supply rail (+VS). The output voltage V+ of the resistive summer can be found by applying the superposition theorem:''

Once I can get to that point then I can solve the rest I think.

Edit: Here is my attempt

#### Attached Files:

• ###### threshold voltage derivation.pdf
File size:
230.6 KB
Views:
53
Last edited: Feb 13, 2014
13. Feb 12, 2014

### Maylis

Also, I'm doing page 6 of the lab and I have no idea what the circuit is supposed to look like for the comparator. They don't say where the resistors should be placed, and the image up top doesn't give any indication either. Then they want a relationship between Ra, Rb, and alpha.

Here is at least what I drew as a circuit

#### Attached Files:

• ###### supply voltage derivation.pdf
File size:
326.3 KB
Views:
56
Last edited: Feb 13, 2014
14. Feb 13, 2014

### Staff: Mentor

At a glance your attempt looks fine. What problem are you having with it?

15. Feb 13, 2014

### Staff: Mentor

Your circuit looks fine. I've reproduced it here and extracted the portion of interest:

Now, you are aware that the potential at the V- pin of the op-amp will define the threshold voltage where the comparator output will make the flip between rails. So emply superposition to determine V- from the isolated circuit. You should end up with something of the form

$V- = (something)\cdot V_s$

#### Attached Files:

• ###### Fig1.gif
File size:
4.8 KB
Views:
1,432
16. Feb 13, 2014

### Maylis

My problem is that I did not derive the expression for V+ on my own, I just took it from wikipedia. How did they arrive at those results to begin with?

17. Feb 13, 2014

### Staff: Mentor

They assume that the output of the comparator is currently locked to one of the rails, say -Vs. They then calculate the value of the input Vin that would bring the V+ comparator input to ground potential. Passing though that critical point in the positive direction will make the V+ input positive wioth respect to the V- input and the comparator will then swing its output to the other rail: +Vs.

The calculation can be repeated for the comparator output starting at the other rail, +Vs, and the input voltage dropping through a critical value.

To analyze, replace the op-amp output with a fixed voltage source at the rail value of interest. Find the voltage at the voltage divider formed by R1 and R2. Superposition makes it easy.