Electrical/PCB: - LTC4040 Block B sized to the 12 Ah 1S4P pack (RPROG 825R -> 2.42 A ~ C/5, RS 8 mR -> 3.1 A input limit, PFI 4.60 V, backup 4.79 V, charge 4.00 V Li-ion via VSYS-referenced straps) + Block E cutoff (P11) + Block F PA4->VEH5V re-tap + Block H fail-safe Modo-B bypass (K1 normally-closed relay) + Block I NTC->PB1. - CARRIER-BOARD conversion: simpleRTK2B Pro on UNO-pattern female headers (MOD1; D0/D1=UART1, D2=RX2, D8=TX2, IOREF=3V3, 5V=SW_5V) + 4G NTRIP Master on on-board XBee socket (J7/J8; VCC=3V3_MODEM via new Block K MP1584 buck off SW_5V - the HP XBee socket is 3.3 V not 5 V). Board 120x100, placement + GND pour + DRC baselines. Custom symbols: LTC4040EUFD, AO4406A, SimpleRTK2B_Pro_Socket. - Fixed duplicated U2, stale no-connects, A4->A3 sheet; ERC 0 errors. Docs: - Canonical electrical-design-state + production delta (Block B values table, 5b/5c/5d/5e) + design/rationale/connections/BOM swept to the Jul-2 assumptions ledger (Conexiones-por-Bloque xlsx). - Guia de Conexion Protoboard: LaTeX source now maintained in-repo -> v2.1 PDF. - CircuiTikZ sheet + wiring Beamer: block 11 (NTC->PB1) + guinda ignition legend. - Client decks: Avance v1.1 (overclaims fixed) + RCA v1.1 (2-jul addendum). Repo hygiene: - .gitignore: live rtk-config (SIM/APN/NTRIP creds) now ignored and REMOVED from tracking (NOTE: rotate those credentials - they exist in prior commits); KiCad .bak/snapshots/.history, LaTeX intermediates, Office locks ignored+purged. - Removed rogue .history gitlinks that broke git status.
451 lines
25 KiB
TeX
451 lines
25 KiB
TeX
% cuerpo.tex — Guía de Conexión en Protoboard v2.1 (bloques 1–11)
|
||
% Fuente de datos autoritativa: ../Drogheda_Conexiones-por-Bloque_Proto_v1.xlsx
|
||
% (hojas: Conexiones · Mapa de pines · Fuentes y convertidores · Estado y cambios)
|
||
|
||
\section{Cómo usar esta guía}
|
||
|
||
Esta guía lleva al técnico de armado por el cableado completo del prototipo del
|
||
\textbf{watchdog HBOX v3} sobre tarjeta DEV / protoboard (MCU STM32F411 «Blackpill»,
|
||
firmware v2.3), organizado en \textbf{11 bloques} que se arman y prueban uno por uno.
|
||
No armes los bloques en el orden en que aparecen: sigue el \textbf{orden de armado} de la
|
||
sección~\ref{sec:orden}, que va de lo más simple (solo USB) a lo más delicado (stack RTK).
|
||
|
||
\begin{helgennotice}[Documentos compañeros — dónde está cada cosa]
|
||
\begin{itemize}
|
||
\item \textbf{Lista de conexiones autoritativa:}
|
||
\texttt{Drogheda\_Conexiones-por-Bloque\_Proto\_v1.xlsx} (hojas \textit{Conexiones},
|
||
\textit{Mapa de pines}, \textit{Fuentes y convertidores}, \textit{Estado y cambios}).
|
||
Si esta guía y el XLSX difieren, \textbf{manda el XLSX}.
|
||
\item \textbf{Diagramas por bloque (CircuiTikZ):} carpeta \texttt{circuitikz-wiring/} —
|
||
\texttt{Drogheda\_Diagrama\_CircuiTikZ.pdf} (lámina completa) y
|
||
\texttt{Drogheda\_Diagrama\_Beamer.pdf} (una diapositiva por bloque).
|
||
\item \textbf{Estado eléctrico canónico del diseño:}
|
||
\texttt{watchdog-electrical-design-state.md} (léelo antes de cambiar cualquier cosa).
|
||
\item \textbf{Listas de compra:} \texttt{watchdog-LISTA-DE-COMPRAS-ES.xlsx} y
|
||
\texttt{watchdog-protoboard-BOM-3boards.xlsx}.
|
||
\end{itemize}
|
||
\end{helgennotice}
|
||
|
||
\section{Estado y cambios recientes}
|
||
\label{sec:estado}
|
||
|
||
Resumen de las decisiones y correcciones vigentes (hoja \textit{Estado y cambios} del XLSX).
|
||
Léelo antes de armar: aquí está lo que cambió respecto a versiones anteriores de la guía.
|
||
|
||
\hwtab{%
|
||
\begin{tabularx}{\textwidth}{@{}L{2.0cm} L{4.6cm} X@{}}
|
||
\toprule
|
||
\rowcolor{HelgenIndigo}\textcolor{white}{\textbf{Área}} & \textcolor{white}{\textbf{Cambio / estado}} & \textcolor{white}{\textbf{Detalle}}\\
|
||
\midrule
|
||
Batería & \textbf{Pack = $\sim$12\,Ah} (2026-06-30) & «40\,Ah» era un error; dimensiona R\textsubscript{PROG} + timer del LTC4040 (2.5\,A máx $\approx$ C/5).\\
|
||
Ventilador & 2 hilos (sin tacómetro) & PB10 DNP; el fallo del ventilador se infiere por temperatura (firmware pendiente).\\
|
||
Ventilador & 5\,V del ventilador = LM2596 & 24$\rightarrow$5\,V \textbf{separado} (ajustar a 5.0\,V) para no hundir el 5\,V principal (inrush).\\
|
||
Ignición & DFR1015 de 4 terminales & IN+/IN$-$/OUT+/OUT$-$; ambos GND al GND del sistema.\\
|
||
Ignición & Clamp BAT54 en PA5 & Ánodo = PA5, cátodo = 3V3 $\rightarrow$ PA5 $\le$ 3.3\,V; digital, \textbf{sin divisor} (Finding~2).\\
|
||
Batería & \textbf{NTC $\rightarrow$ pin TEMP del cargador} & TP4056 (proto) / LTC4040 (PCB); \textbf{no} va al MCU. El MCU lee temperatura por el TMP102 (I\textsuperscript{2}C).\\
|
||
Temperatura & NTC analógico $\rightarrow$ PB1 (si no hay SHT40) & Divisor 3V3 -- 10\,k (1\,\%) -- NTC 10\,k -- GND a PB1 (ADC1\_IN9). Firmware: Beta/Steinhart + posible corte CHRG\_EN. En el punto caliente (batería/módem). Bloque~11.\\
|
||
NTRIP & Modo B (relé / inyección \texttt{\$PHLG}) & F9P TX2 $\rightarrow$ PA10 $\rightarrow$ PA9 $\rightarrow$ 4G DIN (inyecta \texttt{\$PHLG}); RTCM3 DOUT $\rightarrow$ RX2 \textbf{directo}; breakout BOB-08276; switch $\rightarrow$ UART1; IOREF 3.3\,V.\\
|
||
Batería & Respaldo proto = TP4056 + MT3608 & 2$\times$ 1N5819 en «O» (OR) hacia MAIN5V; el PCB usa el LTC4040.\\
|
||
Firmware — pendiente & Gauge PB12--15 · CHRG\_EN · fan-fault por temperatura & \textbf{Bench-test antes de flashear} (el sandbox no compila STM32).\\
|
||
PCB — pendiente & Bloque B (LTC4040) + bypass fail-safe UART2 & El bypass \textbf{normalmente cerrado} evita que un MCU ausente/colgado corte las correcciones (Modo~B). Ver Bloque~9.\\
|
||
Cobertura de partes & Sección 1 + 3 = suficiente para el core & La sección 2 (TP4056/MT3608) solo hace falta para el respaldo de batería.\\
|
||
\bottomrule
|
||
\end{tabularx}}
|
||
|
||
\section{Leyenda de colores de cable}
|
||
|
||
Los mismos colores de los diagramas CircuiTikZ; úsalos también en el cableado físico.
|
||
|
||
\hwtab{%
|
||
\begin{tabularx}{\textwidth}{@{}l l X@{}}
|
||
\toprule
|
||
\rowcolor{HelgenIndigo}\textcolor{white}{\textbf{Cable}} & \textcolor{white}{\textbf{Red}} & \textcolor{white}{\textbf{Qué lleva}}\\
|
||
\midrule
|
||
ROJO & \redV & 5\,V — alimentación principal (MAIN5V) y 5\,V separado del ventilador\\
|
||
NARANJA & \redT & 3.3\,V — sale del Blackpill (sensores, pull-ups, ignición, temperatura)\\
|
||
NEGRO & \redG & GND — tierra común (todo se une aquí)\\
|
||
AZUL & \redS & Señal lógica / digital / UART\\
|
||
VERDE & \redA & Sensado analógico ($\div$2, ADC): PA0, PA4, PB1\\
|
||
GUINDA & \redI & Ignición cruda 12--24\,V (a la entrada del DFR1015)\\
|
||
\bottomrule
|
||
\end{tabularx}}
|
||
|
||
\section{Mapa de pines del Blackpill}
|
||
|
||
Busca cada etiqueta impresa en la tarjeta. (Hoja \textit{Mapa de pines} del XLSX;
|
||
incluye PA8 y PC13, que no aparecían en la guía v2.)
|
||
|
||
\hwtab{%
|
||
\begin{tabularx}{\textwidth}{@{}l X l l@{}}
|
||
\toprule
|
||
\rowcolor{HelgenIndigo}\textcolor{white}{\textbf{Pin}} & \textcolor{white}{\textbf{Función}} & \textcolor{white}{\textbf{Tipo}} & \textcolor{white}{\textbf{Bloque(s)}}\\
|
||
\midrule
|
||
5V / GND / 3V3 & Rieles (3V3 = LDO del Blackpill) & Power & 1\\
|
||
PA0 & BAT\_SENSE — batería $\div$2 & ADC & 4, 10\\
|
||
PA1 & PWR\_CTRL — interruptor de carga del «stack» & Salida & 3\\
|
||
PA2 & USART2 TX $\rightarrow$ F9P UART1 RX (NMEA) & UART & 8, 9\\
|
||
PA3 & USART2 RX $\leftarrow$ F9P UART1 TX (NMEA) & UART & 8, 9\\
|
||
PA4 & 5V\_SENSE — vehículo $\div$2 & ADC & 4\\
|
||
PA5 & IGN\_SENSE — digital, \texttt{INPUT\_PULLDOWN}, \textbf{sin divisor} (máx 3.3\,V) & Entrada dig. & 4\\
|
||
PA6 & FAN\_PWM — 25\,kHz (TIM3\_CH1) & PWM & 5\\
|
||
PA8 & CHRG\_EN (planeado) — corta la carga si la celda está caliente & Salida & batería / firmware\\
|
||
PA9 & Modo B: USART1 TX $\rightarrow$ 4G DIN (relé \texttt{\$PHLG}) & UART & 9\\
|
||
PA10 & Modo B: USART1 RX $\leftarrow$ F9P TX2 (relé); 22\,k$\Omega \rightarrow$ 3V3 & UART & 9\\
|
||
PB0 & EXT\_LED — LED de estado & Salida & 2\\
|
||
PB1 & Temperatura analógica (divisor NTC) — ADC1\_IN9 (libre) & ADC & 11\\
|
||
PB6 & I\textsuperscript{2}C1 SCL — SHT40/TMP102 & I\textsuperscript{2}C & 6\\
|
||
PB7 & I\textsuperscript{2}C1 SDA — SHT40/TMP102 & I\textsuperscript{2}C & 6\\
|
||
PB10 & FAN\_TACH — DNP (ventilador de 2 hilos) & — & 5\\
|
||
PB12--PB15 & Gauge de batería (4 LEDs) — firmware pendiente & Salida & 7\\
|
||
PC13 & LED onboard (activo-bajo) & Salida & —\\
|
||
NRST & Reset (botón a GND) & Reset & 7\\
|
||
\bottomrule
|
||
\end{tabularx}}
|
||
|
||
\section{Fuentes y convertidores — ajústalos ANTES de conectar}
|
||
|
||
\hwtab{%
|
||
\begin{tabularx}{\textwidth}{@{}L{2.5cm} X L{3.1cm} L{1.6cm}@{}}
|
||
\toprule
|
||
\rowcolor{HelgenIndigo}\textcolor{white}{\textbf{Componente}} & \textcolor{white}{\textbf{Qué es / ajuste}} & \textcolor{white}{\textbf{Entrada $\rightarrow$ salida}} & \textcolor{white}{\textbf{Bloque}}\\
|
||
\midrule
|
||
Mean Well SD-15B-05 & Fuente principal 24$\rightarrow$5\,V (o un banco de 5\,V). Es el riel \textbf{MAIN5V} (módulo industrial). & 18--36\,V $\rightarrow$ 5\,V · 3\,A & 1\\
|
||
LM2596 (o MP1584) & 5\,V \textbf{separado} para el ventilador. \textbf{¡Ajústalo a 5.0\,V con el multímetro ANTES de conectar!} Vienen en voltaje aleatorio. En el PCB este papel lo hace el MP1584 (U2). & 24\,V $\rightarrow$ 5.0\,V ajustable & 5\\
|
||
DFR1015 & Acondiciona la ignición. Acepta 12 y 24\,V; 4 terminales (IN$\pm$/OUT$\pm$) y \textbf{ambos GND al GND del sistema}. On-board en la v3 (GX16 pin~3 = ignición cruda). & 12--24\,V $\rightarrow$ 5\,V & 4\\
|
||
TP4056 & Cargador del 18650 (\textbf{proto}; stand-in de banco). El PCB usa el LTC4040. & 5\,V vehículo $\rightarrow$ carga 1S & 10\\
|
||
MT3608 & Elevador de respaldo. Ajústalo \textbf{apenas por debajo} del 5\,V del vehículo para que el vehículo tenga prioridad. & 3.6\,V $\rightarrow$ 5\,V & 10\\
|
||
LTC4040 (PCB) & Battery-backup manager: carga + power-path + boost + NTC. Carga temp-cualificada por NTC; R\textsubscript{PROG} $\approx$ C/5 $\le$ 2.5\,A para 12\,Ah. & 5\,V vehículo / batería $\rightarrow$ 5\,V & B (por diseñar)\\
|
||
18650 1S4P & Pack de respaldo \textbf{$\sim$12\,Ah} («40\,Ah» era un error, corregido 2026-06-30). \textbf{Respeta la polaridad.} & — $\rightarrow$ 3.6\,V · $\sim$12\,Ah & 4, 10\\
|
||
\bottomrule
|
||
\end{tabularx}}
|
||
|
||
\section{Conexiones por bloque (1--11)}
|
||
|
||
Cada tabla lista las conexiones como \textbf{desde $\rightarrow$ vía $\rightarrow$ hacia}, con la
|
||
red (color de cable) a la izquierda. Arma y prueba \textbf{un bloque a la vez}, en el orden de
|
||
la sección~\ref{sec:orden}.
|
||
|
||
\bloque{1}{Rieles de alimentación}
|
||
\queprueba{arma los rieles 5\,V / GND / 3.3\,V que alimentan todo.}
|
||
|
||
\hwtab{%
|
||
\begin{tabularx}{\textwidth}{@{}l X L{4.4cm}@{}}
|
||
\toprule
|
||
\theadconex
|
||
\midrule
|
||
\redV & Fuente 5\,V (SD-15B-05 o banco) (+) $\rightarrow$ riel MAIN5V & Fuente principal\\
|
||
\redG & Fuente 5\,V ($-$) $\rightarrow$ riel GND & Tierra común\\
|
||
\redV & Riel MAIN5V $\rightarrow$ pin 5V del Blackpill & El Blackpill genera el 3.3\,V (LDO interno)\\
|
||
\redG & Riel GND $\rightarrow$ pin GND del Blackpill & \\
|
||
\redT & Blackpill 3V3 (salida) $\rightarrow$ sensores I\textsuperscript{2}C · pull-ups · ignición & Cargas pequeñas ($\mu$A--mA)\\
|
||
\redV & Riel MAIN5V $\rightarrow$ C 100\,$\mu$F + 100\,nF $\rightarrow$ riel GND & Desacople / reserva, cerca de la tarjeta\\
|
||
\bottomrule
|
||
\end{tabularx}}
|
||
|
||
\bloque{2}{LED de estado (PB0)}
|
||
\queprueba{los códigos de parpadeo cambian con el estado.}
|
||
|
||
\hwtab{%
|
||
\begin{tabularx}{\textwidth}{@{}l X L{4.4cm}@{}}
|
||
\toprule
|
||
\theadconex
|
||
\midrule
|
||
\redS & PB0 $\rightarrow$ R 330\,$\Omega$ $\rightarrow$ ánodo del LED & LED 3/5\,mm\\
|
||
\redG & cátodo del LED $\rightarrow$ GND & códigos de parpadeo\\
|
||
\bottomrule
|
||
\end{tabularx}}
|
||
|
||
\bloque{3}{Interruptor de carga del «stack» (PA1) — EL CORAZÓN}
|
||
\queprueba{APAGADO al reset (estado seguro), ON cuando PA1 activa.}
|
||
|
||
\hwtab{%
|
||
\begin{tabularx}{\textwidth}{@{}l X L{4.4cm}@{}}
|
||
\toprule
|
||
\theadconex
|
||
\midrule
|
||
\redS & PA1 $\rightarrow$ R 1\,k$\Omega$ $\rightarrow$ base 2N3904 (B) & Driver\\
|
||
\redG & 2N3904 emisor (E) $\rightarrow$ GND & \\
|
||
\redS & 2N3904 colector (C) $\rightarrow$ compuerta IRF9540 (G) & Nodo de compuerta\\
|
||
\redV & compuerta IRF9540 (G) $\rightarrow$ R 10\,k$\Omega$ $\rightarrow$ MAIN5V & Pull-up $\rightarrow$ \textbf{OFF por defecto} (estado seguro)\\
|
||
\redV & IRF9540 source (S) $\rightarrow$ MAIN5V & P-MOSFET (canal P)\\
|
||
\redS & IRF9540 drain (D) $\rightarrow$ SAL (salida conmutada «stack») & $\rightarrow$ Bloques 8/9 (stack RTK)\\
|
||
\redS & prueba: SAL $\rightarrow$ LED + R 330\,$\Omega$ $\rightarrow$ GND & Para ver el encendido/apagado\\
|
||
\bottomrule
|
||
\end{tabularx}}
|
||
|
||
\noindent{\small\textit{El pull-up de 10\,k$\Omega$ garantiza el invariante «apagado = estado
|
||
seguro»: sin MCU (o durante el reset) el stack queda \textbf{apagado}.}}
|
||
|
||
\begin{center}
|
||
\begin{adjustbox}{max width=\textwidth}
|
||
\begin{tikzpicture}[every node/.append style={font=\footnotesize}]\blkCarga\end{tikzpicture}
|
||
\end{adjustbox}\\
|
||
{\small\itshape Bloque 3 — el mismo dibujo que la lámina CircuiTikZ (\texttt{circuitikz-wiring/}).}
|
||
\end{center}
|
||
|
||
\bloque{4}{Sensado: batería / 5\,V / ignición}
|
||
\queprueba{\texttt{veh}/\texttt{ign}/\texttt{vbat} cambian en el log (TLM).}
|
||
|
||
\hwtab{%
|
||
\begin{tabularx}{\textwidth}{@{}l X L{4.4cm}@{}}
|
||
\toprule
|
||
\theadconex
|
||
\midrule
|
||
\redA & 18650+ (o potenciómetro) $\rightarrow$ R 10\,k$\Omega$ $\rightarrow$ PA0 & Divisor $\div$2 · BAT\_SENSE\\
|
||
\redA & PA0 $\rightarrow$ R 10\,k$\Omega$ $\rightarrow$ GND & Pierna inferior del divisor\\
|
||
\redA & MAIN5V (lado vehículo) $\rightarrow$ R 10\,k$\Omega$ $\rightarrow$ PA4 & Divisor $\div$2 · 5\,V/vehículo presente\\
|
||
\redA & PA4 $\rightarrow$ R 10\,k$\Omega$ $\rightarrow$ GND & \\
|
||
\redI & GX16 pin 3 (ignición 12--24\,V) $\rightarrow$ DFR1015 IN+ & Ignición \textbf{cruda} del gabinete\\
|
||
\redG & DFR1015 IN$-$ $\rightarrow$ GND & Retorno de ignición = GND del sistema\\
|
||
\redS & DFR1015 OUT+ (5\,V) $\rightarrow$ R 100\,$\Omega$ $\rightarrow$ PA5 & Acondiciona a nivel lógico\\
|
||
\redG & DFR1015 OUT$-$ $\rightarrow$ GND & \\
|
||
\redT & PA5 (ánodo) $\rightarrow$ BAT54 $\rightarrow$ 3V3 (cátodo) & Clamp: PA5 $\le$ 3.3\,V\\
|
||
\redG & PA5 $\rightarrow$ C 100\,nF $\rightarrow$ GND & Anti-rebote (con debounce en firmware)\\
|
||
\redS & Banco (proto): 3V3 $\rightarrow$ apagador / push-button $\rightarrow$ PA5 & Simula la ignición sin DFR1015. PA5 = digital, \texttt{INPUT\_PULLDOWN}, \textbf{sin divisor}\\
|
||
\bottomrule
|
||
\end{tabularx}}
|
||
|
||
\bloque{5}{Ventilador (2 hilos)}
|
||
\queprueba{el ventilador arranca/sube con la temperatura.}
|
||
|
||
\hwtab{%
|
||
\begin{tabularx}{\textwidth}{@{}l X L{4.4cm}@{}}
|
||
\toprule
|
||
\theadconex
|
||
\midrule
|
||
\redV & 24\,V (gabinete) $\rightarrow$ LM2596 (buck, ajustar a 5.0\,V) $\rightarrow$ riel 5\,V sep. & Riel \textbf{SEPARADO} para el ventilador (PCB = MP1584)\\
|
||
\redG & LM2596 GND (in/out) $\rightarrow$ GND & \\
|
||
\redS & PA6 $\rightarrow$ R 220\,$\Omega$ $\rightarrow$ compuerta IRLZ44N (G) & PWM 25\,kHz\\
|
||
\redG & IRLZ44N source (S) $\rightarrow$ GND & Low-side switch\\
|
||
\redS & compuerta IRLZ44N (G) $\rightarrow$ R 100\,k$\Omega$ $\rightarrow$ GND & Mantiene el FET apagado\\
|
||
\redG & IRLZ44N drain (D) $\rightarrow$ ventilador ($-$) & Cable negro\\
|
||
\redV & ventilador (+) $\rightarrow$ riel 5\,V sep. & Ventilador de 2 hilos\\
|
||
\redV & 1N5819 en paralelo al ventilador (banda $\rightarrow$ +5\,V sep.) & Flyback / anti-retorno inductivo\\
|
||
\redN & PB10 (tach) $\rightarrow$ sin usar (DNP) & 2 hilos $\rightarrow$ sin tacómetro; el fallo se infiere por temperatura (firmware)\\
|
||
\bottomrule
|
||
\end{tabularx}}
|
||
|
||
\bloque{6}{Sensor de temperatura I\textsuperscript{2}C (si lo tienes)}
|
||
\queprueba{al calentar el sensor, el ventilador sube.}
|
||
|
||
\hwtab{%
|
||
\begin{tabularx}{\textwidth}{@{}l X L{4.4cm}@{}}
|
||
\toprule
|
||
\theadconex
|
||
\midrule
|
||
\redT & SHT40 / TMP102 VCC $\rightarrow$ 3V3 & Parte de 3.3\,V (no 5\,V)\\
|
||
\redG & SHT40 / TMP102 GND $\rightarrow$ GND & \\
|
||
\redS & SCL $\rightarrow$ PB6 & I\textsuperscript{2}C1 SCL\\
|
||
\redT & SCL $\rightarrow$ R 4.7\,k$\Omega$ $\rightarrow$ 3V3 & Pull-up I\textsuperscript{2}C (muchos breakouts ya lo traen)\\
|
||
\redS & SDA $\rightarrow$ PB7 & I\textsuperscript{2}C1 SDA\\
|
||
\redT & SDA $\rightarrow$ R 4.7\,k$\Omega$ $\rightarrow$ 3V3 & Pull-up I\textsuperscript{2}C\\
|
||
\redN & Direcciones: SHT40 = 0x44 · TMP102 = 0x48 & TMP102 en pigtail a la celda/módem (punto caliente)\\
|
||
\redN & Sin SHT40/TMP102 $\rightarrow$ usa el Bloque 11 (NTC $\rightarrow$ PB1) & Alternativa analógica\\
|
||
\bottomrule
|
||
\end{tabularx}}
|
||
|
||
\bloque{7}{Reset (opcional) y gauge de batería (opcional)}
|
||
\queprueba{el botón reinicia; los 4 LEDs quedan listos para el firmware.}
|
||
|
||
\hwtab{%
|
||
\begin{tabularx}{\textwidth}{@{}l X L{4.4cm}@{}}
|
||
\toprule
|
||
\theadconex
|
||
\midrule
|
||
\redS & NRST $\rightarrow$ push-button $\rightarrow$ GND & Reset por hardware\\
|
||
\redS & PB12 / PB13 / PB14 / PB15 $\rightarrow$ R 330\,$\Omega$ c/u $\rightarrow$ LED $\rightarrow$ GND ($\times$4) & Gauge de batería; \textbf{APAGADOS} hasta firmware\\
|
||
\bottomrule
|
||
\end{tabularx}}
|
||
|
||
\bloque{8}{Conexión del stack RTK (modo por defecto)}
|
||
\queprueba{el watchdog observa; solo 4 cables al stack.}
|
||
|
||
\hwtab{%
|
||
\begin{tabularx}{\textwidth}{@{}l X L{4.4cm}@{}}
|
||
\toprule
|
||
\theadconex
|
||
\midrule
|
||
\redV & SAL (5\,V conmutado, Bloque 3) $\rightarrow$ simpleRTK2B Pro · 5V & Alimenta el stack RTK\\
|
||
\redG & GND del sistema $\rightarrow$ simpleRTK2B Pro · GND & \\
|
||
\redS & PA2 (USART2 TX) $\rightarrow$ F9P UART1 RX & NMEA · cruce TX$\rightarrow$RX\\
|
||
\redS & PA3 (USART2 RX) $\rightarrow$ F9P UART1 TX & NMEA · cruce RX$\leftarrow$TX\\
|
||
\redN & 4G NTRIP Master (XBee) $\rightarrow$ socket XBee del Pro (UART2) & 5\,V + datos por el socket (\textbf{no} al Blackpill)\\
|
||
\redN & Antena GNSS (SMA) $\rightarrow$ F9P & \\
|
||
\redN & 2$\times$ antenas LTE $\rightarrow$ 4G NTRIP Master & \\
|
||
\redN & Relé \texttt{\$PHLG} (PA9/PA10) = DNP / apagado & Config por defecto (solo monitor)\\
|
||
\bottomrule
|
||
\end{tabularx}}
|
||
|
||
\bloque{9}{Modo B — Diagnóstico por NTRIP (relé, opcional)}
|
||
\queprueba{inyecta \texttt{\$PHLG} al servidor por 4G. Requiere breakout XBee.}
|
||
|
||
\hwtab{%
|
||
\begin{tabularx}{\textwidth}{@{}l X L{4.4cm}@{}}
|
||
\toprule
|
||
\theadconex
|
||
\midrule
|
||
\redV & SAL / GND (Bloque 3) $\rightarrow$ F9P · watchdog · 4G & IOREF = 3.3\,V (nivel de los UART del F9P)\\
|
||
\redN & switch XBee del Pro $\rightarrow$ UART1 & Libera UART2 para el relé\\
|
||
\redS & PA2 $\rightarrow$ F9P UART1 RX & Monitor de fix\\
|
||
\redS & PA3 $\rightarrow$ F9P UART1 TX & Monitor de fix\\
|
||
\redS & F9P TX2 (UART2) $\rightarrow$ PA10 (USART1 RX) & Relé: la subida entra al MCU\\
|
||
\redS & PA9 (USART1 TX) $\rightarrow$ 4G DIN & El MCU releva + inyecta \texttt{\$PHLG}\\
|
||
\redS & 4G DOUT $\rightarrow$ F9P RX2 (UART2) & RTCM3 \textbf{DIRECTO} (no pasa por el MCU) $\rightarrow$ correcciones intactas\\
|
||
\redT & PA10 $\rightarrow$ R 22\,k$\Omega$ $\rightarrow$ 3V3 & DFU-safe (idle high)\\
|
||
\redN & 4G NTRIP Master $\rightarrow$ breakout XBee (SparkFun BOB-08276), fuera del socket & Para interponer el MCU\\
|
||
\redN & 4G NTRIP Master $\rightarrow$ servidor (4G/NTRIP) & \texttt{\$PHLG} llega \textit{en banda} al backend\\
|
||
\bottomrule
|
||
\end{tabularx}}
|
||
|
||
\begin{helgennotice}[Fail-safe en el PCB v3: bypass UART2 normalmente cerrado]
|
||
En la tarjeta de producción, la bajada RTCM3 (4G DOUT $\rightarrow$ F9P RX2) pasa por un
|
||
\textbf{bypass normalmente cerrado}: si el MCU está \textbf{muerto, ausente o colgado}, el
|
||
bypass mantiene la ruta conectada y las correcciones \textbf{nunca se cortan} — el MCU solo
|
||
se interpone cuando está sano. En el protoboard este fail-safe \textbf{no existe}: si retiras
|
||
o cuelgas el Blackpill en Modo~B, regresa el 4G al socket XBee (modo por defecto, Bloque~8)
|
||
para no perder RTCM3. (Invariante: las correcciones viajan por el módem 4G; ningún estado del
|
||
MCU debe interrumpirlas.)
|
||
\end{helgennotice}
|
||
|
||
\bloque{10}{Respaldo de batería (proto): TP4056 + MT3608}
|
||
\queprueba{reproduce carga / respaldo. El PCB usa el LTC4040.}
|
||
|
||
\hwtab{%
|
||
\begin{tabularx}{\textwidth}{@{}l X L{4.4cm}@{}}
|
||
\toprule
|
||
\theadconex
|
||
\midrule
|
||
\redV & 5\,V vehículo (SD-15B-05) $\rightarrow$ TP4056 IN+ & Camino de carga\\
|
||
\redG & TP4056 IN$-$ $\rightarrow$ GND & \\
|
||
\redN & TP4056 BAT+ $\rightarrow$ 18650+ (nodo compartido) & \\
|
||
\redN & 18650+ $\rightarrow$ MT3608 IN+ & Nodo compartido (carga + boost)\\
|
||
\redG & 18650$-$ $\rightarrow$ GND & \\
|
||
\redG & MT3608 IN$-$ / OUT$-$ $\rightarrow$ GND & \\
|
||
\redV & MT3608 OUT+ (eleva 3.6$\rightarrow$5\,V) $\rightarrow$ 1N5819 $\rightarrow$ MAIN5V & Respaldo (OR)\\
|
||
\redV & 5\,V vehículo $\rightarrow$ 1N5819 $\rightarrow$ MAIN5V & Primario (OR) — el vehículo tiene prioridad\\
|
||
\redN & NTC 10\,k $\rightarrow$ \textbf{pin TEMP del cargador} (TP4056 proto / LTC4040 PCB) & Temperatura de celda — \textbf{NO va al MCU} (ver aviso)\\
|
||
\redA & 18650+ $\rightarrow$ (Bloque 4) $\rightarrow$ PA0 (BAT\_SENSE) & Sensado de voltaje de batería\\
|
||
\redN & MT3608: ajustar \textbf{apenas} $<$ 5\,V del vehículo & Prioridad al vehículo; el PCB usa el LTC4040\\
|
||
\bottomrule
|
||
\end{tabularx}}
|
||
|
||
\begin{helgennotice}[El NTC del pack va al cargador, NUNCA al MCU]
|
||
El termistor pegado a la celda se conecta al \textbf{pin TEMP del cargador} (TP4056 en el
|
||
proto, LTC4040 en el PCB): es el \textbf{cargador} quien califica la carga por temperatura y
|
||
la corta si la celda está fría o caliente — protección por hardware, sin firmware de por
|
||
medio. \textbf{No lo lleves al Blackpill.} El MCU lee la temperatura por I\textsuperscript{2}C
|
||
con el \textbf{TMP102} (Bloque~6, en pigtail al punto caliente). El divisor
|
||
NTC $\rightarrow$ PB1 del \textbf{Bloque~11} es otra pieza: la ruta \textit{analógica} de
|
||
punto caliente cuando no hay SHT40/TMP102.
|
||
\end{helgennotice}
|
||
|
||
\noindent\textbf{Pack:} 1S4P $\sim$\textbf{12\,Ah} — \textit{nunca} 40\,Ah (ese dato fue un
|
||
error, corregido el 2026-06-30). Con 12\,Ah, la corriente de carga del LTC4040 se dimensiona
|
||
con R\textsubscript{PROG} $\approx$ C/5 $\le$ 2.5\,A.
|
||
|
||
\bloque{11}{Temperatura analógica (NTC 10\,k $\rightarrow$ PB1)}
|
||
\queprueba{sin SHT40, esta es tu temperatura.}
|
||
|
||
\hwtab{%
|
||
\begin{tabularx}{\textwidth}{@{}l X L{4.4cm}@{}}
|
||
\toprule
|
||
\theadconex
|
||
\midrule
|
||
\redT & 3V3 $\rightarrow$ R 10\,k$\Omega$ (1\,\%) $\rightarrow$ nodo & Divisor fijo (superior)\\
|
||
\redA & nodo $\rightarrow$ PB1 (ADC1\_IN9, libre) & $\approx$1.65\,V @ 25\,\textdegree C; baja al calentar\\
|
||
\redN & nodo $\rightarrow$ NTC 10\,k$\Omega$ $\rightarrow$ GND & Termistor · Beta $\approx$3950\\
|
||
\redG & nodo $\rightarrow$ C 100\,nF $\rightarrow$ GND & Filtro\\
|
||
\redN & Colócalo en el punto caliente (batería / módem) & Firmware: Beta/Steinhart + CHRG\_EN\\
|
||
\bottomrule
|
||
\end{tabularx}}
|
||
|
||
\noindent{\small\textit{Este NTC es \textbf{distinto} del NTC del cargador (Bloque~10): este
|
||
sí va al MCU (PB1) y mide el punto caliente; aquel va al pin TEMP del cargador y protege la
|
||
celda.}}
|
||
|
||
\section{Patitas de los componentes}
|
||
|
||
Míralos de frente, patitas hacia abajo.
|
||
|
||
\hwtab{%
|
||
\begin{tabularx}{\textwidth}{@{}L{4.6cm} X@{}}
|
||
\toprule
|
||
\rowcolor{HelgenIndigo}\textcolor{white}{\textbf{Componente}} & \textcolor{white}{\textbf{Orientación / pines}}\\
|
||
\midrule
|
||
2N3904 (TO-92) & Cara plana hacia ti, izq $\rightarrow$ der: \textbf{E -- B -- C}\\
|
||
IRF9540 (TO-220, canal P) & Metal atrás, izq $\rightarrow$ der: \textbf{G -- D -- S}. Metal = Drain\\
|
||
IRLZ44N (TO-220, lógico) & Metal atrás, izq $\rightarrow$ der: \textbf{G -- D -- S}. Debe ser «lógico» (\textbf{NO} IRF540/IRFZ44)\\
|
||
BAT54 · 1N5819 (diodos) & La banda impresa = \textbf{cátodo (K)}\\
|
||
NTC 10\,k (termistor) & Sin polaridad. Divisor con R 10\,k (1\,\%) a 3V3\\
|
||
\bottomrule
|
||
\end{tabularx}}
|
||
|
||
\section{Orden de armado (sigue este orden)}
|
||
\label{sec:orden}
|
||
|
||
\hwtab{%
|
||
\begin{tabularx}{\textwidth}{@{}c L{3.2cm} X@{}}
|
||
\toprule
|
||
\rowcolor{HelgenIndigo}\textcolor{white}{\textbf{\#}} & \textcolor{white}{\textbf{Paso}} & \textcolor{white}{\textbf{Acción}}\\
|
||
\midrule
|
||
1 & Solo USB & Compila y flashea el firmware v2.3 (Arduino/STM32duino, F411CE, DFU con BOOT0). Serial 115200: confirma \texttt{BOOT}/\texttt{COLS}/\texttt{TLM} y un \texttt{\$PHLG} cada 30\,s. Si falla, arregla el firmware antes de seguir.\\
|
||
2 & LED de estado & Bloque 2. Verás parpadeos.\\
|
||
3 & Interruptor de carga & Bloque 3. Confirma: \textbf{APAGADO al reset}, ON cuando PA1 activa.\\
|
||
4 & Sensado & Bloque 4. Divisores PA0/PA4; ignición por DFR1015 (12/24\,V) o el apagador a 3V3.\\
|
||
5 & Ventilador & Bloque 5. \textbf{Primero} ajusta el LM2596 a 5.0\,V, luego conecta el ventilador.\\
|
||
6 & Temperatura & Bloque 6 (si tienes SHT40/TMP102) o Bloque 11 (NTC $\rightarrow$ PB1).\\
|
||
7 & Respaldo de batería & Bloque 10. TP4056 + MT3608 (ajusta el MT3608 apenas $<$ 5\,V del vehículo).\\
|
||
8 & Stack RTK & Bloque 8. Solo 4 cables (SAL, GND, PA2, PA3); el 4G va en el socket XBee del Pro.\\
|
||
9 & (Opcional) Modo B & Bloque 9. Relé por breakout XBee — solo si vas a probar el diagnóstico por NTRIP.\\
|
||
\bottomrule
|
||
\end{tabularx}}
|
||
|
||
\section{Avisos importantes}
|
||
|
||
\begin{itemize}
|
||
\item El IRLZ44N debe ser «lógico» (\textbf{no} IRF540/IRFZ44). Si usaron TIP120, avísale a Leo.
|
||
\item \textbf{Nunca 5\,V directo a PA0/PA4/PA5.} PA0/PA4 por divisor $\div$2; PA5 lógico
|
||
$\le$ 3.3\,V (\texttt{INPUT\_PULLDOWN}, clamp BAT54, \textbf{sin divisor}).
|
||
\item LM2596: ajústalo a \textbf{5.0\,V con el multímetro ANTES de conectar} (vienen aleatorios).
|
||
\item El ventilador va en el 5\,V del LM2596 (\textbf{separado}), no en la salida «stack» ni en el 5\,V principal.
|
||
\item MT3608: ajústalo \textbf{apenas} $<$ 5\,V del vehículo (para que el vehículo tenga prioridad).
|
||
\item Ventilador de 2 hilos $\rightarrow$ sin tacómetro (PB10 sin usar).
|
||
\item El DFR1015 acepta 12 y 24\,V; su GND (IN$-$/OUT$-$) va al GND del sistema.
|
||
\item El 4G va en el \textbf{socket XBee del Pro} (no al Blackpill), salvo el Modo B.
|
||
En el PCB v3, el bypass UART2 \textbf{normalmente cerrado} garantiza que un MCU
|
||
muerto/ausente nunca corte el RTCM3 (ver Bloque~9).
|
||
\item El NTC del pack va al \textbf{pin TEMP del cargador} (TP4056 proto / LTC4040 PCB),
|
||
\textbf{nunca al MCU}. El MCU lee temperatura por el TMP102 (I\textsuperscript{2}C,
|
||
Bloque~6); el NTC $\rightarrow$ PB1 (Bloque~11) es la ruta de punto caliente cuando
|
||
no hay SHT40/TMP102.
|
||
\item 18650: respeta la polaridad; pack 1S4P $\sim$\textbf{12\,Ah} (nunca 40\,Ah).
|
||
\textbf{Bench-test} el firmware antes de flashear en campo.
|
||
\item Cobertura de partes: \textbf{Sección 1 + 3} de la lista de compras = suficiente para
|
||
el core; la Sección 2 (TP4056/MT3608) solo para el respaldo de batería.
|
||
\end{itemize}
|
||
|
||
\section{Historial del documento}
|
||
|
||
\hwtab{%
|
||
\begin{tabularx}{\textwidth}{@{}l l X@{}}
|
||
\toprule
|
||
\rowcolor{HelgenIndigo}\textcolor{white}{\textbf{Versión}} & \textcolor{white}{\textbf{Fecha}} & \textcolor{white}{\textbf{Cambios}}\\
|
||
\midrule
|
||
v2 & 2026-07-02 & Guía original (bloques 1--11), publicada solo como PDF (fuente perdida).\\
|
||
v2.1 & 2026-07-02 & Fuente LaTeX reconstruida y mantenida en el repo
|
||
(\texttt{03-Architecture-Hardware/}\allowbreak\texttt{Guia-Conexion-Protoboard/}). Contenido realineado al XLSX
|
||
autoritativo: mapa de pines completado (\textbf{PA8}, \textbf{PC13}), Bloque 9 con las filas
|
||
faltantes (alimentación, monitor PA2/PA3, ruta al servidor), fila LTC4040 en «Fuentes y
|
||
convertidores». Nuevo: tabla «Estado y cambios», aviso del \textbf{bypass UART2 normalmente
|
||
cerrado} del PCB (Bloque 9), aclaración \textbf{NTC del cargador vs TMP102 vs NTC$\rightarrow$PB1},
|
||
pack 1S4P $\sim$12\,Ah (nunca 40\,Ah), leyenda con colores de los diagramas CircuiTikZ,
|
||
figura del Bloque 3 y referencias cruzadas.\\
|
||
\bottomrule
|
||
\end{tabularx}}
|
||
|
||
\vspace{6pt}
|
||
\noindent{\footnotesize Helgen Technologies · Proyecto Drogheda · Guía de conexión en
|
||
protoboard v2.1 (bloques 1--11) · Firmware v2.3 · Documento para el técnico de armado.
|
||
Datos de conexión: \texttt{Drogheda\_Conexiones-por-Bloque\_Proto\_v1.xlsx} · Diagramas:
|
||
\texttt{circuitikz-wiring/}.}
|