[Tex/LaTex] BJT circuit with circuitikz

circuitikz

I am a new circuitikz user . I want to draw a circuit based on BJT transistors. I've done some stuff but my circuit is not perfect and I have some problems that I need to correct them. Can you help me to improve my circuit?
Thank you in advance.

  1. I would like that the labels of the different transistors are on the same line and same position compared to the transistor.

  2. I would like to have some space between the transistors Q1 and Q2.

  3. Reverse the direction of the current sources I1 and I2.

  4. correct the size of the transistor Q3.

  5. The size of the various components of the circuit (BJT, I, R) must be the same.

\documentclass{article}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}
\draw
  (0,0) node[pnp] (pnp1){$Q_1$}
     (pnp1.B) node[pnp, xscale=-1, anchor=B](pnp2){}
     (pnp2) node {$Q_2$}
     (pnp2.B) node[pnp, xscale=-3, anchor=B](pnp3){}
     (pnp3) node {$Q_3$}
     (pnp2.C) node [npn, anchor=C] (npn1) {}
     (pnp1.C) node [npn, xscale=1, anchor=C] (npn2) {}
     (npn2.E) to [american current source, l_=$I_3$,-*](0,-5)
     (npn1.E) to [american current source, l_=$I_4$,-*](-1.65,-5)
     (pnp1.E) to [american current source, l_=$I_1$,-*](0,5)
     (pnp2.E) to [american current source, l_=$I_2$,-*](-1.65,5)
     (-1.65,-5)--(0,-5)node[vee]{$V_{ee}$}
     (-1.65,5)--(0,5)node[vcc]{$V_{cc}$}
     (pnp2.B) node [circ]{}|-(pnp1.C) node[circ]{}
     (pnp2.B) node [circ]{}|-(pnp3.C) node[circ]{}
     (npn1.B)to [R, l_=$R_1$,-*](-5,-1.5)
     (npn1.B)--(npn2.B)
;
\end{circuitikz}
\end{document}

enter image description here

Best Answer

Since you seem to prefer relative coordinates, I tried to continue in that vein. The text anchor is where the label would be placed (lower left corner) if there were any. With xscale=-1 a normal label would also be mirror imaged.

\documentclass{standalone}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}
\draw
  (0,0) node[pnp] (pnp1){$Q_1$} ++(.7,0) % add white space for label
     (pnp1.B) -- ++(-.5,0) node[pnp, xscale=-1, anchor=B](pnp2){}
     (pnp2.text) node[above left,inner sep=0pt] {$Q_2$}
     (pnp2.B) -- ++(-1,0) node[pnp, xscale=-1, anchor=B](pnp3){}
     (pnp3.text) node[above left,inner sep=0pt] {$Q_3$}
     (pnp2.C) node [npn, anchor=C] (npn1) {}
     (pnp1.C) node [npn, xscale=1, anchor=C] (npn2) {}
     (npn2.E) to [american, I , l_=$I_3$,-*] ++(0,-2) coordinate(a)
     (npn1.E) to [american, I , l_=$I_4$,-*] ++(0,-2) coordinate(b)
     (pnp1.E) to [american, I<, l^=$I_1$,-*] ++(0, 2) coordinate(c)
     (pnp2.E) to [american, I<, l^=$I_2$,-*] ++(0, 2) coordinate(d)
     (b)--(a) node[vee]{$V_{ee}$}
     (d)--(c) node[vcc]{$V_{cc}$}
     ($(pnp1.B)!.5!(pnp2.B)$) coordinate (e)
     (e) to[short,*-*] (e |- pnp1.C)
     (pnp3.C) to[short,-*] (pnp1.C)
     (npn1.B)to [R, l_=$R_1$,-*](-5,-1.5)
     (npn1.B)--(npn2.B)
;
\end{circuitikz}
\end{document}

demo

Related Question