\documentclass[paper=A3]{article}
\usepackage[utf8]{inputenc}

\usepackage[landscape, left=2cm, right=2cm, top=2cm, bottom=2cm]{geometry}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage[european, rotatelabels]{circuitikz}

\usepackage{fancyhdr}
\usepackage{lastpage}

\pagestyle{fancy}
\fancyhf{}

\rhead{\includegraphics*[scale=0.03]{bilder/Fasttube-Logo.png}}

\rfoot{Page \thepage \hspace{1pt} of \pageref{LastPage}}

% Circuitikz settings:
\ctikzset{bipole annotation style/.style={color=black}}
\ctikzset{bipole label style/.style={color=black}}

\begin{document}
\lhead{\large Car 313, 06.03.2025, Rev. 1}
\chead{\large TS Accumulator}
\begin{center}
	\begin{circuitikz}[thick]
		% TODO: TS Stecker, AIRs name ändern
		% HV+ Pfad bis Stecker
		\draw[red] (0,0) -- (6,0)
		to [nos,l={AIR+}, color=black] (8,0)
		to (17,0) node[iecsocketL, color=black](s1){} ;
		% Precharge
		\draw[brown] (2,0)
		to [short,*-,color=black] (2,2)
		to [thRp, color=black, a={$500\Omega$}] (6,2)
		to [nos,a={Precharge}, color=black] (8,2)
		-- (8.5,2)
		to [short,-*,color=black] (8.5,0);
		\draw (7,2.75) node[align=left]{Pickering \\ 104-1-A-24/5D \\ 1kV, 1.5A};
		\draw (4,2.75) node[align=left]{PTCEL13R501RxE \\ 800V, 40A=$I_{inrush}$};
		% Batterie / AMS
		\draw[red] (0,0) -- (0,-1)
		to [battery,o-o, color=black] (0,-3) -- (0,-4);
		\draw (0,-1) -- (2,-1)
		to [voltmeter, l={AMS}, color=black] (2,-3)
		-- (0,-3);
		\draw[dotted] (0,-4.5) -- (0,-4.75);
		\draw(0,-5) node[align=left]{x6};
		\draw[dotted] (0,-5.25) -- (0,-5.5);
		\draw[red] (0,-6) -- (0,-7)
		to [battery,o-o, color=black] (0,-9) -- (0,-10);
		\draw (0,-7) -- (2,-7)
		to [voltmeter, l={AMS}, color=black] (2,-9)
		-- (0,-9);
		\draw[<-] (-0.5,-1) -- (-1.5, -1.5);
		\draw(-3,-2) node[align=left]{Maintenance Plugs \\ Molex Sentrality 6.0mm\\ 600V, 140A};
		\draw[->] (-1.5,-2.5) -- (-0.5, -3); 
		\draw[<-] (-0.5,-8) -- (-1.5, -8.5);
		\draw(-2.75,-9.25) node[align=left]{TS Accumulator Segment \\ Cell: Molicel INR-21700-P50A \\ Configuration: 16s4p};
		% HV- Pfad bis Stecker
		\draw[red] (0,-10)
		to [fuse,a={500V, 100A}, l={Adler-AE53100620}, color=black] (3,-10)
		to [ammeter,l={IVT-S-300}, a={1kV, 300A},color=black] (6,-10)
		to [nos,a={AIR-}, color=black] (8,-10)
		to (17,-10) node[iecsocketL, color=black](s1){} ;
		% AIR
		\draw[<-] (7,-0.5) -- (7, -4);
		\draw(7, -5) node[align=left]{AIRs \\ Tyco Electronics \\ ECK100BH5AAA \\ 1kV, 150A};
		\draw[->] (7,-6) -- (7, -9.5); 
		% IMD
		\draw[brown] (10,-10)
		to [twoport,*-*, t={IMD}, color=black] (10,0);
		% Indicator
		\draw[brown] (12,-10)
		to [twoport,*-*, t={VI}, color=black] (12,0);
		% Voltage vehicle side
		\draw[brown] (14,-10)
		to [voltmeter,l={to TSAL \& Precharge State Detection},*-*, color=black] (14,0);
		% Connector
		\draw[<-] (17,-0.5) -- (17, -4);
		\draw(17, -5) node[align=left]{TSAC Connector \\ Amphenol ELRA2A16 \\ 850V, 120A};
		\draw[->] (17,-6) -- (17, -9.5); 
		
		% LEGEND
		\draw[red] (0,5) -- ++(1,0);
		\draw (1,5) node[right]{$16mm^2$ unshielded - Coroflex - 9-2611 FHLR2GCB2G 16, 220A};
		\draw[brown] (0,4.5) -- ++(1,0);
		\draw (1,4.5) node[right]{$0.5mm^2$ unshielded - Alphawire 6713, 5A};
	\end{circuitikz}
