2

We've covered in a digital electronics class the floating gate mos used to construct EPROMs. I have searched in the circuitikz documentation but I've found no way of drawing it.

I am pretty new to tikz in general, I don't really know how to create it. In class we have used the following symbol, but I don't really care if an equivalent symbol is used.

FGmos

Could you please help me drawing it? Thanks in advance for any help!

3 Answers 3

3

You can use a HEMT with no base and add the missing parts:

\documentclass{standalone}
\usepackage{circuitikz}
\usetikzlibrary{calc}

\begin{document}
\begin{tikzpicture}
    \ctikzset{bipoles/length=3cm}
    \node[hemt, nobase] (t) at (0,0) {};
    \path
        let
            \p1 = ($ (t.gate) - (t.nobulk) $),
            \n1 = {veclen(\x1,\y1)},
            \p2 = ($(t.inner up)-(t.inner down)$),
            \n2 = {veclen(\x2,\y2)}
        in
            ($ (t.gate)!0.8!(t.nobulk) $) node[draw, rectangle, anchor=center, minimum width=.1*\n1, minimum height=\n2, inner sep=0pt] {};
    \coordinate (tmp) at ($(t.gate)!0.6!(t.nobulk)$);
    \draw[thick] (tmp |- t.inner up) -- (tmp |- t.inner down);
    \draw (tmp) -- (t.gate);
\end{tikzpicture}
\end{document}

floating gate 1

The "new" mos is scalable (as shown by \ctikzset{bipoles/length=3cm}).

If you need to use this symbol more often you can define a own command for it. I would suggest the use of subcircuits, but keep in mind subcircuits are still experimental (v. 1.3.5):

\documentclass{standalone}
\usepackage{circuitikz}
\usetikzlibrary{calc}

\ctikzsubcircuitdef{flmos}{gate, G, drain, D, source, S, fgate, bulk, nobulk, inner up, inner down}{%
    coordinate (#1-center)
    node[hemt, nobase] (#1-t) at (#1-center) {}
    coordinate (#1-fgate) at ($ (#1-t.gate)!0.8!(#1-t.nobulk) $)
    let
        \p1 = ($ (#1-t.gate) - (#1-t.nobulk) $),
        \n1 = {veclen(\x1,\y1)},
        \p2 = ($(#1-t.inner up)-(#1-t.inner down)$),
        \n2 = {veclen(\x2,\y2)}
    in
        (#1-fgate) node[draw, rectangle, anchor=center, minimum width=.1*\n1, minimum height=\n2, inner sep=0pt] {}
    coordinate (#1-tmp) at ($(#1-t.gate)!0.6!(#1-t.nobulk)$)
    (#1-tmp |- #1-t.inner up) edge[thick] (#1-tmp |- #1-t.inner down)
    (#1-tmp) -- (#1-t.gate)
    coordinate (#1-gate) at (#1-t.gate)
    coordinate (#1-G) at (#1-t.G)
    coordinate (#1-drain) at (#1-t.drain)
    coordinate (#1-D) at (#1-t.D)
    coordinate (#1-source) at (#1-t.source)
    coordinate (#1-S) at (#1-t.S)
    coordinate (#1-bulk) at (#1-t.bulk)
    coordinate (#1-nobulk) at (#1-t.nobulk)
    coordinate (#1-inner up) at (#1-t.inner up)
    coordinate (#1-inner down) at (#1-t.inner down)
    (#1-center)
}
\ctikzsubcircuitactivate{flmos}

\begin{document}
\begin{tikzpicture}
    \draw (0,0) \flmos{flmosA}{};
    \draw (flmosA-S) node[circle,inner sep=1pt,fill]{} \flmos{flmosB}{D};
\end{tikzpicture}
\end{document}

floatin gate 2

2
  • 1
    This is a great answer! I think you are the first user of subcircuits that I know ;-).
    – Rmano
    Oct 28, 2021 at 15:07
  • As resizing the FG mos is fundamental in my circuit, this is the best solution for me (sorry for forgetting to specify this behaviour in my question!). To use this, I had to download the latest .sty file for circuitikz, which seems to work fine with other circuits I have drawn in the past. Thanks mais! Oct 29, 2021 at 8:37
3

The easy solution is to take a mosfet and draw an extra line in the center gap. You can also increase the line thickness and the gap size, or even create a whole new transistor type, depending how much work you want to put into it.

\documentclass{standalone}
\usepackage{circuitikz}

\begin{document}
\begin{circuitikz}
  \node[nmos] (A) {};
  \draw ($(A.centergap) + (0,0.27)$) -- ($(A.centergap) + (0,-0.27)$);
\end{circuitikz}
\end{document}

demo

1
  • This gives me an error about centergap. This anchor does not seem to exist no version 1.3.2. I've downloaded the latest version (1.4.3 at the time of writing) from here. This is now working, thanks! Oct 29, 2021 at 7:14
1

It is very simple with pstricks:

\documentclass[svgnames, border =2pt]{standalone}
\usepackage{pst-plot}

\begin{document}

    \psset{unit = 1.5cm, linejoin=1}
    \begin{pspicture}(-0.4,-2.3)(3.5,2.3)
    \psgrid[gridcolor=Gainsboro, subgriddiv=1, gridlabels=0pt](-1,-3)(4,3)
    \psset{linewidth=1.5pt, arrows = c-c}%
    \psline(0,0)(1,0)
    \psline(1,1)(1,-1) \psline(1.4,1)(1.4,-1)
    \psline(3,2)(3,1)(2,1)(2,-1)(3,-1)(3,-2)
    \end{pspicture}

\end{document}

enter image description here

You must log in to answer this question.

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