18
EE 42/100 Lecture 10: Op-Amp Based Circuits ELECTRONICS Rev B 2/22/2012 (3:01 PM) Prof. Ali M. Niknejad University of California, Berkeley Copyright c 2012 by Ali M. Niknejad A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 8 p. 1/18

EE 42/100 Lecture 10: Op-Amp Based Circuits ELECTRONICSrfic.eecs.berkeley.edu/ee100/pdf/lect10.pdfComparator / Zero Crossing Detector v s v o • In theory an op-amp in “open-loop”

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: EE 42/100 Lecture 10: Op-Amp Based Circuits ELECTRONICSrfic.eecs.berkeley.edu/ee100/pdf/lect10.pdfComparator / Zero Crossing Detector v s v o • In theory an op-amp in “open-loop”

EE 42/100Lecture 10: Op-Amp Based Circuits

ELECTRONICSRev B 2/22/2012 (3:01 PM)

Prof. Ali M. Niknejad

University of California, Berkeley

Copyright c© 2012 by Ali M. Niknejad

A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 8 p. 1/18 – p. 1/18

Page 2: EE 42/100 Lecture 10: Op-Amp Based Circuits ELECTRONICSrfic.eecs.berkeley.edu/ee100/pdf/lect10.pdfComparator / Zero Crossing Detector v s v o • In theory an op-amp in “open-loop”

Differential Amplification and Noise

• In many systems, the desired signal isweak but it’s accompanied by a muchlarger undesired signal. A good exampleis the ECG measurement on the humanbody. The human body picks up a lot of60 Hz noise (due to capacitive pickup)and so a very weak ECG signal (mV) isaccompanied by a large signal (∼ 1V )that we wish to reject.

• Fortunately the noise pickup is in commonwith both leads of the ECG because thebody is essentially an equipotentialsurface for the noise pickup. If we take thedifference between two points, itdisappears.

A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 8 p. 2/18 – p. 2/18

Page 3: EE 42/100 Lecture 10: Op-Amp Based Circuits ELECTRONICSrfic.eecs.berkeley.edu/ee100/pdf/lect10.pdfComparator / Zero Crossing Detector v s v o • In theory an op-amp in “open-loop”

Common-Mode and Differential-Mode Gain

• We thus need an amplifier that can detect a small differential mode voltage in thepresence of a potentially very strong common mode voltage.

A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 8 p. 3/18 – p. 3/18

Page 4: EE 42/100 Lecture 10: Op-Amp Based Circuits ELECTRONICSrfic.eecs.berkeley.edu/ee100/pdf/lect10.pdfComparator / Zero Crossing Detector v s v o • In theory an op-amp in “open-loop”

Don’t Do This

• Even though the op-amp output is the difference between the inputs, this circuitdoes not work for several reasons.

• The op-amp in open loop configuration has very unreliable gain. Also, the gain isprobably too high for this application and the amplifier may rail out.

• In closed loop configurations, the op-amp input voltage is nearly zero(v+ − v− ≈ 0). What we need is a way to amplify potentially large voltagedifferences.

A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 8 p. 4/18 – p. 4/18

Page 5: EE 42/100 Lecture 10: Op-Amp Based Circuits ELECTRONICSrfic.eecs.berkeley.edu/ee100/pdf/lect10.pdfComparator / Zero Crossing Detector v s v o • In theory an op-amp in “open-loop”

Difference Amplifier

R1

R2

R3

R4

v1

v2

vo

• Using superposition, we can quickly calculate the transfer function. For port 1, theamplifier is simply an inverting stage

v1o = v1

−R2

R1

• For port 2, it’s a non-inverting stage, except we only tap off a fraction of v2

v2o = v2

R4

R3 + R4

(1 +R2

R1

)

• Take the sum and set R1 = R3 and R2 = R4, we have

vo =R2

R1

(v2 − v1)A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 8 p. 5/18 – p. 5/18

Page 6: EE 42/100 Lecture 10: Op-Amp Based Circuits ELECTRONICSrfic.eecs.berkeley.edu/ee100/pdf/lect10.pdfComparator / Zero Crossing Detector v s v o • In theory an op-amp in “open-loop”

Instrumentation Amplifier

V2

Vout

V1

R2 R3

R2 R3

• Two unity-gain buffers are used to buffer the input signal. A difference amplifier isused to provide a gain of R3/R2.

A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 8 p. 6/18 – p. 6/18

Page 7: EE 42/100 Lecture 10: Op-Amp Based Circuits ELECTRONICSrfic.eecs.berkeley.edu/ee100/pdf/lect10.pdfComparator / Zero Crossing Detector v s v o • In theory an op-amp in “open-loop”

Instrumentation Amplifier Version 2

