\documentclass[border=4pt]{standalone}
\usepackage{ga}
\input{../ee1.tikz}
\begin{document}
\begin{circuitikz}
% C1 = C2, ideal diodes: V_out = 0 from the zero crossing to the trough, then (V_in + V_0)/2 up to the peak, then V_0
\begin{axis}[sketch, width=9cm, height=5cm, xmin=0, xmax=1.85, ymin=-1.3, ymax=1.35, xlabel={$t$}, ytick={1,-1}, yticklabels={$+V_0$,$-V_0$}, yticklabel style={font=\small}]
  \addplot[black, line width=0.8pt, domain=0:1.75, samples=250] {sin(deg(2*pi*x))};
  \addplot[line width=1.4pt, domain=0.5:1.75, samples=300] {x<0.75 ? 0 : (x<1.25 ? (sin(deg(2*pi*x))+1)/2 : 1)};
  \draw[dim, dashed] (axis cs:0.75,0) -- (axis cs:0.75,-1) (axis cs:1.25,0) -- (axis cs:1.25,1);
  \node[font=\small, anchor=west] at (axis cs:0.4,0.75) {$V_\mathrm{in}$};
  \node[font=\small] at (axis cs:0.95,0.85) {$V_\mathrm{out}$};
  \node[font=\small, anchor=west] at (axis cs:0.05,-0.75) {$C_1 = C_2$};
  \coordinate (a1) at (axis cs:0.65,-0.6); \coordinate (a2) at (axis cs:0.9,-0.3); \coordinate (a3) at (axis cs:1.35,0.6);
\end{axis}
\begin{scope}[shift={(-0.4,-4.4)}]
\draw (0,0) to[american voltage source, l=$V_\mathrm{in}$, invert] (0,1.6) to[C, l=$C_1$] (1.8,1.6) -- (2.2,1.6) node[ocirc]{};
\draw (1.8,1.6) node[circ]{} -- (1.8,0) node[circ]{};
\draw (2.9,1.6) node[ocirc]{} -- (3.4,1.6) to[C, l=$C_2$] (3.4,0) -- (3.9,0) node[ocirc]{};
\draw (0,0) -- (1.8,0);
\coordinate (b1) at (1.4,1.9);
\end{scope}
\begin{scope}[shift={(5.6,-4.4)}]
\draw (0,0) to[american voltage source, l=$V_\mathrm{in}$, invert] (0,1.6) to[C, l=$C_1$] (1.8,1.6) -- (2.6,1.6) node[ocirc]{};
\draw (1.8,1.6) node[circ]{} to[C, l_=$C_2$] (1.8,0) node[circ]{};
\draw (0,0) -- (2.6,0) node[ocirc]{};
\coordinate (b2) at (2.3,1.9);
\end{scope}
\begin{scope}[shift={(10.8,-4.4)}]
\draw (0,0) to[american voltage source, l=$V_\mathrm{in}$, invert] (0,1.6) to[C, l=$C_1$] (1.6,1.6) node[ocirc]{};
\draw (2.0,1.6) node[ocirc]{} -- (2.6,1.6) -- (3.4,1.6) node[ocirc]{};
\draw (2.6,1.6) node[circ]{} to[C, l_=$C_2$] (2.6,0) node[circ]{};
\draw (0,0) -- (3.4,0) node[ocirc]{};
\node at (4.0,0.8) {$V_\mathrm{out}$};
\coordinate (b3) at (2.3,2.1);
\end{scope}
\draw[note, ->] (b1) to[bend left=20] (a1);
\draw[note, ->] (b2) to[bend right=10] (a2);
\draw[note, ->] (b3) to[bend right=20] (a3);
\end{circuitikz}
\end{document}
