0

Is there any way to get the amerycan symbol for a thermistor in circuitikz?
By now, even with the american option loaded, when I draw a thermistor

\begin{circuitikz}
    \draw
    (0, 0) to[thermistor ntc] (2, 0);
\end{circuitikz}

I get the european symbol:

enter image description here

Is there any way to get the american symbol?

enter image description here

Thanks

1
  • I'm not familar with circuitikz. But maybe you can create a new symbol: \newcommand{\americanthermistor}{\draw[thick,color=blue,rotate=0] (0,0) to[american resistor, a=$-t^{\circ}$] +(2,0);\draw[thick,color=blue,rotate=0] (0.4,-0.5) -- (0.6,-0.5) -- +(0.8,1);}
    – Bobyandbob
    Commented Apr 8, 2017 at 17:11

1 Answer 1

1

This is sort of a minimal conversion, since it still uses the same symbols below the line. Also, I moved the line so that it went through the center.

There are a LOT of components which use European resistors, so I added a macro co make the conversion easier.

\documentclass{standalone}
\usepackage{circuitikz}

\makeatletter
\newcommand{\drawamericanresistor}[3]% #1=width (factor), #2=height, #3=depth
{\pgfscope
  \pgftransformationadjustments
    \pgfmathsetlength{\pgf@circ@res@step}{#1\pgf@circ@Rlen+\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}
    \divide \pgf@circ@res@step by 12
  \pgf@circ@res@up=#2
  \pgf@circ@res@down=#3

    \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*0.5*\pgflinewidth}{\pgf@circ@res@zero}}
    \pgf@circ@res@other = \pgf@circ@res@left
    \advance\pgf@circ@res@other by \pgf@circ@res@step 
    \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
    \advance\pgf@circ@res@other by 2\pgf@circ@res@step 
    \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
    \advance\pgf@circ@res@other by 2\pgf@circ@res@step
    \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
    \advance\pgf@circ@res@other by 2\pgf@circ@res@step
    \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
    \advance\pgf@circ@res@other by 2\pgf@circ@res@step
    \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}}
    \advance\pgf@circ@res@other by 2\pgf@circ@res@step
    \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@down}}
    \advance\pgf@circ@res@other by \pgf@circ@res@step
    \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@zero}}
    \pgfsetbeveljoin
    \pgfusepath{draw}
\endpgfscope}

%% Thermistor NTC
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/thermistorntc/height 2}}{thermistorntc}{\ctikzvalof{bipoles/thermistorntc/height}}{\ctikzvalof{bipoles/thermistorntc/width}}{
    \pgf@circ@res@other=\ctikzvalof{bipoles/thermistorntc/main}\pgf@circ@res@up
        \drawamericanresistor{\ctikzvalof{bipoles/thermistorntc/width}}{\pgf@circ@res@other}{-\pgf@circ@res@other}

        \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@left}{\pgf@circ@res@up}}
        \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{-\pgf@circ@res@up}}
        \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@up}}
        \pgfusepath{draw}

        \pgfsetlinewidth{\pgfstartlinewidth}
        \pgftext[top,x=.85\pgf@circ@res@left,y=.75\pgf@circ@res@down]{\tiny$\vartheta$}
        \pgfsetarrowsend{latex'}
        \pgfpathmoveto{\pgfpoint{.62\pgf@circ@res@left}{\pgf@circ@res@down}}
        \pgfpathlineto{\pgfpoint{.62\pgf@circ@res@left}{.7\pgf@circ@res@down}}
        \pgfusepath{draw}
        \pgfpathmoveto{\pgfpoint{.45\pgf@circ@res@left}{.7\pgf@circ@res@down}}
        \pgfpathlineto{\pgfpoint{.45\pgf@circ@res@left}{\pgf@circ@res@down}}
        \pgfusepath{draw}
}
\makeatother

\begin{document}
\begin{circuitikz}
    \draw
    (0, 0) to[thermistor ntc] (2, 0);
\end{circuitikz}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .