如何複製這個運算放大器問題?

如何複製這個運算放大器問題?

在此輸入影像描述這是文字上方的圖表。這是我到目前為止所做的,但我正在努力複製它。

\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}

在此輸入影像描述

相關內容