1

I'm having trouble making a 3-way node using relative coordinates. Op-amps have fractional coordinates and I find it is easier to connect to using relative coordinates, but this diagram has a disconnect where R1 isn't connecting to the node I labelled.

enter image description here

This is my LaTeX code:

\begin{center}
\begin{circuitikz}[american voltages]
\draw 
    (0, 0) node[ op amp, noinv input up ] (opamp) {$A_v$}
    (opamp.+) to[ short, -*, l=$V_{in}$ ] (-2, 0.5)
(opamp.out)
to[ short, -*, l=$V_{out}$ ] ++(1, 0)

(opamp.-)
to [ short, -*, name=moo ] ++(0, -2)
to [ R, l=$R_2$, v=$v_2$ ] ++(0, -2)
to node[ground]{} ++(0,-1)

(moo) to [ R, l=$R_1$ ] ++(3,0)
to [ short, -*] ++(0, 1.5)
;

\end{circuitikz} \end{center}

Also I'm struggling to position the V1 label to the left of the terminal, or the Vout label to the right of its terminal.

Thanks in advance for any advice!

1 Answers1

4

enter image description here

\documentclass[a4paper]{article}
\usepackage[dvipsnames]{xcolor}
\usepackage[siunitx, RPvoltages]{circuitikz}

\ctikzset{amplifiers/fill=cyan!20, component text=center} \begin{document}

\begin{circuitikz}[american voltages] \draw (0,0) node[left]{$v_i$} to[short, o-] ++(1,0) nodeop amp, noinv input up, anchor=+{\texttt{$A_v$}} (OA.-) -- ++(0,-1) coordinate(FB) to[R=$R_1$, v=$v_2$]
++(0,-2) node[ground]{} (FB) to[R=$R_2$, *-] (FB -| OA.out) -- (OA.out) to [short, *-o] ++(1,0) node[right]{$v_o$} ;

\end{circuitikz} \end{document}

js bibra
  • 21,280