1

I want to remove the base pin at the transistor, using circuitikz. How do I do that?

enter image description here

Here's a MWE:

\documentclass[11pt]{article}

% ------- Enable UTF8 characters ------- %
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}


% --------------- Math ----------------- %
\usepackage{amsmath}
\usepackage{amsfonts}

% -------- TikZ --------- %
\usepackage{tikz}
\usepackage{circuitikz}

\begin{document}
 \begin{tikzpicture}[
square/.style={rectangle,draw,minimum width=3.5cm,minimum height=3.5cm,align=top}
]
  \draw (0,8) to[R=$R_1$, -o] (0,10)
  node[anchor=south] {$3.3V$};
  \draw (0,8) to[short, i=$i_1$] (1.25,8);
  \draw (1.25,8) -- (2,8);
  \draw (2,8) to[leDo] (2,6);
  \draw (2,6) -- (0,6);
  \draw (0,6) -- (0,4.5);
  \draw (0,4.5) node[ground]{};

  %\draw (6,10) to[short, o-] (6,8);
  %\draw (6,8) -- (4,8);
  \draw (4,8) to[short, -o] (7,8)
  node[anchor=south] {$24V$};
  \draw (6.5,8) to[short, i=$i_{\text{max}}$] (4,8);
  \draw (4,7) node[pnp] (pnp) {}
  (pnp.base) node[anchor=east] {}
  (pnp.collector) node[anchor=south] {}
  (pnp.emitter) node[anchor=north] {};
  \draw (4,8) -- (4,7.5);
  \draw (4,6.5) -- (4,6);
  \draw (4,6) -- (6,6);
  \draw (6,6) to[short, -o] (7,6)
  node[anchor=south] {$0V$};
  \draw (6,6) to[R=$R_2$] (6,4.5);
  \draw (6,4.5) node[ground]{};

  \node[square, black, dashed] (1) at (3,7) {};
  \node[anchor=west] at (3.5,9) {K827P};
\end{tikzpicture}
\end{document}

Please do come with corrections if I'm coding these circuits in a bad way :)

3
  • Draw something white on top of it. Commented May 19, 2015 at 19:42
  • \draw[->,white] (pnp.base) -- (pnp.center); will do. BTW, I'm getting an error message for "align=top", nor does your black square show up. Commented May 19, 2015 at 19:53
  • Thanks @JohnKormylo. I've posted an answer with your suggestions. Commented May 20, 2015 at 10:50

1 Answer 1

1

As @John Kormylo wrote in a comment to my answer: "Draw something white on top of it". I realize that I went full retard when posting this question. Here's what I did:

\begin{tikzpicture}[
square/.style={rectangle,draw,minimum width=3.5cm,minimum height=3.5cm,align=center},
whitesquare/.style={rectangle,draw,minimum width=0.5cm,minimum height=1cm, fill=white}
]
  \draw (0,8) to[R=$R_1$, -o] (0,10)
  node[anchor=south] {$3.3V$};
  \draw (0,8) to[short, i=$i_1$] (1.25,8);
  \draw (1.25,8) -- (2,8);
  \draw (2,8) to[leDo] (2,6);
  \draw (2,6) -- (0,6);
  \draw (0,6) -- (0,4.5);
  \draw (0,4.5) node[ground]{};

  \draw (4,8) to[short, -o] (7,8)
  node[anchor=south] {$24V$};
  \draw (6.5,8) to[short, i=$i_{\text{max}}$] (4,8);
  \draw (4,7) node[pnp] (pnp) {}
  (pnp.base) node[anchor=east] {}
  (pnp.collector) node[anchor=south] {}
  (pnp.emitter) node[anchor=north] {};
  \draw (4,8) -- (4,7.5);
  \draw (4,6.5) -- (4,6);
  \draw (4,6) -- (6,6);
  \draw (6,6) to[short, -o] (7,6)
  node[anchor=south] {$0V$};
  \draw (6,6) to[R=$R_2$] (6,4.5);
  \draw (6,4.5) node[ground]{};

  \node[whitesquare, white] (2) at (3.31,7) {};
  \node[square, black, dashed] (1) at (3,7) {};
  \node[anchor=west] at (3.5,9) {K827P};
\end{tikzpicture}

I simply added a white square to remove the black line.

You must log in to answer this question.

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