IonizationChamber/Documentation/Diagrams/ArchitectureOverview.tex

60 wiersze
2.9 KiB
TeX

\documentclass[tikz, border=5mm]{standalone}
\usepackage{textcomp}
\usetikzlibrary{arrows.meta,decorations.markings,fit,calc, positioning}
\definecolor{componentColor}{RGB}{210,210,210}
\definecolor{systemColor}{RGB}{230,230,230}
\tikzset{component/.append style={fill=componentColor, align=center, draw, minimum width=2cm, minimum height=1.5cm, rounded corners=.3cm}}
\tikzset{system/.style={component, fill=systemColor, rounded corners=0cm}}
\begin{document}
\begin{tikzpicture}[node distance=1.5cm and 3cm]
% Nodes
\pgfdeclarelayer{background}
\pgfsetlayers{background,main}
\node (chamber) [component] {Ionization chamber};
\node (sample) [system, above=of chamber] {Radioactive sample};
\node (hwpower) [component, right=of chamber] {HV power supply\\ (400V DC)};
\node (amplifier) [component, below=of chamber] {Amplifier};
\node (adc) [component, below=of amplifier] {ADC\\ (MCP3425A0T-ECH)};
\node (cpu) [component, right=of adc] {Acquisition\\ (STM8S003F3P6TR)};
\node (gui) [component, above=of cpu] {User Interface\\ (3xLED)};
\node (uartconverter) [system, right=of cpu] {UART over USB\\ (USB UART FTDI Converter)};
\node (stm8programmer) [system, below=of cpu] {STM8 programator\\ (STM8SVLDISCOVERY)};
\node (pi) [system, below=of uartconverter] {Data processing and firmware flashing\\ (RaspberryPi 3B)};
\node (pc) [system, below=of pi] {Local PC\\ (OS independent)};
\begin{pgfonlayer}{background}
\node[system, draw, thick, inner xsep=1em, inner ysep=1em, fit= (chamber) (hwpower) (amplifier) (adc) (cpu)] {};
\end{pgfonlayer}
% Connectors
\begin{scope}[->]
\draw [-{Latex[scale=3.0]}] (sample) -- node[anchor=west, minimum width=.25cm, draw=none] {Radioactive decay} (chamber);
\draw [-{Latex[scale=3.0]}] (hwpower) -- node[anchor=south, minimum width=.25cm, draw=none] {} (chamber);
\draw [-{Latex[scale=3.0]}] (chamber) -- node[anchor=south, minimum height=.25cm, draw=none] {} (amplifier);
\draw [-{Latex[scale=3.0]}] (amplifier) -- node[anchor=south, minimum height=.25cm, draw=none] {} (adc);
\draw [-{Latex[scale=3.0]}] (cpu) -- node[anchor=south, minimum height=.25cm, draw=none] {UART} (uartconverter);
\draw [-{Latex[scale=3.0]}] (cpu) -- node[anchor=east, minimum height=.25cm, draw=none] {GPIO} (gui);
\draw [-{Latex[scale=3.0]}] (adc) -- node[anchor=south, minimum height=.25cm, draw=none] {I2C} (cpu);
\draw [-{Latex[scale=3.0]}] (stm8programmer) -- node[anchor=east, minimum height=.25cm, draw=none] {SWIM} (cpu);
\draw [-{Latex[scale=3.0]}] (pi) -- node[anchor=south, minimum height=.25cm, draw=none] {USB} (stm8programmer);
\draw [-{Latex[scale=3.0]}] (uartconverter) -- node[anchor=west, minimum height=.25cm, draw=none] {USB} (pi);
\draw [-{Latex[scale=3.0]}] (pi) -- node[anchor=west, minimum height=.25cm, draw=none] {Ethernet} (pc);
\draw [-{Latex[scale=3.0]}] (pc) -- node[anchor=west, minimum height=.25cm, draw=none] {} (pi);
\end{scope}
\end{tikzpicture}
\end{document}