Maker Pro
Maker Pro

Offset calibration of Op-amp - is that really ok?

  • Thread starter Klaus Kragelund
  • Start date
K

Klaus Kragelund

Jan 1, 1970
0
Hi

I have an application in which I need to amplify a signal say 100times.
The opamp is a LM324 with ~5mV offset voltage. If I do nothing the
output might be 500mV off target

I plan to calibrate the op-amp continously by using a switch to set the
input to 0mV (instead of the signal) and then sample the resulting
voltage with the microcontroller to store a calibration number.

That might be fine a that cures any drift the Vos has over time and
temperature.

But what about non-linearities of the offset versus the input signal
range? Will the Vos be the same for say a 0V input and a 5V input?

Thanks

Klaus
 
F

Fred Bartoli

Jan 1, 1970
0
Klaus Kragelund said:
Hi

I have an application in which I need to amplify a signal say 100times.
The opamp is a LM324 with ~5mV offset voltage. If I do nothing the
output might be 500mV off target

I plan to calibrate the op-amp continously by using a switch to set the
input to 0mV (instead of the signal) and then sample the resulting
voltage with the microcontroller to store a calibration number.

That might be fine a that cures any drift the Vos has over time and
temperature.

But what about non-linearities of the offset versus the input signal
range? Will the Vos be the same for say a 0V input and a 5V input?

Check CMRR, or use an inverter stage if you can.
 
R

Robert Baer

Jan 1, 1970
0
Fred said:
Check CMRR, or use an inverter stage if you can.
....and there are a number of op-amps that have VOS in the tens of
microvolts region, not to mention chopper stabilized op-amps.
 
Klaus said:
Hi

I have an application in which I need to amplify a signal say 100times.
The opamp is a LM324 with ~5mV offset voltage. If I do nothing the
output might be 500mV off target

I plan to calibrate the op-amp continously by using a switch to set the
input to 0mV (instead of the signal) and then sample the resulting
voltage with the microcontroller to store a calibration number.

That might be fine a that cures any drift the Vos has over time and
temperature.

But what about non-linearities of the offset versus the input signal
range? Will the Vos be the same for say a 0V input and a 5V input?

The sensitivity of Vos to the common mode voltage can be deduced from
the common mode rejection ratio (CMRR) which is listed on page 3 of the
LM324 data sheet as 85dB typical, 65dB worst case. For a 5V common mode
shift, this is 160uV typical, 2.8mV worst case.

On psge 7 of the data sheet, there is a plot of typical common mode
rejection ratio versus frequency, where you can see that it starts
getting worse at frequencies above 10kHz.

There are amplifiers around offering better common moder rejection
ratios - the Linear Technology LT1014 which was intended to be an
upgrade from the LM324, has a CMRR of 97dB (worst case) and 114dB
typical, which pushes your worst case common mode shift down to 70uV.

Linear Technology also offer a range of auto-zeroing "zsero drift"
amplifiers, which include your auto-zeroing scheme. Analog Devices
offer similar parts.
 
M

Mike Harrison

Jan 1, 1970
0
Hi

I have an application in which I need to amplify a signal say 100times.
The opamp is a LM324 with ~5mV offset voltage. If I do nothing the
output might be 500mV off target

I plan to calibrate the op-amp continously by using a switch to set the
input to 0mV (instead of the signal) and then sample the resulting
voltage with the microcontroller to store a calibration number.

That might be fine a that cures any drift the Vos has over time and
temperature.

But what about non-linearities of the offset versus the input signal
range? Will the Vos be the same for say a 0V input and a 5V input?

Thanks

Klaus

Why not just use a better op-amp?
 
T

Tony Williams

Jan 1, 1970
0
[snip]
But what about non-linearities of the offset versus the input
signal range? Will the Vos be the same for say a 0V input and a
5V input?

But the gain is 100. So MaxVin cannot exceed MaxVout/100,
which limits Vin to 100mV or so.

BTW: If you are on a single rail supply Auto-zero can be
done, but requires two ADC readings of two artificial
offsets with a known ratio. Then a few sums in the uP.
 
S

Spehro Pefhany

Jan 1, 1970
0
Hi

I have an application in which I need to amplify a signal say 100times.
The opamp is a LM324 with ~5mV offset voltage. If I do nothing the
output might be 500mV off target

I plan to calibrate the op-amp continously by using a switch to set the
input to 0mV (instead of the signal) and then sample the resulting
voltage with the microcontroller to store a calibration number.

That might be fine a that cures any drift the Vos has over time and
temperature.

But what about non-linearities of the offset versus the input signal
range? Will the Vos be the same for say a 0V input and a 5V input?

Thanks

Klaus

I don't think the LM324 is too bad in that department, assuming the
power supply is something like 10V. Some of the "better" R-R input
op-amps have a horrible shift of several hundred uV in the Vos as you
transition from one input stage to the other. Bill S says 160uV
typical from the specs for a 5V change, but what configuration do you
have that would change the CM voltage by anything like 5V? Full scale
is going to be less than 10mV, right? Watch effects due to the
resistance of your switches and the relatively hefty Ib of the LM324.


