Searching \ for ' [EE] OpAmp magic' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=opamp+magic
Search entire site for: 'OpAmp magic'.

No exact or substring matches. trying for part
PICList Thread
'[PICLIST] [EE] OpAmp magic'
2002\06\28@114049 by thomas

flavicon
face
Hi all!

Would anybody care to help a newbie out on OpAmp basics? I'm working
with some pressure sensors, one with static pressure for altitude
measurement and one differential for airspeed. I've searched the net for
basic opamp designs and found some useful pages.

I've set a span for the pressure ranges I'm interested in which is quite
less than the full dynamic range of the sensor. So I'd like to amplify
the signals to maximize ADC resolution over my range.

The amplification for the altitude sensor is inverting, which is good
since I get higher readings for higher altitudes with less pressure. I
worked from the description at
http://www.chipcenter.com/embapps/emba004.htm and now have a circuit
which produces the right values when simulated in Protel.

I do have trouble with the non-inverting one, though.

There's a good example at
http://www.tfs.net/~petek/rockets/altimeter/circuit.html, but I cannot
figure out how to go from the first circuit, with two opamps, to the
second with only one. I want to map a span of 0,2V - 0,439026V to the
ADC's 0-5V, non-inverting. And there might be issues with noise etc
since the interesting range is so narrow.
Of course, I could do it inverted and handle that in software, but
shouldn't this be a really basic thing??

I'd be happy to provide anyone with my calculations, circuits etc if
anyone's interested.

Regards,

Thomas

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\06\28@134008 by Brendan Moran

flavicon
face
> There's a good example at
> http://www.tfs.net/~petek/rockets/altimeter/circuit.html, but I cannot
> figure out how to go from the first circuit, with two opamps, to the
> second with only one. I want to map a span of 0,2V - 0,439026V to the
> ADC's 0-5V, non-inverting. And there might be issues with noise etc
> since the interesting range is so narrow.
> Of course, I could do it inverted and handle that in software, but
> shouldn't this be a really basic thing??

Ok, frankly, you're going to need a pair of potentiometers and a DMM to do
this and get the numbers that exact.

Ok, the opamp needs to be biased at the average of the 2 extremes
(0.319513V) and it needs to have a gain of  5V/(Vupper-Vlower) which is
20.9182264691.

So, here comes the ASCII art:

       +5V
        |
        |
        |
        |           |\
Vin O-- | ----------|+\
         >          |  \
        <           |   >---+----O Vout
     R1  >          |  /    |
        <      +----|-/     |
         >     |    |/      |
        <      |            |
        |      |            |
        +------+--/\/\/\/---+
        |           R3
         >
        <
         >
     R2 <
         >
        <
        |
      -----
     / / /

(In case you havent seen ASCII art used before, copy this out of your email
program if it looks like garbage, and paste it into something that uses a
mono-spaced font like Notepad)

Ok, R1 and R2 can be a single potentiometer with the wiper connected to
the -ve input of the opamp, but if they are, then R3 should also be a
potentiometer.

So, to get the values of resistors required, here's what I did:
Av = R3*(1/R1 + 1/R2) + 1
Vbias = 0.319513 = 5 * R2 / (R1 + R2)

Solving the Vbias equation for R1,
R1 = R2(5-0.319513)-0.319513

Subbing into the Av equation,
Av = R3*(1 / (4.680487*R2 - 0.319513) + 1/R2) + 1
or
Av-1 = R3*(1 / (4.680487*R2 - 0.319513) + 1/R2)
Now, at this point, I used a graphing calculator to choose my values, as it
makes the formula easily reusable.

Since there is no third equation, we have to pick an arbitrary value

I picked 180k for R3, because it gave 10k for R2, and that gives roughly 50k
for R1.  The high resistance is better for low power, to reduce the power
loss in the divider, and since the opamp should have low output impedance,
anyways,

The actual values I calculated are the following:
R3 = 180k
R2 = 10.9678404701 kohms
R1 = 51.3316396084 kohms

If you use 2 pots, you'll need to do some careful calibrating.  Configure
the R1/R2 pot first, to get the correct bias voltage, then configure the R3
pot to get the right gain.

