\documentclass[border=4pt]{standalone}
\usepackage{ga}
\input{../ee1.tikz}
\begin{document}
\begin{circuitikz}
\coordinate (T) at (3.4,3.2); \coordinate (R) at (5.8,0.8); \coordinate (B) at (3.4,-1.6); \coordinate (L) at (1,0.8);
\draw (0,-0.2) to[american voltage source, l=$V_\mathrm{in}$, invert] (0,1.8);
\draw (0,1.8) -- (0,3.2) -- (T) (0,-0.2) -- (0,-1.6) -- (B);
\draw (T) to[empty diode] (R);
\draw (B) to[empty diode] (R);
\draw (L) to[empty diode] (B);
\draw (L) to[empty diode] (T);
\draw (L) node[circ]{} -- (2.2,0.8) -- (2.2,1.3) to[R, l=$R_1$] (4.6,1.3) -- (4.6,0.8) -- (R) node[circ]{};
\draw (2.2,0.8) -- (2.2,0.3) to[C, l_=$C_1$] (4.6,0.3) -- (4.6,0.8);
\node[font=\small] at (2.5,0.8) {$-$}; \node[font=\small] at (4.3,0.8) {$+$}; \node[font=\small] at (3.4,0.8) {$V_\mathrm{out}$};
% |V_in| - 2V_D,on (only R1), held peak (only C1), RC decay (R1 C1): V_D,on: 2V_D,on = 0.2, tau = 1.5
\begin{axis}[sketch, at={(6.6cm,-1.6cm)}, width=8.4cm, height=5.2cm, xmin=0, xmax=1.5, ymin=-1.2, ymax=1.35, xlabel={$t$}, ytick={0.2,-0.2}, yticklabels={$2V_\mathrm{D,on}$,$-2V_\mathrm{D,on}$}, yticklabel style={font=\small}]
  \addplot[black, line width=0.8pt, domain=0:1.4, samples=250] {sin(deg(2*pi*x))};
  \draw[dim, dashed] (axis cs:0,0.2) -- (axis cs:1.4,0.2) (axis cs:0,-0.2) -- (axis cs:1.4,-0.2);
  \addplot[gagray, line width=1pt, domain=0:1.4, samples=400] {max(abs(sin(deg(2*pi*x)))-0.2,0)};
  \addplot[gaaccent, dashed, line width=1pt, domain=0.25:1.4] {0.8};
  \addplot[line width=1.4pt, domain=0:1.4, samples=500] {x<0.032 ? 0 : (x<0.25 ? sin(deg(2*pi*x))-0.2 : (x<0.6509 ? 0.8*exp(-(x-0.25)/1.5) : (x<0.75 ? abs(sin(deg(2*pi*x)))-0.2 : (x<1.1509 ? 0.8*exp(-(x-0.75)/1.5) : (x<1.25 ? abs(sin(deg(2*pi*x)))-0.2 : 0.8*exp(-(x-1.25)/1.5))))))};
  \node[font=\small, anchor=east] at (axis cs:0.6,-0.95) {$V_\mathrm{in}$};
  \draw[note, <-] (axis cs:0.45,0.72) -- (axis cs:0.4,1.2) node[above]{$R_1C_1$!};
  \draw[note, <-] (axis cs:0.6,0.3) to[bend right=20] (axis cs:0.8,1.2) node[above]{only $R_1$!};
  \draw[note, <-] (axis cs:1.35,0.82) -- (axis cs:1.35,1.2) node[above]{only $C_1$!};
\end{axis}
\end{circuitikz}
\end{document}