Best regards,
Spehro Pefhany
 
K

Klaus Kragelund

Jan 1, 1970
0
Mike Harrison skrev:
Why not just use a better op-amp?

Well because of the costs. The application is up to 200-300k/year - so
every last nickle counts

Thanks

Klaus
 
K

Klaus Kragelund

Jan 1, 1970
0
[email protected] skrev:
The sensitivity of Vos to the common mode voltage can be deduced from
the common mode rejection ratio (CMRR) which is listed on page 3 of the
LM324 data sheet as 85dB typical, 65dB worst case. For a 5V common mode
shift, this is 160uV typical, 2.8mV worst case.

On psge 7 of the data sheet, there is a plot of typical common mode
rejection ratio versus frequency, where you can see that it starts
getting worse at frequencies above 10kHz.

There are amplifiers around offering better common moder rejection
ratios - the Linear Technology LT1014 which was intended to be an
upgrade from the LM324, has a CMRR of 97dB (worst case) and 114dB
typical, which pushes your worst case common mode shift down to 70uV.

Linear Technology also offer a range of auto-zeroing "zsero drift"
amplifiers, which include your auto-zeroing scheme. Analog Devices
offer similar parts.

Great - thanks, but I can't spend much more on the part so the LT1014
is out of the question. Good point about the CMRR though

Thanks

Klaus
 
K

Klaus Kragelund

Jan 1, 1970
0
Tony Williams skrev:
[snip]
But what about non-linearities of the offset versus the input
signal range? Will the Vos be the same for say a 0V input and a
5V input?

But the gain is 100. So MaxVin cannot exceed MaxVout/100,
which limits Vin to 100mV or so.

BTW: If you are on a single rail supply Auto-zero can be
done, but requires two ADC readings of two artificial
offsets with a known ratio. Then a few sums in the uP.
I am on a single rail. Can you elaborate on that - why not just one
reading when as you say the CMRR isn't important for high gains due to
the limited input range?


Thanks

Klaus
 
J

Jim Thompson

Jan 1, 1970
0
Hi

I have an application in which I need to amplify a signal say 100times.
The opamp is a LM324 with ~5mV offset voltage. If I do nothing the
output might be 500mV off target

I plan to calibrate the op-amp continously by using a switch to set the
input to 0mV (instead of the signal) and then sample the resulting
voltage with the microcontroller to store a calibration number.

That might be fine a that cures any drift the Vos has over time and
temperature.

But what about non-linearities of the offset versus the input signal
range? Will the Vos be the same for say a 0V input and a 5V input?

Thanks

Klaus

Signal Frequency?

If DC or in a limited time frame, just store VOS in a capacitor...
chopper-style.

I built a uV meter that way 25 years ago to find shorts on PCB's by
measuring trace drops.

...Jim Thompson
 
T

Tony Williams

Jan 1, 1970
0
BTW: If you are on a single rail supply Auto-zero can be
done, but requires two ADC readings of two artificial
offsets with a known ratio. Then a few sums in the uP.
[/QUOTE]
I am on a single rail. Can you elaborate on that - why not just
one reading when as you say the CMRR isn't important for high
gains due to the limited input range?

Amplifier Vout = G(Vin + Vos). A single rail amplifier
cannot deliver a negative Vout. If Vos is negative then
the amplifier will fail to give the correct output for
all values of Vin less than Vos. This applies to signal
readings as well as trying to auto-zero to a 0V reference.
The 324 max Vos is +/- 7mV, so it cannot be guaranteed to
work for Vin less than 7mV.

I realise now (with that gain of x100) that you probably
do need to operate correctly for Vin less than 7mV, and
the two-stage Vos correction is not appropriate.

Time for Plan B.... which involves putting a small voltage
in series with Vin, slightly larger than +7mV.
_
|- \
Sw1 C + |Op >-->ADC
Vin----+----+----+---+/+--+--||----+----|+_/
| | | | 1uF? |
\ _|_ _|_ + +
/ /_\ \_/ Sw2/ Sw3/
\ | | + +
| | | | |
0v----+----+----+--------+--/\/\--+---/\/\--+2.5V
10R /|\ 3k
|
8mV approx.

To Auto-zero. Open Sw1, Close Sw2 and Sw3.
Wait 50uS (or so), for C to stabilise.
Read ADC, store effective (Vos+8mV).

To read Vin. Open Sw2 and Sw3, Close Sw1.
Read ADC.
Subtract effective (Vos+8mV).

Note the relatively high value of C. The LM324 has
a maximum input bias current of 250nA, which causes
the voltage on C to drift upwards slightly when
measuring Vin. 1uF is a drift of 250uV/mS, so the
ADC must be read as quickly as possible.
 
W

Winfield Hill

