I am drawing a circuit with circuitikz that have lots of SPDT switches.
I want to show the circuit at two different moments: once, when all the SPDT switches connected to out1 and the second with all of them to out2.
Is there any simple way to do this?
Here is a working example of what I am trying to code:
\documentclass[a4paper]{article}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}
% Switches
\draw (0,2) node[spdt,xscale=1,anchor=in] (Swp) {};
\draw (0,0) node[spdt,xscale=-1,anchor=in] (Swc) {};
\draw (0,-2) node[spdt,xscale=1,anchor=in] (Swn) {};
% Capacitors
\draw (Swp.in) to[C,l_=$(C_s + \Delta C)$] (Swc.in);
\draw (Swn.in) to[C,l^=$(C_s - \Delta C)$] (Swc.in);
% Voltages
\draw (Swp.out 1) node[anchor=west] {$V_{in}^+$};
\draw (Swn.out 1) node[anchor=west] {$V_{in}^-$};
\draw (Swp.out 2) node[anchor=west] {$V_{cm}$};
\draw (Swn.out 2) node[anchor=west] {$V_{cm}$};
\draw (Swc.out 1) node[anchor=east] {$V_{cm}$};
\draw (Swc.out 2) node[anchor=east] {$V_{ref}$};
\end{circuitikz}
\end{document}
Best Answer
Turn the appropriate values into a parameter-dependant values and use a conditional test: