Circuitikz 中的变压器

Circuitikz 中的变压器

这可能是一个基本问题,但我正在尝试将其融入其中。

\draw (0,0) node [transformer](T){}
      (T.A1) node[anchor=east] {A1}
 (T.A2) node[anchor=east] {A2}
      (T.B1) node[anchor=north] {B1} 
      (T.B2) node[anchor=west] {B2}
      (T.base) node{K};
\draw (T.B1) -- (2,0);
\draw (2,0) to[D, v=${V_\gamma=0.7}$,i>_=](4,0);        

\draw (T.B2) to[D, v=${V_\gamma=0.7}$,i>_=](4,-2.1);      

那么我该如何定位变压器的支脚,即在右侧画一些短路,这样我就可以制作一个中心抽头变压器,右侧有两个整流二极管,显示 240V_{rms} 作为输入,次级为 12V_{rms}。此外,circuitikz 中是否有显示电感器中间两条线的图形?我现在的做法是

\draw (x,y) -- (a,b);

我是否需要将锚点与变压器结合起来?我不太清楚该怎么做。

答案1

这是其中一种方法。有一个模型叫做 ,transformer core它画了两条垂直线。

更新: 带中性线及变压器铁芯

在此处输入图片描述

代码

\documentclass[border=10pt]{standalone}  
\usepackage[american,siunitx]{circuitikz}
\usetikzlibrary{arrows,shapes,calc,positioning}
\begin{document}  
\begin{circuitikz}[american]
\draw (0,0) node [transformer core](T){}  % reminded by @PaulGessler, thanks.
      (T.A1) node[above] {A1}
      (T.A2) node[below] {A2}
      (T.B1) node[above] {B1} 
      (T.B2) node[below] {B2}
      (T.base) node{K};
\draw (T.A1) --++(-2,0);
\draw (T.A2) --++(-2,0);
\draw (T.B1) --++(2,0) to[D, v=${V_\gamma=0.7}$, i>_=](5,0);        
\draw (T.B2) --++(2,0) to[D, v=${V_\gamma=0.7}$ ,i>_=](5,-2.1);
\draw(T.A1) to[open,v<={$240V_{rms}$}](T.A2);
\draw(T.B2) to[open,v>=$$](T.B1);
% 2 new lines for neutral line on the secondary side.
\draw[thick] ($(T.B1)!0.515!(T.B2)-(0.7,0)$)--node[pos=0.5,above,inner sep=0pt](n){$12V_{rms}$}++ (3,0);
\draw  (n) -- ++ (0,-0.3)node[ground]{};
\end{circuitikz}

\end{document}

在此处输入图片描述

代码

\documentclass[border=10pt]{standalone}  
\usepackage[american,siunitx]{circuitikz}
\usetikzlibrary{arrows,shapes,calc,positioning}
\begin{document}  
\begin{circuitikz}[american]
\draw (0,0) node [transformer](T){}
      (T.A1) node[above] {A1}
      (T.A2) node[below] {A2}
      (T.B1) node[above] {B1} 
      (T.B2) node[below] {B2}
      (T.base) node{K};
\draw (T.A1) --++(-2,0);
\draw (T.A2) --++(-2,0);
\draw (T.B1) --++(2,0) to[D, v=${V_\gamma=0.7}$, i>_=](5,0);        
\draw (T.B2) --++(2,0) to[D, v=${V_\gamma=0.7}$ ,i>_=](5,-2.1);
\draw(T.A1) to[open,v<={$240V_{rms}$}](T.A2);
\draw(T.B2) to[open,v>=$12V_{rms}$](T.B1);
\draw ($(T.base)+(1mm,-2mm)$)  -- ++(0,-1.8);
\draw ($(T.base)+(-1mm,-2mm)$) -- ++(0,-1.8);
\end{circuitikz}

\end{document}

答案2

PSTricks 解决方案使用pst-circ包裹:

\documentclass{article}

\usepackage{pst-circ,pstricks-add}

\def\Points(#1)#2#3{
  \uput[90](#1){#2}
  \uput[270](#1){#3}
}
\def\Diode(#1){
  \uput[210](#1){$+$}
  \uput[330](#1){$-$}
  \uput[270](#1){$U_{\gamma} = 0.7$}
}

\begin{document}

\begin{pspicture}(0,-0.8)(9,4.5)
  \pnodes{P}(0,0)(1.8,0)(4.5,0)(6,0)(7,0)(8,0)(9,0)(0,4)(1.8,4)(4.5,4)(6,4)(7,4)(8,4)(9,4)(1,2)(3.7,2)(5,2)(3,3.1)
  \transformer(P7)(P0)(P10)(P3){}
  \rput(P17){$K$}
 {\psset{labelsep = 0.5}
  \wire(P3)(P4)
  \diode(P4)(P6){}
  \Diode(P5)
  \wire(P10)(P11)
  \diode(P11)(P13){}
  \Diode(P12)}
  \Points(P1){$-$}{$A_{2}$}
  \Points(P8){$A_{1}$}{$+$}
  \Points(P2){$-$}{$B_{2}$}
  \Points(P9){$B_{1}$}{$+$}
 \psset{linestyle = none}
  \rput(P14){$240U_{\textup{rms}}$}
  \rput(P16){$12U_{\textup{rms}}$}
\end{pspicture}

\end{document}

输出

答案3

您可能喜欢以下关于您的方案的介绍:

舍梅

\documentclass[12pt, margin=3mm]{standalone}
\usepackage[american,siunitx]{circuitikz}
\usepackage{mathtools}
\DeclareMathOperator{\rms}{rms}

\begin{document}
\begin{circuitikz}
\ctikzset{transformer L1/.style={inductors/width=1.8,
                                 inductors/coils=7},
         quadpoles/transformer core/height=2.4
         }
\node[transformer core] (T) {};
\draw   (T.inner dot B1) node[circ] {}
        (T.inner dot B2) node[circ] {}
        (T-L2.midtap) -| ++ (0.4,-2) node[ground] (g) {};
\draw   (T.A2) --  ++ (-1,0)   coordinate (Tin)
               to[open, v^=\qty{240}{\volt\of\rms},
                  voltage=straight] (Tin |- T.A1)
               -- (T.A1)
        (T-L2.midtap -| T.B1) to[open, v=\qty{12}{\volt\of\rms},
                                 voltage=straight] (T.B1)
        (T-L2.midtap -| T.B1) to[open, v^=\qty{12}{\volt\of\rms},
                                 voltage=straight] (T.B2)
        (T.B1) -- ++ (2,0) 
               to[D, v={$V_{\gamma}=\qty{0.7}{\volt}$}, i>_=] ++ (2,0) 
        (T.B2) -- ++ (2,0) 
               to[D, v={$V_{\gamma}=\qty{0.7}{\volt}$}, i>_=] ++ (2,0)
        ;
\end{circuitikz}
\end{document}

相关内容