# Op amp calculation

Assuming that the op amp and the diode are ideal (for op amp: infinite input impedance and 0 output impedance, for diode: 0 voltage drop):

D1 is open <=> $$V_i \frac{R2}{R1}>E$$

• case 1 (D1 closed):

$$V_i < E\frac{R1}{R2}$$

$$V_o = -V_i \frac{R2}{R1}$$ (It's a simple inverter)

• case 2 (D1 open):

$$V_i > E \frac{R1}{R2}$$

$$Vo = -V_i \frac{R2||R3}{R1} -E \frac{R2||R3}{R3}$$

How do you get the last relation (case2, Vo=...) ?

where $$R1||R2 = \frac{R1 \cdot R2}{R1+R2}$$

• Gotta love those "ideal" 741 opamps. – Olin Lathrop Jan 30 '13 at 18:12
• Those "ideal" diodes are pretty sweet, too. – HikeOnPast Jan 30 '13 at 18:29
• They are limited edition... – Cristi Jan 30 '13 at 20:07