I'm trying to do the next schematics about the 741 opamp:
enter image description here

but I don't know where to anchor the first transistor or even which should be done first, and how to do the transistor with double emitter. I'm looking for a start.

\usepackage[siunitx, RPvoltages]{circuitikz}

\begin{tikzpicture}[american voltages, european resistors]
    \draw (-0.5,4)
     (Ap.D) to [short] ++(0,-1) node[nmos, anchor = D](An){}
     (Ap.G) to (An.G)
     ($(Ap.G)!0.5!(An.G)$) to [short,-o] ++(-1,0) node[anchor=east]{$V_i$}
     ($(Ap.D)!0.5!(An.D)$) to [short,-o] ++(1,0) node[anchor=west]{$V_p$};

enter image description here


Thanks for the great ideas and superb support! I'll post the advance of the circuits, here.

  • 3
    Note that you can use (A-|B) to locate the point left or right of (A) and above or below (B). This will help when lining up components. Sep 29, 2021 at 16:54

3 Answers 3


Consider locating all multi-outlet components as nodes; Where possible using relative locations, not absolute as in my code, I did it to nest them in a for loop, to do so you can use help lines, then you can start creating the connections with the corresponding bipoles using the coordinates of each node created, Also add the code to be able to place 2 lines in the names of the components. For the rest such as the use of endings, changing the size of each family of components consult the manual of course. I also recommend that you consult the visual manual of tikz so that you can see how to use relative locations, in midpoints and intersections.


enter image description here


