circuitikz_series2

../_images/sphx_glr_circuitikz_series2.svg
\documentclass[]{standalone}

\usepackage[]{graphicx}

\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.17}
\tikzset{>=latex}
\usetikzlibrary{arrows,arrows.meta}
\usepackage{steinmetz}
\usepackage{circuitikz}
\newcommand*{\equal}{=}

\usepackage{tikz-3dplot}
\usetikzlibrary{decorations.markings}

\tikzset{->-/.style={decoration={
  markings,
  mark=at position #1 with {\arrow{>}}},postaction={decorate}}}

\begin{document}
    \begin{circuitikz}
    \draw (0,3) to[battery,l=$E$,i<=$I$] (0,0) -- (4,0) to[vR,v>=$V$,l=$R$] (4,3) to[R,l=$r$] (0,3);
    \draw (0,0) node[ground]{} (0,-1);
    \draw[dashed] (-1,1)--(1,1) -- (1,2) -- (3,2)--(3,4)--(-1,4)--(-1,1);
  \end{circuitikz}
\end{document}