% Buck Converter
% This DC-DC converter decreases the voltage level from input to output
% Designed by: Amir Ostadrahimi
\documentclass [border=5pt]{standalone}
\usepackage{tikz}
\usepackage[american,cuteinductors,smartlabels]{circuitikz} % A package to draw electrical networks with TikZ
%-- the dimensions of the elements can be changed here
\ctikzset{bipoles/thickness=0.7}
\ctikzset{bipoles/length=1.5cm}
\ctikzset{bipoles/resistor/width=0.7}
\ctikzset{bipoles/resistor/height=0.25}
\ctikzset{bipoles/diode/height=0.3}
\ctikzset{bipoles/diode/width=0.3}
\ctikzset{tripoles/thickness=0.7}
\ctikzset{bipoles/battery1/height=0.7}
%settings for fonts and lines
\tikzstyle{every node}=[font=\Large]
\tikzstyle{every path}=[line width=0.9 pt, line cap=round, line join=round]
\begin{document}
\begin{circuitikz}
%------ Converter
\coordinate (VBottom) at (0,0); %%VBottom stands for voltage source bottom and is located on (0,0)
\draw (VBottom) to [battery1, l=$V_{in}$, invert] ++(0,3) coordinate (VTop); % "battery1" is to insert voltage source, instead of it, you can use "battery", "battery2", or "V".
% the " l=$V_{in}$" is for label. You can use "l_=$V_{in}$" or "l^=$V_{in}$" to change its location.
%"invert" changes the polarity of the source. (VTop) stands for voltage top.
% to change size of the voltage source, we can modify "\ctikzset{bipoles/battery1/height=0.7}", at the beginning of the documents
\draw (VTop) to [short] ++(0.8,0) node [nigbt, anchor=C, rotate=90, label={[yshift=-1.5 cm] \normalsize $IGBT$}] (nigbt1){}; % here we used an N-channel IGBT using "nigbt". Alternatively, we could use "pigbt", "nmos", "pmos" and so on.