Jan 1, 1970
0
Klaus Kragelund wrote...
Well because of the costs. The application is up to 200-300k/year
- so every last nickle counts

If there's a uP involved, how about switching to ground, measure
the offset and stores its value.
 
K

Klaus Kragelund

Jan 1, 1970
0
Winfield Hill skrev:
Klaus Kragelund wrote...

If there's a uP involved, how about switching to ground, measure
the offset and stores its value.

Well, that was the thing I was talking about in the original post -
calibration....

Regards

Klaus
 
F

Fred Bloggs

Jan 1, 1970
0
Klaus said:
Winfield Hill skrev:




Well, that was the thing I was talking about in the original post -
calibration....

Regards

Klaus

Have you compared the price of one good OA to the cheap OA + all the
accessory circuits required for this otherwise unnecessary calibration?
 
K

Klaus Kragelund

Jan 1, 1970
0
Tony Williams skrev:
I am on a single rail. Can you elaborate on that - why not just
one reading when as you say the CMRR isn't important for high
gains due to the limited input range?

Amplifier Vout = G(Vin + Vos). A single rail amplifier
cannot deliver a negative Vout. If Vos is negative then
the amplifier will fail to give the correct output for
all values of Vin less than Vos. This applies to signal
readings as well as trying to auto-zero to a 0V reference.
The 324 max Vos is +/- 7mV, so it cannot be guaranteed to
work for Vin less than 7mV.

I realise now (with that gain of x100) that you probably
do need to operate correctly for Vin less than 7mV, and
the two-stage Vos correction is not appropriate.

Time for Plan B.... which involves putting a small voltage
in series with Vin, slightly larger than +7mV.
_
|- \
Sw1 C + |Op >-->ADC
Vin----+----+----+---+/+--+--||----+----|+_/
| | | | 1uF? |
\ _|_ _|_ + +
/ /_\ \_/ Sw2/ Sw3/
\ | | + +
| | | | |
0v----+----+----+--------+--/\/\--+---/\/\--+2.5V
10R /|\ 3k
|
8mV approx.

To Auto-zero. Open Sw1, Close Sw2 and Sw3.
Wait 50uS (or so), for C to stabilise.
Read ADC, store effective (Vos+8mV).

To read Vin. Open Sw2 and Sw3, Close Sw1.
Read ADC.
Subtract effective (Vos+8mV).

Note the relatively high value of C. The LM324 has
a maximum input bias current of 250nA, which causes
the voltage on C to drift upwards slightly when
measuring Vin. 1uF is a drift of 250uV/mS, so the
ADC must be read as quickly as possible.
[/QUOTE]
Nice solution, Tony :)

And this circuit can be used for all the inputs for all the non-ideal
amplifiers in the circuit (switching the circuit via an analog switch)
- and with not that high a penalty cost-wise

Moreover the temperature drift of the offset voltage is pretty low so
an autozero at startup might be sufficient (or perhaps even a
productionline calibration)

Thanks

Klaus
 
J

Jim Thompson

Jan 1, 1970
0
Signal Frequency?

If DC or in a limited time frame, just store VOS in a capacitor...
chopper-style.

I built a uV meter that way 25 years ago to find shorts on PCB's by
measuring trace drops.

...Jim Thompson

Found my notes. Posted at....

Newsgroups: alt.binaries.schematics.electronic
Subject: Re: Offset calibration of Op-amp - is that really ok? -
AutoZeroVOS.pdf
Message-ID: <[email protected]>

...Jim Thompson
 
J

John Larkin

Jan 1, 1970
0
Signal Frequency?

If DC or in a limited time frame, just store VOS in a capacitor...
chopper-style.

I built a uV meter that way 25 years ago to find shorts on PCB's by
measuring trace drops.

...Jim Thompson


But now, in the 21st century, it's more common to use a uP to switch
in zero, digitize the result, and subtract that from subsequent live
readings.

(Not with a single-supply LM324, of course.)

Excuse me, it's time for my mid-morning nap.

John
 
J

Jim Thompson

Jan 1, 1970
0
But now, in the 21st century, it's more common to use a uP to switch
in zero, digitize the result, and subtract that from subsequent live
readings.

(Not with a single-supply LM324, of course.)

Excuse me, it's time for my mid-morning nap.

John

But, if you're taking a lot of gain, the output of the amplifier will
saturate on the signal, rendering the subtraction invalid.

So much for the 21st Century ;-)

...Jim Thompson
 
J

John Larkin

Jan 1, 1970
0
But, if you're taking a lot of gain, the output of the amplifier will
saturate on the signal, rendering the subtraction invalid.

So much for the 21st Century ;-)

...Jim Thompson


So cut the analog gain to allow a little headroom, do the subtraction,
then multiply by a modest gain cal factor, 1.2 ballpark, to get the
range back. All these modern ADCs have more codes than anybody really
needs, anyhow; nobody will ever now.

John
 
Top