Edit and compile if you like:
\documentclass[border=2pt]{standalone}% Circuits\usepackage{circuitikz}% Notation\usepackage{siunitx}% Define Color\definecolor{bluegray}{rgb}{0.4, 0.6, 0.8}% Define Lengths\def\dx{0.3}\def\dy{0.4667}\def\x{10.75}\def\xx{12.0}\def\y{9.0}\def\dX{0.6}\def\dY{1}\def\X{7.25}\def\XX{6.0}\def\Y{9}\begin{document}\begin{circuitikz}[scale=0.5]% Grid% \draw[help lines] (-1,-1) grid (18,14);% Core (Blue)\draw[draw=black, line width = 2pt, fill = bluegray, even odd rule, rounded corners](6, -0.5) rectangle ++(6,12) (7.25, 1) rectangle ++(3.5,9);% Circuit%% Left\draw[line width=1.5pt](\X,\Y) -- (2,9) to [sV, line width=0.7pt, l_=$V_1$, i=$I_1$] (2,2) -- (\XX,2);%% Right\draw[line width=1.5pt](12,9) to [normal open switch, line width=0.7pt, l=$S$] (16,9)
Click to download: transformer.tex
Open in Overleaf: transformer.tex
This file is available on GitHub.
See more on the author page of Alexandros Tsagkaropolulos.