这是使用 LM741 的简单电压跟随器的示例代码。我需要为运算放大器电路添加引脚编号。如何实现?
\documentclass{article}
\usepackage[american,siunitx]{circuitikz}
\usetikzlibrary{positioning, fit, calc}
\begin{document}
\ctikzset{tripoles/op amp/height=2.0, tripoles/op amp/width=2.5,}
\tikzset{opamp label/.style={xshift=-9mm, font=\normalsize,right}}
\tikzset{iovardelay/.style={label={[above]90:\textsf{#1}},
label={[right=2ex]180:\textsf{I}},
label={[left=3ex]0:\textsf{O}},
draw,fill=blue!10,
minimum width=1cm,
minimum height=2cm
}
}
\begin{center}
\begin{circuitikz}
\draw (0,0) node[op amp] (opamp){}(opamp)node[opamp label]{LM741}
(opamp.-) |- ($(opamp.-)+(0.2,2)$) to[short] ($(opamp.-)+(2.2,2)$) -|
(opamp.out) to[short,*-] ($(opamp.out)+(.5,0)$) node [right] {$V_{out}$} node [ocirc] {}
(opamp.+) to[short] ($(opamp.+)-(0,.5)$) to [sV]++(0,-2) node[ground] {}
(opamp.down) ++ (0,-.5) node[below] {${-15V}$}-- (opamp.down)
(opamp.up) ++ (0,.5) node[above] {${+15V}$}-- (opamp.up)
;
\end{circuitikz}
\end{center}
\end{circuitikz}
\end{center}
\end{figure}
\end{document}
答案1
像这样:
\documentclass[margin=3mm]{standalone}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}[PH/.append style={font=\scriptsize,inner ysep=2pt,inner xsep=5pt},
PV/.append style={PH,inner ysep=2pt,inner xsep=2pt}]
\node [op amp,label=center:LM741] (opamp) {};
\draw (opamp.-) node [PH,above right] {2} % pin number
|- ($(opamp.out)+(0,2)$)
to [short,-*] (opamp.out) node [PH,above left] {6} % pin number
to [short,-o] ++ (0.5,0) node [right] {$V_{\mathrm{out}}$}
(opamp.+) node [PH,above right] {3} % pin number
to [sV] ++ (0,-2) node [ground] {}
(opamp.up) node[PV,above right] {1} % pin number
to [short,-o] ++ (0,.5) node [above] {${+15V}$}
(opamp.down)node[PV,below right] {8} % pin number
to [short,-o] ++ (0,-.5) node [below] {${-15V}$}
;
\end{circuitikz}
\end{document}
我不记得正确的密码了,所以你检查一下,如果有必要的话,再进行相应的修改。