3

I would like to draw an electric circuit diagram that looks like this:

Circuit diagram to draw

I am suffering from those circular flows $i_1(t),i_2(t)$ (I drew them in red to point out; they actually don't need to be colored).

I have so far coded:

\begin{circuitikz}
        \ctikzset{inductor=american}
        \draw(0,0)to[open,v^>=$v_i(t)$,o-o](0,2);
        \draw(0,2)to[short,o-*,R=$R_1$](2,2)to[short,*-*,L=$L$](2,0);
        \draw(2,2)to[short,*-*,R=$R_2$](4,2)to[C,*-,l_=$C$,v^<=$v_o(t)$](4,0);
        \draw(0,0)to[short,-*](2,0)to[short,*-](4,0);
        % FIXME the following line and so far
        \draw(1,1.5)arc[short,start angle=90,end angle=-90,I=$i_1(t)$,radius=0.5];
\end{circuitikz}

, which outputs:

What I have drawn

1

1 Answer 1

5
\documentclass[border=3.1314592mm]{standalone}
\usepackage{circuitikz}

\begin{document}
    \begin{circuitikz}
    \ctikzset{inductor=american}
\draw   (0,0)   to [open,v^>=$v_i(t)$]  ++ (0,2) 
                to [R=$R_1$,o-*]        ++ (2,0) coordinate (L)
                to [R=$R_2$,*-*]        ++ (3,0)
                to [C,a=$C$,v^<=$v_o(t)$] ++ (0,-2)
                to [short, *-o] (0,0)
        (L)     to [L=$L$,-*]           ++ (0,-2);
%
% now is FIXED  :-)
\draw[->]   (0.8,1.5) arc(110:-110:5mm) node[midway, left, font=\footnotesize] {$i_1(t)$};
\draw[->]   (3.3,1.5) arc(110:-110:5mm) node[midway, left, font=\footnotesize] {$i_2(t)$};
    \end{circuitikz}
\end{document}

enter image description here

or (to my opinion better):

enter image description here

where MWE is

\documentclass[border=3.1314592mm]{standalone}
\usepackage{circuitikz}

\begin{document}
    \begin{circuitikz}
\ctikzset{inductor=american,
          bipoles/capacitor/height=0.4,
          bipoles/capacitor/width=0.1
          }
\draw   (0,0)   to [open,v^>=$v_i(t)$]  ++ (0,2) 
                to [R=$R_1$,o-*]        ++ (2,0) coordinate (L)
                to [R=$R_2$,*- ]        ++ (3,0)
                to [C,a=$C$,v^<=$v_o(t)$] ++ (0,-2)
                to [short,  -o] (0,0)
        (L)     to [L=$L$,-*]           ++ (0,-2);
%
% now is FIXED  :-)
\draw[->]   (0.8,1.5) arc(110:-110:5mm) node[midway, left, font=\footnotesize] {$i_1(t)$};
\draw[->]   (3.7,0.5) arc(290:  70:5mm) node[midway, right,font=\footnotesize] {$i_2(t)$};
    \end{circuitikz}
\end{document}
10
  • 1
    @Sebastiano, really? You are so kind and also magician: how you put this nice smiles in comment?
    – Zarko
    Jan 19 at 13:44
  • 1
    @Sebastiano, I'm on M$ .W10. But I have a plan go to W11 when I will buy a new PC (now I'm on 15 year old machine, but it still works however it is very slow ). I'm to old to learn new OS :-(
    – Zarko
    Jan 19 at 16:21
  • 2
    One can always open unicode.org/emoji/charts/full-emoji-list.html and do a copy&paste: 🙂 ;-)
    – Rmano
    Jan 19 at 16:47
  • 1
    @Sebastiano, so far i use my (smart)phone only for talking and sms ... 😎 (i found how to this here in comment)
    – Zarko
    Jan 20 at 8:01
  • 1
    @Sebastiano, Zarko: for windows I suggest this: github.com/samhocevar/wincompose --- very nice and powerful
    – Rmano
    Jan 20 at 10:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.