
Actualmente estoy intentando hacer este circuito, pero cada vez que hago algo, suena. El que quiero agregar está en rojo.
Aquí está el código y el resultado.
\begin{document}
\begin{circuitikz}
\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,0)to[R, l_=$R_1$] -- ++(-3.5,0) to[V, 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_-$};
\node[shift={(0,-0.3)}] at (opamp.-) {\scriptsize$v_-$};
\node[shift={(0,+0.3)}] at (opamp.+) {\scriptsize$v_+$};
\end{circuitikz}
\end{document}
Respuesta1
Su principal error es ignorar los errores que recibe de LaTeX:
wth.tex|8 error| Package tikz Error: (, +, coordinate, pic, or node expected.
wth.tex|8 error| Package pgf Error: No shape named `' is known.
...
Como casi siempre con LaTeX, sólo el primer error es realmente relevante, el otro podría estar simplemente relacionado con una mala interpretación al intentar superar el error encontrado.
La línea en cuestión es
\draw (opamp.+)(-3,0)to[R, l_=$R_1$] -- ++(-3.5,0) [...]
Y el error es bastante claro: necesitas un nodo/coordenada después de a to
y tienes un --
.
Cambie esa línea a
\draw (opamp.+) to[R, l_=$R_1$] ++(-3.5,0) to[V, l_=$v_\text{IN}$,] ++(0,-3) -- (ground);
y tu tienes:
No fuesugerido por @Jasper Habicht, puede agregar la flecha "variable" agregando un nombre al generador y usando elmétodo mostrado aquí.
El ejemplo completo sería:
\documentclass[border=10pt]{standalone}
\usepackage[siunitx, RPvoltages]{circuitikz}
\begin{document}
\begin{tikzpicture}[]
\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.+) to[R, l_=$R_1$] ++(-3.5,0) to[V, l_=$v_\text{IN}$, name=myV] ++(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_-$};
\node[shift={(0,-0.3)}] at (opamp.-) {\scriptsize$v_-$};
\node[shift={(0,+0.3)}] at (opamp.+) {\scriptsize$v_+$};
\ctikztunablearrow{1}{1.25}{150}{myV}
\end{tikzpicture}
\end{document}
Resultando en
PD: (¿Ves? ¡Ahora la respuesta es mucho más útil porque sabes de dónde vino el error! Y tienes un ejemplo de "ejemplo de trabajo mínimo", que siempre debes agregar a tus preguntas)
Respuesta2
A excepción del amplificador operacional con voltajes de alimentación, el esquema está escrito en un \draw
bucle:
\documentclass[margin=3mm]{standalone}
\usepackage{amsmath}
\DeclareMathOperator{\IN}{\textsc{in}}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}[american]
\node[op amp, noinv input up] (oa) {};
\draw[-stealth] (oa.up) -- ++ (0,+0.5) node[above] {$V_{+}$};
\draw[-stealth] (oa.down) -- ++ (0,-0.5) node[below] {$V_{-}$};
\draw
(oa.-) node[below] {\scriptsize $v_-$}
-| ++ (-0.5,-1.5) coordinate (aux)
to [R, a=$R_1$, *-] ++ (0,-2)
to [short,-*] ++ (-3,0) node (gnd) [ground] {}
to [V=$V_{\IN}$, name=V] (gnd |- oa.+) %
to [R=$R_1$] ++ (3,0) -- (oa.+)
node[above] {\scriptsize $v_+$}
(oa.out) to [short,] (oa.out |- aux)
to [R=$R_2$] (aux)
(oa.out) to [short, -o] ++ (0.5,0) node[right] {$v_o$}
;
\ctikztunablearrow[thick]{1}{1.2}{-30}{V}
\end{circuitikz}
\end{document}