\end{center}

\newpage
\lhead{\large Car 313, 06.03.2025, Rev. 1}
\chead{\large Vehicle}
\begin{center}
	\begin{circuitikz}[thick]
		% TSAC:
		\draw[dashed] (0,2) -- (1,2) -- (1,-12) -- (0,-12);
		\draw(0,2) node[above]{TS Accumulator};
		% TS-Wiring
		\draw[red] (1,0) node[iecplugR,color=black](s2){}
		to (3,0);
		\draw[red] (1,-10) node[iecplugR,color=black](s2){}
		to (3,-10);
		\draw[<-] (1,-0.5) -- (0, -3);
		\draw(-0, -5) node[align=left]{TSAC \\ Connector \\ Amphenol \\ ELPA2A16 \\ 850V, 120A};
		\draw[->] (0,-7) -- (1, -9.5); 
		% HV Box
		\draw[dashed] (3,2) -- (13,2) -- (13,-12) -- (3,-12) -- (3,2);
		\draw(8,2) node[above]{HV-Splitter};
		% Datalogger
		\draw[blue] (3,-10)
		-- (5,-10)
		to [twoport, t=DL, color=black] (11,-10);
		% BSPD
		\draw[blue] (3,0)
		-- (3.5,0)
		to [ammeter,l={to BSPD},color=black] (5.5,0);
		\draw (4.5, -1) node[align=left]{LEM HO \\ 50-S-0100};
		% HVD
		\draw[blue] (5.5,0)
		to [closed jumper, l={HVD}, color=black] (7.5,0)
		-- (12,0);
		\draw (6.75, -1) node[align=left]{Hirose \\ EM30MSD-A \\ 1500V, 200A};
		% Fuse
		\draw[brown] (8,0)
		to [short,*-, color=black] ++(0,0)
		to [fuse,l={1A},-*, color=black] (8,-9.5);
		% Discharge
		\draw[brown] (9.5,0)
		to [short,*-,color=black] ++(0,0)
		to[thRp,a={500$\Omega$}, color=black] (9.5,-5)
		to[ncs,l={Discharge}, color=black] (9.5,-10)
		to [short,*-,color=black] ++(0,0);
		\draw (10.25,-2.5) node[align=left, rotate=-90]{PTCEL13R501RxE \\ 800V, 40A=$I_{inrush}$};
		% TSAL
		\draw[brown] (11,0)
		to [voltmeter,l={TSAL}, color=black] (11,-10);
		% TSMPs
		\draw[brown] (11,0)
		to[R,l={15k$\Omega$, 20W},*-, color=black] (13,-4);
		\draw[teal] (13,-4)
		to (14,-4) node[bnc, color=black, xscale=-1](s1){\scalebox{-1}[1]{TSMP+}};
		\draw[brown] (11,-10)
		to [R,l={15k$\Omega$, 20W},*-, color=black] (13,-6);
		\draw[teal] (13,-6)
		to (14,-6) node[bnc, color=black, xscale=-1](s1){\scalebox{-1}[1]{TSMP+}};
		% Inverters
		\draw(17.5,-9) node[tdcacshape](il){};
		\draw(17.5,-1) node[tdcacshape](ir){};
		\draw[orange] let \p1 = (ir.dc1) in (11,0) -- (16,0) -- (16,\y1) -- (ir.dc1);
		\draw[orange] let \p1 = (il.dc1) in (11,0) -- (12,1) -- (15,1) -- (15,\y1) -- (il.dc1);
		\draw[orange] let \p1 = (ir.dc2) in (11,-10) -- (16,-10) -- (16,\y1) -- (ir.dc2);
		\draw[orange] let \p1 = (il.dc2) in (11,-10) -- (12,-11) -- (15,-11) -- (15,\y1) -- (il.dc2);
		\draw[<-] (17.5,-2) -- (17.5, -4);
		\draw (17.5,-5) node[align=left]{emDrive H100 \\ 450V, 150A\textsubscript{rms}};
		\draw[->] (17.5,-6) -- (17.5, -8); 
		% Motors
		\draw(20,-1) node[elmech](motr){M};
		\draw(20,-9) node[elmech](motl){M};
		\draw[orange] (ir.right)
		to [multiwire = 3, color=orange] (motr.left);
		\draw[orange] (il.right)
		to [multiwire = 3, color=orange] (motl.left);
		\draw[<-] (20,-2) -- (20, -4);
		\draw (20,-5) node[align=left]{EMRAX 188 \\ 660V, 100A};
		\draw[->] (20,-6) -- (20, -8); 
		% Comments
		\draw (19,-12) node[align=left]{The inverters and motors
			\\ are connected through direct screwed
			\\ connections using cable lugs. The built-in
			\\ overcurrent protection of the inverters
			\\ (150A\textsubscript{rms}) is used to protect the wires,
			\\ which can handle a continuous current of
			\\ 170A};
		\draw (8,-12.5) node[align=left]{The cables are routed through cable glands if not specified};
		
		% LEGEND
		\draw[red] (0,4) -- ++(1,0);
		\draw (1,4) node[right]{$16mm^2$ unshielded - Coroflex - 9-2611 FHLR2GCB2G 16, 220A};
		\draw[blue] (0,3.5) -- ++(1,0);
		\draw (1,3.5) node[right]{$16mm^2$ shielded - Coroflex - 9-2611 FHLR2GCB2G 16, 220A};
		\draw[orange] (0,3) -- ++(1,0);
		\draw (1,3) node[right]{$6mm^2$ shielded - Coroflex - 9-2611 FHLR2GCB2G 6, 150A};
		\draw[teal] (12,4) -- ++(1,0);
		\draw (13,4) node[right]{$0.5mm^2$ shielded - TE SPEC55, 6A};
		\draw[brown] (12,3.5) -- ++(1,0);
		\draw (13,3.5) node[right]{$0.5mm^2$ unshielded - Alphawire 6713, 5A};
	\end{circuitikz}
