1

I've been trying to experiment a bit with circuitikz to make my file look cleaner and take up less space (instead of using images from circuits diagram editors). I'm simply lost in all the examples and possibilities I've found online and I figured it's better to ask here and get a straight answer.

These are the two circuits I've been trying to make without much success: enter image description here

This is my code:

    \begin{circuitikz}[scale=1] \draw
(0,0) to[battery2, v=f, invert] (0,4)
    to[R=R, -*] (4,4)
    to[voltmeter, l=$V_{mis}$] (4,2)
(4,2) --* (4,0)
    to[ammeter, l = $I_{mis}$] (5,2)
(5,0) -- (0,0)
;
\end{circuitikz}

which turns out like this (yikes):

enter image description here

Any help would be appreciated!

EDIT: I did it! Here's the code:

\begin{circuitikz}[scale=1] \draw
(0,0) to[battery2, v=f, invert] (0,4)
    to[R=R, -*] (4,4)
    to[voltmeter, l=$V_{mis}$, -*] (4,0) -- (0,0)
(4,4) -* (6,4)
    to[ammeter, l=$I_{mis}$] (6,2) to[R=$R_x$, -*] (6,0) -- (4,0)
;
\end{circuitikz}

and here's the final result:

enter image description here

I still don't know how to rotate the components (especially the voltmeter and amperometer) without making a fuss, so if anyone could help me in this regard it would be great.

  • 1
    tex.stackexchange.com/questions/229152/… is related to rotating, the solution is a bit complex though. – Marijn Jun 28 '19 at 10:57
  • 1
    Please consider accepting the answers to your pervious questions (if you find them useful). – Raaja Jun 28 '19 at 11:00
  • 1
    @Raaja is right, it seems that you are missing the "accept tick" feature of the network. Please, it is important to properly mark accepted the answers, to signal that the problem is solved. – Rmano Jun 28 '19 at 14:24
  • 1
    @Rmano, yes I didn't know exactly how it worked. Thanks for your answer and for helping me understand how the network works. – Roberto Gargiulo Jun 29 '19 at 8:27
5

If you use the new version (0.9.2, but it's here since 0.9.0) you can use the new generic instruments:

\documentclass[border=10pt]{standalone}
\usepackage[siunitx, RPvoltages]{circuitikz}
%\usepackage[siunitx, RPvoltages]{circuitikzgit}
\begin{document}
\begin{circuitikz}[
    ]
        \draw
(0,0) to[battery2, v=f, ] (0,4)
    to[R=R, -*] (4,4)
    to[rmeterwa, t=V, l=$V_{mis}$, -*] (4,0) -- (0,0)
(4,4) -* (6,4)
    to[rmeterwa, t=A, l=$I_{mis}$] (6,2) to[R=$R_x$, -*] (6,0) -- (4,0)
;
\end{circuitikz}
\end{document}

enter image description here

You can find a snapshot of the last version, with the documentation, in its github page. You just download the circuitikzgit.sty file, and use the second (commented out here) \usepackage instruction. Be sure to read the part about voltage and current orientation.

(By the way, given that these are circuits that I think will be used in class, consider the "QUCS-style" instruments; they show explicitly the type of internal connection --- short circuit for the ammeter, open circuit for the voltmeter).

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.