# How can I add a capacitor and ground to the supply voltage of OPAMP?

I am new to LaTeX and currently trying to redraw this Schematic via Circuitikz, which my Professor drew in class by hand.

For some reason I cannot get the capacitor and ground on both supply voltages of the opamp.

This is what I have so far:

\documentclass{minimal}
\usepackage[straightvoltages]{circuitikz}
\usepackage{tikz}
\usepackage[locale=DE]{siunitx}
\begin{document}
\begin{center}
\begin{circuitikz}[european resistors]
\ctikzset{resistors/scale=1,capacitors/scale=0.5,
diodes/scale=0.6,
transistors/scale=1}
\draw (0,0) node[op amp] (opamp){}
(opamp.-) [short, -*] to (-3,0.5);
\draw (-3,0.5) [short] to (-3,3);
\draw (-3,3) [short, -*] to (-2,3);
\draw (-2,3) [R=\SI{1}{M\ohm}] to (1,3);
\draw (1,3) [short, *-] to (2,3);
\draw (-2,3) [short] to (-2,5);
\draw (1,5) [short] to (1,3);
\draw (1,3) [short] to (2,3);
\draw (2,3) [short,-*] to (2,0);
\draw (opamp.out) [short] to (4,0);

%Oszi
\draw (4,0) [oscope=$Oszi$,fill=green!20!gray]
to (7,0);
\draw (3,0) [R=\SI{4,7}{k\ohm}] to (3,-3);
\draw (3,-3) node[rground] to (3, -3);
\draw (opamp.+) [short] to (-2,-0.5);
\draw (-2,-0.5) [short] to (-2,-3);
\draw (-2,-3) node[rground] to (-2,-3);

%+12/-12V
\draw (opamp.up)--++(0,0.5)
node[vcc,color=red]{\tiny+12{V}};
\draw (opamp.down) --++(0,-0.5) node[vee,color=blue]{\tiny-12{V}}; %--++(1,0);

%left side
\draw (-3,0.5) [short,-o] to (-5,0.5);
\draw [yellow](-6,0.5) [short, a=gelb] to (-8,0.5);
\draw (-8,0.5) [pD] to (-8,-2);
\draw (-8,-2) [short, a=weiß] to (-6,-2);
\draw (-5,-2) [short,o-] to (-3,-2);
\draw (-3,-2) [short] to (-3,-3);
\draw (-3,-3) node[rground] to (-3,-3);

\end{circuitikz}
\end{center}
\end{document}


Also: How can I get rid of the open end after the green oscilloscope?

• Welcome to TeX.SE! May 23 at 17:46

Do not use minimal class, that is not used for minimal examples --- it is used to test packages or other strange things. Use standalone or article.

Never let errors go. You have several in your code; you do not have \tiny defined in minimal; you have to add a {} to empty nodes, like your rground ones.

For the coupling capacitors: one idea is to use:

%+12/-12V
\draw (opamp.up)--++(0,0.5) node[vcc,color=red](vccup){\tiny +12{V}};
\draw (opamp.down) --++(0,-0.5) node[vee,color=blue](vccdn){\tiny-12{V}}; %--++(1,0);
\draw (vccup) to [elko, capacitors/scale=0.5] ++(0.8,0) node[rground]{};
\draw (vccdn) to [elko, capacitors/scale=0.5, invert] ++(0.8,0) node[rground]{};


For the oscilloscope: if you do not want it in the middle of the wire, you have to use the shape-type object.

\draw (4,0) -- ++(1,0) node[oscopeshape,fill=green!20!gray, anchor=west]{\emph{Oszi}};



...and do not use math mode as a kind of italic font! LaTeX is all about coherence with the meaning of things: $Oszi$ means O multiplied by s multiplied by... you got it. Emphasized text is \emph, or \textit.

Full MWE (you can do much better with relative coordinates, naming anchors, perpendicular coordinates; browse around or look at the examples in the manual):

\documentclass{article}
\usepackage[straightvoltages]{circuitikz}
\usepackage{tikz}
\usepackage[locale=DE]{siunitx}
\begin{document}
\begin{center}
\begin{circuitikz}[european resistors]
\ctikzset{resistors/scale=1,capacitors/scale=0.5,
diodes/scale=0.6,
transistors/scale=1}
\draw (0,0) node[op amp] (opamp){}
(opamp.-) [short, -*] to (-3,0.5);
\draw (-3,0.5) [short] to (-3,3);
\draw (-3,3) [short, -*] to (-2,3);
\draw (-2,3) [R=\SI{1}{M\ohm}] to (1,3);
\draw (1,3) [short, *-] to (2,3);
\draw (-2,3) [short] to (-2,5);
\draw (1,5) [short] to (1,3);
\draw (1,3) [short] to (2,3);
\draw (2,3) [short,-*] to (2,0);
\draw (opamp.out) [short] to (4,0);

%Oszi
\draw (4,0) -- ++(1,0) node[oscopeshape,fill=green!20!gray, anchor=west]{\emph{Oszi}};
\draw (3,0) [R=\SI{4,7}{k\ohm}] to (3,-3);
\draw (3,-3) node[rground]{} to (3, -3);
\draw (opamp.+) [short] to (-2,-0.5);
\draw (-2,-0.5) [short] to (-2,-3);
\draw (-2,-3) node[rground]{} to (-2,-3);

%+12/-12V
\draw (opamp.up)--++(0,0.5) node[vcc,color=red](vccup){\tiny +12{V}};
\draw (opamp.down) --++(0,-0.5) node[vee,color=blue](vccdn){\tiny-12{V}}; %--++(1,0);
\draw (vccup) to [elko, capacitors/scale=0.5] ++(0.8,0) node[rground]{};
\draw (vccdn) to [elko, capacitors/scale=0.5, invert] ++(0.8,0) node[rground]{};

%left side
\draw (-3,0.5) [short,-o] to (-5,0.5);
\draw [yellow](-6,0.5) [short, a=gelb] to (-8,0.5);
\draw (-8,0.5) [pD] to (-8,-2);
\draw (-8,-2) [short, a=weiß] to (-6,-2);
\draw (-5,-2) [short,o-] to (-3,-2);
\draw (-3,-2) [short] to (-3,-3);
\draw (-3,-3) node[rground]{} to (-3,-3);

\end{circuitikz}
\end{center}
\end{document}


• Wow, thank you for going out of your way and taking your time to help me. I was really frustrated because I couldn't get it to work. Will look into the listed coordinates for sure! Thanks again for the help! May 23 at 20:03