1
\$\begingroup\$

enter image description here

I want this circuit to give \$V_{out}\$ satisfying

\$ V_{out} = \begin{cases} -\dfrac{R_f}{R_1}V_{s1}-\dfrac{R_f}{R_2}V_{s2}; \quad \text{if} \quad \left(-\dfrac{R_f}{R_1}V_{s1}-\dfrac{R_f}{R_2}V_{s2}\right) > 0 \\ 0; \quad \text{if} \quad \left(-\dfrac{R_f}{R_1}V_{s1}-\dfrac{R_f}{R_2}V_{s2}\right) \le 0 \end{cases} \$

How do I do it?

I considered adding a diode at the output like in the image below, but I'm not sure whether it will work or not, or even if it works, it is the best way of doing it or there is a better way.

enter image description here

\$\endgroup\$
3
  • \$\begingroup\$ What is the load on Vout? \$\endgroup\$
    – The Photon
    Commented Nov 14, 2013 at 2:49
  • \$\begingroup\$ An input pin of an IC, it is said to have 50M\$\Omega\$ impedance in its datasheet. \$\endgroup\$ Commented Nov 14, 2013 at 2:57
  • \$\begingroup\$ Your proposed circuit should work pretty well then. \$\endgroup\$
    – The Photon
    Commented Nov 14, 2013 at 3:08

2 Answers 2

1
\$\begingroup\$

There is a problem with this design since, with the series diode, there is no path for the op-amp output to sink current.

Consider the case that both inputs are positive. The effective circuit is:

schematic

simulate this circuit – Schematic created using CircuitLab

Then, assuming \$V_{out}\$ is connected to a high enough impedance, we have:

\$V_{out} = \dfrac{V_{s1}R_2 + V_{s2}R_1}{R_1 + R_2} \ne 0\$

This problem is essentially due to the fact that you've lost negative feedback when the diode is reverse biased and thus, there is no virtual ground at the inverting input.

Take a look at an inverting precision rectifier to see what you need to do to fix this problem:

enter image description here

\$\endgroup\$
0
\$\begingroup\$

You can use a single supply opamp so the lowest voltage it could reach is zero.

\$\endgroup\$
1
  • \$\begingroup\$ ex: LM324 - this IC is single supply \$\endgroup\$
    – nrnw
    Commented Apr 13, 2014 at 11:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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