\usepackage[american currents]{circuitikz}
% This code is from Claudio Fiandrino https://tex.stackexchange.com/a/65792/154390
% Ads new label styles to allow aditional labels like two line descriptions.
\ctikzset{lx/.code args={#1 and #2}{ 
        \pgfkeys{/tikz/circuitikz/bipole/label/name=\parbox{1cm}{\centering #1  \\ #2}}

\ctikzset{lx^/.style args={#1 and #2}{ 
        lx=#2 and #1,
        \circuitikzbasekey/bipole/label/position=90 } 

\ctikzset{lx_/.style args={#1 and #2}{ 
        lx=#1 and #2,
        \circuitikzbasekey/bipole/label/position=-90 } 

    %Size adjust
    \ctikzset{nodes width/.initial=0.05}
    \ctikzset{transistors/arrow pos=end}
    % Canvas help lines.
    \draw[red!5,step=0.25] (0,0) grid (\wcanvas,-\hcanvas);
    \draw[cyan!40,step=1,line width=1] (0,0) grid (\wcanvas,-\hcanvas);
    \foreach \x in {0, ..., \wcanvas} {%
        \node[anchor=-90] at (\x,0) {\tiny\x};
        \node[anchor=90] at (\x,-\hcanvas) {\tiny\x};
    \foreach \y in {0, ..., \hcanvas} {%
        \node[anchor=0] at (0,-\y) {\tiny-\y};
        \node[anchor=180] at (\wcanvas,-\y) {\tiny-\y};

    %Create each transistor by type, orientation, ID,name,xposition,yposition.
    \foreach \nodetype/\xscal/\alias/\name/\px/\py in {
    }{\node[\nodetype,xscale=\xscal](\alias) at (\px,\py) {\name};}
        node[anchor=-90,inner sep=7pt]{$V_{CC}$}
        to [short,o-*] ++(0,-0.5) coordinate (lineVcc)
        -| (Q1.C)
        to [short,-o] ++ (-0.25,0)
        node[anchor=0,inner sep=7pt]{$V_{P}$}
        -- (Q4.B)
        to [I,*-o,lx_=$Q_{10}$ and $I_1$] ++ (0,-1.5) 
        node[anchor=90,inner sep=7pt]{$V_{EE}$}
        -- (Q5.C)
        to [short,*-] ++ (1.5,0) coordinate (temp)
        to [short,-*] (Q5.B-|temp)
        -- (Q6.B)
        |- (6,-10) coordinate (lineVee)
        to [short,*-o] ++ (0,-0.5)
        node[anchor=90,inner sep=7pt]{$V_{EE}$};
        to [short,-*] (Q2.C|-lineVcc)
        to [short,-o] ++ (0.25,0)
        node[anchor=180,inner sep=7pt]{$v_{N}$}
        -- (Q6.C)
        to [short,*-](Q16.B)
        to [short,-*](Q6.E|-lineVee)
        to [short,-o]++(0,0.25)
        node[anchor=-90,inner sep=7pt]{$V_{CC}$}
        -- (Q17.B)
        to [I,*-,lx_=$Q_{13A}$ and $I_2$] (Q17.C|-Q14.B)
        to [short,-*] (Q17.C)
        to [short] (Q22.B)
        to [short,-*](Q17.E|-lineVee);
        -| (Q14.C)
        -- (Q20.C)
    ($(Q14.E)!0.5!(Q20.C)$) coordinate (mid1)
        to [short,*-o]++(0.5,0)
        node[anchor=180,inner sep=7pt]{$v_{O}$}
        |- (lineVee)
        to [I,*-*,lx_=$Q_{13B}$ and $I_3$] (Q22.C|-Q14.B) coordinate (inter)
        to [short] (Q14.B)
        to [D,l_=$Q_{18}$](inter|-mid1)
        to [D,l_=$Q_{19}$,-*](inter|-Q20.B)
        -| (Q22.C)
        to [short,-*](Q22.E|-lineVee);
  • 1
    Thanks for the great idea, its very clever and creative. I think its a great tool for this and future schematics!!
    – riccs_0x
    Sep 29, 2021 at 20:47
  • 2
    Why do you redefine lx? Did not ` l2 halign=c, l2=...` work? (nice drawing, btw!)
    – Rmano
    Sep 30, 2021 at 9:30
  • 2
    Wow, I thought it was not integrated, but I already saw that it is resolved and with a complete alignment treaty in manual 1.4.3 - section 5.1.4, for that matter it should be then: [I,*-*,l2 halign=r,l2_=$Q_{13B}$ and $I_3$]; thanks for letting me know.
    – J Leon V.
    Sep 30, 2021 at 18:05
  • @JLeonV. I'm trying still to do it, I have studied and learn a lot of your answert, its a great code!!
    – riccs_0x
    Oct 1, 2021 at 16:20

For the multi-emitter (and multi-collector) transistors you can look at the section "multi-terminal bipolar transistors" in the manual: https://texdoc.org/serve/circuitikz/0#subsubsection.4.14.2.

There is an example later in the section; in that case I started by positioning Q1 at the origin and then I started building everything around using only relative ana perpendicular coordinates. That way you can move the circuit around freely:

\usepackage[siunitx, RPvoltages]{circuitikz}
    \ctikzset{transistors/arrow pos=end}
    \draw (0,0) node[bjtpnp, xscale=-1](Q1){%
    \draw (Q1.B) node[bjtpnp, anchor=B, collectors=2]
    (Q2){Q2} (Q1.B) node[circ]{};
    \draw (Q1.E) node[circ]{} node[vcc]{} (Q2.E)
    node[vcc]{} (Q1.E) -| (Q1.B);
    \draw (Q1.C) to[R, l_=$R_0$, f=$I_0$] ++(0,-3.5)
    \draw (Q2.C) -- ++(0,-0.5) coordinate(a);
    \draw (Q2.C1) -- ++(1,0) coordinate(b) -- (b|-a);
    \draw (a) ++(0,-0.1) node[flowarrow, rotate=-90,
    \draw (b|-a) ++(0,-0.1) node[flowarrow, rotate=-90,
    \path (b) ++(0.5,0); % bounding box adjust

enter image description here

  • 2
    I'm reading the manual and trying your approach, thanks!!
    – riccs_0x
    Sep 29, 2021 at 15:47

To know in which direction to take the diagram, in fact we can take several which will ultimately give the right diagram but sometimes with more complex paths.

To help you:

  • name the transistors as in the diagram. For example : \draw (0,0) node[below]{$v_p$} to[short, o-] (0.5,0) node [npn, anchor=B](Q1){Q1};. So to connect a component to the emitter of transistor Q1, you can use as coordinate (Q1.E)
  • to flip a component, use the command xscale=-1
  • do not hesitate to abuse the name of nodes. An example: for the node located between two transistors Q3 and Q4, you can name it q3q4 with the command coordinate(q3q4)
  • 2
    Thanks, excelent ideas. Using the same numbering for the transistors is a basic one, I dont know why didnt think it before.
    – riccs_0x
    Sep 29, 2021 at 6:02
  • 4
    Yes, this is a good idea.
    – Rmano
    Sep 29, 2021 at 7:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .