I have a simple circuit and a problem. The coding of the circuit can be seen here:



to[vsourcesin] (2,0)
to[closing switch,->](0,0)




\caption{\textit{{\small Peter's circuit}}}

Why doesn't circuitikz show the transformer? In my document there is no transformer when I build the code.

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

Drawing electrical schemes with circuitikz is not so flexible as ones desired, so the some elements as voltmeters, transformers etc need special effort to be rotated in desired orientation (see rotate voltmeter, etc), so the scheme -- based on guessing about real circuit -- can be drawn as:

\draw (0,0) node[transformer] (T) {};
\coordinate[left=2cm] (a) at (T.A1);
\draw (a) to [closing switch] (T.A1)
      (a) to [vsourcesin]    (a |- T.A2)
          to [lamp] (T.A2);

\draw (T.B1) to[voltmeter,l=$U$,*-] ++ (1,0) coordinate (b)
             to (b |- T.B2) 
             to [short,-*] (T.B2);
%\caption{Peter's circuit}

which gives:

enter image description here

|improve this answer|||||

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.