1

I want to draw something like this, I don't have any clue how to use the latex for drawing this. Can anybody help me with that? thanks

[1]: https://i.stack.imgur.com/6i7Wt.png

5

1 Answer 1

3

enter image description here

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[siunitx,european,fetbodydiode]{circuitikz}
\usetikzlibrary{positioning}

\tikzset{
    declare function={% in case of CVS which switches the arguments of atan2
        atan3(\a,\b)=ifthenelse(atan2(0,1)==90, atan2(\a,\b), atan2(\b,\a));},
    kinky cross radius/.initial=+.125cm,
    @kinky cross/.initial=+, kinky crosses/.is choice,
    kinky crosses/left/.style={@kinky cross=-},kinky crosses/right/.style={@kinky cross=+},
    kinky cross/.style args={(#1)--(#2)}{
        to path={
            let \p{@kc@}=($(\tikztotarget)-(\tikztostart)$),
            \n{@kc@}={atan3(\p{@kc@})+180} in
            -- ($(intersection of \tikztostart--{\tikztotarget} and #1--#2)!%
            \pgfkeysvalueof{/tikz/kinky cross radius}!(\tikztostart)$)
            arc [ radius     =\pgfkeysvalueof{/tikz/kinky cross radius},
            start angle=\n{@kc@},
            delta angle=\pgfkeysvalueof{/tikz/@kinky cross}180 ]
            -- (\tikztotarget)}}}
\begin{document}
\begin{circuitikz}
    \draw   
    (0,0)       coordinate  (s1) to++ (0,-0.4)  node (mosfet1) [nigfete,xscale=-1, below,anchor=D] {}
    (mosfet1)                                   node (mosfet3) [nigfete,xscale=-1, right=36mm]{}
    (mosfet3.S) coordinate  (t34)to++ (0,-0.4)  node (mosfet4) [nigfete,xscale=-1, below,anchor=D] {}
    (mosfet1.S) coordinate  (t12)to++ (0,-0.4)  node (mosfet2) [nigfete,xscale=-1, below,anchor=D] {}
    (s1)-|(mosfet3.D)
    (mosfet2.S)-|(mosfet4.S)
    (s1)to[short,-*, ]++(5,0)coordinate[label=above:V\textsubscript{uf}](s11)
    (mosfet2.S)to[short,-*]++(5,0)coordinate(ss)
    (s11)to[C,l=C\textsubscript{out}](ss)to ++(0,-0.5)node[ground]{}
    (mosfet1.S)to++(-0.5,0)coordinate(sss)to++(0,0.75)to[short,-o]++(-0.5,0)
    (mosfet4.D)to[kinky cross=(mosfet1.S)--(mosfet2.D), kinky crosses=right]++(-3.2,0)to++(0,-0.75)to[short,-o]++(-0.5,0)
    ;
\end{circuitikz}

\end{document}
1
  • 1
    Nice, but notice that there is an equivalent to kinky cross in stock circuitikz now. It's called crossing (page 64).
    – Rmano
    Feb 4, 2021 at 7:45

You must log in to answer this question.

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