[Tex/LaTex] Visualizing Wheatstone bridges using CircuiTikz

circuitikz

I want to visualize a Wheatstone bridge configuration in LaTeX using the CircuiTikz package.

I want result similar to this one on Wikimedia — what do I need to consider to get a correct rendering?

Note: This question was answered Q&A-style and therefore does not display a lack of research effort.

Best Answer

You can use visualize it like this:

Example Wheatstone bridge rendering using CircuiTikz

using this code (which you can simply compile using pdflatex):

% tikzpic.tex
\documentclass[tikz, border=1mm]{standalone}
\usepackage[europeanresistors,americaninductors,americancurrents,siunitx]{circuitikz}
\begin{document}

%%% Coordinate definitions: %%%
% Position of the bridge (top upper corner)
\def\x{6}
\def\y{6}
% Size of the bridge
\def\dx{3}
\def\dy{3}

\begin{circuitikz}[american voltages]
  % Voltage source
  \draw (0,0) to [V, l_=5<\volt>]
  (0, \y) to (\x, \y)
  % Left half bridge
  to [R, l_=350<\ohm>, *-*] (\x-\dx,\y-\dy) % Top left resistor
  to [R, l_=350<\ohm>, -*] (\x,\y-2*\dy);  % Bottom left resistor
  % Right half bridge
  \draw (\x,\y)
  to [R, l_=350<\ohm>, -*] (\x+\dx, \y-\dy) % Top right resistor
  to [R, l_=350<\ohm>, -*] (\x,\y-2*\dy)  % Bottom left resistor
  % Draw connection to (-) terminal of voltage source
  to (\x, 0) to (0,0);

  % Draw voltmeter
  \draw (\x-\dx, \y-\dy) to [voltmeter] (\x+\dx, \y-\dy);
\end{circuitikz}

\end{document}

As you can see, the resistance and voltage values are shown in this example. When doing so, ensure you are using the CircuiTikz siunitx integration to properly render the units.

For example, use 5<\milli\volts> instead of $5mV$ or similar -- the latter would cause improper spacing being rendered between the value and the unit.

In order to place the labels on the opposite side of the element, use l_ instead of l_ or vice versa. You can also use v to place a text on the other side.

Another important aspect is to ensure all connections of more than 2 wires are rendered as a black dot in order to avoid ambiguities whether the wires are connected. This can be done using the -* style (and similar, like *-*.

Related Question