\end{center}

\newpage
\lhead{\large Car 313, 06.03.2025, Rev. 1}
\chead{\large Charger}
\begin{center}
	\begin{circuitikz}[thick]
		% Cables
		\draw[blue] (0,-4) -- (0,0)
		to (16,0) node[iecplugL, color=black](s1){} ;
		\draw[blue] (0,-6) -- (0,-10)
		to (16,-10) node[iecplugL, color=black](s1){} ;
		% Housing
		\draw[dashed] (2,1) -- (14,1) -- (14, -11) -- (2,-11) -- (2,1);
		\draw(8,1) node[above]{Charger-Housing};
		% Power-supply
		\draw[black] (0,-4) to [dcvsource, o-o, align=left, a=Delta Elektronika \\ SM1500-CP-30 \\ 1500V/30A output, color=black, label/align=straight] (0,-6);
		% Discharge
		\draw[brown] (8,0) -- (8,-2)
		to [thRp,a={500$\Omega$}, color=black] (8,-5)
		to [ncs,l={Discharge},color=black] (8,-8) -- (8,-10);
		\draw (8.75,-3.5) node[align=left, rotate=-90]{PTCEL13R501RxE \\ 800V, 40A=$I_{inrush}$};
		% TSMPs
		\draw[brown] (8,0) to [R,l={15k$\Omega$, 20W},*-,color=black] (11,-3) -- (14,-3) node[bnc, color=black, xscale=-1](s1){\hspace{-11mm}\scalebox{-1}[1]{TSMP+}};
		\draw[brown] (8,-10) to [R,l={15k$\Omega$, 20W},*-,color=black] (11,-7) -- (14,-7) node[bnc, color=black, xscale=-1, yscale=-1](s2){\raisebox{2mm}{\hspace{-10mm}\scalebox{-1}[-1]{TSMP-}}};
		\draw[<-] (13.75,-3.25) -- (13, -4);
		\draw(12.5, -5) node[align=left]{4mm shrouded \\ banana jacks};
		\draw[->] (13,-6) -- (13.75, -6.75); 
		% Connector
		\draw[<-] (16,-0.5) -- (16, -4);
		\draw(16, -5) node[align=left]{TSAC Connector \\ Amphenol ELPA2A16 \\ 850V, 120A};
		\draw[->] (16,-6) -- (16, -9.5); 
		% Comments
		\draw (8,-11.5) node[align=left]{The cables are routed through cable glands if not specified};
		
		
		% LEGEND
		\draw[blue] (0,4) -- ++(1,0);
		\draw (1,4) node[right]{$16mm^2$ shielded - Coroflex 9-2611 FHLR2GCB2G 16, 220A};
		\draw[brown] (0,3.5) -- ++(1,0);
		\draw (1,3.5) node[right]{$0.5mm^2$ unshielded - Alphawire 6713, 5A};
	\end{circuitikz}
\end{center}
\end{document}
