\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=3cm, 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=2.5cm,minimum width=2cm, 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, postaction={draw, path fading = north}},
}
}}
\newsavebox{\mc}
\sbox{\mc}{%
\begin{circuitikz}
\draw[->,red](-0.6,0.5)--(-0.6,1.5)node
[red, left, midway]{$Current$};
\end{circuitikz}
}
\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 (sesti) [BJT,below right= 3mm and 1cm of drugi] {BJT \\MODULATOR};
\node (osmi) [kolo,right =3cm of sesti, label={pojačavačc RF signala}]{ \\\usebox{\mycircuitb}};
\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}
So I searched how to insert tikz picture inside node and found \savebox.I tried it but it keeps overflowing my node and when I try to make circuit inside \savebox and call my box with \usebox but nothing happen.Here is my code so far and picture of what I want to accomplish.If anyone is familiar with \savebox that can store this circuit in picture could you help me or guide me.Thanks



\usepackage{circuitikz}. Also, where you have\usebox{\mycircuitb}, which is undefined, replace with\usebox{\mc}, which is defined. Then it compiles. – Steven B. Segletes Apr 13 '21 at 15:02\usepackage{circuitikz}in your preamble yet? – SebGlav Apr 13 '21 at 15:07circuitikzis mandatory running your code should have given an error -- also thesaveboxsyntax slightly changed as below gives the correct result -- the new syntax copied over from the answer by MartinScharrer here -- https://tex.stackexchange.com/a/23419/197451 -- you may like to upvote the answer if it met your requirement – js bibra Apr 13 '21 at 15:21