6

I'd want to draw a circuit with an inductive coupling, as you can see in the following image:

enter image description here

What I need now is putting the dots related to the inductive coupling, as well as the power lines. I think I could draw these last ones using TikZ if they were flat, but as they are wavy, I don't know how to do it.

This is the code I've written till now (I've put two lines between both coupled inductors):

\documentclass[border=2pt]{standalone}
\usepackage{circuitikz}

 \begin{document}
\begin{figure}
\centering
\begin{circuitikz}
  \draw (0,0) to [short,o-o] (8,0);
  \draw (0,1.5) to [short,o-] (3,1.5);
  \draw (5,1.5) to [short,-o] (8,1.5);
  \draw (3,1.5) to [inductor] (5,1.5);
  \draw (6,2.5) to [short] (5,2.5) to [inductor] (3,2.5) to [short] (2,2.5) to [short] (2,3.5) to [C] (6,3.5) to [short] (6,2.5);
  \draw (2,3.5) to [short] (2,4.5) to [inductor] (6,4.5) to [short] (6,3.5);
  \draw (2,4.5) to [short] (2,5.5) to [resistor] (6,5.5) to [short] (6,4.5);
  \draw[-] (3.5,1.95) -- (4.5,1.95) node{};
  \draw[-] (3.5,2.05) -- (4.5,2.05) node{};
\end{circuitikz} 
\end{figure}
\end{document}

How could I complete this drawing?

Thank you.

3
  • Please make sure that all images are uploaded using the official Stack Exchange interface, i.e. the image icon on top of the text field (shortcut: Ctrl+G). This ensures that all images will always be accessible and won't expire.
    – someonr
    Dec 8, 2013 at 21:42
  • 3
    In the future, please always try to post a minimal working example (MWE), starting with \documentclass and ending with \end{document}.
    – Herr K.
    Dec 8, 2013 at 21:53
  • Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers.
    – jub0bs
    Sep 15, 2014 at 13:18

3 Answers 3

6

To draw the "wavy" lines, you can use the snake line pattern offered by the decorations.pathmorphing library. Play with the segment length and amplitude parameters to get the exact line style you want.

Code

\documentclass[border=2pt]{standalone}
\usepackage{circuitikz}
\usetikzlibrary{tikzmark,decorations.pathmorphing}

\begin{document}
\begin{circuitikz}
  \draw (0,0) to [short,o-o] (8,0);
  \draw (0,1.5) to [short,o-] (3,1.5);
  \draw (5,1.5) to [short,-o] (8,1.5);
  \draw (3,1.5) to [inductor] (5,1.5);
  \draw (6,2.5) to [short] (5,2.5) to [inductor] (3,2.5) to [short] (2,2.5) to [short] (2,3.5) to [C] (6,3.5) to [short] (6,2.5);
  \draw (2,3.5) to [short] (2,4.5) to [inductor] (6,4.5) to [short] (6,3.5);
  \draw (2,4.5) to [short] (2,5.5) to [resistor] (6,5.5) to [short] (6,4.5);
  \draw[-] (3.5,1.95) -- (4.5,1.95) node{};
  \draw[-] (3.5,2.05) -- (4.5,2.05) node{};

  % wavy lines
  \draw[->,decorate,decoration={snake,segment length=30pt,amplitude=4pt}](0,.75)--(2,.75);
  \draw[->,decorate,decoration={snake,segment length=30pt,amplitude=4pt}](6,.75)--(8,.75);
\end{circuitikz} 
\end{document}

Output

enter image description here

1
  • 1
    Just realized I missed the arrow style. To change it, replace -> with -latex in the \draw command.
    – Herr K.
    Dec 8, 2013 at 22:07
3

You can also use PSTricks:

\documentclass{article}

\usepackage{pst-circ,pst-plot}
\newcommand*\CurvedArrow[4]{
  \rput(#1,0){
    \psplot[algebraic]{0}{#2}{#3*sin(6*x)+#4}
    \psline{->}(#2,#4)(!#2 0.15 add #4)
  }
}

\begin{document}

\begin{pspicture}(-0.4,-0.1)(7.3,8.8)
  \wire[arrows=*-*](0,0)(7,0)
  \coil[arrows=*-*](0,2)(7,2){}
  \coil(6,3.5)(1,3.5){}
  \psline(2.5,2.75)(4.5,2.75)
  \capacitor[arrows=*-*](1,5)(6,5){$C$}
  \coil[arrows=*-*](1,6.5)(6,6.5){$L$}
  \resistor[dipolestyle=zigzag](1,8)(6,8){$R$}
  \wire(1,3.5)(1,8)
  \wire(6,3.5)(6,8)
  \psdots[dotsize=2pt](5.5,2.15)(5.5,3.65)
  \rput(6.2,2.15){$n$}
  \rput(6.2,3.65){$l$}
  \CurvedArrow{-0.4}{1.05}{0.2}{1}
  \CurvedArrow{6.1}{1.05}{0.2}{1}
\end{pspicture}

\end{document}

output

It can almost certainly be made simpler but here is my first try.

2
  • Those inductors are ugly, but the image it's so much pretty than an output of circuitikz, this package maybe is the one thing that I hate of LaTeX.
    – osjerick
    Dec 10, 2013 at 0:38
  • 1
    @OSjerick If you use the option dipolestyle=curved or dipolestyle=elektor for the \coil macro, the winded wire looks "better". Dec 10, 2013 at 0:47
1

For the coupling of the inductors, I'd go like this:

\documentclass{article}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz} \draw
    (0,0) node[transformer] (T) {}
    (T.A1) node[above] {A1}
    (T.B2) node[anchor=west] {B2}
    (T.A1) node[below right=2mm] {$\bullet$}
    (T.B2) node[above left=2mm] {$\bullet$}
    (T.A1) -| (-1.5,1) to[C] (-3,1) |- (T.A2)
;\end{circuitikz}
\end{document}
4
  • And how do you connect the transformer vertically with the rest of the circuit? It always has those horizontal lines at each node.
    – baister
    Dec 9, 2013 at 11:02
  • Yeah those lines are part of the node shape: can't get rid of them if using the transformer shape. Otherwise, you just do something like (T.A1) |- (other node)
    – kenshin
    Dec 9, 2013 at 16:29
  • I don't understand what you say about writing something like (T.A1) |- (other node). Could you give me an example?
    – baister
    Dec 9, 2013 at 21:14
  • Sure. I edited the answer.
    – kenshin
    Dec 10, 2013 at 0:30

You must log in to answer this question.

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