Relaxation Oscillator using Op-Amp in CircuiTikZ

  • This tutorial is about drawing a relaxation oscillator in LaTeX using CircuiTikZ package. We will learn how to draw operational amplifier and how to connect different electrical components to its inputs and outputs. 
Relaxation oscillator using op amp in LaTeX Circuitikz

Short description

  • The relaxation oscillator is built based on operational amplifier, resistors and capacitors. Resistors and capacitors are drawn along path unlike op-amp and the ground which are added as nodes. Check the code below to figure out how one can draw the above illustration!

Relaxation oscillator LaTeX code


% Package


\begin{tikzpicture}[line width=0.8pt]

% Add operational amplifier
\node[op amp,scale=1.5,fill=yellow!50] (opamp) at (0,0){};  
\draw (opamp.-) -| ++(-0.1,2)node[above]{$V_{-}$} coordinate(vm);

% Draw capacitor
\draw (vm) to[C, l_=C,*-] ++(-3,0)node[ground]{};

% Draw resistors
\draw (vm) to[R, l=R] ++(3.5,0) -| (opamp.out);
\draw (opamp.+) -| ++(-0.1,-2)node[below]{$V_{+}$} coordinate(vp);
\draw (vp) to[R, l=R,*-] ++(-3,0)node[ground]{};
\draw (vp) to[R, l_=R] ++(3.5,0) -| (opamp.out);
\draw (opamp.out) to[short,*-o] ++(1,0) node[right]{$V_{out}$};

% Draw Vdd and Vss
\draw (opamp.up) to[short,-o] ++(0,1)node[right]{$V_{DD}$};
\draw (opamp.down) to[short,-o] ++(0,-1)node[right]{$V_{SS}$};


  • If you would to write a detailed tutorial about it, leave me a comment below or reach me via e-mail at, I will be happy to hear from you!