0
    \documentclass[a4paper,10pt]{article}
\usepackage[left=24mm,right=30mm,bottom=25mm,top=25mm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage[usestackEOL]{stackengine}
\usetikzlibrary{shapes.geometric, arrows}
\usetikzlibrary{fadings}
\usetikzlibrary{shadows.blur}
\newlength{\borderwidth}
\setlength{\borderwidth}{2mm}
\definecolor{plava.b}{RGB}{91,75,183}
\definecolor{crvena.b}{RGB}{163,32,48}
\definecolor{zelena}{RGB}{149,173,124}
\definecolor{orange.b}{RGB}{245,164,41}
\definecolor{unutra}{RGB}{255,255,225}
\definecolor{s.plava}{RGB}{183,206,225}
\definecolor{purp}{RGB}{129,81,153}
\definecolor{siva}{RGB}{140,138,134}

  \tikzstyle{M3} = [rectangle, rounded corners ,minimum width=4cm, minimum height=1.5cm,
  text centered, border = plava.b, inner sep=10pt,
  blur shadow={shadow blur steps=3},
  draw,fill=unutra]
  
  \tikzstyle{nosilac} = [rectangle, rounded corners ,minimum width=4cm, minimum height=1.5cm,
  text centered, border = zelena, inner sep=10pt,
  blur shadow={shadow blur steps=3},
  draw,fill=unutra]
  
  \tikzstyle{signal} = [rectangle, rounded corners ,minimum width=4cm, minimum height=1.5cm,
  text centered, border = crvena.b, inner sep=10pt,
  blur shadow={shadow blur steps=3},
  draw,fill=unutra]
  
  \tikzstyle{BJT} = [rectangle, rounded corners ,minimum width=4cm, minimum height=1.5cm,
  text centered, border = orange.b, inner sep=10pt,
  blur shadow={shadow blur steps=3},
  draw,fill=unutra]
  
  \tikzstyle{DSO} = [rectangle, rounded corners ,minimum width=4cm, minimum height=1.5cm,
  text centered, border = s.plava, inner sep=10pt,
  blur shadow={shadow blur steps=3},
  draw,fill=unutra]
  
  \tikzstyle{diodni} = [rectangle, rounded corners ,minimum width=4cm, minimum height=1.5cm,
  text centered, border = purp, inner sep=10pt,
  blur shadow={shadow blur steps=3},
  draw,fill=unutra]
  
  \tikzstyle{kolo} = [rectangle, rounded corners ,minimum width=3cm, minimum height=3cm,
  text centered, border = siva, inner sep=10pt,
  blur shadow={shadow blur steps=2},
  draw,fill=white]
  
  \tikzstyle{arrow} = [normal,->,>=stealth]
  \tikzstyle{arrow1} = [normal,-,>=stealth]
  
  \tikzstyle{100}=[rectangle]
  
  \tikzstyle{modularni}=[rectangle,minimum width=3cm,text centered]

\tikzset{
border/.style = {
    postaction = {clip, postaction = {draw = #1, solid, 
    line width = \borderwidth, path fading=, 
    postaction={draw, path fading = north}},
    }
}}

\begin{document}
\begin{tikzpicture}[node distance=3.5cm]
\node (prvi) [M3] {\sffamily\bfseries
  \Centerstack{M3 Cortex MCU \\STM32F103}};
\node (drugi) [nosilac,below of=prvi] {\sffamily\bfseries
  \Centerstack{NOSILAC\\DSS AD9833}};
\node (treci) [signal,below of=drugi] {\sffamily\bfseries
  \Centerstack{SIGNAL PORUKE\\DSS AD9833}};  
 \node (cetvrti) [100,right of=drugi,xshift=0.3cm] {\sffamily
  {0.7V@100kHZ}}; 
   \node (peti) [100,right of=treci,xshift=0.3cm] {\sffamily
  {0.7V@5kHZ}}; 
 \node (sesti) [BJT,below of=cetvrti,xshift=1.7cm,yshift=1.8cm] {\sffamily\bfseries
  \Centerstack{BJT \\MODULATOR}};
  \node (sedmi)[modularni,right of=sesti]{\sffamily\Centerstack{Modulirani\\signal}};
\node (osmi) [kolo,right of=sedmi,xshift=-0.3cm]{};
\node (deveti) [DSO,below of=peti,xshift=1.1cm,yshift=1.5cm]{\sffamily
  \Centerstack{\textbf{DSO} \\4x Kanala}};
  \node (deseti) [diodni,below of=osmi,yshift=-0.3cm,xshift=-0.1cm] {\sffamily\bfseries
  \Centerstack{DIODNI detektor \\sa NF RC filterom}};
 \node (jedanaesti)[100,above of=osmi,yshift=-1.7cm]{\sffamily{pojačavačc RF signala}}
  

  
 
\end{tikzpicture}
\end{document}

So I am doing this diagram like one below but I can not figure out how to draw arrows like this.And can anyone help me how to make circuit inside this grey rectangle. 13

4
  • please see that your code compiles
    – js bibra
    Apr 13 '21 at 8:20
  • @jsbibra jeah I compile it on overleaf.com
    – user239512
    Apr 13 '21 at 8:22
  • It compiles with several errors... please check errors always when using overleaf. It's a little red number on the top right.
    – Rmano
    Apr 13 '21 at 8:41
  • it says package pgf error:undefined fading ''
    – user239512
    Apr 13 '21 at 8:44
1

I have removed the fadings definition since it is giving errors -- the arrows can be easily drawn with the start point as the compass anchor of the node -- see if you can expand -- in case of difficulty please revert

    \draw[arrow](prvi.west)to ($(prvi.west)+(-1,0)$)|-(drugi.west)node[rotate=180,above,sloped,pos=0.3]{text};
    \draw[arrow](prvi.west)to ($(prvi.west)+(-1,0)$)|-(treci.west);
    

enter image description here

4
  • Thanky you now I know hot to use arrows.
    – user239512
    Apr 13 '21 at 9:20
  • Can you just guide me how to insert circuit in box like in picture.Do I need to write circuit inside box or do I add picture of cicruit in box
    – user239512
    Apr 13 '21 at 9:21
  • @Vesne look at tex.stackexchange.com/a/66028/38080 and also tex.stackexchange.com/a/291849/38080
    – Rmano
    Apr 13 '21 at 9:42
  • Thanks guys you helped me a lot.😁
    – user239512
    Apr 13 '21 at 11:23
2

Changes on OP code.

  • use positioning library
  • changed deprecated tikzstyle to tikzset
  • defined parametric style for almost all boxed elements to save some typping
  • added desired arrows

The result

\documentclass[a4paper,10pt]{article}
\usepackage[left=24mm,right=30mm,bottom=25mm,top=25mm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows}
\usetikzlibrary{fadings, positioning}
\usetikzlibrary{shadows.blur}

\newlength{\borderwidth}
\setlength{\borderwidth}{2mm}

\definecolor{plava.b}{RGB}{91,75,183}
\definecolor{crvena.b}{RGB}{163,32,48}
\definecolor{zelena}{RGB}{149,173,124}
\definecolor{orange.b}{RGB}{245,164,41}
\definecolor{unutra}{RGB}{255,255,225}
\definecolor{s.plava}{RGB}{183,206,225}
\definecolor{purp}{RGB}{129,81,153}
\definecolor{siva}{RGB}{140,138,134}

\tikzset{
    anybox/.style={rectangle, rounded corners, minimum width=4cm, minimum height=1.5cm,
        text width=3cm, align=center, inner sep=10pt, blur shadow={shadow blur steps=3},
        draw, fill=unutra, font=\bfseries\sffamily, border=#1},
    M3/.style={anybox=plava.b},
    nosilac/.style={anybox=zelena},
    signal/.style={anybox=crvena.b},
    BJT/.style={anybox=orange.b},
    DSO/.style={anybox=s.plava},
    diodni/.style={anybox=purp},
    kolo/.style={anybox=siva, minimum height=3cm, fill=white},
    modularni/.style={minimum width=2cm, text width=1.5cm, align=center},
    >=stealth, 
} 

  

\tikzset{
border/.style = {
    postaction = {clip, postaction = {draw = #1, solid, 
    line width = \borderwidth, path fading=west, 
    postaction={draw, path fading = north}},
    }
}}

\begin{document}
\begin{tikzpicture}[node distance=2cm, font=\sffamily]
\node (prvi) [M3] {M3 Cortex MCU\\STM32F103};
\node (drugi) [nosilac, below = of prvi] {NOSILAC\\DSS AD9833};
\node (treci) [signal,below = of drugi] {SIGNAL PORUKE\\DSS AD9833};  
%\node (cetvrti) [right = 5mm of drugi] {0.7V@100kHZ}; 
%\node (peti) at (cetvrti|-treci) {0.7V@5kHZ}; 
\node (sesti) [BJT,below right= 3mm and 1cm of drugi] {BJT \\MODULATOR};
%\node (sedmi) [modularni,right = 1cm of sesti]{Modulirani\\signal};
\node (osmi) [kolo,right =3cm of sesti, label={pojačavačc RF signala}]{};
\node (deveti) [DSO,below = of sesti]{\textbf{DSO} \\4x Kanala};
\node (deseti) [diodni] at (deveti-|osmi) {DIODNI detektor \\sa NF RC filterom};

\draw[->] (prvi.west)--++(180:5mm)|-(drugi) node[pos=.25,above,sloped, rotate=180] {SPI interface};
\draw[->] (prvi.west)--++(180:5mm)|-(treci);
\draw[->] (drugi)-|(sesti) node[pos=.25, fill=white] (cetvrti) {0.7V@100kHZ}; 
\draw[->] (treci)-|(sesti) node[pos=.25, fill=white] (peti) {0.7V@5kHZ}; 
\draw[->] (sesti)--(osmi) node[modularni, pos=.5, fill=white] (sedmi) {Modulirani\\signal}; 
\draw[->] (osmi)--(deseti);

\draw[dashed,->,red] (deveti.north) -- (sedmi.west);
\draw[dashed,->,red] (deveti.north) -- (peti.west);
\draw[dashed,->,red] (deveti.north) -- (cetvrti.west); 
\draw[dashed,->,red] (deveti) -- (deseti); 
\end{tikzpicture}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy