-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.tex
56 lines (45 loc) · 1.27 KB
/
example.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
\documentclass[multi,border=25]{standalone}
\usepackage[siunitx]{circuitikz}
\standaloneenv{circuitikz}
\ctikzsubcircuitdef{thermistor}{center, in, out}{
coordinate (#1-center)
foreach[count=\i] \x in {in, out} {
(#1-center) + (\fpeval{(-1)^\i * 1.5}, 0) coordinate (#1-\x)
}
(#1-in) to[
sR,
name=#1-sr,
l=~,
a=~,
v=$V_{ts}$,
i=$i_{ts}$,
voltage shift=0
] (#1-out)
}
\ctikzsubcircuitactivate{thermistor}
\newcommand{\PTC}[3]{
\thermistor{#1}{#2}
node[right, font=\tiny] at (#1-sr.label) {+t\si{\degree}}
node[above] at (#1-sr.n) (#1-label) {\texttt{#3}}
}
\newcommand{\NTC}[3]{
\thermistor{#1}{#2}
node[right, font=\tiny] at (#1-sr.label) {-t\si{\degree}}
node[above] at (#1-sr.n) (#1-label) {\texttt{#3}}
}
\newcommand{\PTCPN}[4]{
\PTC{#1}{#2}{#3}
(#1-label) + (0, 0.2) coordinate (#1-pn)
node[above] at (#1-pn) {\texttt{#4}}
}
\begin{document}
\begin{circuitikz}[american]
\draw(0,0) \PTC{TH1}{center}{\SI{47}{\kilo\ohm}};
\end{circuitikz}
\begin{circuitikz}[american]
\draw(0,0) \NTC{TH2}{center}{\SI{47}{\kilo\ohm}};
\end{circuitikz}
\begin{circuitikz}[american]
\draw(0,0) \PTCPN{TH2}{center}{\SI{100}{\kilo\ohm}}{TMP63};
\end{circuitikz}
\end{document}