如何在电路中放置晶体管,以便其集电极(或任何特定节点)位于给定的坐标?

如何在电路中放置晶体管,以便其集电极(或任何特定节点)位于给定的坐标?
\documentclass[border=10pt]{standalone}
\usepackage[american,siunitx]{circuitikz}


\begin{document}

\begin{circuitikz}
\draw (0,0)
node[transformer] (T) {};

\draw (T.B1)
to [D] (3,|-T.B1)
to [R] (3,|-T.B2)
-- (T.B2);

{
\ctikzset{bipoles/resistor/width =0.4}
\draw (3,|-T.B1)
to [vR] (6,|-T.B1)
to [R] (6,-1);
}

\draw (3,-1)
node [npn,xscale=-1] (npn) {} 
(npn.collector) ;

\end{circuitikz}

\end{document}

在此处输入图片描述

如何将晶体管的集电极放置在最右边电阻的末端?

答案1

使用收集器的锚点(circuitikz文档解释了组件的预定义锚点,但在这种情况下,您也可以使用“标准” TikZ 锚点):

\documentclass[border=10pt]{standalone}
\usepackage[american,siunitx]{circuitikz}

\begin{document}

\begin{circuitikz}
\draw (0,0)
node[transformer] (T) {};

\draw (T.B1)
to [D] (3,|-T.B1)
to [R] (3,|-T.B2)
-- (T.B2);

{
\ctikzset{bipoles/resistor/width =0.4}
\draw (3,|-T.B1)
to [vR] (6,|-T.B1)
to [R] 
(6,-1) node [npn,xscale=-1,anchor=C] (npn) {} 
(npn.collector);
}
\end{circuitikz}

\begin{circuitikz}
\draw (0,0)
node[transformer] (T) {};

\draw (T.B1)
to [D] (3,|-T.B1)
to [R] (3,|-T.B2)
-- (T.B2);

{
\ctikzset{bipoles/resistor/width =0.4}
\draw (3,|-T.B1)
to [vR] (6,|-T.B1)
to [R] (6,-1);
}

\draw (6,-1)
  node [npn,xscale=-1,anchor=B,rotate=-90] (npn) {} 
  (npn.collector);
\end{circuitikz}

\end{document}

在此处输入图片描述

相关内容