Memo: Phase-locked loop

Phased-lock loop (PLL) synchronizes the frequency of output and input signals. The output signal is generated internally as part of the phased-lock loop; specifically from its variable-frequency oscillator (VFO).

PLL applications

PLLs are primary used for clock synchronization within IC packages, encompassing the whole or parts of the IC’s (signal processing) circuitry within its loop in place of the VFO (though the IC’s circuitry itself normally contains a clock source, crystal or otherwise, within it). This eliminates race conditions between the inputs and outputs of the said circuit.

PLLs are also used for demodulation; e.g., in a radio receiver for both AM and FM signals.

Finally, they are used in frequency synthesis. Frequency synthesizers create multiple frequencies based on the divider value in the feedback loop and the reference frequency (from master oscillator, normally a quartz crystal). This allows very high frequencies or very low frequencies to be generated from one crystal source.

Block diagram of common PLL synthesizer

This type of synthesizer, however, cannot operate over a very wide frequency range as the comparator will have a limited bandwidth and may suffer from aliasing problems.

PLL construction

A simple PLL consists of a phase detector, a loop filter and a VFO. In analog or linear PLL (see https://en.wikipedia.org/wiki/Phase-locked_loop#Variations), these basic components correspond to:

Analog multiplier as Phase detector

Passive or Active low-pass filter as Loop filter

Voltage-controlled oscillator, which falls under analog VFO category.

One implementation of analog PLL is as follow:

Phase-locked loop circuit
Analog PLL circuit

The specific values of these components are not easy to determine via trial and error. They are often determined via modeling and simulation. In practice, it is usually easier to just buy an off-the-shelf PLL chip than trying to construct one.

Read more

https://en.wikipedia.org/wiki/Phase-locked_loop

Phase Locked Loop Tutorial (Youtube)

https://en.wikipedia.org/wiki/Variable_frequency_oscillator

https://en.wikipedia.org/wiki/Demodulation

https://en.wikipedia.org/wiki/Frequency_synthesizer

https://en.wikipedia.org/wiki/Bandwidth_(signal_processing)

 

Advertisements

Memo: Analog multiplier and voltage-controlled circuits

Analog multipliers are commonly available as integrated circuits (IC) and are rarely constructed from scratch due to their complexity. Multipliers commonly have 8 pin outs: X1, X2, Y1, Y2, W, Z, +VCC, -VCC. The common AD632 and MPY634 devices consist of one feedback line (W), two ground lines (X2, Y2), two supply lines (+VCC, -VCC) and one amplification factor line (Z); although the configuration might vary from model to model.

Image result for analog multiplier pinout
Always check the datasheet first.
Multiplier in signal processing

Analog multipliers allow the engineer to perform amplitude modulation (AM) techniques; that is, the encoding of one signal as the shape of another signal of a different (higher) frequency. In such applications, the multipliers are used for tweaking the gain by controlling the voltage of one input, effectively turning the multiplier into a voltage-controlled amplifier.

While all multipliers are voltage-controlled amplifiers, not all voltage-controlled amplifiers are true analog multipliers.

When used in conjunction with low-pass filters (and integrators in specific), analog multipliers enable phase detection, and in turn, set the foundation for frequency modulation (FM) techniques; ergo, the encoding of one signal as the frequency variation of another signal of a different amplitude.

An important note for modulation setups is that, the carrier signal will always be the one with higher frequency in AM circuits while the carrier signal in FM circuits will be the one with lower frequency [citation needed!].

Phase detector

Cascading a multiplier into a low-pass filter results in a phase detector. A phase detector detects the difference in phase between two input signals. When the phase is 90 degree, the output goes to 0 and this information can be used in self-tuning circuits.

Because the output signal can receive amplifications beyond what is suitable for tuning circuits, the output is often scaled down via a voltage divider circuit before it can be used as a control signal.

Beyond self-tuning circuits, phase detectors also find applications in phase locked loops, demodulators, radars and servo controllers.

Self-tuned filters

Specifically for the second order universal active filter circuit (conglomerate filter) from the last memo, adding a multiplier to the feedback loops of two integrators turns the entire circuit into a Voltage-Controlled Filter (or Voltage-Controlled Phase Generator).

Self-tuned universal filter circuit
Self-tuned second order universal filter

The above circuit synchronizes the outputs of all four filters’ signals to be in-phase with each other and with the input signal, effectively eliminating race conditions and the likes.

In spite of the name, the circuit itself still requires manual adjustment of the voltage divider after the phase detector (before the control signal). The amplitude of the control signal appears to influence the effective frequency band of the tuner; ergo, the range of input frequencies that the tuner can “lock on”.

Only some amplitudes are usable in reality as a minute change to the control signal’s peak-to-peak voltage can cause this effective frequency band to shift to god-know-where (possibly beyond the measurement limits of the oscilloscope or cut-off thresholds of op-amps in the circuit).

Voltage-controlled oscillator (FM generator)

Like the phase detector, a voltage-controlled oscillator is essential in phase-locked loop‘s construction. Cascading a multiplier into the (inverting) input of an integrator allows the saw-tooth pattern output to vary in frequency (frequency modulated). In voltage-controlled relaxation oscillators, the oscillation is then provided by the Schmitt Trigger via its positive feedback.

Voltage-controlled relaxation oscillator

While not covered by this course, harmonic oscillators can be made voltage-controllable in a similar fashion. They are constructed from a feedback network with L-C elements / R-C elements / crystal which provide the oscillation, an amplifier to keep the signal leveled. Harmonic oscillators are linear and produce sinusoidal waveform. Making a harmonic oscillator voltage-controllable (frequency-wise) is as simple as throwing a multiplier before the primary integrative component of its feedback network (the capacitor or op-amp integrator).

However, unlike non-linear relaxation oscillators, it can become difficult to maintain the sinusoidal shape of the output with a multiplier messing up the integrator’s input.

The circuit for a function generator and a voltage-controlled oscillator (FM generator) is basically the same. The difference lies in the input Vc of the multiplier.

A function generator converts AC input signal and modifies it using separate circuits to produce various waveform.

On the other hand, an oscillator does NOT need AC input to work. It only needs DC supply and uses positive feedback to generate various waveform.

Assuming the hypothesis in the first section of this memo holds true, placing a multiplier at the outputs (saw-tooth output of the integrator or square output of the Schmitt trigger) and outside of the feedback loops will allows amplitude modulation of the output signal and an external signal [citation needed!].

Bonus: Electronic noise in recursive analog circuits

The transient operation of an oscillator highlights a key difference between analog and digital electronics. In analog electronics, the electrical noise is never completely suppressed and it can be used in kick starting oscillations.

“When the power supply to the amplifier is first switched on, electronic noise in the circuit provides a non-zero signal to get oscillations started. The noise travels around the loop and is amplified and filtered until very quickly it converges on a sine wave at a single frequency.” — Wikipedia.

This also explains the existence of conglomerate filters and similar recursive circuits that have no apparent starting or ending point.

Read more

https://en.wikipedia.org/wiki/Analog_multiplier

https://en.wikipedia.org/wiki/Automatic_gain_control

https://en.wikipedia.org/wiki/Phase_detector

https://en.wikipedia.org/wiki/Electronic_oscillator

https://en.wikipedia.org/wiki/RC_oscillator

https://en.wikipedia.org/wiki/Voltage-controlled_oscillator

http://www.electronics-tutorial.net/analog-integrated-circuits/op-amp-comparators/comparator-as-a-function-generator/index.html

http://www.electronics-tutorial.net/analog-integrated-circuits/op-amp-comparators/voltage-controlled-oscillator/index.html

https://www.crazyengineers.com/threads/major-difference-between-oscillator-and-generator.37032/

https://en.wikipedia.org/wiki/Phase-locked_loop

Phase Locked Loop Tutorial (Youtube)

 

Memo: Active frequency filters

Frequency filters attenuate signals outside its band-pass thresholds. There are two flavors of frequency filters: active and passive. Active filters have op-amps and offer amplification, as well as impedance matching functionality, of the output signal. Passive filters are simple R-C-L networks without any op-amp.

Band-pass and Band-stop construction

Band-pass filter is defined as follow:

band-pass filter is a device that passes frequencies within a certain range and rejects (attenuates) frequencies outside that range.

Band-stop filter is the opposite of Band-pass filter.

Both band-pass and band-stop filters can be created from low-pass and high-pass filters via the corresponding arrangement as shown below:

band stop filter configuration
Band-stop filter construction: Summing low-pass and high-pass filter
band pass filter design
Band-pass filter construction: cascading low-pass and high-pass filter

On a related note, there exists a special form of band-stop filter called notch filter and it is defined as follow:

notch filter is a band-stop filter with a narrow stopband (high Q factor).

with Q factor is, in turned, defined as:

The Q-factor is the reciprocal of the fractional bandwidth. A high-Q filter will have a narrow passband and a low-Q filter will have a wide passband. These are respectively referred to as narrow-band and wide-band filters.

Frequency filters conversion

There are a total of four frequency filters and they can be combined with other electronics and one another to create a new filter. Their second order relationships are described by the following equations:

(1) Low-pass filter = ∫(Band-pass filter)

(2) Band-stop filter = X(t) – Band-pass filter

(3) Band-pass filter = ∫(High-pass filter)

For first order systems, derivations from Band-stop and Band-pass constructions permit the following:

(4) High-pass filter = Low-pass filter – Band-stop filter

(5) Band-pass filter = Low-pass filter (High-pass filter)

IMPOTANT: Anything that works in first order also works in second order.

First order active filters

For the first order filters, a resistor and capacitor bridge is employed. The use of feedback eliminates the need for inductors as used in first order passive filters.

Low-pass filter has the resistor near the source while high-pass filter has the capacitor. In high-pass filters, a small resistor might be included between the source and the capacitor to prevent overloading the capacitor.

Non-inverting low-pass filter
Non-inverting high-pass filter

The difference between inverting and non-inverting filters is the input terminal the input source is connected to. If Vin is connected to the inverting terminal, it’s an inverting filter.

Inverting low-pass filter
Inverting high-pass filter

In any cases, the feedback should always be negative for filters and amplifiers alike. Positive feedback will result in hysteresis circuits (Schmitt triggers).

Second order active filters

Second order filters offer more drastic attenuation (steep roll-off). The simplest kinds are based off Sallen-Key topology

Generic Sallen-Key topology

Second order filters are designed around a non-inverting amplifier with equal resistor and capacitor values. The specific values are determined by the cut-off frequency desired by the designer. As with first-order filters, low-pass filters have a resistor near the source and high-pass filters have a capacitor.

second order low pass filter
Second order active low-pass filter
second order high pass filter
Second order active high-pass filter
Second order universal active filter (Conglomerate filters)

The all the filters above are “section”, meaning, they standalone and are not dependent on any other filters. The opposite of section filters are “conglomerate” filters. Every component of the conglomerate filter must be in order for the entire filter to work correctly. They offer reduced circuitry at the cost of reliability due to high dependency on other components of the system.

At the core, the universal filter is one such conglomerate. Each output of the four op-amps provides a different second order filter behavior:

Notch-filter

2nd order high-pass filter

Band-pass filter

2nd order low-pass filter

The universal filter is based on cascading two inverting amplifiers blocks and two inverting integrators blocks with additional, second order feedback loops from each integrator back to the input of the amplifier furthest from it.

Second order universal active filter circuit

Tow-Thomas biquad filter is another conglomerate filter offering low-pass and band-pass characteristics depending on where the input is taken.

Read more

http://www.electronics-tutorials.ws/filter/band-stop-filter.html

https://en.wikipedia.org/wiki/Band-stop_filter

https://www.quora.com/What-is-the-difference-between-a-Low-pass-filter-and-Integrator-Circuit-Why-two-different-names

http://www.electronics-tutorials.ws/filter/filter_2.html (Passive low pass)

http://www.electronics-tutorials.ws/filter/filter_3.html (Passive high pass)

http://www.electronics-tutorials.ws/filter/filter_4.html (Passive band pass)

http://www.electronics-tutorials.ws/filter/filter_5.html (Active low pass)

http://www.electronics-tutorials.ws/filter/filter_6.html (Active high pass)

http://www.electronics-tutorials.ws/filter/filter_7.html (Active band pass)

http://www.electronics-tutorials.ws/filter/second-order-filters.html

http://www.learningaboutelectronics.com/Articles/Active-op-amp-bandpass-filter-circuit.php

https://en.wikipedia.org/wiki/Sallen%E2%80%93Key_topology

https://en.wikipedia.org/wiki/Electronic_filter_topology#Tow-Thomas_Biquad_Example

http://www.beis.de/Elektronik/AudioMeasure/UniversalFilter.html

Memo: One-shot timer and op-amp filters

Integrators and Differentiators are basic building blocks of analog computers. They enable summation and subtraction operations (hence, the core component of them is called “operational” amplifier). For multiplication, multiple integrators are used in parallel, along with exponential and logarithmic elements (non-linear op-amp circuits), to achieve the effect via the following transformation:

ln(ab) = ln(a) + ln(b) = c

e^(c) = ab 

This is why analog multiplicators are expensive, costing up to $20 a pop.

All the circuits below require very specific values for their components. Changing the value of the components will do more than changing the properties of the output, it can cause instability and disrupt the circuit’s operation. As an oscilloscope is required to diagnose these circuits, some preset values that have been tested in the lab are also included in this memo for DIY projects at home.

Monostable multivibrator (one-shot timer)

Monostable multivibrator has one stable state and it will change to the unstable state for a period of time when a trigger pulse (negative edge) is introduced as input.

The circuit can be derived from astable multivibrator circuit; the only new addition is the grounded diode in parallel to the output capacitor. If all values are appropriate, connecting the diode will dampen all output and (negative) feedback generated by the powered astable multivibrator without any input. After this dampening characteristic has been achieved, negative edge trigger input can be introduced to complete the circuit.

The basic circuit is as seen below:

basic op amp monostable
Basic monostable multivibrator: R1 = 10K, R2 = 2.2K, R = 1K, C = 1uF
op amp monostable waveforms
Measuring the voltage behavior across the capacitor C yields a shark-fin waveform

The timing period T is the amount of time it takes for the circuit to return switch from unstable back to stable state. The timing period is given by

T = RC ln[1 / (1-B)]

where B is the regenerative feedback as described in Memo: Schmitt trigger. The units of the remaining variables are as follow:

T: seconds (s)

R: ohms (Ω)

C: farad (F).

Cheat sheet: when R1 = R2, the timing period T = 0.693 RC

Similarly, the charging period is the amount of time the circuit must wait before it can be triggered again. This is given by

T(charging) = RC ln[(1+B) / B]

In some circuits, an additional RC differentiator circuit can be connected to the input (sometimes, only a single 0.01uF capacitator is sufficient). The purpose of this extra circuit is to transform rectangular signal into trigger pulse signal as seen below

rc differentiator circuit
RC differentiator

The complete monostable circuit is as follow:

op amp monostable circuit
Final monostable multivibrator with RC differentiator
Integrator

Integrator functions like an average filter, it’s often used as a low-pass filter.

Inverting integrator: C = 0.01uF, R = 1K

The output of the integrator is given by

V_{{{\text{out}}}}(t_{1})=V_{{{\text{out}}}}(t_{0})-{\frac  {1}{RC}}\int _{{t_{0}}}^{{t_{1}}}V_{{{\text{in}}}}(t)\,\operatorname {d}t

or in Laplace domain, it is

Vout = -Vin/(sRC)

If the integrator starts from zero (no charge in the capacitor), the output is simply given by

-{\frac  {1}{RC}}\int _{{t_{0}}}^{{t_{1}}}V_{{{\text{in}}}}(t)\,\operatorname {d}t

where Vout(t0) represents the output voltage of the circuit at time t = t0.

Op-amp integrator suffers from the same frequency response limitation as other closed-loop op-amp circuits. It has a cut-off frequency at -3 dB and a decreased output at high frequencies. In addition to this, the integrator also has run-away output issue where it can drift to either power rail due to constant noises and it must be reset periodically to prevent this problem.

The drift is caused by any of the three conditions:

The input Vin has a non-zero DC component,

Input bias current is non-zero,

Input offset voltage is non-zero.

A more complex, grounded integrator circuit prevents this drift

100pxl
Grounded integrator circuit

A simple switch in parallel to the negative feedback capacitor allows resetting the integrator to zero.

For the grounded integrator circuit, the output is given by

V_{{{\text{out}}}}(t_{1})=V_{{{\text{out}}}}(t_{0})-{\frac  {1}{R_{{i}}C_{{f}}}}\int _{{t_{0}}}^{{t_{1}}}V_{{{\text{in}}}}(t)\,\operatorname {d}t

Differentiator

Differentiator, in contrast, is a high-pass filter. It has poor high frequency response and any sudden disturbance at the input will cause it to ring at natural frequency

Op-Amp Differentiating Amplifier.svg
Inverting differentiator: C = 1F, R = 1K

The transfer function of the above circuit is as follow:

V_{{{\text{out}}}}=-RC\,{\frac  {\operatorname {d}V_{{{\text{in}}}}}{\operatorname {d}t}}\,\qquad {\text{where }}V_{{{\text{in}}}}{\text{ and }}V_{{{\text{out}}}}{\text{ are functions of time.}}

or in Laplace domain:

Vout = -sVinRC

Bonus: Non-inverting integrator

Like closed-loop amplifiers, non-inverting integrators and differentiators circuits are easily achievable by switching GND and Vin. A possible circuit for non-inverting integrator is as shown below and it makes use of an RC passive low pass filter circuit at the non-inverting input.

integrater29
Non-inverting integrator: one extra passive low pass filter at the non-inverting input
Read more

https://en.wikipedia.org/wiki/Analog_computer

https://en.wikipedia.org/wiki/Monostable

http://www.electronics-tutorials.ws/opamp/op-amp-monostable.html

https://en.wikipedia.org/wiki/Integrator

https://en.wikipedia.org/wiki/Op_amp_integrator

https://en.wikipedia.org/wiki/Differentiator

https://en.wikipedia.org/wiki/Operational_amplifier_applications

http://www.electronics-tutorial.net/analog-integrated-circuits/op-amp-integrator/non-inverting-integrator/index.html

https://www.researchgate.net/publication/245316727_A_non-inverting_differentiator_using_a_single_operational_amplifier

Memo: Schmitt trigger

Hysteresis definition is as follow:

the phenomenon in which the value of a physical property lags behind changes in the effect causing it, as for instance when magnetic induction lags behind the magnetizing force.

The horizontal and vertical axes are input voltage and output voltage, respectively. T and −T are the switching thresholds, and and −M are the output voltage levels.

In asymmetric bipolar power supply (such as those created by elevating a virtual ground from unipolar power source), the hysteresis can be skewed along the horizontal axis of the above transfer function.

Schmitt triggers vs. Closed-loop amplifiers

It is easy to convert a closed-loop amplifier into Schmitt trigger by swapping the input terminals. Standard closed-loop amplifiers have negative feedbacks while Schmitt triggers have positive feedbacks as defined by Wikipedia:

In electronics, a Schmitt trigger is a comparator circuit with hysteresis implemented by applying positive feedback to the noninverting input of a comparator or differential amplifier.

One important note when converting negative feedback comparators into Schmitt triggers is the direction of the output. As seen below, non-inverting amplifiers will yield inverting Schmitt triggers when the input terminals are swapped, and vice versa.

Non-inverting amplifier (negative feedback)
Inverting Schmitt trigger (positive feedback)

Fortunately, changing the output direction of a comparator circuit (any feedback) is quite simple. Swapping Vin and GND terminals inverses the output direction of the circuit.

Non-inverting Schmitt trigger, practically identical layout with the inverting counterpart except Vin and GND positions
Schmitt trigger’s characteristics

Schmitt triggers are commonly used for switch debouncing and noise filtering for digital signals. In digital circuits, noisy signals are often fed to a low-pass filter to create a smoother signal before passing through a Schmitt trigger to recreate the sharp digital signal. Despite its importance in digital circuitry, the trigger itself is an analog component and is sometimes omitted in digital circuit simulation libraries.

Due to open-loop nature of the circuit, the gain of Schmitt trigger is infinity. Impedance values follow normal op-amp characteristics.

The regenerative feedback refers to the portion coming out of the voltage divider and into the non-inverting input. It’s denoted with beta symbol and defined as follow:

B = R1 / (R1 + R2)

The switching thresholds are calculated as the regenerative feedback times the positive or negative supply rail voltage Vs as seen below

V_\mathrm{+} = \frac{R_1}{R_1+R_2} \cdot V_\mathrm{s}

Please note that despite the formula, in reality, the Vs value in this calculation experiences some voltage drops (around 15%) due to internal impedance; hence the switching thresholds might be lower than calculated.

Astable multivibrator (Relaxation oscillator)

With a few extra components (a capacitor and a resistor), a Schmitt trigger can be adapted into an astable multivibrator. From inverting Schmitt trigger, add an additional negative feedback using a resistor, a capacitor and ground to create the astable multivibrator.

Astable multivibrator adapted from inverting Schmitt trigger circuit

The multivibrator does not take in any input signal. When powered up, it creates a full-range square waveform across the op-amp’s output and a half-range waveform across the non-inverting input (some documents denote this waveform as reference voltage). At the same time, it creates a half-range ramp waveform across the capacitor.

Transient analysis of a comparator-based relaxation oscillator.

The time period of the multivibrator is given by

T = 2 RC ln[(1+B)/(1-B)]

with B is the regenerative feedback, R and C are the value of the resistor and the value of the capacitor across the negative feedback respectively.

The amplitudes of half-range voltages are calculated using the same formula as the switching thresholds of normal Schmitt triggers.

When using an asymmetric bipolar supply, the switching thresholds of the multivibrator will be skewed and it will produce waveform of adjustable duty cycles. The duty cycle is dependent on the offset; left offset produces shorter duty cycle and right offset produces longer duty cycle. However, the device can only accept so much power supply offsetting before it cannot operate (under load) or overloaded.

Read more

https://en.wikipedia.org/wiki/Schmitt_trigger

https://en.wikipedia.org/wiki/Switch#Contact_bounce

https://en.wikipedia.org/wiki/Relaxation_oscillator

https://en.wikipedia.org/wiki/Multivibrator

https://www.allaboutcircuits.com/textbook/semiconductors/chpt-8/positive-feedback/

 

Memo: Op-amp’s gain factor and noise problems

First, here’s a quick cheatsheet on closed-loop gain factor for inverting and non-inverting amplifiers. The gain of inverting amplifier is given by the resistance R2 across the feedback loop divided by the resistance R1 across the forward input.

A = R2/R1

Meanwhile, the gain of non-inverting amplifier is given by

A = 1 + R2/R1

as calculated in the previous note. Kirchhoff’s current law is applied.

Gain factor and cut-off frequency relationship

Cut-off frequency is not only affected by the properties of a given component but it is also dependent on the gain factor of the amplifier circuit. Higher gain amplifiers have lower cut-off frequencies and this can be charted as an exponential decay function.

To easier express this function in linear terms, the relationship is converted to logarithmic terms:

20 log(0.5) = -6.02 [dB]

with 0.5 is the approximated V/Vref value from experimentation.

On a side note, below are two commonly seen decibel functions in electronics for power and voltage respectively.

{\displaystyle G_{\mathrm {dB} }=10\log _{10}\left({\frac {1000~\mathrm {W} }{1~\mathrm {W} }}\right)=30.}

{\displaystyle G_{\mathrm {dB} }=20\log _{10}\left({\frac {31.62~\mathrm {V} }{1~\mathrm {V} }}\right)=30.}

Naturally, the gain factor for op-amps is expressed in terms of voltages (the second formula).

Differential amplifier

A useful circuit using op-amps to amplify and de-noise a weak signal is differential amplifier. The basic circuit uses one op-amp in the arrangement below:

V1 and V2 inputs are the same signal, one of which is inverted. This can be done using an inverting amplifier with gain factor of 1 (inverting unity gain amplifier) but this arrangement is subjected to high-frequency quirks as stated in the previous memo, especially phase shifting property.

If the inputs are identical and not phase-inverted, the output will be zero.

The output of this particular circuit is an amplified signal with transmission line noise suppressed. Note that the transmission line noise being suppressed is the one common on both inputs after the inversion. Noises occurred before inversion cannot be suppressed this way.

Instrumentation amplifier (three op-amps)

Normally, to ensure proper signal flow, the inputs are tunneled through two additional voltage followers (two more op-amps) in order to reduce the impedance. The full circuit (called “instrumentation amplifier) would then look like the following:

with all R values are the same except for Rgain.

Rgain can be of any value. It serves as a “common ground” connector and it also tweaks the voltage gain of the full circuit. Increasing the value of Rgain decreases the gain of the differential amplifier.

In reality, the gain of the above circuit can be tweaked further, following this function

{\frac {V_{\mathrm {out} }}{V_{2}-V_{1}}}=\left(1+{2R_{1} \over R_{\mathrm {gain} }}\right){R_{3} \over R_{2}}

Instrumentation amplifier (two op-amps)

An alternative instrumentation amplifier design using two op-amps can be seen below:

Though this setup saves on component costs, it does have a few disadvantages, notably, the lack of support for unity gain (not a problem for most scenarios but can be if the instrumentation amplifier is used solely for noise canceling).

Furthermore, the circuit is unbalanced. The leftmost amplifier increases the input slightly and introduces some signal delay. This unbalance leads to reduced noise canceling capability. The output can saturate if the common-mode noise of the input signal here is too high and race condition can lead to a much lower cut-off frequency (compared to three op-amps version).

The gain factor here is controlled by RG in the same manner as Rgain in the other circuit.

G = 1 + R2/R1 + (2*R2)/RG

Bonus: Choosing the base resistance

When calculating the resistance of an analog system, the first resistor (base resistor) is chosen as a compromise between power consumption and noise tolerance. Low resistance (or impedance for AC systems) allows more current draw. This is welcome when loads are concerned but it is a waste of energy when sensors are concerned. The higher the base resistance, the lower the power consumption will be.

On the other hand, high resistance circuits are more susceptible to noise. The relationship between resistance and noise is given by Johnson-Nyquist noise voltage function

{\overline {v_{n}^{2}}}=4k_{\text{B}}TR

where kB is Boltzmann constant 1.38 x 10^-23 [J/K], T is the absolute temperature in Kelvin [K], and R is the system’s resistance. In other words, a small increase in resistance increases in Johnson noise voltage by the power of two.

TL;DR:

Increase R, increase noise, decrease current consumption

Decrease R, decrease noise, increase current consumption

Choose the right compromise for the application.

Bonus: Using op-amp with a unipolar power source

Unipolar or single-rail power sources that only have GND and VCC terminals need to offset the ground terminal to create a -VCC source. This offset can be done using a voltage divider circuit in conjunction with a voltage follower. Be mindful that the with only half of the voltage range, the op-amp might experience unexpected floating values.

The voltage follower (or unity gain amplifier) must be connected in series to the middle point of the voltage divider in order to create a new, offset virtual ground. This eliminates the added impedance from the voltage divider, ensuring sufficient current draw power devices using the virtual ground.

For example, such a system of voltage divider and voltage follower can be employed to create +2.5V and -2.5V bi-polar supply from Arduino’s 5V and 0V unipolar supply. In this case, the op-amp will produce 5V (relative to the Arduino’s true ground) as HIGH signal and 0V as LOW signal. Inversely, it will see 0V from the Arduino as -2.5V (relative to the virtual ground) and 5V as +2.5V.

The previous section on choosing base resistance also applies here, and even more so with the halved voltage range doubling susceptibility to signal distortion.

Read more

https://en.wikipedia.org/wiki/Exponential_decay

https://en.wikipedia.org/wiki/Decibel#Examples

http://www.electronics-tutorials.ws/opamp/opamp_5.html

https://en.wikipedia.org/wiki/Instrumentation_amplifier

http://www.electronicdesign.com/power/what-s-difference-between-operational-amplifiers-and-instrumentation-amplifiers

https://en.wikipedia.org/wiki/Johnson%E2%80%93Nyquist_noise

http://www.talkingelectronics.com/projects/OP-AMP/OP-AMP-1.html

Memo: Op-amp’s analog characteristics

Operational amplifier (op-amp) possesses an open-loop gain factor A0 and a close-circuit gain factor A.

The negative terminal of the op-amp is called “inverting” terminal and the positive terminal is called “non-inverting”. In addition to two input terminals, there are two power terminal V+vcc and V-vcc.

The output Vout is calculated as

Vout = A * (V+in – V-in).

Ideal op-amp has the following characteristics:

Input impedance rin approaches infinity.

Meanwhile, output rout impedance approaches zero.

Unity gain amplifier

These characteristics see applications in voltage follower (also known as unity gain amplifier), which produces an output voltage equal to input voltage but with much lower impedance. Low impedance circuits allows more current draw than high impedance ones.

Voltage follower setup: a simple negative feedback loop without any resistance

This unity gain is possible because the gain factor used here is open loop

Vout / Vin = A/ (1+A0)

as Aapproaches infinity

Vout / Vin = 1

Gain of closed-loop amplifiers

In other cases, the gain is determined by the values of the voltage divider overlaying the feedback loop. For example

A non-inverting amplifier: negative feedback with voltage divider setup

In this case, the gain is determined using Kirchhoff’s law. Since Kirchhoff’s current law states that the same current must leave a node as enter it, and since the impedance into the (−) pin is near infinity, we can assume practically all of the same current i flows through Rf, creating an output voltage

{\displaystyle V_{\text{out}}=V_{\text{in}}+i\times R_{f}=V_{\text{in}}+\left({\frac {V_{\text{in}}}{R_{g}}}\times R_{f}\right)=V_{\text{in}}+{\frac {V_{\text{in}}\times R_{f}}{R_{g}}}=V_{\text{in}}\left(1+{\frac {R_{f}}{R_{g}}}\right).}

Finally, we have the following closed-loop gain (applicable only to the above circuit)

{\displaystyle A_{\text{CL}}={\frac {V_{\text{out}}}{V_{\text{in}}}}=1+{\frac {R_{f}}{R_{g}}}.}

High frequency characteristics

The gains and formulas above are only applicable for low frequency circuits. In high frequencies, the following will happen:

Above certain frequencies, voltage gain and current gain factors become diminished in inverse proportion to frequency increase.

The output signal becomes lagged behind the input signal (phase shifting) as the op-amp cannot react fast enough to the frequency changes.

Very high input amplitude (peak-to-peak voltage swing of electrical signal) causes distortions and the higher the frequency, the lower this upper amplitude threshold is (distortion appears at lower amplitudes at high frequencies).

Cut-off frequency is the frequency at which the voltage gain is 1/sqrt(2) of the low frequency gain, meaning, the power at the output is effectively halved in voltage follower setup. The cut-off frequency is unique to each op-amp component. It can be easier determined using an oscilloscope as the frequency at which the phase shift is 180o.

Textbook definition:

The frequency where the voltage falls to 0.707 of its intended value is the cutoff or -3 dB frequency, fc. (Gain in decibels = 20∙log(0.707) = -3dB.)

As a result of these special high frequency characteristics, op-amps can be unsuitable for high frequency applications.

Read more

https://en.wikipedia.org/wiki/Operational_amplifier

http://www.learningaboutelectronics.com/Articles/Voltage-follower

http://www.ecircuitcenter.com/Circuits/op_bandwidth1/op_bandwidth1.htm

https://www.researchgate.net/post/Please_tell_me_Why_the_cutoff_frequency_is_taken_for_3dB_and_not_other_values_like_1_or_2_db