我想在电路中添加一些去耦电容,但总是放错位置。它应该位于电容的底部。我做错了什么?
\documentclass{standalone}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}
\draw
(0, 0) node[op amp] (opamp) {}
(opamp.out) -- ++(1,0) coordinate (out)
(opamp.-) to[short,*-] ++(0,4) coordinate (leftC)
to[C] (leftC -| out)
to[short,-*] (out)
to[short,-o] ++ (1,0) node[right] {Control input}
(leftC) to[short,*-] ++ (0,1) coordinate (leftR)
to[R] (leftR -| out)
to[short,-*] (leftC -| out)
(opamp.+) -- ++ (0,-0.5) node[ground] {}
(opamp.-) to[short,-*] ++ (-0.4,0) coordinate (Rnode)
(Rnode) to [R,-o] ++(-2,0)
(Rnode) to [short] ++(0,1) coordinate (sensR)
(sensR) to [R,-o] ++(-2,0)
(opamp.up) to [short,-o] ++ (0,2) node [above] {${+10V}$}
(opamp.down)to [short,-o] ++ (0,-2) node [below] {${-10V}$}
(opamp.up) ++(0,1.5) coordinate (up)
(up) to[short, *-] ++(1,0) coordinate (leftCplus)
to[C] ++(0,-1) (leftCplus |- opamp.out) node (Cplusbottom)
to node[ground] {}
;
\end{circuitikz}
\end{document}
答案1
这是你想要的?
\documentclass{standalone}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}
\draw
(0, 0) node[op amp] (opamp) {}
(opamp.out) -- ++(1,0) coordinate (out)
(opamp.-) to[short,*-] ++(0,4) coordinate (leftC)
to[C] (leftC -| out)
to[short,-*] (out)
to[short,-o] ++ (1,0) node[right] {Control input}
(leftC) to[short,*-] ++ (0,1) coordinate (leftR)
to[R] (leftR -| out)
to[short,-*] (leftC -| out)
(opamp.+) -- ++ (0,-0.5) node[ground] {}
(opamp.-) to[short,-*] ++ (-0.4,0) coordinate (Rnode)
(Rnode) to [R,-o] ++(-2,0)
(Rnode) to [short] ++(0,1) coordinate (sensR)
(sensR) to [R,-o] ++(-2,0)
(opamp.up) to [short,-o] ++ (0,2) node [above] {${+10V}$}
(opamp.down)to [short,-o] ++ (0,-2) node [below] {${-10V}$}
(opamp.up) ++(0,1.5) coordinate (up)
(up) to[short, *-] ++(1,0) coordinate (leftCplus)
to[C] ++(0,-1) node (Cplusbottom) {} to ++(0,0) node[ground] {};
\end{circuitikz}
\end{document}
然而,为了拥有良好的单位,你应该使用siunitx
:
\documentclass{standalone}
\usepackage{circuitikz}
\usepackage{siunitx}
\begin{document}
\begin{circuitikz}
\draw
(0, 0) node[op amp] (opamp) {}
(opamp.out) -- ++(1,0) coordinate (out)
(opamp.-) to[short,*-] ++(0,4) coordinate (leftC)
to[C] (leftC -| out)
to[short,-*] (out)
to[short,-o] ++ (1,0) node[right] {Control input}
(leftC) to[short,*-] ++ (0,1) coordinate (leftR)
to[R] (leftR -| out)
to[short,-*] (leftC -| out)
(opamp.+) -- ++ (0,-0.5) node[ground] {}
(opamp.-) to[short,-*] ++ (-0.4,0) coordinate (Rnode)
(Rnode) to [R,-o] ++(-2,0)
(Rnode) to [short] ++(0,1) coordinate (sensR)
(sensR) to [R,-o] ++(-2,0)
(opamp.up) to [short,-o] ++ (0,2) node [above] {$\SI{10}{\volt}$}
(opamp.down)to [short,-o] ++ (0,-2) node [below] {$\SI{-10}{\volt}$}
(opamp.up) ++(0,1.5) coordinate (up)
(up) to[short, *-] ++(1,0) coordinate (leftCplus)
to[C] ++(0,-1) node (Cplusbottom) {} to ++(0,0) node[ground] {};
\end{circuitikz}
\end{document}