Handy Tips - OP Amps

What happens if the voltage source you want to sample is over 5V? Or
you want to produce an analogue output between 0 and 24V? The answer
is use an op-amp.
A popular op-amp is the
LM324, it has 4 amps on board, and only requires 1 power supply
(most need 2 - a positive and a negative).
One thing to look out for is that an op-amp with a 5V power supply
wont
actually be able to swing to 5V, it will get to just over 4. If you
want to have a voltage output swing of 0-5V, use a power supply 6V+,
or a 0-12V swing, use a 13V+ power supply, any range up to 32V is
possible.
Non-inverting amplifiers allow the output to be
greater
than the input by the value of
gain.
The values of the resistance are anything
between 100K and 900K, if on
ISIS,
1M resistors are used, it will assume its an
open circuit,
and the op-amp will not work
correctly.. although this wont happen in real life.
Inverting amplifiers are used to sample negative voltages (or
positive), and reverse the polarity while increasing / decreasing
the output voltage depending on the
gain. The gain can be
calculated in the following examples:
|
For
an ideal op-amp, the non-inverting amplifier
gain (Vout / Vin) is given by

|

|
|
For
an ideal op-amp, the inverting amplifier gain (Vout /
Vin) is given simply by

For
equal resistors, it has a gain of -1, and is used in
digital circuits as an
inverting buffer.
|

|
Buffer
Amplifier (
Video SIM of a Buffer Amp )

Op-amps have
a huge input impedance, and this
feature is great to use to sample circuits with practically no
additional load placed on it. A buffer amp is a great tool to use
for applications like this.

 | Site Tutorial Index |
|  | 16F PIC Examples |
|  | 18F PIC Examples |
|  | Handy Tips |
| |  | High Power Switching |
| |  | Serial Comms |