|
| 1 | +\documentclass[a4paper]{scrartcl} |
| 2 | + |
| 3 | +\usepackage{tikz} |
| 4 | +\usepackage[european resistor]{circuitikz} |
| 5 | +\usepackage{siunitx} |
| 6 | + |
| 7 | +\begin{document} |
| 8 | + |
| 9 | +\begin{figure} |
| 10 | + \begin{circuitikz} |
| 11 | + % Raspberry Pi |
| 12 | + \draw (0.5, -0.5) rectangle (3, 3.5); |
| 13 | + \node at (1.5, 3) {\textbf{RPi}}; |
| 14 | + |
| 15 | + \draw (3.5, 2) to [short] (2.5, 2) node [left] {GND}; |
| 16 | + \draw (3.5, 0) to [short] (2.5, 0) node [left] {GPIO18}; |
| 17 | + |
| 18 | + % Bread Board 1 |
| 19 | + \draw (4, -0.5) rectangle (7.5, 3.5); |
| 20 | + \node at (5, 3) {\textbf{BB1}}; |
| 21 | + |
| 22 | + \draw (3.5, 2) to [short] (4.5, 2) node [circ] {} |
| 23 | + to [short] (5.5, 2) node [circ] {} |
| 24 | + to [short] (8, 2); |
| 25 | + |
| 26 | + \draw (3.5, 0) to [short] (4.5, 0) node [circ] {} |
| 27 | + to [short] (5.5, 0) node [circ] {} |
| 28 | + to [R, l=$R_2$] (7.5, 0) |
| 29 | + to [short] (8, 0); |
| 30 | + |
| 31 | + \draw (4.5, 2) to [push button] (4.5, 0); |
| 32 | + \draw (5.5, 2) to [R, l=$R_1$] (5.5, 0); |
| 33 | + |
| 34 | + % Bread Board 2 |
| 35 | + \draw (8.5, -3.5) rectangle (11.5, 3.5); |
| 36 | + \node at (10, 3) {\textbf{BB2}}; |
| 37 | + |
| 38 | + \draw (8, 2) to [short] (9, 2) node [circ] {} |
| 39 | + to [short] (12, 2); |
| 40 | + |
| 41 | + \draw (9, 1) node [circ] {} to [empty led] (11, 1) node [circ] {} |
| 42 | + to [short] (12, 1); |
| 43 | + |
| 44 | + \draw (8, 0) to [short] (9.5, 0) |
| 45 | + to [empty led] (11.5, 0) |
| 46 | + to [short] (12, 0); |
| 47 | + |
| 48 | + \draw (9, -1) node [circ] {} to [R, l=$R_3$] (11, -1) |
| 49 | + to [short] (12, -1); |
| 50 | + |
| 51 | + \draw (10, -2) to [short] (12, -2); |
| 52 | + \draw (11, -3) to [short] (12, -3); |
| 53 | + |
| 54 | + \draw (9, 4) to [short] (9, -1) |
| 55 | + to [R, l=$R_4$] (9, -3) |
| 56 | + to [short] (9, -4); |
| 57 | + |
| 58 | + \draw (10, -2) to [short] (10, -4); |
| 59 | + |
| 60 | + \draw (11, 4) to [short] (11, 1); |
| 61 | + \draw (11, -3) to [short] (11, -4); |
| 62 | + |
| 63 | + % Door |
| 64 | + \draw (8.5, 4.5) rectangle (11.5, 6.5); |
| 65 | + \node at (9.5, 6) {\textbf{Door}}; |
| 66 | + |
| 67 | + \draw (9, 5) to [empty led] (11, 5); |
| 68 | + |
| 69 | + \draw (9, 5) to [short] (9, 4); |
| 70 | + |
| 71 | + \draw (11, 5) to [short] (11, 4); |
| 72 | + |
| 73 | + % ADMN |
| 74 | + \draw (12.5, -3.5) rectangle (15, 3.5); |
| 75 | + \node at (13.5, 3) {\textbf{Arduino}}; |
| 76 | + |
| 77 | + \draw (12, 2) to [short] (13, 2) node [right] {GND}; |
| 78 | + \draw (12, 1) to [short] (13, 1) node [right] {D12}; |
| 79 | + \draw (12, 0) to [short] (13, 0) node [right] {D10}; |
| 80 | + \draw (12, -1) to [short] (13, -1) node [right] {A0}; |
| 81 | + \draw (12, -2) to [short] (13, -2) node [right] {\SI{5}{\volt}}; |
| 82 | + \draw (12, -3) to [short] (13, -3) node [right] {D13}; |
| 83 | + |
| 84 | + % Sensor |
| 85 | + \draw (8.5, -4.5) rectangle (11.5, -7); |
| 86 | + \node at (9.5, -6.5) {\textbf{Sensor}}; |
| 87 | + |
| 88 | + |
| 89 | + \draw (9, -4) to [short] (9, -5) node [rotate=90, left] {black}; |
| 90 | + \draw (10, -4) to [short] (10, -5) node [rotate=90, left] {blue}; |
| 91 | + \draw (11, -4) to [short] (11, -5) node [rotate=90, left] {red}; |
| 92 | + |
| 93 | + \end{circuitikz} |
| 94 | + \caption{ |
| 95 | + $R_1 = \SI{33}{\kilo\ohm} \pm \SI{2}{\percent}$, |
| 96 | + $R_2 = \SI{28}{\kilo\ohm} \pm \SI{2}{\percent}$, |
| 97 | + $R_3 = \SI{68}{\kilo\ohm} \pm \SI{1}{\percent}$, |
| 98 | + $R_4 = \SI{200}{\ohm} \pm \SI{1}{\percent}$, |
| 99 | + } |
| 100 | +\end{figure} |
| 101 | + |
| 102 | + |
| 103 | +\end{document} |
| 104 | + |
| 105 | +%%% Local Variables: |
| 106 | +%%% coding: utf-8 |
| 107 | +%%% mode: latex |
| 108 | +%%% TeX-engine: xetex |
| 109 | +%%% End: |
0 commit comments