V2

Vout

V1

R1

R1

Rgain

R2 R3

R2 R3

vo =

1 +2R1

Rgain

«

R3

R2

(v2 − v1)

• The input buffers now have gain due to the fact that the circuit is configured as anon-inverting amplifier. Why is the resistor Rgain appear between the amplifiers?

• Subtle: Note that we could simply put in two resistors to ground, but a moreelegant way to realize it is to put in between the top and bottom. For balancedinputs, the resistor is split in two and grounded in the middle (another virtualground). For unbalanced inputs, no current flows and the resistor is not there, sothere’s no common-mode gain!

A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 8 p. 7/18 – p. 7/18

Page 8: EE 42/100 Lecture 10: Op-Amp Based Circuits ELECTRONICSrfic.eecs.berkeley.edu/ee100/pdf/lect10.pdfComparator / Zero Crossing Detector v s v o • In theory an op-amp in “open-loop”

Current Summing Amplifier

R2

vo

is1 + is2

is1 is2

• An important observation is that in the inverting amplifier, the current injected intothe negative terminal of the op-amp is routed to the output and converted into avoltage through R2. If multiple currents are injected, then the sum of the currentsis converted to a voltage.

A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 8 p. 8/18 – p. 8/18

Page 9: EE 42/100 Lecture 10: Op-Amp Based Circuits ELECTRONICSrfic.eecs.berkeley.edu/ee100/pdf/lect10.pdfComparator / Zero Crossing Detector v s v o • In theory an op-amp in “open-loop”

Voltage Summing Amplifier

R2

vo

is1 + is2R1

R1

vs1

vs2

• Each source is converted into a current and then summed in a similar fashion asthe currents. Note that the virtual ground means that no current is “lost” when thecurrents are put in parallel (due to the output resistance).

A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 8 p. 9/18 – p. 9/18

Page 10: EE 42/100 Lecture 10: Op-Amp Based Circuits ELECTRONICSrfic.eecs.berkeley.edu/ee100/pdf/lect10.pdfComparator / Zero Crossing Detector v s v o • In theory an op-amp in “open-loop”

Comparator / Zero Crossing Detector

vs vo

• In theory an op-amp in “open-loop” configuration can be turned into a comparator,a circuit that compares the inputs and produces either a “high” signal (v+ > v−) ora “low” signal (v+ < v−). This is useful in converting small analog signals into adigital signal.

• Due to the very high gain of the op-amp, the output rails to one or the other supplyas the input crosses zero.

• In practice, a specialized comparator should be used since it can operate muchfaster than an op-amp.

A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 8 p. 10/18 – p.

Page 11: EE 42/100 Lecture 10: Op-Amp Based Circuits ELECTRONICSrfic.eecs.berkeley.edu/ee100/pdf/lect10.pdfComparator / Zero Crossing Detector v s v o • In theory an op-amp in “open-loop”

Digital Signal Processing

ADC DACDigital Signal

Processing

...110011100... ...100110100...

• An Analog-to-Digital Converter (ADC) converts a continuously varying analogsignal into digital form (1’s and 0’s), which can be read into a computer, stored,processed (filtered or otherwise manipulated). [Note: You’ll need a pre-filter toavoid aliasing...]

• A Digital-to-Analog Converter (DAC) does the reverse process. A digital input isconverted into a continuous waveform. Most DAC’s hold their value over the entireclock period (“zero-order hold”). By filtering this data we can reconstruct theoriginal waveform.

A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 8 p. 11/18 – p.

Page 12: EE 42/100 Lecture 10: Op-Amp Based Circuits ELECTRONICSrfic.eecs.berkeley.edu/ee100/pdf/lect10.pdfComparator / Zero Crossing Detector v s v o • In theory an op-amp in “open-loop”

Op-Amp Based DAC

RL

R2

v0

v1

v2

vN−1

20R1

21R1

22R1

2N−1

R1

• Each voltage source represents a binary digital. A 1 corresponds to the maximumvoltage (rail) and a 0 corresponds to the ground potential.

• Each voltage is converted into a current. We weight the voltage by the binary digitposition (2j ). The weighted sum is the desired analog voltage.

A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 8 p. 12/18 – p.

Page 13: EE 42/100 Lecture 10: Op-Amp Based Circuits ELECTRONICSrfic.eecs.berkeley.edu/ee100/pdf/lect10.pdfComparator / Zero Crossing Detector v s v o • In theory an op-amp in “open-loop”

Comparator Analog-to-Digital Converter

vs

vo3

vo2

vo1

R

R

R

1V

R

• A very useful circuit is an analog-to-digitalconverter, or a circuit that quantizes (rounds off) asmoothly varying analog signal into a digital signal(that can be read into a computer and processedusing power digital signal processing algorithms).

