# Circuitikz question on how to solve a problem with voltage arrows

\begin{circuitikz} [european, scale=1.75]
\draw
(0,0) to[sinusoidal voltage source, l=Uq](0,4)
(0,4) -- (3.9999,4)
(3.9999,4) to[short, -*, l=$P_0$](4,4)
(4,4) to[C,  l_=$d_{eff}$,i>^=$I_C$] (4,1.9999)
(4,1.9999) to[short, -*, l=$P_1$](4,2)
(4,2) to[R, l=$R_s$] (4,0)
(4,0) -- (0,0)
(4,2) to[amp,/tikz/circuitikz/bipoles/length=2cm,t=1000x] (6,2)
(6,2) to node[draw,circle,fill=white] {V} (6,0)
(4,4) -- (8,4)
to node[draw,circle,fill=white] {V} (8,0) -- (3.9999,0)
(3.9999,0) to[short, -*, l_=$P_2$](4,0)

(0,0) node[rground] (0,-1);

\end{circuitikz}


This is my circuit code right now. I know it's not really the best solution but it's looking alright. All I need now is 3 Voltage arrows. One at the voltage source. If i add "V<=Uq" to the Voltage source the sinusoidal voltage source changes to a DC source. the other 2 are on the Voltmeters but i can't use the normal voltmeter because it has the potentiometer arrow and I lost 2 points last time I used it.

• welcome to tex.se! ac voltage source are not oriented, so add arrows at it has not sense. for other it is not clear what you like to obtain. i suggest you to add image generated with your code and add by hand, where you like to have your arrows. Commented Apr 13, 2019 at 17:35
• @Zarko --- I do not agree about your comment on the ac voltage sources not being oriented. Phase concordance or opposition is very important in most applications... Anyway, nice answer! Commented Apr 14, 2019 at 0:03
• @Rmano, and this is indicated by arrow? well, this should be invented after time of the mine study :-(. in the first spare time i will check my old and new textbook (even standards) ;-). however, as you see, i find symbol for such a source in circuitikz and use them. its existence somehow say that you are right ... Commented Apr 14, 2019 at 7:56
• @Zarko well, I prefer American notation with signs, but yes, you need to show in which direction the voltage is positive (sin(t) and - sin(t) are different if relative phase is important) Commented Apr 14, 2019 at 8:00
• Look also at github.com/circuitikz/circuitikz/issues/182 Commented Apr 14, 2019 at 18:24

probably you looking for something like this:

for voltmeters i define new mode style, which work properly if voltmeters are in separate \draw branch:

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

\begin{document}
\begin{circuitikz} [european,
Vm/.style = {circle, draw, semithick, minimum size=9mm,
append after command={\pgfextra{\let\LN\tikzlastnode
\node[circle, fill=white, minimum size=9mm]
at (\LN.center) {\textbf{V}};
\draw [-latex, shorten >=-3mm, shorten <=-3mm]
(\LN.240) -- (\LN.45);
}}
}
]
\ctikzset{bipoles/capacitor/height=0.5,
bipoles/capacitor/width=0.1,
bipoles/amp/width=1
}
\draw   (0,0)   to [sV=$Uq$]                (0,4) % <---
to[short, -*]               (3,4) node[above] {$P_0$}
to[C=$d_{\mathrm{eff}}$,
i>^=$I_C$]               (3,2) node[left]  {$P_1$}
to[R, l=$R_s$]              (3,0) node[below] {$P_2$}
(3,2)   to[short, *- ]              (4,2)
to[amp, t=$1000\times$]     (6,2)
--                          (6,0)% Vm
(3,4)   -|                          (8,0)% Vm
to[short, -*]               (3,0)
-- (0,0)
node[rground] {};
\draw   (6,2)   to node (vm) [Vm] {}        (6,0)   % <---
(8,4)   to node (vm) [Vm] {}        (8,0);  % <---
\end{circuitikz}
\end{document}


addendum: after seeing advertising for new version of the circuitikzgit package in addendum of Rmano's answer, i quickly checked the novelties in the package. for test I reprogrammed my answer using it:

\documentclass[border=3.14159]{standalone}
\usepackage[siunitx]{circuitikzgit}

\begin{document}
\begin{circuitikz}[european]
\ctikzset{bipoles/capacitor/height=0.5,
bipoles/capacitor/width=0.1,
bipoles/amp/width=1
}
\draw
(0,0)   to [sV=$Uq$]                        (0,4)
to[short, -*]                       (3,4) node[above] {$P_0$}
to[C=$d_{\mathrm{eff}}$,i>^=$I_C$]  (3,2) node[left]  {$P_1$}
to[R, l=$R_s$]                      (3,0) node[below] {$P_2$}
to[short, -*]                       (0,0)
node[rground] {}
(3,2)   to[short, *- ]                      (3.2,2)
to[amp, t=$1000\times$]             (6,2)
to[rmeterwa, t=$V_0$]               (6,0)% Vm 1
to[short, -*]                       (3,0)
(3,4)   to[short, *-]                       (8,4)
to[rmeterwa, t=$V_1$]               (8,0)% Vm 2
to[short, -*]                       (6,0);
\end{circuitikz}
\end{document}


really simpler and shorter solution! i looking forward for further development of the package and for its availability on CTAN.

There are a bit of strange things there, like all the x.99999 coordinates to avoid use simple nodes, and the error on the ground node without a {} and used as a path node, but:

1. you can put a voltage on a sinusoidal generator using to[sV, v=...] and its variants v<, v_> etc. (see the manual);

2. If you don't like the arrow on the voltmeters, you can use the empty generator symbol, name it, and add whatever you want to it.

For example (I would optimize this more, there are repeated coordinates, but I did just the minimum changes):

\documentclass[border=10pt]{standalone}
\usepackage[siunitx]{circuitikz}
\begin{document}
\begin{circuitikz} [european, scale=1.75]
\draw
(0,0) to[sinusoidal voltage source, v=Uq] (0,4)
(0,4)  to[short, -*](4,4) node[above]{$P_0$}
(4,4) to[C,  l_=$d_\mathrm{eff}$,i>^=$I_C$, -*]
(4,2) node[left]{$P_1$}
(4,2) to[R, l=$R_s$] (4,0)
(4,0) -- (0,0)
(4,2) to[amp,/tikz/circuitikz/bipoles/length=2cm,t=1000x] (6,2)
(6,2) to[esource, v<=$V_0$, name=V0] (6,0)
(4,4) -- (8,4) to[esource, v<=$V_1$, name=V1] (8,0)
to[short, -*](4,0) node[below]{$P_2$}
(0,0) node[rground]{};
\path (V0.center) node{V} (V1.center) node{V};
\end{circuitikz}
\end{document}


Notes:

1. of course the sign of a sinusoidal voltage generator is important, most of the time. Think two generators in series in phase or in phase opposition...

2. In the new version of the package I hope to add a faster way to add the text on the empty generator.

3. In the new version of the manual there are a couple of tutorials that may help you: see at https://circuitikz.github.io/circuitikz/

### Update: with the last (unreleased) version of circuitikz, you can do this:

\documentclass[border=10pt]{standalone}
\usepackage[siunitx, RPvoltages]{circuitikzgit}
\begin{document}
\begin{circuitikz} [european, scale=1.75]
\draw
(0,0) to[sinusoidal voltage source, v=Uq]
(0,4) to[short, -*](4,4) node[above]{$P_0$}
(4,4) to[C,  l_=$d_\mathrm{eff}$,i>^=$I_C$, -*]
(4,2) node[left]{$P_1$} to[R, l=$R_s$]
(4,0) -- (0,0)
(4,2) to[amp,/tikz/circuitikz/bipoles/length=2cm,t=1000x] (6,2)
(6,2) to[smeter, t=V, v<=$V_0$] (6,0)
(4,4) -- (8,4) to[smeter, t=V, v<=$V_1$]
(8,0) to[short, -*](4,0) node[below]{$P_2$}
(0,0) node[rground]{};
\end{circuitikz}
\end{document}


• +1 for advertising of new version of the circuitikz package: circuiotikzgit. I'm curious when the authors will decide to load it in CTAN ? Commented Apr 16, 2019 at 19:47
• @Zarko we decided to wait TeXLive 2019 release to check for compatibility problem. Then I hope to release as soon as possible. See github.com/circuitikz/circuitikz/issues/173. Notice however that circuitikzgit is just the "bleeding edge" version of circuitikz and not a separate thing. Commented Apr 16, 2019 at 20:09
• i expected, that circuitikzgit on CTAN will be circuitikz version 0.8.4 :). my first test (one i show in my answer, it is slightly different from yours) gives good impression. congratulations! Commented Apr 16, 2019 at 20:31