1

I'm trying to use OverLeaf with Circuitikz to draw schematics.

For training example I chose simple schematic for switch input de-bouncing: enter image description here

(But with replacement of buffer symbol with actual inverting Schmitt-Trigger)

For some reason it doesn't draw several symbols: "rground" and "invschmitt" Manual is here: http://texdoc.net/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf

My code is:

\begin{circuitikz}
\draw
    (0,0) node[vcc] {Vcc}
        to (0,0)
        to[R] (0,-2)
        to[full diode] (2,-2) -- (2,-3)
    (0,-2) -- (0,-3)
        to[R] (2,-3)
        to[invschmitt] (4,-3)
    (0,-3) 
        to[push button, mirror] (0,-5)
    (2,-3)
        to [C] (2,-5)
        -- (0,-5)
        to [rground] (0,-5)

;\end{circuitikz}

The output is: enter image description here

What is wrong?

Update 1: After suggestion in first comment to this post I've tried the following code:

(0,0) node[vcc] {Vcc}
    to (0,0)
    to[R, -*] (0,-2)
    to[full diode] (2,-2) -* (2,-3)
(0,-2) -- (0,-3)
    to[R, *-*] (2,-3)
    to node[invschmitt] (3, -3)
(0,-3) 
    to[push button, mirror, -*] (0,-5)
(2,-3)
    to [C] (2,-5)
    -- (0,-5) node[ground]

and it produced following image:

enter image description here

extra corrections fixed location of inverter, but messed location of button:

(0,0) node[vcc] {Vcc}
    to (0,0)
    to[R, -*] (0,-2)
    to[full diode] (2,-2) -* (2,-3)
(0,-2) -- (0,-3)
    to[R, *-*] (2,-3)
    to (3, -3) node[invschmitt] 
(0,-3) 
    to[push button, mirror, -*] (0,-5)
(2,-3)
    to [C] (2,-5)
    -- (0,-5) node[ground]

enter image description here

For some reason it continues connection after trigger instead of starting new one from new point. Still looking for solution.

Update 2: Full listing is:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[european]{circuitikz}
\begin{document}
    \begin{circuitikz}
        \draw
        (0,0) node[vcc] {Vcc}
            to (0,0)
            to[R, -*] (0,-2)
            to[full diode] (2,-2) -* (2,-3)
        (0,-2) -- (0,-3)
            to[R, *-*] (2,-3)
            to (3, -3) node[invschmitt] 
        (0,-3) 
            to[push button, mirror, -*] (0,-5)
        (2,-3)
            to [C] (2,-5)
            -- (0,-5) node[ground]
    \end{circuitikz}
\end{document}
4
  • I'm not entirely fluent with circuitikz but it looks to me that you need node[invschmitt]{} and node[rground]{}?
    – imnothere
    Commented Aug 9, 2018 at 3:27
  • Partially solved the problem. Updates are in the first post. Commented Aug 9, 2018 at 4:27
  • (i) first explain, what you like to draw (ii) please provide complete document beginning with \documentclass{...}` and end with \end{document}. from your code fragments, which obviously not contain missing elements, is not possible to guess, what you like to obtain. welcome to tex.se!
    – Zarko
    Commented Aug 9, 2018 at 7:34
  • @Zarko It was missing before first update. Also, please, find extra updates based on your comment. Commented Aug 9, 2018 at 7:49

1 Answer 1

0

i suspect, that you looking for the following:

enter image description here

\documentclass[margin=3mm]{standalone}
\usepackage{circuitikz}

\begin{document}
\begin{circuitikz}
\draw
    (0,0)   node [vcc] {Vcc}
            to [R,-*]        ++ (0,-2)  coordinate (aux1)
            to [short, -*]   ++ (0,-1)  coordinate (aux2)
            to [push button, mirror,-*] ++ (0,-2)
            node [rground] (rg) {}
    (aux1)  to [full diode] ++ (2,0) -- ++ (0,-1)
    (aux2)  to [R,-*]       ++ (2,0)   coordinate (aux3)
            to [C]          ++ (0,-2) -- (rg)
    (aux3)  -- ++ (0.5,0) node [invschmitt, anchor=in] (is) {}
    (is.out)   to [short,-o] ++ (0.5,0)
    ;
\end{circuitikz}
\end{document}

note, you should always check which elements in circuitikz are nodes

0

You must log in to answer this question.

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