I have a simple circuit and a problem. The coding of the circuit can be seen here:
\begin{figure}[h]
\centering
\begin{circuitikz}[scale=2]
%CIRCUIT
\draw(0,0)
to[vsourcesin] (2,0)
to[transformer](2,2)
to[lamp](0,2)
to[closing switch,->](0,0)
;
%ADDING VOLTMETER
\draw
(.25,2)to[short,*-](.25,4)
to[voltmeter,l=$U$](1.75,4)
to[short,-*](1.75,2)
;
%NODES
\draw(1,1.6)node{lamp};
\draw(1,3.6)node{voltmeter};
\end{circuitikz}
\caption{\textit{{\small Peter's circuit}}}
\end{figure}
Why doesn't circuitikz show the transformer? In my document there is no transformer when I build the code.

transformeris a node style, i.e. you have to use it likenode[transformer] {}. Unfortunately, I don't know where you want it to be placed, thus I cannot straighforwardly answer your question. – Henri Menke Dec 06 '15 at 10:50