Drogheda/03-Architecture-Hardware/circuitikz-wiring/Drogheda_Diagrama_CircuiTikZ.tex

46 lines
2.7 KiB
TeX

\documentclass[border=16pt]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{circuitikz}
\usepackage{helvet}\renewcommand{\familydefault}{\sfdefault}
\input{wiring-blocks}
\begin{document}
\begin{tikzpicture}[every node/.append style={font=\footnotesize}]
% ---- title ----
\node[anchor=north west,font=\bfseries\Large,Indigo] at (-2,6.0)
{HBOX Watchdog v3 — Diagrama de Cableado del Prototipo (CircuiTikZ)};
\node[anchor=north west,font=\small,gray] at (-2,5.2)
{Tarjeta DEV · Firmware v2.3 · STM32F411 Blackpill · Proyecto Drogheda / Helgen · Diagramas v2.1 · 2026-07-03};
% legend
\begin{scope}[shift={(-2,4.2)}]
\foreach \i/\c/\t in {0/net5V/{5 V},1.7/net3V3/{3.3 V},3.3/netGND/GND,4.7/netSig/{Señal},6.3/netAna/{Analóg. (PA0, PA4, PB1)},10.1/netIgn/{Ign. cruda 12--24 V}}{
\draw[\c,line width=2pt] (\i,0)--(\i+0.5,0); \node[anchor=west,font=\scriptsize] at (\i+0.55,0){\t};}
\end{scope}
% ---- block grid ----
\def\cw{14.0} \def\ch{9.4}
\newcommand\cell[4]{\begin{scope}[shift={(#1*\cw, #2*\ch)}]
\node[anchor=north west,font=\bfseries,Indigo] at (-2,3.7){#3}; #4 \end{scope}}
\cell{0}{0}{1 · Rieles de alimentación}{\blkRieles}
\cell{1}{0}{2 · LED de estado (PB0)}{\blkLED}
\cell{0}{-1}{3 · Interruptor de carga (PA1) — el corazón}{\blkCarga}
\cell{1}{-1}{4 · Sensado: batería / 5 V / ignición}{\blkSensado}
\cell{0}{-2}{5 · Ventilador (2 hilos, 5 V)}{\blkVent}
\cell{1}{-2}{6 · Temperatura y humedad I\textsuperscript{2}C — AHT10}{\blkTemp}
\cell{0}{-3}{7 · Reset y Gauge de batería}{\blkResetGauge}
\cell{0}{-4}{8 · Conexión del stack RTK (modo por defecto): simpleRTK2B Pro + 4G NTRIP}{\blkStack}
\cell{0}{-5}{9 · Modo B — Diagnóstico por NTRIP (relé + inyección \$PHLG)}{\blkStackB}
\cell{0}{-6}{10 · Respaldo de batería (proto): TP4056 + MT3608 — el PCB usa LTC4040}{\blkBatt}
\cell{1}{-6}{11 · Temperatura analógica (NTC $\rightarrow$ PB1 + LM35 $\rightarrow$ PA7)}{\blkTempA}
% notes cell (1,-3)
\begin{scope}[shift={(1*\cw,-3*\ch)}]
\node[anchor=north west,font=\bfseries,Indigo] at (-2,3.4){Avisos};
\node[anchor=north west,font=\scriptsize,text width=11cm] at (-2,2.6){%
$\bullet$ IRLZ44N debe ser \textbf{lógico} (no IRF540/IRFZ44).\\
$\bullet$ Nunca 5 V directo a PA0/PA4/PB1/PA5 (PA5 lógico $\le$ 3.3 V).\\
$\bullet$ El ventilador usa un \textbf{5 V separado}, no la salida ``stack''.\\
$\bullet$ Apagado = estado seguro: el ``stack'' arranca APAGADO.\\
$\bullet$ Cobertura: \textbf{Sección 1 + 3} = suficiente; Sección 2 (TP4056/MT3608) sólo para el respaldo de batería.};
\end{scope}
\end{tikzpicture}
\end{document}