aboutsummaryrefslogtreecommitdiff
path: root/docs/ontwerp.tex
blob: 95e9a4b9272b976749d64d4439acd96b8b583515 (plain)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
\documentclass[12pt, a4paper, dutch]{article}

\usepackage[margin=1in]{geometry}
\usepackage{circuitikz}
\usepackage{float}
\usepackage{babel}
\usepackage{siunitx}
\usepackage{amsmath}
\usepackage{scalerel}
\usepackage{csquotes}
\usepackage{parskip}
\usepackage{unicode-math}
\usepackage{fontspec}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage{pgfplots}
\usepackage{color}
\usepackage{hyperref}

\setmainfont{TeX Gyre Schola}
\setmathfont{TeX Gyre Schola Math}
\setmonofont{JetBrainsMono Nerd Font}
\sisetup{
	group-separator = {.},
	output-decimal-marker = {,}
}

\pgfplotsset{compat=newest}

\usetikzlibrary{calc}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{arrows.meta,arrows}
\usetikzlibrary{positioning}
\tikzset{
	initial/.style={circle, fill},
	final/.style={solid, double=white, circle, fill, thick, draw},
	decision/.style={diamond, black, draw},
	action/.style={rectangle, draw, rounded corners, align=center},
	arrow/.style={draw, -{Latex[length=3mm]}, thick, rounded corners}
}

\bigskipamount=7mm
\medskipamount=4mm
\parindent=0mm

\begin{document}

\begin{center}
\textbf{Ontwerp} \hspace{2mm} project ledcube \hfill \textbf{Loek Le Blansch}
(2180996)\\
\today \hfill \textbf{Sybren van den Heuvel} (2191465)
\end{center}

\medskip

Dit document maakt gebruik van hyperlinks, dus je kunt klikken op de blokken met
\emph{benadrukte tekst} om naar de definitie van dat blok te gaan.

\section{Software ontwerp}

\subsection*{Overzicht}\label{overzicht}
\begin{center}
\begin{tikzpicture}[node distance=1.5cm]
\node[initial] (initial) at (0,0) {};
\node[action, below of = initial] (setup) {\hyperref[init]{\emph{Initialisatie}}};
\node[decision, below of = setup] (comb) {};
\node[action, below of = comb] (loop) {\hyperref[loop]{\emph{Loop}}};

\draw [arrow] (initial) -- (setup);
\draw [arrow] (setup) -- (comb);
\draw [arrow] (comb) -- (loop);
\draw [arrow] (loop) -- ++(0, -1) -- ++(-2, 0) |- (comb);

\end{tikzpicture}
\end{center}


\subsection*{Initialisatie}\label{init}
\begin{center}
\begin{tikzpicture}[node distance=1.5cm]
\node[initial] (initial) at (0,0) {};

\node[action, below = 1cm of initial] (mkvars) {Maak globale variabelen voor\\de
	huidige staat van de led's};

\node[action, below = 1cm of mkvars] (pinmode) {Stel pin 2, 3, en 4 in als
	output\\voor het shiftregister};

\node[action, below = 1cm of pinmode] (frametimecalc) {Bereken hoe lang een beeld
	duurt\\in milliseconden afhankelijk van\\de verversingssnelheid};

\node[final, below of = frametimecalc] (final) {};

\draw [arrow] (initial) -- (mkvars);
\draw [arrow] (mkvars) -- (pinmode);
\draw [arrow] (pinmode) -- (frametimecalc);
\draw [arrow] (frametimecalc) -- (final);

\end{tikzpicture}
\end{center}


\subsection*{Loop}\label{loop}
\begin{center}
\begin{tikzpicture}[node distance=2cm]
\node[initial] (initial) at (0,0) {};

\node[action, below of = initial] (gettime)
	{Sla op hoe lang de arduino\\aan is in milliseconden};

\node[action, below of = gettime] (calcfxindex)
	{Bereken welk effect afgespeeld moet worden};

\node[action, below of = calcfxindex] (calcfxtime)
	{Bereken hoe lang het huidige effect al bezig is};

\node[action, below of = calcfxtime] (fxexec)
	{Voer de functie van het huidige effect uit};

\node[action, below of = fxexec] (updateregs)
	{Update de status van de led's};

\node[final, below of = updateregs] (final) {};

\draw [arrow] (initial) -- (gettime);
\draw [arrow] (gettime) -- (calcfxindex);
\draw [arrow] (calcfxindex) -- (calcfxtime);
\draw [arrow] (calcfxtime) -- (fxexec);
\draw [arrow] (fxexec) -- (updateregs);
\draw [arrow] (updateregs) -- (final);

\end{tikzpicture}
\end{center}

\section{Hardware}

\subsection{Schema}

\begin{center}
\includegraphics[
	clip,
	trim=21mm 83mm 22mm 13mm,
	width=\textwidth
]{./schema.pdf}
\end{center}

\subsection{PCB}
\begin{center}
\includegraphics[
	clip,
	trim=13mm 119mm 124mm 13mm,
	width=\textwidth
]{./pcb.pdf}
\end{center}

\subsection{Bedrading (3D)}

Dit is een 3D-weergave van de bedrading van de led cube. In deze weergave zie je
duidelijk dat de led cube bestaat uit een 8$\times$8-matrix die twee keer is
dubbelgevouwd. Hier zijn de roze verbindingen de anode's van de led's, en de blauwe
de cathode's.

\begin{center}
\includegraphics[
	width=0.4\textwidth
]{./red.png}
\hspace{1cm}
\includegraphics[
	width=0.4\textwidth
]{./blue.png}
\end{center}

\section{Functiebeschrijving}

\includegraphics[
	clip,
	trim=24.5mm 180mm 24.5mm 24.5mm,
	width=\textwidth
]{./functiebeschrijving.pdf}

\section{Blokschema}

\includegraphics[
	width=\textwidth
]{./blokschema.jpeg}

\end{document}