
노드를 opamp 출력에 정렬하는 방법을 많이 발견했습니다. 하지만 tikzpicture에 노드가 있다고 가정하고 입력이 노드와 정렬되도록 opamp를 배치하고 싶습니다.
어떻게 해야 할까요?
예를 들어, C1을 opamp의 양극 입력에 연결하고 싶습니다.
\documentclass[]{article}
%opening
\title{}
\author{}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,positioning}
\usepackage[siunitx]{circuitikz} % Loading circuitikz with siunitx option
\begin{document}
\maketitle
\begin{abstract}
\end{abstract}
\section{}
\begin{figure}[!htbp]
\centering
\ctikzset{voltage/distance from node=.2}% defines arrow's distance from nodes
\ctikzset{voltage/distance from line=.02}% defines arrow's distance from wires
\ctikzset{voltage/bump b/.initial=.1}% defines arrow's curvature
\begin{tikzpicture}
\draw
node[op amp,yscale=-1] (opamp) {}
node[ocirc, left=3cm of opamp.+] (B) {}
node[ocirc, below=5cm of B] (A) {}
%node[op amp,yscale=-1] (opamp1) {}
coordinate[right=0.5cm of opamp.out] (tmpout1)
node[circ, below=2cm of tmpout1] (div1) {}
(tmpout1 |- A) coordinate (tmpgndout1)
coordinate[left=0.5cm of opamp.-] (opamp1-)
(B) -- (opamp.+)
(A) -- (tmpgndout1)
(opamp.-) -- (opamp1-) -- (opamp1- |- div1) -- (div1)
(opamp.out) -- (tmpout1) to[R, l=$R_1$] (div1)
(div1) to[R, l=$R_2$] (tmpgndout1)
node[circ, right=2cm of tmpout1] (stage2in) {}
(tmpout1) to[C,l=C$_1$] (stage2in)
(stage2in) to[R,l=$R_3$] (stage2in |- A) -- (tmpgndout1)
node[op amp,right=1cm of stage2in,yscale=-1] (opamp) {}
;
\end{tikzpicture}
\caption{Active Envelope Detector Circuit}
\label{fig:detector_circuit_active}
\end{figure}
\end{document}
답변1
어쨌든, 당신이 스스로 해결책을 찾았다면, 당신의 회로에 대해 다음과 같은 (내 의견으로는 좀 더 일관성 있는) 코드를 살펴보는 것이 좋습니다.
\documentclass[margin=3mm]{standalone}
\usepackage{siunitx}
\usepackage[siunitx]{circuitikz} % Loading circuitikz with siunitx option
\begin{document}
\begin{tikzpicture}
\node [op amp, yscale=-1] (oa1) {};
\draw (oa1.+) to[short,-o] ++ (-1,0) coordinate (in)
(oa1.out) to [R=$R_1$,*-*] ++ (0,-2) coordinate (aux1)
to [R=$R_2$,-*] ++ (0,-2)
(oa1.out) to [C=$C_1$,-*] ++ (2,0) coordinate (aux2)
to [R=$R_3$,-*] ++ (0,-4) coordinate (aux3)
to [short,-o] (in |- aux3)
(aux1) -| (oa1.-)
(aux2) to[short] ++ (1,0)
node[op amp, yscale=-1,anchor=+] (oa2) {}
(oa2.out) to [short,-o] ++ (1,0) coordinate (out)
(aux3) to[short,-o] (aux3 -| out);
\end{tikzpicture}
\end{document}
내 MWE에서는 이미지에만 집중하므로 standalone
문서 클래스를 사용합니다. 회로에 대한 정보를 제공하는 한 구성표가 완성됩니다. 회로를 그리는 데 도움이 될 수 있습니다.
답변2
나는 답을 찾았는데, 내 생각에는 괜찮을 것 같다.
node[op amp, right= 2cm of stage2in, anchor=+, yscale=-1] (opamp2) {}