1

I am trying to draw the following figure in circuitikz.

I am able to draw the capacitor and the mosfets so far. However i am stuck at how to draw the 3 phase transformer.

this is what I have so far

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[siunitx,cuteinductors,american,RPvoltages]{circuitikz}

\begin{document}

\def\normalcoord(#1){coordinate(#1)}
\def\showcoord(#1){node[circle, red, draw, inner sep=1pt,
pin={[red, overlay, inner sep=0.5pt, font=\tiny, pin distance=0.1cm,
pin edge={red, overlay}]45:#1}](#1){}}
\let\coord=\normalcoord
%\let\coord=\showcoord

\begin{circuitikz}[scale=1, voltage shift
=0.5]
\ctikzset{
diode=stroke,
diodes/scale=0.8,
diodes/fill=red,
capacitors/scale=0.8,
voltage shift=0.8,
}
\draw 
(0,0)  coordinate (origin)  \coord(origin)
   to[short, -*] ++(1,0) coordinate (i1) \coord(i1)
   % capicator1
   (i1) to[C=$C_1$, v=$V_1$] ++(0,6)  coordinate(i2) \coord(i2)

   % S4 and S1
   (i1) to[short, -*] ++(2,0) coordinate(i3) \coord(i3)
   (i3)  to[short, -*] ++(0,1) coordinate(i4) \coord(i4)
   node[nigfete,bodydiode] (fet4) {S4} \coord(s4)
   (fet4.D) to[short, -*] ++(0,3) coordinate(i5) \coord(i5)
   node[nigfete,bodydiode] (fet1) {S1} \coord(s1)
   (fet1.D) to[short, -*] ++(0,0.5) coordinate(i6) \coord(i6)
   to[short, -*] ++(-2,0) coordinate(i7) \coord(i7)
   to[short] ++(-1,0) coordinate(i8) \coord(i8)

   % S5 and S2
   (i3) to[short, -*] ++(2,0) coordinate(i9) \coord(i9)
   (i9)  to[short, -*] ++(0,1) coordinate(i10) \coord(i10)
   node[nigfete,bodydiode] (fet5) {S5} \coord(S5)
   (fet5.D) to[short, -*] ++(0,3) coordinate(i11) \coord(i11)
   node[nigfete,bodydiode] (fet2) {S2} \coord(S2)
   (fet2.D) to[short, -*] ++(0,0.5) coordinate(i12) \coord(i12)
   to[short, -*] ++(-2,0) coordinate(i13) \coord(i13)

   % S6 and S3
   (i9) to[short, -*] ++(2,0) coordinate(i14) \coord(i14)
   (i14)  to[short, -*] ++(0,1) coordinate(i15) \coord(i15)
   node[nigfete,bodydiode] (fet6) {S6} \coord(S6)
   (fet6.D) to[short, -*] ++(0,3) coordinate(i16) \coord(i16)
   node[nigfete,bodydiode] (fet3) {S3} \coord(S3)
   (fet3.D) to[short, -*] ++(0,0.5) coordinate(i17) \coord(i17)
   to[short, -*] ++(-2,0) coordinate(i18) \coord(i18)

   %L11A
   (fet1.E) to[L=$L_1_1_A$] ++(6,0)
   node [transformer](T){}

;
\end{circuitikz}
\end{document}

Any help is appreciated!!

1
  • 1
    Basically, it is just a bunch of coills (some fancy, some not). Looking at your code, I would first draw the transformer as a separate unit, then add it back into the existing circuit as a scope. Mar 1, 2020 at 15:17

1 Answer 1

3

Here is the transformer. It will be placed centered at T0 (which you must provide). The connecting points are at T1 - T6.

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

\begin{document}

\def\normalcoord(#1){coordinate(#1)}
\def\showcoord(#1){node[circle, red, draw, inner sep=1pt,
pin={[red, overlay, inner sep=0.5pt, font=\tiny, pin distance=0.1cm,
pin edge={red, overlay}]45:#1}](#1){}}
\let\coord=\normalcoord
%\let\coord=\showcoord

\begin{circuitikz}[scale=1, voltage shift=0.5]
\coordinate (T0) at (0,0);% position scope relative to ouside coordinates
\begin{scope}[shift=(T0)]
\draw (-.2,1) -- (-.2,-1) (.2,1)--(.2,-1);
\draw (-3,1) coordinate(T1) to[cute choke] (-2,1) to[inductor,name=L1] (-.2,1)
  node[below,circ] at (L1.south west) {};
\draw (-3,0) coordinate(T2) to[cute choke] (-2,0) to[inductor,name=L2] (-.2,0)
  node[below,circ] at (L2.south west) {};
\draw (-3,-1) coordinate(T3) to[cute choke] (-2,-1) to[inductor,name=L3] (-.2,-1)
  node[below,circ] at (L3.south west) {};
\draw (.2,1) to[inductor,name=L4] (2,1) to[cute choke] (3,1) coordinate(T4)
  node[below,circ] at (L4.south east) {};
\draw (.2,0) to[inductor,name=L5] (2,0) to[cute choke] (3,0) coordinate(T5)
  node[below,circ] at (L5.south east) {};
\draw (.2,-1) to[inductor,name=L6] (2,-1) to[cute choke] (3,-1) coordinate(T6)
  node[below,circ] at (L6.south east) {};
\end{scope}
\end{circuitikz}
\end{document}

demo

3
  • Thanks, this is exactly what i wanted. Can you please explain what is the purpose of [shift=(T0)] ? I am new to tikiz and trying to learn.
    – root
    Mar 1, 2020 at 19:02
  • I think i understood the purpose of shift, by playing around. Thanks for the hele :)
    – root
    Mar 1, 2020 at 19:55
  • It is convenient to use different coordinates inside the scope With a node you can use [anchor=...] to do the alignment, but with a scope you only have shift, or xshift and yshift. Mar 2, 2020 at 3:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .