# Ammeter and Voltmeter for the circuit TikZ library

How can I make the Voltmeter and Ammeter symbols look like in the follwing picture using the circuits.ee.IEC library?

I just managed to do this:

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{circuits}
\usetikzlibrary{circuits.ee.IEC}

\tikzset{circuit declare symbol = ammeter}
\tikzset{set ammeter graphic ={draw,generic circle IEC, minimum size=5mm}}

\begin{document}

\begin{tikzpicture}[circuit ee IEC]
\draw (0,0) to[ammeter] (2,0);
\end{tikzpicture}

\end{document}


-

You can simply use the generic circle IEC shape. So you would put \node (name) [generic circle IEC, draw] at (location) {A} for the Ammeter. Just replace the A with a V for the voltmeter. If this is not exactly what you mean or you need additional information on how to apply it to your specific case, you should provide a minimal working example showing the diagram you have so far without the meters.

Edit: In response to your edit, you can simply use the info option to get a label and use center as the angle to position this label in the center of the shape. Your example then becomes:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{circuits}
\usetikzlibrary{circuits.ee.IEC}
\tikzset{circuit declare symbol = ammeter}
\tikzset{set ammeter graphic ={draw,generic circle IEC, minimum size=5mm,info=center:A}}
\begin{document}
\begin{tikzpicture}[circuit ee IEC]
\draw (0,0) to[ammeter] (2,0);
\end{tikzpicture}
\end{document}


Resulting in:

-
@student: see the updated answer. –  Roelof Spijker Jan 30 '12 at 19:40

A PSTricks solution using the pst-circ package:

\documentclass{article}

\usepackage{pst-circ}

\begin{document}

\begin{pspicture}(-0.5,-2)(9,6.5)
\pnodes{P}(0,0)(0,6)(3.1,6)(5.9,6)(9,6)(9,0)(8.2,0)(5.5,0)
\circledipole[
labeloffset = 0
](P0)(P1){$A$}
\battery(P1)(P3){}
\battery(P2)(P4){}
\wire(P4)(P5)
\wire(P5)(P6)
\lamp(P6)(P7){}
\circledipole[
labeloffset = 0,
parallel,
parallelsep = 0.2,
parallelarm = 1.5,
parallelnode
](P6)(P7){$U$}
\lamp(P7)(P0){}
\end{pspicture}

\end{document}


Notice that in the coordinates for the nodes, I've choosen 3.1 and 5.9 instead of 3 and 6. These choices avoid an overlap in the drawing of the two batteries.

-

Try to see whether this helps you

\begin{circuitikz}
\draw (4,4) to [battery] (0,4) -- (0,0) to [lamp] (4,0)--(4,4) -- (1,0);
\draw (1,-2)--(3,-2)--(3,0);