我发现了很多关于将节点与运算放大器输出对齐的方法。但假设 tikzpicture 中有一个节点,我想放置一个运算放大器,以便其输入与节点对齐。
我该怎么做?
例如,在美国,想将 C1 连接到运算放大器的正输入。
\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
文档类。只要您提供有关电路的信息,Scheme 就很完整。它可能有助于您绘制电路。
答案2
我找到了答案,我认为应该没问题。
node[op amp, right= 2cm of stage2in, anchor=+, yscale=-1] (opamp2) {}