
나는 현재 이 회로를 만들려고 노력하고 있지만, 무엇을 할 때마다 삐걱거리는 소리가 납니다. 제가 추가하고 싶은 것은 빨간색입니다.
코드와 결과는 다음과 같습니다
\begin{document}
\begin{circuitikz}
\node[op amp, noinv input up] at (0,0) (opamp) {};
\node[ground] at (-4.69,-5.5) (ground) {};
\draw (opamp.-) -- ++(-1.15,0) -- ++(0,-2) to[R, l_=$R_1$] ++(0,-2.5) to[short,-*] ++(-2.35,0);
\draw (opamp.+)(-3,0)to[R, l_=$R_1$] -- ++(-3.5,0) to[V, l_=$v_\text{IN}$,] ++(0,-3) -- (ground);
\draw (1.66,0) to[short,*-] ++(0,-2.5) to[R, l^=$R_2$, -*] ++(-4,0);
\draw (opamp.out) to[short,-*] ++(1.5,0) node[shift={(0.6,0)}] {$v_\text{O}$};
\draw[-latex] (opamp.up) -- ++(0,0.5) node[above] {$V_+$};
\draw[-latex] (opamp.down) -- ++(0,-0.5) node[below] {$V_-$};
\node[shift={(0,-0.3)}] at (opamp.-) {\scriptsize$v_-$};
\node[shift={(0,+0.3)}] at (opamp.+) {\scriptsize$v_+$};
\end{circuitikz}
\end{document}
답변1
주요 오류는 LaTeX에서 받는 오류를 무시하는 것입니다.
wth.tex|8 error| Package tikz Error: (, +, coordinate, pic, or node expected.
wth.tex|8 error| Package pgf Error: No shape named `' is known.
...
LaTeX에서 거의 항상 그렇듯이, 첫 번째 오류만 실제로 관련이 있으며, 다른 오류는 발견된 오류를 넘어가려는 잘못된 해석과 관련될 수 있습니다.
문제의 라인은
\draw (opamp.+)(-3,0)to[R, l_=$R_1$] -- ++(-3.5,0) [...]
to
그리고 오류는 매우 분명합니다. a 뒤에 노드/좌표가 필요하고 --
.
해당 줄을 다음으로 변경하십시오.
\draw (opamp.+) to[R, l_=$R_1$] ++(-3.5,0) to[V, l_=$v_\text{IN}$,] ++(0,-3) -- (ground);
그리고 당신이 가진 것은:
이제 다음과 같이@Jasper Habicht가 제안함, 생성기에 이름을 추가하고여기에 표시된 방법.
전체 예는 다음과 같습니다.
\documentclass[border=10pt]{standalone}
\usepackage[siunitx, RPvoltages]{circuitikz}
\begin{document}
\begin{tikzpicture}[]
\node[op amp, noinv input up] at (0,0) (opamp) {};
\node[ground] at (-4.69,-5.5) (ground) {};
\draw (opamp.-) -- ++(-1.15,0) -- ++(0,-2) to[R, l_=$R_1$] ++(0,-2.5) to[short,-*] ++(-2.35,0);
\draw (opamp.+) to[R, l_=$R_1$] ++(-3.5,0) to[V, l_=$v_\text{IN}$, name=myV] ++(0,-3) -- (ground);
\draw (1.66,0) to[short,*-] ++(0,-2.5) to[R, l^=$R_2$, -*] ++(-4,0);
\draw (opamp.out) to[short,-*] ++(1.5,0) node[shift={(0.6,0)}] {$v_\text{O}$};
\draw[-latex] (opamp.up) -- ++(0,0.5) node[above] {$V_+$};
\draw[-latex] (opamp.down) -- ++(0,-0.5) node[below] {$V_-$};
\node[shift={(0,-0.3)}] at (opamp.-) {\scriptsize$v_-$};
\node[shift={(0,+0.3)}] at (opamp.+) {\scriptsize$v_+$};
\ctikztunablearrow{1}{1.25}{150}{myV}
\end{tikzpicture}
\end{document}
~를 야기하는
PS: (보셨나요? 이제 오류가 어디서 왔는지 알기 때문에 답변이 훨씬 더 유용해졌습니다! 그리고 항상 질문에 추가해야 하는 "최소 작업 예제"의 예가 있습니다.)
답변2
공급 전압이 있는 연산 증폭기를 제외하고 구성표는 하나의 \draw
루프로 작성됩니다.
\documentclass[margin=3mm]{standalone}
\usepackage{amsmath}
\DeclareMathOperator{\IN}{\textsc{in}}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}[american]
\node[op amp, noinv input up] (oa) {};
\draw[-stealth] (oa.up) -- ++ (0,+0.5) node[above] {$V_{+}$};
\draw[-stealth] (oa.down) -- ++ (0,-0.5) node[below] {$V_{-}$};
\draw
(oa.-) node[below] {\scriptsize $v_-$}
-| ++ (-0.5,-1.5) coordinate (aux)
to [R, a=$R_1$, *-] ++ (0,-2)
to [short,-*] ++ (-3,0) node (gnd) [ground] {}
to [V=$V_{\IN}$, name=V] (gnd |- oa.+) %
to [R=$R_1$] ++ (3,0) -- (oa.+)
node[above] {\scriptsize $v_+$}
(oa.out) to [short,] (oa.out |- aux)
to [R=$R_2$] (aux)
(oa.out) to [short, -o] ++ (0.5,0) node[right] {$v_o$}
;
\ctikztunablearrow[thick]{1}{1.2}{-30}{V}
\end{circuitikz}
\end{document}