0
\$\begingroup\$

$$ \newcommand{\rth}{R_{TH}} \newcommand{\vth}{V_{TH}} \newcommand{\rf}{R_{F}} $$

Asked this in the math stack exchange, who recommended asking here instead.

I'm stumped (hence posting here!) with what is probably a very simple extrapolation.

Consider this circuit:

Non-inverting op amp with 3.3V bias

The values supplied are based on an example that I am working with. I need to better understand how the resistance values were derived as I need to change the reference (from 3.3V to 2.5V), the $V_{in}$ (from 0 to 3.3V to 0 to 2.5V), and the $V_{out}$ from $\pm 36V$ to $\pm 40V$.

So I'm seeking guidance on how to calculate the resistor values. Leading up to this, I have a good understanding.

Here is the transfer function for this circuit: $$ OUT = IN (1 + \frac{\rf}{\rth}) - \vth \frac{\rf}{\rth}. $$ The opamp is supplied with +45 and -45 V rails and it can safely swing between $\pm 40V$ at those levels.

The desired output will go from $-40$ to $-40V$ as the input goes from $0$ to $+2.5V$ (at $1.25V$ the output will sit at $0V$).

The gain is calculated thusly:

\begin{align} Gain (\text{non-inverting}) &= (36 - (-36))/3.3 = 72/3.3 = 21.81818182\\ Gain(\text{inverting}) &= Gain (\text{non-inverting}) - 1 = 20.81818182 = \frac{\rf}{\rth} \end{align}

The resistor values are calculated using this formula: $$ \vth = 3.3 V (\frac{R_2 }{ R_1 + R_2}). $$

First, I must find $\vth$. Here's the formula for that:

\begin{align} -36 V &= 0 - \vth (\frac{\rf}{\rth})\\ \vth &= 1.729257642 V \end{align}

In the above, $\frac{\rf}{\rth}$ is taken as an unknown, so: \begin{align} -36V &= 0-\vth \frac{\rf}{\rth}\\ -36/20.81818182 = \vth \end{align}

Now, here's the sticky part: \begin{align} \vth &= 3.3 V \frac{R_2 }{ (R_1 + R_2)}\\ 1.729257642 V &= 3.3 V \frac{R_2}{(R_1 + R_2)}\\ 1.729257642/3.3 V &= \frac{R_2}{R_1 + R_2}\\ 1.729257642/3.3 V &= 0.5240\\ \end{align}

From $0.5240$, how in blazes do I calculate the value of $R_2$, $R_1$ and $\rf$? $$ \rf = gain * \rth $$ ( but $\rth$ is $R_2/(R_1+R_2)$ ):

$$ \rf = 20.81818182 * \rth $$ Seems as if I need to choose one value out of the blue to get the others??

--

Based on suggestions I tried this circuit:

modified test circuit

And this is the output:

simulation output


Third try:

modified circuit

Result: Result

\$\endgroup\$
  • \$\begingroup\$ Sure, the ratios are defined so there's a degree of freedom left. You may as well pick one of the values as something like 10.0K and then make sure that the result isn't too high (so sensitive to input bias current) or too low (so excessive loading and self-heating, affecting the accuracy). If it looks to low (say) change the 10.0K to 20.0K (say) and double the other values. Or 100K and multiply the other values by 10 etc. \$\endgroup\$ – Spehro Pefhany Oct 16 '18 at 17:20
  • 1
    \$\begingroup\$ You choose the one free resistor value to get convenient component values (Spehro's 10.0K), to keep all of the resistances in a reasonable range for the op-amp (too low and it'll have trouble driving them, or in this circuit, they'll get hot -- too high and you'll have problems with bias current or current noise). I'd also seriously consider putting a resistor from the DAC to the '+' input of the amp, to eliminate the effect of op-amp bias current -- it should be equal to the parallel combination of R1, R2, and Rth. \$\endgroup\$ – TimWescott Oct 16 '18 at 17:46
  • \$\begingroup\$ In your simulation, Vref voltage is negative and equal to -3.3V \$\endgroup\$ – G36 Oct 16 '18 at 19:55
  • \$\begingroup\$ @G36 Thank you for spotting that. Modified and tweaked. Question modified. \$\endgroup\$ – Mark Richards Oct 16 '18 at 21:15
  • \$\begingroup\$ Try Rf = 120k; R1 = 7.5k; R2 = 8.2k or (4.7k + 3.3k) \$\endgroup\$ – G36 Oct 16 '18 at 21:21
1
\$\begingroup\$

First of all your transfer function is wrong.

From what I see the correct one should look like this:

$$V_{OUT} = V_{IN}\left(1 + \frac{R_F}{R_1||R_2}\right) - V_{REF}\left(\frac{R_F}{R_1}\right) $$

For this circuit

enter image description here

Now let us assume that you want "shift" the voltage from \$0V ... 3.3V\$ into \$-40V...+40V\$

Therefore the "inverting part" of a voltage gain is \$ \frac{- V_{OUT}}{V_{REF}}= -\frac{40V}{3.3V} = -12.121V/V\$

So I pick \$R_1 = 75 \textrm{k}\Omega , R_F = 910\textrm{k}\Omega\$

http://jansson.us/resistors.html

http://www.ti.com/download/kbase/volt/volt_div3.htm

Now we can solve for \$R_2\$ by using this case:

enter image description here

Notice that \$R_1\$ current is \$0A\$ hence solving for \$R_2\$ resistor value is a trivial task.

$$R_2 = \frac{R_F}{\frac{V_{OUT}}{V_{IN}} -1} = \frac{910\textrm{k}\Omega}{\frac{40V}{3.3V} -1} = 82\textrm{k}\Omega $$

And we done.

Additional bedtime reading:

http://www.ti.com/lit/an/sloa030a/sloa030a.pdf

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.