Ich habe viel zum Ausrichten von Knoten an Operationsverstärkerausgängen gefunden. Aber angenommen, es gibt einen Knoten in Tikzpicture und ich möchte einen Operationsverstärker so platzieren, dass sein Eingang mit dem Knoten ausgerichtet ist.
Wie würde ich es machen?
In unserem Beispielfall möchten wir C1 mit dem positiven Eingang des Operationsverstärkers verbinden.
\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}
Antwort1
Da Sie jedoch selbst eine Lösung gefunden haben, schlage ich vor, dass Sie sich den folgenden (meiner Meinung nach konsistenteren) Code für Ihre Schaltung ansehen:
\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}
In meinem MWE konzentriere ich mich nur auf das Bild, daher verwende ich standalone
die Dokumentklasse. Das Schema ist vollständig, sofern Sie Informationen zu Ihrem Schaltkreis angeben. Es könnte Ihnen beim Zeichnen Ihrer Schaltkreise helfen.
Antwort2
Ich habe die Antwort gefunden, die meiner Meinung nach in Ordnung sein sollte.
node[op amp, right= 2cm of stage2in, anchor=+, yscale=-1] (opamp2) {}