IonizationChamber/documentation/diagrams/ArchitectureOverview.tex

58 wiersze
2.5 KiB
TeX

\documentclass[tikz, border=5mm]{standalone}
\usepackage{textcomp}
\usetikzlibrary{arrows.meta,decorations.markings,fit,calc, positioning}
\definecolor{componentColor}{RGB}{220,220,220}
\definecolor{systemColor}{RGB}{250,250,250}
\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 (hwpower) [component, above=of chamber] {HV power supply};
\node (amplifier) [component, right=of chamber] {Amplifier};
\node (adc) [component, right=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 to USB};
\node (stm8programmer) [system, below=of cpu] {STM8 programmer};
\node (pi) [system, below=of uartconverter] {Data processing\\ (RaspberryPi 3B)};
\node (pc) [system, below=of pi] {Local PC};
\begin{pgfonlayer}{background}
\node[system , draw, thick, inner xsep=1em, inner ysep=1em, fit=(chamber) (hwpower) (amplifier) (adc) (cpu) ] {\Large Ionization Chamber Board};
\end{pgfonlayer}
% Connectors
\begin{scope}[->]
\draw [-{Latex[scale=3.0]}] (hwpower) -- node[anchor=east, minimum width=.25cm, draw=none] {400V DC} (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=east, minimum height=.25cm, draw=none] {USB} (pi);
\draw [-{Latex[scale=3.0]}] (pi) -- node[anchor=east, minimum height=.25cm, draw=none] {ethernet} (pc);
\end{scope}
\end{tikzpicture}
\end{document}