Non Inverting Op Amp – Negative Feedback

\documentclass[border=3pt]{standalone}

% Circuits
\usepackage[european,s traightvoltages, RPvoltages, americanresistor, americaninductors]{circuitikz}
\tikzset{every picture/.style={line width=0.2mm}}

% Notation
\usepackage{amsmath}

% Tikz Library
\usetikzlibrary{calc}

% Bipoles Specifications
\ctikzset{bipoles/thickness=1.2, label distance=1mm, voltage shift = 1}

% Arrows Above Compenents
% Source: https://tex.stackexchange.com/questions/574576/circuitikz-straight-voltage-arrows-with-fixed-length
\newcommand{\fixedvlen}[3][0.4cm]{% [semilength]{node}{label}
    % get the center of the standard arrow
    \coordinate (#2-Vcenter) at ($(#2-Vfrom)!0.5!(#2-Vto)$);
    % draw an arrow of a fixed size around that center and on the same line
    \draw[-{Triangle[round,open]}] ($(#2-Vcenter)!#1!(#2-Vfrom)$) -- ($(#2-Vcenter)!#1!(#2-Vto)$);
    % position the label as it where if standard voltages were used
    \node[ anchor=\ctikzgetanchor{#2}{Vlab}] at (#2-Vlab) {#3};
}
\newcommand{\fixedvlendashed}[3][0.75cm]{% [semilength]{node}{label}
    % get the center of the standard arrow
    \coordinate (#2-Vcenter) at ($(#2-Vfrom)!0.5!(#2-Vto)$);
    % draw an arrow of a fixed size around that center and on the same line
    \draw[dashed,-{Triangle[round,open]}] ($(#2-Vcenter)!#1!(#2-Vfrom)$) -- ($(#2-Vcenter)!#1!(#2-Vto)$);
    % position the label as it where if standard voltages were used
    \node[ anchor=\ctikzgetanchor{#2}{Vlab}] at (#2-Vlab) {#3};
}

\begin{document}

\begin{circuitikz}
%	%Grid
%	\def\length{6}
%	\draw[thin, dotted] (-\length,-\length) grid (\length,\length);
%	\foreach \i in {1,...,\length}
%	{
%		\node at (\i,-2ex) {\i};
%		\node at (-\i,-2ex) {-\i};	
%	}
%	\foreach \i in {1,...,\length}
%	{
%		\node at (-2ex,\i) {\i};	
%		\node at (-2ex,-\i) {-\i};	
%	}
%	\node at (-2ex,-2ex) {0};
	
	%Circuit
	\node[op amp, noinv input up] at (0,0) (opamp) {};
	\node[ground] at (-4.69,-5.5) (ground) {};
	\draw (opamp.-) -- ++(-1.15,0) -- ++(0,-2) to[R, l_=$R_1$] ++(0,-2.5) to[short,-*] ++(-2.35,0);
	\draw (opamp.+) -- ++(-3.5,0) to[sV, l_=$v_\text{IN}$,] ++(0,-3) -- (ground);
	\draw (1.66,0) to[short,*-] ++(0,-2.5) to[R, l^=$R_2$, -*] ++(-4,0);
	\draw (opamp.out) to[short,-*] ++(1.5,0) node[shift={(0.6,0)}] {$v_\text{O}$};
	\draw[-latex] (opamp.up) -- ++(0,0.5) node[above] {$V_+$};
	\draw[-latex] (opamp.down) -- ++(0,-0.5) node[below] {$V_-$};
%	\draw[-{Triangle[round]}] ($(opamp.-)+(-0.15,0)$) -- +(+0.2,0) node[below] {\scriptsize$i_-$};
%	\draw[-{Triangle[round]}] ($(opamp.+)+(-0.15,0)$) -- +(+0.2,0) node[above] {\scriptsize$i_+$};
	
	%Voltage
%	\fixedvlen[0.4]{R1}{$V_{R_1}$};
%	\fixedvlen[0.4]{R2}{$V_{R_2}$};
	
	%Nodes
	\node[shift={(0,-0.3)}] at (opamp.-) {\scriptsize$v_-$};
	\node[shift={(0,+0.3)}] at (opamp.+) {\scriptsize$v_+$};

\end{circuitikz}
	
\end{document}

Leave a Reply

Your email address will not be published.