• The resistor tree is essentially a voltage divider,where the tap points provide a uniform referencevoltages for comparison.

• All the comparators with reference voltage belowthe input go high. The remaining comparators golow. This output can be translated into standardbinary.

A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 8 p. 13/18 – p.

Page 14: EE 42/100 Lecture 10: Op-Amp Based Circuits ELECTRONICSrfic.eecs.berkeley.edu/ee100/pdf/lect10.pdfComparator / Zero Crossing Detector v s v o • In theory an op-amp in “open-loop”

Positive Feedback

R 2

vo

• Most of the circuits we have seen so far use negative feedback. The output issampled and fed into the negative terminal of the op-amp. As we have seen, thisleads to a very stable operating point.

• By contrast, when we feed the output back to the positive terminal, as shownabove, the output will saturate to the positive or negative rail.

• Suppose that we when we turn on the above circuit, the input is at zero and theoutput is at zero, so the input differential voltage is zero. That seems stable, right?

• Now suppose a slight perturbation causes the output go to slightly positive. Thendue to the large gain, the output would “rail” to the positive supply.

• What would have happened if the voltage perturbation had occurred in thenegative direction?

A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 8 p. 14/18 – p.

Page 15: EE 42/100 Lecture 10: Op-Amp Based Circuits ELECTRONICSrfic.eecs.berkeley.edu/ee100/pdf/lect10.pdfComparator / Zero Crossing Detector v s v o • In theory an op-amp in “open-loop”

Schmitt Trigger

vLH

vHLvs

vo

• The Schmitt Trigger is a circuit that employs positive feedback. It is similar to acomparator, but due to the feedback, it has hysteresis. In other words, the transfercharacteristics of the amplifier are not static, but depends on the history or pastinput values.

A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 8 p. 15/18 – p.

Page 16: EE 42/100 Lecture 10: Op-Amp Based Circuits ELECTRONICSrfic.eecs.berkeley.edu/ee100/pdf/lect10.pdfComparator / Zero Crossing Detector v s v o • In theory an op-amp in “open-loop”

Schmitt Trigger (cont)

R 1

R 2

vsvo

• A Schmitt Trigger can be constructed using an op-amp. The action of the feedbackis to set the “comparison” voltage based on the current output voltage.

• The op-amp output will change if v+ cross zero. At any given time, the voltage v+

can be found by Nodal analysis (no current flows into the input terminals of anideal op-amp

v+ − vs

R1

+v+ − vo

R2

= 0

• Solve for v+ to obtain

v+

1

R1

+1

R2

«

=vs

R1

+vo

R2

v+ (R2 + R1) = vsR2 + voR1

v+ =vsR2 + voR1

(R2 + R1)

A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 8 p. 16/18 – p.

Page 17: EE 42/100 Lecture 10: Op-Amp Based Circuits ELECTRONICSrfic.eecs.berkeley.edu/ee100/pdf/lect10.pdfComparator / Zero Crossing Detector v s v o • In theory an op-amp in “open-loop”

Schmitt Trigger Thresholds• We find that v+ is a function of both the input vs and the output vo. This second

dependence gives rise to the hysteresis.

• One can say that the input v+ is an “arm wrestle” between the input and thecurrent output. For instance, if the output is already high, then the input vs has tocome sufficiently low to cause v+ to cross zero. We can find the “high-to-low”threshold vHL by setting vo = Vsup and solve for v+ = 0

v+ =vHLR2 + VsupR1

(R2 + R1)= 0

VHL = −VsupR1

R2

• Similarly, the “low-to-high” threshold vLH can be found by setting vo = −Vsup andsolving for v+ = 0

v+ =vLHR2 − VsupR1

(R2 + R1)= 0

VLH = VsupR1

R2

A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 8 p. 17/18 – p.

Page 18: EE 42/100 Lecture 10: Op-Amp Based Circuits ELECTRONICSrfic.eecs.berkeley.edu/ee100/pdf/lect10.pdfComparator / Zero Crossing Detector v s v o • In theory an op-amp in “open-loop”

Schmitt Trigger Application• First notice that a Schmitt Trigger is a bi-stable device, with two stable operating

points. It’s a memory cell !

• In practice we can build memory cells with far fewer transistors than an op-amp,but this is a useful way to think about the circuit.

• The most common application is to increase the noise immunity of a circuit. In acomparator, there is only a signal threshold voltage. If the input is noisy, then theoutput will bounce if the noise causes the input to cross the threshold. In a SchmittTrigger, though, once the output transitions (say high), the threshold to bring theoutput back down to zero is more negative, which means it’s less likely that a noisesignal will cause a false transition.

A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 8 p. 18/18 – p.