如何复制这个运算放大器问题?

如何复制这个运算放大器问题?

在此处输入图片描述这是文本上方的图表。这是我目前所做的,但我很难复制它。

\begin{circuitikz}
    \draw
    (0, 0) node[op amp] (opamp) {}
    (opamp.-) to[R,l_=$R_1$,-o] (-2, 0.35) -- (-3, 0.35) to [V=$v_1$] (-3,-0.5) to (-3,-0.5) node[ground]{}
    (opamp.-) to[short,*-] ++(0,0.5) coordinate (leftC)
    to[R=$R_2$] (leftC -| opamp.out)
    to[short,-*] (opamp.out) to [short,-o] (1.5,0) to (1.5,-0.5) node[ground]{}
    (opamp.+) -- (-1,-0.35) to (-1,-0.5) node[ground]{}
    ;
\end{circuitikz}

答案1

这是 MWE 的精简版,更完整地体现了相对坐标。可惜的是,它与所画的电路完全不同。

\documentclass {standalone}
\usepackage{circuitikz}

\begin{document}
\begin{circuitikz}
    \draw
    (0, 0) node[op amp] (opamp) {}
    (opamp.-) to[R,l_=$R_1$,-o] ++(-2, 0) to [V=$v_1$] ++(0,-2) node[ground]{}
    (opamp.-) to[short,*-] ++(0,1) coordinate (leftC)
    to[R=$R_2$] (leftC -| opamp.out)
    to[short,-*] (opamp.out) to [short,-o] (1.5,0) to (1.5,-0.5) node[ground]{}
    (opamp.+) -- ++(0,-0.5) node[ground]{}
    ;
\end{circuitikz}
\end{document}

演示

答案2

使用siunitx选项写入数量、电路元件定位的相对坐标、定义运算放大器输入和锚点以及americano驱动风格:

\documentclass[border=3.131592]{standalone}
\usepackage[siunitx]{circuitikz}

\begin{document}   
    \begin{circuitikz}[american]
\draw   (0,0)   to[R,l=\qty{12}{\kilo\ohm}]     ++(2,0) coordinate[label=$V_1$] (in+)
                to[short,i=$i_1$, *-]           ++(1,0)
                node[op amp,
                     noinv input up,
                     anchor=+]  (oa) {}
(in+ |- oa.-)   coordinate[label=$V_2$] (in-)
                to[short,i=$i_2$, *-]       (oa.-)
    (oa.out)    to[short,*-o]                   ++(2, 0) coordinate (out+)
    (oa.out)    to[R,l=\qty{15}{\kilo\ohm},-*]  ++(0,-2) coordinate (aux1)
                to[R,l=\qty{15}{\kilo\ohm},-*]  ++(0,-2)
                to[short]                       ++(2, 0) coordinate (out-)
                to[open, v=$V_o$, o-o]  (out+)
        (in-)   |-  (aux1)
    (0,0)       to[V,a=\qty{12}{\volt}]      (0,0 |- out-)
                -- (out-)
                ;
    \end{circuitikz}
\end{document}

在此处输入图片描述

相关内容