3

I am using Circuitikz and trying to get a SP3T switch. I was wondering if anyone knew a solution for either what the node format (node[spdt]) is or if there is another way. I've already combed through the circuitikz manual and cannot find anything.

2

The easy way is to add an extra contact to a spdt.

I placed it as a rotary switch. For vertical placement, use .45 or \pgfkeysvalueof{/tikz/circuitikz/tripoles/spdt/margin}.

\documentclass{standalone}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}
  \node[spdt,name=S1] {};
  \draw ($(S1)!.59!(S1.east)$) to[short,o-] (S1.east);
\end{circuitikz}
\end{document}

demo

3

Although John Kormylo's answer is the correct one, notice that starting from version 0.9.1 (to be released mid-June 2019) or shortly using the git version, you will be able to use the new rotary switch component:

\begin{circuitikz}
    \draw
    (0,0) -- ++(1,0)
    node[rotary switch <->=3 in 45 wiper 22, anchor=in](R){}
    (R.out 1) -- ++(0.5,0)
    (R.out 2) -- ++(0.5,0)
    (R.out 3) -- ++(0.5,0);
\end{circuitikz}

three channels switch

Pull request and specific docs are at https://github.com/circuitikz/circuitikz/pull/212

  • well, this is more advertisement than answer ;-), anyway, glad to hear that further development of circuitikz is in progress (+1) – Zarko May 29 at 10:48
  • 1
    @Zarko yes, you're right. I was just putting that here for the future reader, so that they know there is a more straightforward way... – Rmano May 29 at 10:52

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.