1. Circuit circuitikz๏ƒ


1.1. Simple series circuit๏ƒ

A simple circuit is shown below.
circuit.png
 1\documentclass[12pt, varwidth, border=5mm]{standalone}
 2\usepackage{circuitikz}
 3\usepackage{tikz}
 4\begin{document}
 5\begin{circuitikz}
 6\draw (0,0) to[battery, l={$12V$}, american] (0,2)
 7to[short] (2,2)
 8to[bulb, l=$3\Omega$] (2,0) % The bulb
 9to[short] (0,0);
10\end{circuitikz}\\
11Series circuit with one globe.
12\end{document}

1.2. Latex guide๏ƒ

The circuitikz package is used to create circuit diagrams in LaTeX.
It provides a set of macros and commands to draw circuit elements such as batteries, resistors, and capacitors.
The draw command is used to draw the circuit elements.
The to keyword is used to connect the elements.
The options within square brackets specify the type of element and its properties.
The to keyword is used four times to connect circuit elements.
The first to connects the bottom of the battery to the top (0,0) to[battery={$12V$}] (0,2).
The second to connects the top of the battery to a point (2,2) using a short wire to[short] (2,2).
The third to connects this point to a bulb with a resistance of 3 Ohms to[bulb, l=$3Omega$] (2,0).
The fourth to connects the bottom of the bulb back to the bottom of the battery using a short wire to[short] (0,0).

1.3. Series circuit with Ammeter and Voltmeter๏ƒ

A simple circuit is shown below.
circuit_globe_AV.png
 1\documentclass[12pt, varwidth, border=5mm]{standalone}
 2\usepackage{circuitikz}
 3\usepackage{tikz}
 4\usetikzlibrary{calc}
 5
 6% define a custom ammeter component with overlaid text label
 7\newcommand{\myammeter}[2]{
 8    \draw (#1) to[rmeter] (#2);
 9    \node[align=center] at ($(#1)!0.5!(#2)$){A};
10}
11
12% define a custom voltmeter component with overlaid text label
13\newcommand{\myvoltmeter}[2]{
14    \draw (#1) to[rmeter] (#2);
15    \node[align=center] at ($(#1)!0.5!(#2)$){V};
16}
17
18\begin{document}
19\begin{circuitikz}
20% define coordinates for points in circuit form bot left of main loop
21\coordinate (A) at (0,0);
22\coordinate (B) at (0,2);
23\coordinate (C) at (3,2);
24\coordinate (D) at (3,0);
25\coordinate (E) at (0.5,0);
26\coordinate (F) at (0.5,-2);
27\coordinate (G) at (2.5,-2);
28\coordinate (H) at (2.5,0);
29
30% use the custom ammeter and voltmeter components
31\draw
32(A) to[battery] (B);
33\myammeter{B}{C};
34\draw
35(C) -- (D)
36(D) to[bulb] (A)
37(E) -- (F);
38\myvoltmeter{F}{G};
39\draw
40(G) -- (H)
41;
42 \end{circuitikz}\\
43Series circuit with one globe \\
44and an ammeter in series \\
45and a voltmeter in parallel.
46\end{document}

1.4. Series circuit with 2 globes๏ƒ

A series circuit with 2 globes.
circuit_2globes_series.png
 1\documentclass[12pt, varwidth, border=5mm]{standalone}
 2\usepackage{circuitikz}
 3\usepackage{tikz}
 4
 5\begin{document}
 6\begin{circuitikz}
 7% define coordinates for points in circuit form top left
 8\coordinate (A) at (0,-2);
 9\coordinate (B) at (0,2);
10\coordinate (C) at (2,2);
11\coordinate (D) at (2,0);
12\coordinate (E) at (2,-2);
13
14\draw
15(A) to[battery, l={$12V$}] (B) % The voltage source
16to[short] (C)
17to[bulb, l=$3\Omega$] (D) % The first bulb
18to[bulb, l=$3\Omega$] (E) % The second bulb
19to[short] (A);
20\end{circuitikz}\\
21Circuit with two globes in series.
22\end{document}

1.5. Parallel circuit with 2 globes๏ƒ

A parallel circuit with 2 globes.
circuit_2globes_parallel.png
 1\documentclass[12pt, varwidth, border=5mm]{standalone}
 2\usepackage{circuitikz}
 3\usepackage{tikz}
 4
 5\begin{document}
 6\begin{circuitikz}
 7% define coordinates for points in circuit from bot left
 8\coordinate (A) at (0,0);
 9\coordinate (B) at ($(A)+(0,2)$);
10\coordinate (C) at ($(B)+(2,0)$);
11\coordinate (D) at ($(C)+(2,0)$);
12\coordinate (E) at ($(D)+(0,-2)$);
13\coordinate (F) at ($(E)+(-2,0)$);
14
15\draw
16(A) to[battery, l={$12V$}] (B) % The voltage source
17to[short] (C)
18to[bulb, l=$3\Omega$] (F) % The first bulb
19to[short] (A)
20(C) to[short] (D)
21(D) to[bulb, l=$3\Omega$] (E) % The second bulb
22(E) to[short] (F);
23\end{circuitikz}\\
24Circuit with two globes in parallel.
25\end{document}