2

I've stumbled upon the following figure I'm trying to implement:

enter image description here

The previous circuit is already made by me using circuitikz. There is a very simple way of making this figure using tikz, but before jumpstarting into it, I was wondering if there is a "circuitikz way" of making such picture. I've looked on the manual and didn't find anything.

The code for making this picture (without the red current):

    \begin{circuitikz} [american voltages]
        \draw
        (0,0)
        node[ground] (terra1) {}
        to[american voltage source, l=$V_{dc}$] ++(0,2.5)
        to[R=$R_{dc}$] ++(2.5,0)
        to[short, i=$I_{1}$] ++(0.5,0) coordinate (nocomum)
        to[R, l=$R_{Load}$, v=$V_{out}$,i=$I_{out}$] ++(0,-2.5)
        node[ground] (terra ref) {}
        (nocomum) to[short,i^<=$I_{2}$] ++(0.5,0) 
        to[R=$R_{dc}$] ++(2.5,0)
        to[american voltage source,invert, l=$V_{dc}$] ++(0,-2.5)
        node[ground] (terra2) {}
        ;
    \end{circuitikz}
1
  • 3
    Yes, you are supposed to use TikZ for the elements that do exists in it, like the arrow --- circuitikz is not trying to reinvent the wheel ;-). The @Scrödinger's cat's answer is spot on
    – Rmano
    Feb 28, 2020 at 18:43

2 Answers 2

6

This is a TikZ solution in case this does not exist in circuitikz or is difficult.

\documentclass{article}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}[american voltages]
 \begin{scope}[local bounding box=circuit]
        \draw
        (0,0)
        node[ground] (terra1) {}
        to[american voltage source, l=$V_{dc}$] ++(0,2.5)
        to[R=$R_{dc}$] ++(2.5,0)
        to[short, i=$I_{1}$] ++(0.5,0) coordinate (nocomum)
        to[R, l=$R_{Load}$, v=$V_{out}$,i=$I_{out}$] ++(0,-2.5)
        node[ground] (terra ref) {}
        (nocomum) to[short,i^<=$I_{2}$] ++(0.5,0) 
        to[R=$R_{dc}$] ++(2.5,0)
        to[american voltage source,invert, l=$V_{dc}$] ++(0,-2.5)
        node[ground] (terra2) {}
        ;
 \end{scope}        
 \draw[red,-stealth,rounded corners=1em] ([xshift=-1em]circuit.west) |-
 ([xshift=1em,yshift=1em]circuit.north east) -- 
 node[right,font=\sffamily]{Ic12}
 ([xshift=1em]circuit.east);
\end{circuitikz}
\end{document}

enter image description here

3

A small, off-topic variation of nice @Schrödinger's cat answer (+1):

\documentclass[margin=3mm]{standalone}
\usepackage{circuitikz}

\begin{document}
    \begin{circuitikz} [american voltages]
\def\dc{\mathrm{dc}}
\def\out{\mathrm{out}}
    \begin{scope}[local bounding box=circuit]
\draw   (0,0)   node[ground] {}
                to[V=$V_{\dc}$,invert]  ++ (0,2.5)
                to[R=$R_{\dc}$]  ++ (2.5,0)
                to[short, i=$I_{1}$]    ++ (0.5,0) coordinate (nocomum)
                to[R=$R_{\mathrm{Load}}$,
                   v=$V_{\out}$,
                   i=$I_{\out}$]    ++ (0,-2.5)
                node[ground]  {}
        (nocomum)   to[short,i^<=$I_{2}$]   ++(0.5,0)
            to[R=$R_{\dc}$] ++ ( 2.5,0)
            to[V=$V_{\dc}$] ++ (0,-2.5)
            node[ground] {};
    \end{scope}
\draw[-stealth, semithick, red, rounded corners=7mm]
    ([xshift=-1mm] circuit.west) |- ([yshift=1mm] circuit.north)
                                 -| ([xshift=1mm] circuit.east)
    node[pos=.75,right] {$I_{12}$};
    \end{circuitikz}
\end{document}

enter image description here

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.