Electronics notes/Amplifier notes
The below is about electronic components that give (at least a little) more usable power than they get.
For amplifiers as in "the complex box that makes your audio go", see Electronics project notes/Audio notes - amps and speakers
Current amplifiers
Typically transistors, or constructions based largely on them.
Op amps (and differential amplifiers)
Side note: While most op amps are voltage amplifiers, there are some variants that are sensitive to current.
See http://en.wikipedia.org/wiki/Current-feedback_operational_amplifier
General properties and behaviour
- Differential in that they amplify the difference between the voltage at the two inputs (+ and -)
- Voltage amplifiers in that they amplify the difference between the voltages presented between their inputs (whereas e.g. transistors are current amplifiers)
Operational amplifiers are differential amplifiers of a more specific design. Opamps:
- have (very) high input impedance,
- have low output impedance, and
- have a (very) high gain (often on the order of 1000 to 1000000(verify))
- ...open loop gain, that is. In almost all uses you tame that gain (by not using it as an open loop)
- starting with a high gain, and being able to control it well, just gives you more options.
Most of the below is specifically about op amps.
Op amps are built mainly from transistors and resistors, and capacitors, and you could build your own from discrete components if you really wanted to - for education's sake you can take a look at the 741SE, which also demonstrates how op amps are smaller and cheaper. They also perform better due to easier control.
Behaviour tl;dr
- Tries to keep two two inputs at same voltage
- No current flows in/out of the input pins, so #1 happens via changing the output
...which only works when there is feedback: some sort of circuit back into the inputs.
Exactly how that connection back to the input works determines the actual behaviour.
These, plus some other basic electronics laws, and thinking about it for an hour,
should help intuit what a good deal of op amp circuits do (though detailed analysis sometimes comes down to specific op amp component specs).
See e.g. EEVblog #600 - OpAmps Tutorial - What is an Operational Amplifier? on a rundown of common functions and some details how.
The - input is called the inverting input, the + input is called the non-inverting input, which mostly refers to what they are often effectively used for (not to polarity, or direct implications on how they must be connected).
The top and bottom wires, often labeled VS+ and VS-, are the power supply.
When omitted they are implied to be attached to something obvious, like the circuit's voltage and ground, or to a present bipolar power supply. See also #Supply voltage
It can be useful to know that...
- high gain usually means somewhere in the 10,000 ... 1,000,000+ range
- and means that if not controlled, the output will just saturate one way or the other (depending on the inputs), which usually amounts like an input-comparing on-off switch.
- ...so most applications reduce the gain.
- input impedance is high
- ...meaning inputs draw nearly no current, often no more than a few dozen nanoamps. For most uses and calculations (but not all) this is effectively negligible, and means opamps won't noticeably alter circuits/signals they measure. Which makes them useful as buffers.
- output impedance is low
- ...because its output comes from a final amplification stage. They can give you a few milliamps. To drive anything more you'll probably want to control a transistor.
- this is also an important part of their feedback behaviour; it means they are fairly good at achieving a given voltage
Feedback means the output at some point goes back into the input.
Without feedback it's basically a comparator (meaning the output saturates at one of the possible extremes, dependin on which input has higher voltage), due to the high gain making the transition area so small.
With feedback things can get more complex. Often it can help to consider that an op amp will try its best to make the difference between the inputs zero (via the feedback), so design change how it will change the output to minimize the difference between the input terminals. Op amp's high gain and low output impedance help with that.
Some uses
Op amps have a few few dozen basic setups/uses, and tons of variations.
Some of the more basic constructions follow.
Biasing an op amp
Comparator
The one exception in the rules in the whole set of configurations. This is the open-loop configuration of an op amp, and because there is no feedback between output and intput, the very high gain dictates that this is now a comparator.
Behaviour:
- output = input difference times the open-loop gain.
- As the open-loop gain is gain is on the order of a million), it'll saturate to either output. Effectively:
- Vout = VS+ while the + input (V2) is larger than - (V1)
- Vout = VS- while the - input (V1) is larger than + (V2)
- In other words, it acts as a comparison between two two voltages, the output basically saying which one is higher.
Notes:
- Useful e.g. for switching based on comparison to a voltage references.
- There are also ICs that are specifically comparators, but with slightly different behaviour
- If the inputs difference is maybe less than a microvolt you may not see it not saturated to one of the rails, but this is unlikely to ever happen unintentionally, and not something you'd design for
- When you want to avoid possible high-speed output changes if the inputs are near each other, you may want a Schottky trigger instead.
Voltage follower / buffer
Vin to +, output also loops back to -.
Behaviour:
Vout = Vin
(You can the other port (Vin to -, output loops back to +), but that would would invert the signal, which in most uses you wouldn't want.)
From the rules above: the output drives whatever it needs to - to make it equal to +, so will make all three equal.
Since the output is the same voltage as the input, this is primarily useful as a buffer, e.g. when you want to not disturb what's on the input (inputs are high impedance), and possibly want to drive a few milliamps.
So e.g. useful between a sensor (that would be affected by drawing current) and a component that cannot itself guarantee negligible load (e.g. some ADCs)
Basic variants of amplifiers
Non-inverting amplifier
The resistors are used primarily to reduce the op amp's native huge gain to something much lower.
A single-ended amplifier, in that the - is referenced to ground, so only + is relevant (+ is the same as the difference between it and ground). You can feed AC and negative DC in, the gain just applies relative to ground.
Behaviour:
Vout = Vin * (1 + R2/R1)
(The 1 comes from (R1 + R2)/R1 simplifying to 1+R2/R1)
Inverting amplifier
Behaviour:
Vout = -(R2/R1) * Vin
Note that due to the inputs-are-the-same rule, the bottom reference in the image, e.g. ground, will be the same voltage as what will be made present on the -.
This seems confusing at first, because that means there would be no differential, and no signal to be amplified. That's mainly because you're thinking of the feedback as going through the op amp's output, but remember it can both sink and source voltage -- it's actually being sunk through V-, which is also why its effect is inverting.
Note that when used in a single-sided power supply, you would put half your voltage on the op-amp + side (e.g. a voltage divider between V+ and Gnd), which will offset both the input and output by that amount -- because by our rule above, the op amp will try to make the - side (still called virtual ground now) this voltage too.
Note: the point in the circuit at - is called virtual ground because it will measure as 0V (well, whatever's on +), but not actually tied there directly.
Why use inverting versus non-inverting
Differential amplifier
(Not to be confused with a differentiator).
Instrumentation amplifier
Most broadly, an instrumentation amplifier (sometimes in-amp) seems to describe properties we prefer for test equipment, like
- high input impedance (won't affect what it's measuring),
- a strong preference to avoiding he need for impedance matching.
...and further preferences like
- using a differential amplifier
- high common mode rejection (DC and AC)
- low DC offset
- low drift
- low noise
There is more than one way to get those properties, but usually it's built with op amps.
The typical way to do so uses three opamps: two opamps for input buffering, and one as a differential amplifier. There is also a two-opamp design, which has some different restrictions[1]
While you can build one yourself from op amps and some resistors, it often makes more sense to get an in-amp IC, because it'll typically to have better specs (e.g. CMRR, possible protections, and such).
You can construct one so that you can control the gain of both input buffers via a single resistor - which can be particularly handy if you use a (precision) trim potmeter. The IC variant will have two pins to connect this resistor/potmeter.
http://www.allaboutcircuits.com/vol_3/chpt_8/10.html
http://en.wikipedia.org/wiki/Instrumentation_amplifier
Isolation amplifier
Current to voltage amplifier
http://en.wikipedia.org/wiki/Current-to-voltage_converter
Voltage to current amplifier
Summing amplifier
Precision rectifier
Zero level detector
Schmitt trigger
Negative impedance converter
Relaxation oscillator
Wien bridge oscillator
Inverting integrator
Inverting differentiator
Design and behaviour details
On temperature
On capacitors
Some more notes...
Terminating op amps
If you use a dual or quad op amp, and don't use all of its units, you should terminate the rest so that it won't do parasitic nonsense.
On choosing amps
Op amps are non-trivial circuits and can be optimized for many different specific things. There are literally thousands of op different amps in production. Design choices mean tradeoffs, so while looking around it is useful to prioritize what is most important to your application.
For almost any application, only a few specs are important, while the rest just have to be vaguely good enough. Amps that are good at more than you need tend to be pricier than necessary for that application.
There may also be special-purpose amps -- things that are differential/operational amps in nature, but have a design that makes them usefuly (only) to a specific task. Consider for example current sense amplifiers.
Some amps are generic in that if you have no tight restrictions on noise, voltage, power, bandwidth or such, you can use cheap generic amps.
However, often enough you do have some restrictions. For example:
- High frequency applications
- will require enough bandwidth (and possibly slew rate)
- Audio applications
- you probably don't care much about slew
- no real bandwidth requirements
- may care about Input offset, sometimes drift
- Sensor amplification
- often require low noise
- often require low offset
- often require low drift (minimal temperature influence)
- may not care about power use
- Battery powered applications
- wish for require a low operating voltage
- require single supply operation (sometimes preferably rail-to-rail)
- prefer low power
- often have no direct care much about slew
http://www.adafruit.com/blog/2006/02/28/specifying-an-op-amp/
In some cases, two amps in a row can do better than a single fancy amp.
You can't escape noise specs, but you can e.g. spread gain bandwidth(verify).
Basic notes on gain and feedback
Open-loop means no feedback circuitry. Since the gain is so high (usually something in the range 10000..1000000), this is only useful as a comparator, not to get an amplified form of a voltage signal.
For this reason, pretty much all other op amp circuits are closed-loop applications, which uses negative feedback, a.k.a. degenerative feedback.
The op amp's output opposes its own input, and it will try to minimize the difference between input terminals (Horowitz & Hill voltage rule).
This reduces the effective gain of the amplifier, and it makes it easy to control gain with a few components external to the amp.
This behaviour can seem a little magical at first
Positive feedback also exists, but is probably only useful for controlled oscillation. (verify)
Specs that can matter
Ideally, the output of an op amp is independent of voltage ripples it gets on its power supply.
They try to do well. The PSRR (power supply rejection ration) gives the degree to which changes in its supply voltage make it into the output, in decibel, usually something like 100dB, up to 120 or 130dB in good amps, while figures like 80, 70, or 60dB aren't so good.
You can improve somewhat it by adding decoupling capacitors on the amp's voltage supply. A 100nF (0.1uF) cap covers most applications, lower is possible depending on application (primarily speed).
Current drawn
The two most interesting figures here are the quiescent current and the output current.
The output current is what the final amp can drive at its output.
This can be a figure like 20mA, 50mA, 150mA for some.
Supply current(verify) (Is, Icc) and quiescent current (Iq) refer to the current required to operate the amp with no signal applied.
Quiescent current is the current drawn when no signal is applied, which in general means 'it won't draw less than this when you're not using it'.
- This may be a figure like 5mA to 10mA in general amps, which matters when you want to minimize power use.
- Low-power means something like 1mA or less, like 300uA or even 60uA(verify).
- Low power is preferred in battery powered applications (in mains-powered applications, amps are often minor in terms of power draw).
Low-power op amps are usually slow - relatively or very (low bandwidth, low )
They are also often noisier, partly because the circuit would probably use higher-value feedback resistors to keep current low.
In some situations, you can save power by disabling an op amp while you're not using it.
Signal voltage stuff
Supply voltage
Op amps have two power connections, the positive and negative supply, often marked V+ and V-.
Split supply setups refer to using two (non-ground) voltage rails,
often from a bipolar power supply, to for example putting +12V on V+ and -12V on V- (or whatever other voltage you use).
The alternative is single supply - usually VCC (on V+) and Gnd (on V-).
- Many amps can be used in both split supply and single supply setups, but check the data sheet to be sure.
- An amp's specs will mention supply voltage restrictions, for example "±1.5V to ±16V, or +3V to +32V", meaning that in split supply, V+ must be with in 1.5V..16V and V- must be within -1.6V and -16V, while in single supply, V+ must be within 3V and 32V.
- these details can particularly matter on battery-powered things (wall powered setups are less constrained, though split supply will require at least one (extra) regulator).
Rail-to-rail amps (see also mention of "wide voltage range") can output voltages within a few hundred millivolts near the power supply (V+ and V-) voltages (sometimes closer).
Amps that aren't rail to rail stop at a noticeable margin - for example, the LM324 can go almost to ground, but stops ~1.5V short of VCC.
Rail to rail amps may be preferable in single side applications, particularly in low-voltage circuits.
To avoid getting near the limits of the voltage range, In single supply applications you would often put (particularly AC) signals on top of a basic (often resistor-divided) voltage, probably a voltage about halfway between V+ and V-.
In single supply applications you would often put a signal (particularly AC signals) on top of a basic voltage that's probably about halfway towards V+ and V-, largely because you don't want the signal to be near either of the rails (V+ or V-) as no amp is purely rail to rail, and you'ld get strange nonlinearities.
This is less of a worry in split supply applications since the signal is almost necessarily near neither of the rails.
In single supply amps you'll often have to bias the signal to add some voltage - for example, in a 0..5V application, you might put your signal on a resistor-divided ~2.5V.
Operating supply voltage is the difference between the supply terminals
- for single supply the minimum potential at V+.
- For split supply: V+-V-(verify))
Amps that can be used both ways, the range is often the same - for example, LM324 has a 3V to 32V span and single supply limits, which in split supply means ±1.5 to ±16.
Amps may have a minimum supply voltage: When supply voltage is below a certain point, amps may clip their output (...at a lower voltage than its usual saturation level), distort, or drop out completely. (verify)
Stability
Precision
Input offset voltage
Drift, temperature effects
Input bias current
Phase inversion
Phase inversion refers to an issue where if one of the inputs goes below the negative rail's level, the output goes to V+.
You can consider this a design flaw that happens in certain amps amps.
In some cases it is easily avoidable,
or patched well enough with a diode,
but if left to happen will put a nasty pulse-like thing over your output.
Speed
Bandwidth
Slew rate
Noise
Common mode gain/rejection
Unipolar/bipolar
"Programmable"
Miller effect
See also
Unsorted:
- http://webpages.ursinus.edu/lriley/ref/circuits/node5.html
- http://video.answers.com/op-amp-design-basics-non-inverting-amplifier-101089616
- http://en.wikipedia.org/wiki/Operational_amplifier_applications
- http://www.bcae1.com/opamp.htm
- http://www.play-hookey.com/analog/experiments/basic_op_amp_inverter.html
- http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/opampvar2.html
- http://www.google.com/search?q=A+Single-Supply+Op-Amp+Circuit+Collection
- http://www.google.com/search?q=Demystifying+single+supply+op+amp+design
Operational Transconductance Amplifiers (OTA)
Operational Transconductance Amplifiers are voltage-controlled current sources.
They are op amp's little brother, in that they also have a high impedance differential input, but their output is current rather than voltage.
They can also be seen as a variant on a transistor, but with differential input.
Most OTAs also allow tweaking on the gain via a pin.
OTA ICs tend to also have a (completely separate) output buffer amplifier, because in many applications you'll want one.
In practice, standard op amps are often more directly applicable, but in a few cases OTAs are preferred.
Example uses include tunable oscillators, tunable filters, tunable amplifiers, and voltage-controlled resistors. For some uses, not all OTAs are precise enough, and the better ones were such a niche element (e.g. useful in synthesizers) that they are now out of production.
You can build OTAs from discrete elements, but it requires more space, and some component matching.
Notes:
- While you can use feedback on them, OTAs are regularly used open-loop.