Oh, and make sure you use a rail-to-rail opamp, or you'll get some clipping.

Hope this helps.

Regards,
Brendan

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\06\28@182024 by David Minkler

flavicon
face
Brendan Moran wrote:
>
> > second with only one. I want to map a span of 0,2V - 0,439026V to the
> > ADC's 0-5V, non-inverting. And there might be issues with noise etc
> > since the interesting range is so narrow.
>
> Ok, frankly, you're going to need a pair of potentiometers and a DMM to do
> this and get the numbers that exact.

Uh, yeah and they need a ratio tempco of 1ppm/(temp range of operation)
and the opamp needs a better than 1uV input offset and ...

Wouldn't this be easier with a 40-bit ADC glued to a 40-bit DAC by a DSP
chip to handle the offset and gain calculations ;-)

Dave

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\06\28@185442 by Brendan Moran

flavicon
face
David Minkler wrote:

> Uh, yeah and they need a ratio tempco of 1ppm/(temp range of operation)
> and the opamp needs a better than 1uV input offset and ...
>
> Wouldn't this be easier with a 40-bit ADC glued to a 40-bit DAC by a DSP
> chip to handle the offset and gain calculations ;-)

Well, I don't know about that... you'd have to write the software for the
DSP

If you ask me, which I know you didn't ;) then, since he's spending most of
the gain of the opamp (usually has at least 250000 or 107.96 dB) then what
you have left is pretty darn stable.  Now, that said, the values he's asking
for are unatainable.
0,2V - 0,439026V isn't going to happen.  I'd aim for a range of 0.2V to
0.44V which is a much more likely target.

As to opamp selection, my suggestion is an opamp with MOSFET inputs, and
rail-to-rail outputs.  Most devices simply don't have the precision to
handle that number of decimal places, but then, I expect that that was
already known.

Good luck.

--Brendan

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.



'[PICLIST] [EE] OpAmp magic'
2002\07\01@091307 by Sean H. Breheny
face picon face
Hi Thomas,

What is the average DC value of your Vsin input? Since you have a divider
on the reference voltage (the 5V), it looks like you have an effective
reference of 0.8197 V ( 10/(10+51) * 5). If your Vsin input isn't centered
at this, then the amp will be amplifying the difference in DC offsets, too.
Since your output amplitude is so small, I'd guess that the amp is
saturated, that is, the difference between the input DC offset and 0.8197
V, when multiplied by the gain of the circuit, is outside the supply rails
and so the op-amp has it's output at ground(with a very slight output
voltage variation). One of the deceptive things about spice simulations is
that they show results that are too clean. You might look at these results
and say "hmmm, the output is right but the gain is too low", when in real
life, compared to the noise levels, you wouldn't even see a 30 microvolt
peak-to-peak output.

Sean

At 10:14 AM 7/1/2002 +0200, you wrote:

{Quote hidden}

> > {Original Message removed}

2002\07\01@103245 by Dave Tweed

face
flavicon
face
Thomas <spam_OUTthomasTakeThisOuTspamBLUEICERESEARCH.COM> wrote:

> Thanks for all the help on the OpAmp circuit. I understand that the
> levels in my question was a *little* too precise, but they where ideal
> theoretical levels and I'm trying to get to a decent compromise between
> ADC resolution and complexity of the circuit.

> I dont have any luch with the suggestion below though. I've tried
> simulating the circuit below and don't end up with the nearly the right
> values. I've attached (hope this doesn't violate any list policy)
> pictures of my circuit and the resulting simulation. Can anybody figure
> out what's wrong?

I didn't try to work out Brendan's equations, but his results are not
correct. You need a gain of about 20, and a Thevenin voltage for your bias
circuit of about 0.21V. The 51K/10K voltage divider is providing a source
voltage of 0.82V, which is way too much.

The simulation is saturated at the negative (ground) rail, but the
simulator is accurate enough to show the tiny amount of signal that makes
it through the opamp anyway.

Try R3=3.3K, R1=75K, and R2 = 62K (these are 5% values)

If you have 1% resistors, try R3=1.02K, R1=23.2K and R2=19.2K.

-- Dave Tweed

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...