From 84967437838591eb26c0642af0027ee8a0006ba2 Mon Sep 17 00:00:00 2001 From: Robert Gawron Date: Mon, 5 Aug 2019 17:53:43 +0300 Subject: [PATCH] architecture documents added --- .../diagrams/ArchitectureOverview.tex | 58 +++++++++++++++++++ documentation/diagrams/UARTFRameFormat.tex | 46 +++++++++++++++ documentation/diagrams/creatediagrams.sh | 27 +++++++++ 3 files changed, 131 insertions(+) create mode 100644 documentation/diagrams/ArchitectureOverview.tex create mode 100644 documentation/diagrams/UARTFRameFormat.tex create mode 100644 documentation/diagrams/creatediagrams.sh diff --git a/documentation/diagrams/ArchitectureOverview.tex b/documentation/diagrams/ArchitectureOverview.tex new file mode 100644 index 0000000..3b43570 --- /dev/null +++ b/documentation/diagrams/ArchitectureOverview.tex @@ -0,0 +1,58 @@ +\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} \ No newline at end of file diff --git a/documentation/diagrams/UARTFRameFormat.tex b/documentation/diagrams/UARTFRameFormat.tex new file mode 100644 index 0000000..cc8020c --- /dev/null +++ b/documentation/diagrams/UARTFRameFormat.tex @@ -0,0 +1,46 @@ +\documentclass[tikz, border=5mm]{standalone} +\usepackage{textcomp} +\usepackage{graphicx} +\usetikzlibrary{arrows.meta,decorations.markings,fit,calc, positioning} + +\usetikzlibrary{calc,positioning,shapes,decorations.pathreplacing} + +% the styles for short and long nodes +\tikzset{ +short/.style={draw,rectangle,text height=6pt,text depth=13pt,text width=30pt,align=center,fill=yellow!30}, +long/.style={short,text width=60pt} +} + +\begin{document} + +% the short nodes \shnode{