0

I've drawn a circuit with a noninverting opamp in Circuitikz and the only modifications I made so far are that I scaled the whole circuit and varied the parameters of the voltage arrows to get them straigth. Now, without the voltage arrows everything looks fine, but when I add them the upper nodes at the input and output connectors (A and C) suddenly turn black. I have no clue why this is happening, any help would be be very much appreciated!

\documentclass[12pt]{article}
\usepackage[european]{circuitikz}
\usetikzlibrary{arrows}
\begin{document}
\begin center
\begin{circuitikz}[scale=.8,transform shape ]
\ctikzset{voltage/distance from node=.2}% defines arrow's distance from nodes
\ctikzset{voltage/distance from line=.02}% defines arrow's distance from wires
\ctikzset{voltage/bump b/.initial=.1}% defines arrow's curvature

\draw % draw nodes
(0, 0) node[op amp,yscale=-1] (opamp) {}
(-3,0.5) node[ocirc] (A) {}
(-3,-3.8) node [ocirc] (B) {}
(5,0) node[ocirc] (C) {}
(5,-3.8) node[ocirc] (D) {} 

(opamp.+) to (A)
(opamp.-) -|  (-1.5,-1.8)
to[short,*-] (.5,-1.8) 
to [C,l=$C$] (2,-1.8)
to [R,l=$R_1$] (3.2,-1.8)
to [short,-] (3.8,-1.8) to [short,-*] (3.8,0)
(opamp.out) to [short,-o] (C)
(B) to[short,-] (-1.5,-3.8) to [R,l=$R_2$,*-*] (-1.5,-1.8)
(-1.5,-3.8) [short,*-o] to (D)

%draw voltage arrows
(A) to [open,v=$u_e(t)$] (B)
(C) to [open, v^=$u_a(t)$] (D)
;
\end{circuitikz}
\end center
\end{document}

This is the actual resulting circuit:

Noninverting opamp

0

Add the voltage-specifiers without creating new nodes by adding the code after you specify it. Example: (opamp.+) to (A) to [open,v=$u_e(t)$] (B)

Suggestions

  • Don't specify manual options like curvature, unless you are sure that these are not the standards used in your country. There is an option to get European symbols.
  • Don't use the center environment. Use \centering instead, often inside the figure-environment.

Output

enter image description here

Code

\documentclass[12pt]{article}
\usepackage[european]{circuitikz}
\usetikzlibrary{arrows}
\begin{document}
\begin{figure}[hbt]
\centering
    \begin{circuitikz}[scale=.8,transform shape ]
    \ctikzset{voltage/distance from node=.2}% defines arrow's distance from nodes
    \ctikzset{voltage/distance from line=.02}% defines arrow's distance from wires
    \ctikzset{voltage/bump b/.initial=.1}% defines arrow's curvature

    \draw % draw nodes
    (0, 0) node[op amp,yscale=-1] (opamp) {}
    (-3,0.5) node[ocirc] (A) {}
    (-3,-3.8) node [ocirc] (B) {}
    (5,0) node[ocirc] (C) {}
    (5,-3.8) node[ocirc] (D) {} 

    (opamp.+) to (A) to [open,v=$u_e(t)$] (B)
    (opamp.-) -|  (-1.5,-1.8)
    to[short,*-] (.5,-1.8) 
    to [C,l=$C$] (2,-1.8)
    to [R,l=$R_1$] (3.2,-1.8)
    to [short,-] (3.8,-1.8) to [short,-*] (3.8,0)
    (opamp.out) to [short,-o] (C) to [open, v^=$u_a(t)$] (D)
    (B) to[short,-] (-1.5,-3.8) to [R,l=$R_2$,*-*] (-1.5,-1.8)
    (-1.5,-3.8) [short,*-o] to (D)
    ;
\end{circuitikz}
\end{figure}
\end{document}
  • Great, that works perfectly. Thanks for the quick answer! – OPfritz Jul 20 '16 at 15:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.