From The Compiler, 6 Years ago, written in LaTeX.
Embed
  1. \documentclass[a4paper,12pt]{scrartcl}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage[T1]{fontenc}
  4. \usepackage{cmbright}
  5. \usepackage[left=1cm]{geometry}
  6. \usepackage[ngerman]{babel}
  7.  
  8. \usepackage{tikz}
  9. \usetikzlibrary{matrix}
  10. \usetikzlibrary{arrows}
  11. \usetikzlibrary{calc}
  12. \usetikzlibrary{shapes.symbols}
  13.  
  14. %%%%% Drawing styles %%%%%
  15. % Blocks
  16. \tikzstyle{block} = [draw,
  17.                     rectangle,
  18.                     thick,
  19.                     minimum width=4.3cm,
  20.                     align=center,
  21.                     rounded corners]
  22. % External block (green)
  23. \tikzstyle{outblock} = [block, fill=green!25, draw=green!70!black]
  24. % uC block (brown)
  25. \tikzstyle{ucblock}  = [block, fill=brown!50, draw=brown]
  26.  
  27. % Line style
  28. \tikzstyle{lin}  = [thick, rounded corners]
  29. % Output connection (->)
  30. \tikzstyle{outc} = [lin, -triangle 45]
  31. % Input connection (<-)
  32. \tikzstyle{inc}  = [lin, triangle 45-]
  33. % In/Output connection (<->)
  34. \tikzstyle{ioc}  = [lin, triangle 45-triangle 45]
  35. % VCC arrow
  36. \tikzstyle{vcc}  = [lin, -open triangle 90]
  37.  
  38. \begin{document}
  39.  
  40. %%%%% Own macros/lengths %%%%%
  41. % 3-line component text
  42. % Usage: \comptxt{note 1}{name}{note 2}
  43. \newcommand{\comptxt}[3]{%
  44.     \footnotesize #1 \\
  45.     #2 \\
  46.     \footnotesize #3
  47. }
  48.  
  49. % VCC arrow
  50. % Usage: \vcc[pos]{component}{label}
  51. \newcommand{\vcc}[3][-3]{%
  52.     \coordinate (arrowpeak-#2) at ($(#2.north) + (#1\hpitch,5mm)$);
  53.     \draw [vcc]
  54.         ($(#2.north) + (#1\hpitch,0)$)
  55.         -- node [right, pos=1.2] {\llabel{#3}}
  56.        (arrowpeak-#2);
  57. }
  58.  
  59. \newcommand{\llabel}[1]{\scriptsize#1} % Line label font style
  60. \newcommand{\IIC}{I$^2$C}              % I2C written the right way
  61. \newlength{\hpitch}
  62. \setlength{\hpitch}{6mm}               % Horizontal pitch between lines
  63. \newlength{\vpitch}
  64. \setlength{\vpitch}{3mm}               % Vertical pitch between lines
  65.  
  66. \begin{figure}[p]
  67.    \thispagestyle{empty}
  68.    \begin{tikzpicture}
  69.     %%%%% Blocks %%%%%
  70.     \matrix [row sep=1cm, column sep=1.5cm] { % 3x8 matrix
  71.         %%%%%%%%%%%%%%%
  72.         \node[outblock] (bat)   {\comptxt{Spannungsversorgung}{3V Lithiumbatterie}{}}; &
  73.        &
  74.        \node[block]    (boost) {\comptxt{3.3V Boostconverter}{TPS61025}{}}; \\
  75.         %%%%%%%%%%%%%%%
  76.         \node[block]    (ntx)   {\comptxt{434\,MHz TX}{NTX2 433\,MHz}{oder RFM-228 (SPI)}}; &
  77.        &
  78.        \node[block]    (osc)   {\comptxt{Oszillator}{9.216\,MHz Quartz}{}}; \\
  79.         %%%%%%%%%%%%%%%
  80.         \node[block]    (xbee)  {\comptxt{868\,MHz TX/RX}{XBee 868\,MHz}{}}; &
  81.        &
  82.        \node[block]    (swi)   {\comptxt{elektronischer Schalter}{TS5A5624}{\IIC{} ausschalten}}; \\
  83.         %%%%%%%%%%%%%%%
  84.         \node[block]    (flash) {\comptxt{256\,Mbit flash}{S25FL256SAGNFI001}{Datenlogging}}; &
  85.        \node[ucblock]  (uc)    {\comptxt{Microcontroller}{ATmega1281}{}}; &
  86.        \node[block]    (mux)   {\comptxt{\IIC{} Mux/Konverter}{PCA9540}{}}; \\
  87.         %%%%%%%%%%%%%%%
  88.         \node[outblock] (beep)  {\comptxt{Alarm}{Beeper}{+ Treiber}}; &
  89.        &
  90.        \node[block]    (9dof)  {\comptxt{Bewegungssensoren}{9DOF-Board}{}}; \\
  91.         %%%%%%%%%%%%%%%
  92.         \node[block]    (gps)   {\comptxt{GPS RX}{MAX-6Q}{}}; &
  93.        &
  94.        \node[block]    (temp)  {\comptxt{Temperatur/Feuchtigkeit}{SHT25}{}}; \\
  95.         %%%%%%%%%%%%%%%
  96.         \node[block]    (cfg)   {\comptxt{Konfigurationsspeicher}{4K EEPROM}{}}; &
  97.        &
  98.        \node[outblock] (temp2) {\comptxt{Temperatur/Feuchtigkeit}{SHT25}{}}; \\
  99.         %%%%%%%%%%%%%%%
  100.         \node[block]    (inout) {\comptxt{Input/Output Debug}{LEDs + DIP-switches}{}}; &
  101.        &
  102.        \node[block]    (press) {\comptxt{Drucksensor}{SSCMNNN015PA2A3}{}}; \\
  103.         %%%%%%%%%%%%%%%
  104.     };
  105.  
  106.     %%%%% Lines %%%%%
  107.     %% Left side to uC %%
  108.     % Battery - Boost converter
  109.     \draw [outc]
  110.         ($(bat.east) + (0,\vpitch)$)
  111.         -- node [above] {\llabel{U$_{\textnormal{bat}}$}}
  112.         ($(boost.west) + (0, \vpitch)$);
  113.     % NTX2 - uC
  114.     \draw [inc]
  115.         (ntx)
  116.         -| node [above, near start] {\llabel{PWM}}
  117.         (uc.north);
  118.     % XBee - uC
  119.     \draw [ioc]
  120.         (xbee)
  121.         -| node [above, near start] {\llabel{UART}}
  122.         ($(uc.north) - (\hpitch,0)$);
  123.     % Flash - uC
  124.     \draw [ioc]
  125.         (flash)
  126.         -- node [above] {\llabel{SPI}}
  127.         (uc.west);
  128.     % Beeper - uC
  129.     \draw [ioc]
  130.         (beep)
  131.         -| node [above, near start] {\llabel{\IIC{}}}
  132.         ($(uc.south) - (1\hpitch,0)$);
  133.     % GPS - uC (UART)
  134.     \draw [ioc]
  135.         ($(gps.east) + (0,\vpitch)$)
  136.         -| node [above, near start] {\llabel{UART}}
  137.         ($(uc.south) + (0\hpitch,0)$);
  138.     % GPS - uC (I/O)
  139.     \draw [outc]
  140.         ($(gps.east) - (0,\vpitch)$)
  141.         -| node [above, near start] {\llabel{I/O}}
  142.         ($(uc.south) + (1\hpitch,0)$);
  143.     % GPS - config memory
  144.     \draw [ioc]
  145.         (gps)
  146.         -- node [right] {\llabel{\IIC{}}}
  147.         (cfg);
  148.     % I/O Debug - uC
  149.     \draw [ioc]
  150.         (inout)
  151.         -| node [above, near start] {\llabel{I/O}}
  152.         ($(uc.south) + (2\hpitch,0)$);
  153.  
  154.     %% Right side - uC %%
  155.     % Boost to uC
  156.     \draw [outc]
  157.         ($(boost.west) - (0,\vpitch)$)
  158.         -| node [above, near start] {\llabel{ADC}}
  159.         ($(uc.north) + (1\hpitch,0)$);
  160.     % Oscillator - uC
  161.     \draw [outc]
  162.         (osc)
  163.         -| ($(uc.north) + (2\hpitch,0)$);
  164.     % silicon switch - uC
  165.     \draw [ioc]
  166.         (swi)
  167.         -| node [above, near start] {\llabel{I/O}}
  168.         ($(uc.north) + (3\hpitch,0)$);
  169.  
  170.     %% I2C bus %%
  171.     % Mux - uC
  172.     \draw [ioc]
  173.         (mux)
  174.         -- node [above] {\llabel{\IIC{}}}
  175.         (uc.east);
  176.     % Middle between uC and mux
  177.     \coordinate
  178.         (i2c1) at ($(uc.east)!0.5!(mux.west)$);
  179.     % Branch point for 9dof
  180.     \coordinate
  181.         (i2c2) at (i2c1 |- 9dof);
  182.     % Middle - 9dof via branch point
  183.     \draw [outc, rounded corners=0]
  184.         (i2c1) -- (i2c2) -- (9dof);
  185.     % branch point to pressure sensor
  186.     \draw [outc]
  187.         (i2c2) |- (press);
  188.  
  189.     %% SHT25 to mux/conv %%
  190.     % inner line, SHT25 to I2C mux/conv
  191.     \draw[inc]
  192.         ($(mux.east) - (0,\vpitch)$)
  193.         -- ($(mux.east) + (\hpitch,-\vpitch)$)
  194.         |- node [above=-2pt, pos=0] {\llabel{\IIC{}\_0}}
  195.         (temp);
  196.     % outer line, external SHT25 to I2C mux/conf
  197.     \draw [inc]
  198.         ($(mux.east) + (0,\vpitch)$)
  199.         -- ($(mux.east) + (2\hpitch,\vpitch)$)
  200.         |- node [above=8pt, left, pos=0] {\llabel{\IIC{}\_1}}
  201.         (temp2);
  202.  
  203.     %% Serial port %%
  204.     % circle of serial signal
  205.     \coordinate
  206.         (serialend) at ($(xbee.east) + (1.5,-8mm)$);
  207.     % branch off point of XBee on uC
  208.     \coordinate
  209.         (xbeetmp) at ($(uc.north) - (\hpitch,0)$);
  210.     % Start point of serial
  211.     \coordinate
  212.         (serialstart) at (xbeetmp |- serialend);
  213.     % Circle
  214.     \draw
  215.         ($(serialend) - (0.7mm,0)$)
  216.         circle (0.7mm);
  217.     % Line
  218.     \draw[lin]
  219.         (serialstart)
  220.         -- node [above] {\llabel{SERIAL}}
  221.         (serialend);
  222.  
  223.     %%%%% Power supplies %%%%%
  224.     \foreach \dev in {ntx,xbee,flash,gps,cfg,inout,boost,uc} {
  225.        \vcc{\dev}{3.3V}
  226.    }
  227.    \vcc[3]{swi}{3.3V}
  228.    \foreach \dev in {swi,mux,9dof,temp,temp2,press} {
  229.        \vcc{\dev}{3.3V\_\IIC{}}
  230.    }
  231.  
  232.     %%%%% Antennas %%%%%
  233.     % Y-line on which antennas are on
  234.     \coordinate
  235.         (antoffset) at ($(ntx.west) + (-7mm,0)$);
  236.     \foreach \dev in {ntx,xbee,gps}{
  237.         \draw[lin]
  238.             % Start on left edge of device
  239.             (\dev.west)
  240.             % draw to the left until the edge
  241.             -- (antoffset |- \dev)
  242.             % draw to the top until the arrow peak
  243.             -- (antoffset |- arrowpeak-\dev)
  244.             % left branch
  245.             +(-1.5mm,0mm) -- +(0mm,-2.5mm)
  246.             % right branch
  247.             +(1.5mm,0mm) -- +(0mm,-2.5mm);
  248.     }
  249.  
  250.     %%%%% Legend %%%%%
  251.     \filldraw[draw=green!50!black, fill=green!25, rounded corners]
  252.         ($(cfg.south east) + (5mm,0mm)$)
  253.         rectangle +(8mm,8mm)
  254.         ($(cfg.south east) + (15mm,4mm)$)
  255.         node [right, align=center] {externe \\ Komponenten};
  256.    \end{tikzpicture}
  257.    \caption{Blockdiagramm der Elektronik}
  258.    \label{block}
  259. \end{figure}
  260.  
  261. \end{document}