센서1·3(누수 노드)에 PMS7003 를 온습도와 동일 sensor_id 로 통합하고 metric_type='pms7003'
로 구분해 수집한다. LED 는 스위칭 없이 상시 점등 방식으로 확정.
- raspberry_pi4_pms7003/: PMS7003 노드 풀세트(드라이버·센서·install·systemd·vendor·배선·연결테스트·프레임 단위테스트)
- 서버: evaluate_metric_thresholds() 에 pm25/pm10 선택 인자 추가(온습도 전용 호출 후방호환),
sensor_data.php 수집 경로에 pms7003 metric 반영, config.php/예시에 PM 임계 추가
- SQL: migration_pms7003.sql · schema_sht30.sql 정합, tools/migration_leak_add_{pms7003,sht30} 마이그레이터
- tests/pm_threshold_test.php + run_tests.sh 러너 등록
- .gitignore: 노드별 config_local.py 커밋 차단
618 lines
44 KiB
HTML
618 lines
44 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<title>Leak Detection Node · Wiring & Pinmap (Raspberry Pi 4)</title>
|
||
<style>
|
||
:root{
|
||
--bg:#eef1f5; --card:#ffffff; --ink:#212529; --muted:#6b7280; --line:#e5e8ec;
|
||
--sig:#2f9e44; --sig-d:#2b8a3e; --pwr:#e03131; --pwr-d:#c92a2a;
|
||
--gnd:#1971c2; --gnd-d:#1864ab; --exp:#e8590c; --exp-b:#ffa94d;
|
||
--sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Malgun Gothic","Apple SD Gothic Neo","Noto Sans KR",sans-serif;
|
||
--mono:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;
|
||
}
|
||
*{box-sizing:border-box}
|
||
html,body{margin:0}
|
||
body{font-family:var(--sans);background:var(--bg);color:var(--ink);line-height:1.6;
|
||
-webkit-font-smoothing:antialiased;padding:24px 16px 60px}
|
||
.wrap{max-width:1000px;margin:0 auto}
|
||
svg text{font-family:var(--sans)}
|
||
|
||
/* Header */
|
||
.hero{background:linear-gradient(135deg,#0b2545 0%,#134074 55%,#1971c2 100%);
|
||
color:#fff;border-radius:16px;padding:26px 28px;box-shadow:0 8px 24px rgba(11,37,69,.18)}
|
||
.hero .eyebrow{font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:#a5c4e6;font-weight:700;margin:0 0 6px}
|
||
.hero h1{margin:0 0 10px;font-size:26px;line-height:1.25;font-weight:800}
|
||
.hero p{margin:0 0 16px;font-size:15px;color:#dbe7f5;max-width:70ch}
|
||
.chips{display:flex;flex-wrap:wrap;gap:8px}
|
||
.chip{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.25);color:#fff;
|
||
border-radius:999px;padding:5px 12px;font-size:12.5px;font-weight:600;white-space:nowrap}
|
||
.chip.mono{font-family:var(--mono);letter-spacing:.02em}
|
||
|
||
/* Section cards */
|
||
section{background:var(--card);border:1px solid var(--line);border-radius:14px;
|
||
padding:22px 24px;margin-top:20px;box-shadow:0 2px 8px rgba(16,24,40,.05)}
|
||
h2{display:flex;align-items:center;gap:12px;margin:0 0 18px;font-size:19px;font-weight:800}
|
||
h2 .num{flex:none;width:30px;height:30px;border-radius:9px;background:#134074;color:#fff;
|
||
font-size:15px;display:flex;align-items:center;justify-content:center;font-weight:800}
|
||
h3{margin:22px 0 10px;font-size:15px;font-weight:700;color:#134074}
|
||
|
||
/* Pinmap block */
|
||
.pinwrap{display:grid;grid-template-columns:minmax(260px,1.15fr) 1fr;gap:24px;align-items:start}
|
||
.diagram{background:#fbfcfd;border:1px solid var(--line);border-radius:12px;padding:14px}
|
||
.legend{display:flex;flex-direction:column;gap:11px}
|
||
.legend .lg{display:flex;align-items:flex-start;gap:11px;font-size:13.5px}
|
||
.sw{flex:none;width:22px;height:22px;border-radius:6px;margin-top:1px}
|
||
.sw.sig{background:var(--sig);border:2px solid var(--sig-d)}
|
||
.sw.pwr{background:var(--pwr);border:2px solid var(--pwr-d)}
|
||
.sw.gnd{background:var(--gnd);border:2px solid var(--gnd-d)}
|
||
.sw.alt{background:#e7f5ff;border:2px dashed #4dabf7}
|
||
.sw.exp{background:#fff4e6;border:2px dashed var(--exp-b)}
|
||
.sw.off{background:#e9ecef;border:2px solid #ced4da}
|
||
.lg b{display:block;font-weight:700}
|
||
.lg span{color:var(--muted);font-size:12.5px}
|
||
.hint{margin-top:6px;font-size:12.5px;color:var(--muted);background:#f8f9fb;border:1px dashed #d5dbe3;
|
||
border-radius:8px;padding:9px 11px}
|
||
|
||
/* Table */
|
||
table{width:100%;border-collapse:collapse;font-size:14px}
|
||
caption{caption-side:bottom;text-align:left;color:var(--muted);font-size:12.5px;padding-top:10px}
|
||
th,td{padding:11px 12px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top}
|
||
thead th{background:#f3f6fa;color:#134074;font-weight:700;font-size:13px;border-bottom:2px solid #d6e0ec}
|
||
td.mono,th.mono{font-family:var(--mono);white-space:nowrap}
|
||
.tag{display:inline-block;font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px;line-height:1.7}
|
||
.tag.sig{background:#e7f6ec;color:var(--sig-d)}
|
||
.tag.pwr{background:#fdecec;color:var(--pwr-d)}
|
||
.tag.gnd{background:#e7f1fb;color:var(--gnd-d)}
|
||
.tag.exp{background:#fff1e3;color:var(--exp)}
|
||
tr.exprow td{background:#fffaf3}
|
||
|
||
/* Electrical notes */
|
||
.notes{display:grid;grid-template-columns:1fr 1fr;gap:14px}
|
||
.note{border:1px solid var(--line);border-left:4px solid #1971c2;border-radius:10px;padding:13px 15px;background:#fbfcfd}
|
||
.note h4{margin:0 0 4px;font-size:14px}
|
||
.note p{margin:0;font-size:13.5px;color:#374151}
|
||
.note code,.inline-code{font-family:var(--mono);background:#eef2f7;padding:1px 6px;border-radius:5px;font-size:12.5px}
|
||
.crit{grid-column:1 / -1;border:2px solid var(--pwr);border-left-width:6px;background:#fff5f5;border-radius:10px;padding:15px 18px}
|
||
.crit .badge{display:inline-block;background:var(--pwr);color:#fff;font-weight:800;font-size:12px;
|
||
padding:3px 11px;border-radius:6px;letter-spacing:.04em;margin-bottom:8px}
|
||
.crit h4{margin:0 0 6px;font-size:16px;color:var(--pwr-d)}
|
||
.crit p{margin:0;font-size:14px;color:#5c1a1a}
|
||
.cam{margin-top:16px;border:1px solid var(--line);border-left:4px solid #7048e8;border-radius:10px;
|
||
padding:13px 16px;background:#fbfaff}
|
||
.cam h4{margin:0 0 6px;font-size:14px;color:#5f3dc4}
|
||
.cam p{margin:0;font-size:13.5px;color:#374151}
|
||
|
||
/* Checklist */
|
||
ol.check{counter-reset:c;list-style:none;margin:0;padding:0}
|
||
ol.check li{position:relative;padding:12px 14px 12px 80px;border-bottom:1px solid #f1f3f5;
|
||
line-height:1.5;font-size:14px}
|
||
ol.check li:last-child{border-bottom:none}
|
||
ol.check li::before{counter-increment:c;content:counter(c);position:absolute;left:12px;top:11px;
|
||
width:26px;height:26px;border-radius:50%;background:#e7f1fb;color:#1971c2;font-weight:800;
|
||
font-size:13px;display:flex;align-items:center;justify-content:center}
|
||
ol.check li::after{content:"";position:absolute;left:50px;top:13px;width:18px;height:18px;
|
||
border:2px solid #adb5bd;border-radius:4px}
|
||
ol.check li.key{background:#fff8f8}
|
||
ol.check li b{color:var(--pwr-d)}
|
||
|
||
@media (max-width:720px){
|
||
.pinwrap{grid-template-columns:1fr}
|
||
.notes{grid-template-columns:1fr}
|
||
.hero h1{font-size:22px}
|
||
}
|
||
|
||
@media print{
|
||
:root{--bg:#fff}
|
||
body{background:#fff;color:#000;padding:0;font-size:12px}
|
||
.wrap{max-width:100%}
|
||
.hero{background:#fff!important;color:#000;border:2px solid #134074;box-shadow:none}
|
||
.hero .eyebrow{color:#134074}.hero p{color:#333}
|
||
.chip{background:#fff;border:1px solid #999;color:#000}
|
||
section{box-shadow:none;border:1px solid #999;page-break-inside:avoid;break-inside:avoid}
|
||
h2 .num{background:#134074!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
|
||
svg{max-width:100%!important;height:auto}
|
||
table,tr,td,th,.note,.crit,.cam,ol.check li{page-break-inside:avoid;break-inside:avoid}
|
||
*{-webkit-print-color-adjust:exact;print-color-adjust:exact}
|
||
.diagram,.note,.crit,.cam{background:#fff}
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="wrap">
|
||
|
||
<!-- 1) HEADER -->
|
||
<header class="hero">
|
||
<p class="eyebrow">Field Wiring & Pinmap · Leak Detection Node</p>
|
||
<h1>Leak Detection Node · Wiring & Pinmap</h1>
|
||
<p>Standard wiring diagram for connecting the e-con 5C-08 resistive leak sensor to <b>GPIO17 (physical pin 11)</b>.
|
||
Pi-A (sensor_id=1 · Site 1 · Server Room) and Pi-C (sensor_id=3 · Site 3 · New) are <b>common nodes</b> with identical wiring.</p>
|
||
<div class="chips">
|
||
<span class="chip">Raspberry Pi 4 Model B</span>
|
||
<span class="chip mono">BCM2711</span>
|
||
<span class="chip">Raspberry Pi OS Bookworm 64-bit</span>
|
||
<span class="chip">e-con 5C-08 · Resistive ~1.5MΩ</span>
|
||
<span class="chip mono">GPIO17 / Pin 11</span>
|
||
<span class="chip">External 10MΩ pull-down required</span>
|
||
</div>
|
||
</header>
|
||
|
||
<!-- 2) 40-pin header pinmap diagram -->
|
||
<section>
|
||
<h2><span class="num">2</span>40-Pin Header Pinmap Diagram</h2>
|
||
<div class="pinwrap">
|
||
<div class="diagram">
|
||
<svg viewBox="0 0 600 681" role="img" aria-label="Raspberry Pi 4 40-pin GPIO header pinmap" xmlns="http://www.w3.org/2000/svg" style="width:100%;height:auto;max-width:600px;">
|
||
<rect x="70" y="69" width="460" height="31" fill="#f6f8fa"/>
|
||
<rect x="70" y="131" width="460" height="31" fill="#f6f8fa"/>
|
||
<rect x="70" y="193" width="460" height="31" fill="#f6f8fa"/>
|
||
<rect x="70" y="255" width="460" height="31" fill="#f6f8fa"/>
|
||
<rect x="70" y="317" width="460" height="31" fill="#f6f8fa"/>
|
||
<rect x="70" y="379" width="460" height="31" fill="#f6f8fa"/>
|
||
<rect x="70" y="441" width="460" height="31" fill="#f6f8fa"/>
|
||
<rect x="70" y="503" width="460" height="31" fill="#f6f8fa"/>
|
||
<rect x="70" y="565" width="460" height="31" fill="#f6f8fa"/>
|
||
<rect x="70" y="627" width="460" height="31" fill="#f6f8fa"/>
|
||
<rect x="234" y="30" width="112" height="633" rx="10" fill="#f1f3f5" stroke="#adb5bd" stroke-width="1.5"/>
|
||
<rect x="236" y="36" width="32" height="32" rx="6" fill="none" stroke="#e03131" stroke-width="1.5" stroke-dasharray="3 2"/>
|
||
<text x="252" y="22" text-anchor="middle" font-size="10" fill="#868e96">Odd pins</text>
|
||
<text x="330" y="22" text-anchor="middle" font-size="10" fill="#868e96">Even pins</text>
|
||
<text x="220" y="56" text-anchor="end" font-family="Consolas,monospace" font-size="12" font-weight="700" fill="#7d1616">3V3</text>
|
||
<text x="360" y="56" text-anchor="start" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">5V</text>
|
||
<circle cx="252" cy="52" r="12" fill="#e03131" stroke="#c92a2a" stroke-width="1.5"/><text x="252" y="55.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#ffffff">1</text>
|
||
<circle cx="330" cy="52" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="330" y="55.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">2</text>
|
||
<text x="220" y="87" text-anchor="end" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO2 (SDA1)</text>
|
||
<text x="360" y="87" text-anchor="start" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">5V</text>
|
||
<circle cx="252" cy="83" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="252" y="86.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">3</text>
|
||
<circle cx="330" cy="83" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="330" y="86.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">4</text>
|
||
<text x="220" y="118" text-anchor="end" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO3 (SCL1)</text>
|
||
<text x="360" y="118" text-anchor="start" font-family="Consolas,monospace" font-size="12" font-weight="700" fill="#123a63">GND</text>
|
||
<circle cx="252" cy="114" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="252" y="117.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">5</text>
|
||
<circle cx="330" cy="114" r="12" fill="#1971c2" stroke="#1864ab" stroke-width="1.5"/><text x="330" y="117.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#ffffff">6</text>
|
||
<text x="220" y="149" text-anchor="end" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO4</text>
|
||
<text x="360" y="149" text-anchor="start" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO14 (TXD)</text>
|
||
<circle cx="252" cy="145" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="252" y="148.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">7</text>
|
||
<circle cx="330" cy="145" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="330" y="148.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">8</text>
|
||
<text x="220" y="180" text-anchor="end" font-family="Consolas,monospace" font-size="12" font-weight="600" fill="#1971c2">GND</text>
|
||
<text x="360" y="180" text-anchor="start" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO15 (RXD)</text>
|
||
<circle cx="252" cy="176" r="12" fill="#e7f5ff" stroke="#4dabf7" stroke-width="1.5" stroke-dasharray="3 2"/><text x="252" y="179.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#1971c2">9</text>
|
||
<circle cx="330" cy="176" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="330" y="179.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">10</text>
|
||
<text x="220" y="211" text-anchor="end" font-family="Consolas,monospace" font-size="12" font-weight="700" fill="#1b4332">GPIO17</text>
|
||
<text x="360" y="211" text-anchor="start" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO18</text>
|
||
<circle cx="252" cy="207" r="12" fill="#2f9e44" stroke="#2b8a3e" stroke-width="1.5"/><text x="252" y="210.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#ffffff">11</text>
|
||
<circle cx="330" cy="207" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="330" y="210.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">12</text>
|
||
<text x="220" y="242" text-anchor="end" font-family="Consolas,monospace" font-size="12" font-weight="600" fill="#e8590c">GPIO27</text>
|
||
<text x="360" y="242" text-anchor="start" font-family="Consolas,monospace" font-size="12" font-weight="600" fill="#1971c2">GND</text>
|
||
<circle cx="252" cy="238" r="12" fill="#fff4e6" stroke="#ffa94d" stroke-width="1.5" stroke-dasharray="3 2"/><text x="252" y="241.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#e8590c">13</text>
|
||
<circle cx="330" cy="238" r="12" fill="#e7f5ff" stroke="#4dabf7" stroke-width="1.5" stroke-dasharray="3 2"/><text x="330" y="241.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#1971c2">14</text>
|
||
<text x="220" y="273" text-anchor="end" font-family="Consolas,monospace" font-size="12" font-weight="600" fill="#e8590c">GPIO22</text>
|
||
<text x="360" y="273" text-anchor="start" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO23</text>
|
||
<circle cx="252" cy="269" r="12" fill="#fff4e6" stroke="#ffa94d" stroke-width="1.5" stroke-dasharray="3 2"/><text x="252" y="272.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#e8590c">15</text>
|
||
<circle cx="330" cy="269" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="330" y="272.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">16</text>
|
||
<text x="220" y="304" text-anchor="end" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">3V3</text>
|
||
<text x="360" y="304" text-anchor="start" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO24</text>
|
||
<circle cx="252" cy="300" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="252" y="303.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">17</text>
|
||
<circle cx="330" cy="300" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="330" y="303.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">18</text>
|
||
<text x="220" y="335" text-anchor="end" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO10 (MOSI)</text>
|
||
<text x="360" y="335" text-anchor="start" font-family="Consolas,monospace" font-size="12" font-weight="600" fill="#1971c2">GND</text>
|
||
<circle cx="252" cy="331" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="252" y="334.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">19</text>
|
||
<circle cx="330" cy="331" r="12" fill="#e7f5ff" stroke="#4dabf7" stroke-width="1.5" stroke-dasharray="3 2"/><text x="330" y="334.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#1971c2">20</text>
|
||
<text x="220" y="366" text-anchor="end" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO9 (MISO)</text>
|
||
<text x="360" y="366" text-anchor="start" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO25</text>
|
||
<circle cx="252" cy="362" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="252" y="365.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">21</text>
|
||
<circle cx="330" cy="362" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="330" y="365.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">22</text>
|
||
<text x="220" y="397" text-anchor="end" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO11 (SCLK)</text>
|
||
<text x="360" y="397" text-anchor="start" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO8 (CE0)</text>
|
||
<circle cx="252" cy="393" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="252" y="396.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">23</text>
|
||
<circle cx="330" cy="393" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="330" y="396.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">24</text>
|
||
<text x="220" y="428" text-anchor="end" font-family="Consolas,monospace" font-size="12" font-weight="600" fill="#1971c2">GND</text>
|
||
<text x="360" y="428" text-anchor="start" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO7 (CE1)</text>
|
||
<circle cx="252" cy="424" r="12" fill="#e7f5ff" stroke="#4dabf7" stroke-width="1.5" stroke-dasharray="3 2"/><text x="252" y="427.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#1971c2">25</text>
|
||
<circle cx="330" cy="424" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="330" y="427.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">26</text>
|
||
<text x="220" y="459" text-anchor="end" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO0 (ID_SD)</text>
|
||
<text x="360" y="459" text-anchor="start" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO1 (ID_SC)</text>
|
||
<circle cx="252" cy="455" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="252" y="458.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">27</text>
|
||
<circle cx="330" cy="455" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="330" y="458.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">28</text>
|
||
<text x="220" y="490" text-anchor="end" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO5</text>
|
||
<text x="360" y="490" text-anchor="start" font-family="Consolas,monospace" font-size="12" font-weight="600" fill="#1971c2">GND</text>
|
||
<circle cx="252" cy="486" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="252" y="489.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">29</text>
|
||
<circle cx="330" cy="486" r="12" fill="#e7f5ff" stroke="#4dabf7" stroke-width="1.5" stroke-dasharray="3 2"/><text x="330" y="489.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#1971c2">30</text>
|
||
<text x="220" y="521" text-anchor="end" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO6</text>
|
||
<text x="360" y="521" text-anchor="start" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO12</text>
|
||
<circle cx="252" cy="517" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="252" y="520.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">31</text>
|
||
<circle cx="330" cy="517" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="330" y="520.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">32</text>
|
||
<text x="220" y="552" text-anchor="end" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO13</text>
|
||
<text x="360" y="552" text-anchor="start" font-family="Consolas,monospace" font-size="12" font-weight="600" fill="#1971c2">GND</text>
|
||
<circle cx="252" cy="548" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="252" y="551.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">33</text>
|
||
<circle cx="330" cy="548" r="12" fill="#e7f5ff" stroke="#4dabf7" stroke-width="1.5" stroke-dasharray="3 2"/><text x="330" y="551.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#1971c2">34</text>
|
||
<text x="220" y="583" text-anchor="end" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO19</text>
|
||
<text x="360" y="583" text-anchor="start" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO16</text>
|
||
<circle cx="252" cy="579" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="252" y="582.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">35</text>
|
||
<circle cx="330" cy="579" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="330" y="582.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">36</text>
|
||
<text x="220" y="614" text-anchor="end" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO26</text>
|
||
<text x="360" y="614" text-anchor="start" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO20</text>
|
||
<circle cx="252" cy="610" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="252" y="613.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">37</text>
|
||
<circle cx="330" cy="610" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="330" y="613.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">38</text>
|
||
<text x="220" y="645" text-anchor="end" font-family="Consolas,monospace" font-size="12" font-weight="600" fill="#1971c2">GND</text>
|
||
<text x="360" y="645" text-anchor="start" font-family="Consolas,monospace" font-size="12" font-weight="400" fill="#adb5bd">GPIO21</text>
|
||
<circle cx="252" cy="641" r="12" fill="#e7f5ff" stroke="#4dabf7" stroke-width="1.5" stroke-dasharray="3 2"/><text x="252" y="644.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#1971c2">39</text>
|
||
<circle cx="330" cy="641" r="12" fill="#e9ecef" stroke="#ced4da" stroke-width="1.5"/><text x="330" y="644.5" text-anchor="middle" font-family="Consolas,monospace" font-size="10" font-weight="700" fill="#868e96">40</text>
|
||
</svg>
|
||
</div>
|
||
<div class="legend">
|
||
<div class="lg"><span class="sw sig"></span><b>Signal (GPIO17 · Pin 11)<span>Sensor signal line input</span></b></div>
|
||
<div class="lg"><span class="sw pwr"></span><b>Power 3V3 (Pin 1)<span>Sensor power supply</span></b></div>
|
||
<div class="lg"><span class="sw gnd"></span><b>Ground GND (Pin 6 · used)<span>Default sensor GND connection</span></b></div>
|
||
<div class="lg"><span class="sw alt"></span><b>Ground alternatives<span>Pin 9 / 14 / 20 / 25 / 30 / 34 / 39</span></b></div>
|
||
<div class="lg"><span class="sw exp"></span><b>Expansion example (optional)<span>GPIO27·Pin 13, GPIO22·Pin 15</span></b></div>
|
||
<div class="lg"><span class="sw off"></span><b>Unused pins<span>Not connected on this node</span></b></div>
|
||
<div class="hint">The red dashed square marks the <b>Pin 1</b> position. Always verify the header orientation (relative to Pin 1) before wiring. Only three pins are actually used: <b>1 · 6 · 11</b>.</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- 3) Pinmap table -->
|
||
<section>
|
||
<h2><span class="num">3</span>Pinmap Table</h2>
|
||
<table>
|
||
<thead>
|
||
<tr><th>Signal</th><th class="mono">BCM</th><th class="mono">Physical Pin</th><th>Notes</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td><span class="tag sig">Signal</span> Sensor signal line</td>
|
||
<td class="mono">GPIO17</td>
|
||
<td class="mono">Pin 11</td>
|
||
<td>Sensor signal input. Connect an external 10MΩ pull-down between <b>Pin 11 ↔ GND</b>.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><span class="tag pwr">Power</span> Sensor power 3.3V</td>
|
||
<td class="mono">3V3</td>
|
||
<td class="mono">Pin 1</td>
|
||
<td>Sensor VCC supply. (Spare 3V3 = Pin 17)</td>
|
||
</tr>
|
||
<tr>
|
||
<td><span class="tag gnd">Ground</span> Sensor GND</td>
|
||
<td class="mono">GND</td>
|
||
<td class="mono">Pin 6</td>
|
||
<td>Alternatives: any GND among Pin 9 / 14 / 20 / 25 / 30 / 34 / 39.</td>
|
||
</tr>
|
||
<tr class="exprow">
|
||
<td><span class="tag exp">Expansion</span> Additional sensor example</td>
|
||
<td class="mono">GPIO27</td>
|
||
<td class="mono">Pin 13</td>
|
||
<td>Optional. Add by BCM number to SENSORS in <span class="inline-code">config.py</span>.</td>
|
||
</tr>
|
||
<tr class="exprow">
|
||
<td><span class="tag exp">Expansion</span> Additional sensor example</td>
|
||
<td class="mono">GPIO22</td>
|
||
<td class="mono">Pin 15</td>
|
||
<td>Optional. Add the same way as above (each channel needs its own external pull-down).</td>
|
||
</tr>
|
||
</tbody>
|
||
<caption>Three pins used (Pin 1 · 6 · 11). The expansion rows are reference examples for multi-sensor setups. Per-device sensor_id / location is set in <span class="inline-code">config_local.py</span>.</caption>
|
||
</table>
|
||
</section>
|
||
|
||
<!-- 4) Wiring schematic -->
|
||
<section>
|
||
<h2><span class="num">4</span>Wiring Schematic</h2>
|
||
<div class="diagram">
|
||
<svg viewBox="0 0 640 400" role="img" aria-label="Leak sensor wiring schematic — 3V3·GPIO17·GND and external 10MΩ pull-down" xmlns="http://www.w3.org/2000/svg" style="width:100%;height:auto">
|
||
<!-- Pi header block -->
|
||
<rect x="36" y="70" width="150" height="250" rx="10" fill="#f1f3f5" stroke="#adb5bd" stroke-width="1.5"/>
|
||
<text x="111" y="60" text-anchor="middle" font-size="13" font-weight="700" fill="#212529">Raspberry Pi 4 · 40-pin header</text>
|
||
<!-- header pin rows -->
|
||
<circle cx="60" cy="120" r="5" fill="#e03131"/>
|
||
<text x="74" y="124" text-anchor="start" font-family="Consolas,monospace" font-size="12" fill="#212529">Pin 1 · 3V3</text>
|
||
<rect x="182" y="114" width="10" height="12" rx="2" fill="#e03131"/>
|
||
<circle cx="60" cy="195" r="5" fill="#2f9e44"/>
|
||
<text x="74" y="199" text-anchor="start" font-family="Consolas,monospace" font-size="12" fill="#212529">Pin 11 · GPIO17</text>
|
||
<rect x="182" y="189" width="10" height="12" rx="2" fill="#2f9e44"/>
|
||
<circle cx="60" cy="270" r="5" fill="#1971c2"/>
|
||
<text x="74" y="274" text-anchor="start" font-family="Consolas,monospace" font-size="12" fill="#212529">Pin 6 · GND</text>
|
||
<rect x="182" y="264" width="10" height="12" rx="2" fill="#1971c2"/>
|
||
<!-- sensor block -->
|
||
<rect x="470" y="95" width="150" height="190" rx="10" fill="#ffffff" stroke="#495057" stroke-width="1.5"/>
|
||
<text x="545" y="84" text-anchor="middle" font-size="13" font-weight="700" fill="#212529">e-con 5C-08 leak sensor</text>
|
||
<rect x="462" y="114" width="10" height="12" rx="2" fill="#e03131"/>
|
||
<text x="484" y="124" text-anchor="start" font-family="Consolas,monospace" font-size="12" fill="#212529">VCC 3.3V</text>
|
||
<rect x="462" y="189" width="10" height="12" rx="2" fill="#2f9e44"/>
|
||
<text x="484" y="199" text-anchor="start" font-family="Consolas,monospace" font-size="12" fill="#212529">SIG signal</text>
|
||
<rect x="462" y="264" width="10" height="12" rx="2" fill="#1971c2"/>
|
||
<text x="484" y="274" text-anchor="start" font-family="Consolas,monospace" font-size="12" fill="#212529">GND</text>
|
||
<!-- wires -->
|
||
<path d="M192,120 H462" stroke="#e03131" stroke-width="2.5" fill="none"/>
|
||
<path d="M192,195 H462" stroke="#2f9e44" stroke-width="2.5" fill="none"/>
|
||
<path d="M192,270 H462" stroke="#1971c2" stroke-width="2.5" fill="none"/>
|
||
<text x="327" y="111" text-anchor="middle" font-size="11" fill="#c92a2a">3.3V power · Pin 1</text>
|
||
<text x="250" y="186" text-anchor="middle" font-size="11" fill="#2b8a3e">Signal · GPIO17 · Pin 11</text>
|
||
<text x="250" y="261" text-anchor="middle" font-size="11" fill="#1864ab">GND · Pin 6</text>
|
||
<!-- external pulldown between SIG wire and GND wire -->
|
||
<circle cx="340" cy="195" r="4" fill="#2f9e44"/>
|
||
<circle cx="340" cy="270" r="4" fill="#1971c2"/>
|
||
<polyline points="340,199 340,206 330,210 350,218 330,226 350,234 330,242 340,246 340,266" fill="none" stroke="#343a40" stroke-width="2"/>
|
||
<text x="360" y="226" text-anchor="start" font-size="13" font-weight="700" fill="#343a40">10MΩ</text>
|
||
<text x="360" y="242" text-anchor="start" font-size="11" fill="#495057">External pull-down (required)</text>
|
||
<!-- internal pull off note -->
|
||
<rect x="60" y="300" width="330" height="26" rx="6" fill="#fff5f5" stroke="#ffa8a8" stroke-width="1.5" stroke-dasharray="4 3"/>
|
||
<text x="72" y="317" text-anchor="start" font-size="11" font-weight="700" fill="#c92a2a">Internal pull OFF · USE_INTERNAL_PULL=False (PUD_OFF)</text>
|
||
<!-- logic box -->
|
||
<rect x="60" y="350" width="520" height="30" rx="6" fill="#f1f3f5" stroke="#ced4da"/>
|
||
<text x="320" y="369" text-anchor="middle" font-size="11.5" fill="#343a40">Dry → GPIO=LOW(0) · Leak → GPIO=HIGH(1) · ACTIVE_LOW=False</text>
|
||
</svg>
|
||
</div>
|
||
<div class="hint">How it works: when dry, the sensor sits in an ultra-high-impedance (nearly open) state, so the external 10MΩ pull-down holds GPIO17 <b>LOW</b>. When a leak bridges the electrodes with water, 3.3V pulls the signal line up through ~1.5MΩ and GPIO17 switches to <b>HIGH</b>.</div>
|
||
</section>
|
||
|
||
<!-- 5) Electrical design · cautions -->
|
||
<section>
|
||
<h2><span class="num">5</span>Electrical Design · Cautions</h2>
|
||
|
||
<div class="crit">
|
||
<span class="badge">★ Critical Caution · CRITICAL</span>
|
||
<h4>Do not enable the internal pull-down</h4>
|
||
<p>If you enable the internal <b>50kΩ</b> pull-down, the ~1.5MΩ high-impedance sensor cannot pull the GPIO HIGH,
|
||
so <b>leaks will not be detected (detection failure)</b>. Always turn the internal pull off with <span class="inline-code">PUD_OFF</span>
|
||
and use <b>only the external 10MΩ pull-down</b>. (<span class="inline-code">USE_INTERNAL_PULL = False</span>)</p>
|
||
</div>
|
||
|
||
<div class="notes" style="margin-top:14px">
|
||
<div class="note">
|
||
<h4>Polarity · Logic Level</h4>
|
||
<p><span class="inline-code">ACTIVE_LOW = False</span> → when dry <b>GPIO=LOW(0)</b>, on leak <b>GPIO=HIGH(1)</b>.</p>
|
||
</div>
|
||
<div class="note">
|
||
<h4>External Pull-down (required)</h4>
|
||
<p>Connect a 10MΩ resistor between <b>GPIO17 (Pin 11) ↔ GND</b>. Essential for the high-impedance sensor.</p>
|
||
</div>
|
||
<div class="note">
|
||
<h4>Internal Pull Setting</h4>
|
||
<p><span class="inline-code">USE_INTERNAL_PULL = False</span> — keep the internal pull at <span class="inline-code">PUD_OFF</span>.</p>
|
||
</div>
|
||
<div class="note">
|
||
<h4>Debounce</h4>
|
||
<p><span class="inline-code">DEBOUNCE_MS = 500</span> — set generously given the high-impedance behavior.</p>
|
||
</div>
|
||
<div class="note" style="grid-column:1 / -1">
|
||
<h4>Configuration Files</h4>
|
||
<p>Electrical parameters live in <span class="inline-code">raspberry_pi4/config.py</span> (SENSORS · ACTIVE_LOW · USE_INTERNAL_PULL · DEBOUNCE_MS).
|
||
Per-device <b>sensor_id / location</b> is in <span class="inline-code">config_local.py</span>
|
||
(Pi-A = id 1 · Site 1 · Server Room / Pi-C = id 3 · Site 3 · New).</p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="cam">
|
||
<h4>Camera (optional · CAMERA_ENABLED=True)</h4>
|
||
<p>The Raspberry Pi 4 uses a <b>15-pin (1.0mm pitch) standard CSI connector</b>. The Zero 2 W uses 22-pin (0.5mm),
|
||
so its ribbon and camera board are <b>incompatible</b> → you need a <b>15-pin ribbon</b> for the Pi 4 or a <b>15↔22 conversion adapter</b>.
|
||
Capture with <span class="inline-code">rpicam-still</span> (Bookworm) / <span class="inline-code">libcamera-still</span> (Bullseye), <b>640×480 JPEG</b>.</p>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- 6) Installation checklist -->
|
||
<section>
|
||
<h2><span class="num">6</span>Installation Checklist</h2>
|
||
<ol class="check">
|
||
<li>Start wiring with the Raspberry Pi power <b>fully disconnected</b>.</li>
|
||
<li>Verify the header orientation (Pin 1 position). Red dashed marker = Pin 1.</li>
|
||
<li>Connect the sensor signal line to <b>Pin 11 (GPIO17)</b>.</li>
|
||
<li>Connect sensor power (3.3V) to <b>Pin 1 (3V3)</b> and sensor GND to <b>Pin 6 (GND)</b>.</li>
|
||
<li class="key">Connect an external <b>10MΩ pull-down</b> between <b>Pin 11 ↔ GND</b>. <b>(Required · omitting it causes detection failure)</b></li>
|
||
<li class="key">Confirm the internal pull is off — <span class="inline-code">USE_INTERNAL_PULL=False</span> (PUD_OFF). <b>Never use the internal pull-down.</b></li>
|
||
<li>Check <span class="inline-code">config.py</span>: <span class="inline-code">ACTIVE_LOW=False</span>, <span class="inline-code">DEBOUNCE_MS=500</span>, GPIO17 registered in SENSORS.</li>
|
||
<li>Set the per-device <b>sensor_id / location</b> in <span class="inline-code">config_local.py</span> (Pi-A=1/Server Room, Pi-C=3/New).</li>
|
||
<li>After powering on, confirm via the log that GPIO17 = <b>LOW(0)</b> in the <b>dry state</b>.</li>
|
||
<li>Wet the sensor with water (or a damp cloth) and confirm GPIO17 switches to <b>HIGH(1)</b> and a leak event is logged.</li>
|
||
<li>(Optional) When using the camera, verify the ribbon orientation and connector spec (15-pin / adapter) and run a 640×480 capture test.</li>
|
||
</ol>
|
||
</section>
|
||
|
||
<!-- 7) Camera lighting (always-on) -->
|
||
<section>
|
||
<h2><span class="num">7</span>Camera Lighting (Always-On)</h2>
|
||
|
||
<div class="cam">
|
||
<h4>White LED module — always on, no switching, no code</h4>
|
||
<p>Power a small <b>white LED module</b> directly from the Pi so the leak-check camera has light.
|
||
<b>VCC → 5V (Pin 2)</b>, <b>GND → GND (Pin 6)</b>. It stays <b>lit continuously</b> — there is
|
||
<b>no GPIO control, no switching, and no software</b>. The module is low-power, so continuous
|
||
operation produces <b>negligible heat</b> (harmless to leave on).</p>
|
||
</div>
|
||
|
||
<div class="notes" style="margin-top:14px">
|
||
<div class="note">
|
||
<h4>Wiring</h4>
|
||
<p>LED module <span class="inline-code">VCC → 5V (Pin 2)</span>, <span class="inline-code">GND → GND (Pin 6)</span>.
|
||
No signal pin — it is a bare power connection, always on.</p>
|
||
</div>
|
||
<div class="note">
|
||
<h4>No conflict with sensors</h4>
|
||
<p>Uses only 5V/GND power rails — it does not touch GPIO17 (leak), the I2C pins (SHT30),
|
||
or the UART pins (PMS7003 on GPIO15). All can coexist.</p>
|
||
</div>
|
||
<div class="note" style="grid-column:1 / -1">
|
||
<h4>NoIR camera + white light → pink tint</h4>
|
||
<p>A <b>NoIR</b> camera (no IR-cut filter) under white LED light renders the image with a
|
||
<b>pink/magenta tint</b>. This does <b>not</b> hinder leak identification (a wet patch is still
|
||
clearly visible). If you need <b>natural color</b>, use a <b>standard camera with a built-in
|
||
IR-cut filter</b> instead of the NoIR module.</p>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- 8) 통합 노드 배선 (combined node master reference) -->
|
||
<section>
|
||
<h2><span class="num">8</span>통합 노드 배선 (누수 + 온습도 + 미세먼지 + 카메라 + 조명)</h2>
|
||
|
||
<p style="margin:0 0 16px;font-size:14px;color:#374151">
|
||
Pi-A (id 1) / Pi-C (id 3) are <b>combined nodes</b> carrying <b>all five loads on one Pi</b>:
|
||
leak sensor + SHT30 (온습도) + PMS7003 (미세먼지) + camera + always-on light. The three standalone
|
||
sensor sheets each independently claim <b>Pin 1 / Pin 2 / Pin 6</b>, which <b>physically collide</b>
|
||
on a shared board. <b>This single table is the de-conflicted master; wire the combined node from
|
||
here, not from the per-sensor sections above.</b>
|
||
</p>
|
||
|
||
<div class="crit">
|
||
<span class="badge">★ De-conflict · KEY FIX</span>
|
||
<h4>GND is common, but you cannot stack 4 wires on Pin 6</h4>
|
||
<p>Every device shares the same ground, but the Pi 4 exposes <b>8 separate GND pins
|
||
(6 · 9 · 14 · 20 · 25 · 30 · 34 · 39)</b>. Spread the four grounds across them, one per device.
|
||
Likewise there are <b>two 3V3 pins (1, 17)</b> and <b>two 5V pins (2, 4)</b>: give the leak sensor
|
||
Pin 1 and the SHT30 the <b>second</b> 3V3 (Pin 17); give the PMS7003 Pin 2 and the LED the
|
||
<b>second</b> 5V (Pin 4). Never double up two wires on a single rail pin.</p>
|
||
</div>
|
||
|
||
<table style="margin-top:16px">
|
||
<thead>
|
||
<tr><th>Device</th><th>Line</th><th class="mono">BCM / Rail</th><th class="mono">Physical Pin</th><th>Notes</th></tr>
|
||
</thead>
|
||
<tbody>
|
||
<!-- Leak -->
|
||
<tr>
|
||
<td rowspan="3"><b>누수 Leak</b><br><span style="color:var(--muted);font-size:12.5px">e-con 5C-08</span></td>
|
||
<td><span class="tag sig">Signal</span> Sensor signal</td>
|
||
<td class="mono">GPIO17</td>
|
||
<td class="mono">Pin 11</td>
|
||
<td>External <b>10MΩ pull-down</b> Pin 11 ↔ GND (required). Internal pull <b>OFF</b> (PUD_OFF).</td>
|
||
</tr>
|
||
<tr>
|
||
<td><span class="tag pwr">Power</span> VCC 3.3V</td>
|
||
<td class="mono">3V3</td>
|
||
<td class="mono">Pin 1</td>
|
||
<td>First 3V3 rail.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><span class="tag gnd">Ground</span> GND</td>
|
||
<td class="mono">GND</td>
|
||
<td class="mono">Pin 20</td>
|
||
<td>Keep the high-impedance leak ground <b>short & solid</b>. (alt: Pin 25)</td>
|
||
</tr>
|
||
<!-- SHT30 -->
|
||
<tr>
|
||
<td rowspan="4"><b>온습도 SHT30</b><br><span style="color:var(--muted);font-size:12.5px">I2C · 3.3V ONLY</span></td>
|
||
<td><span class="tag sig">I2C</span> SDA</td>
|
||
<td class="mono">GPIO2</td>
|
||
<td class="mono">Pin 3</td>
|
||
<td>I2C data (SDA1).</td>
|
||
</tr>
|
||
<tr>
|
||
<td><span class="tag sig">I2C</span> SCL</td>
|
||
<td class="mono">GPIO3</td>
|
||
<td class="mono">Pin 5</td>
|
||
<td>I2C clock (SCL1).</td>
|
||
</tr>
|
||
<tr>
|
||
<td><span class="tag pwr">Power</span> VCC 3.3V</td>
|
||
<td class="mono">3V3</td>
|
||
<td class="mono">Pin 17</td>
|
||
<td><b>SECOND 3V3, NOT Pin 1.</b> <b>3.3V only</b>, never 5V (5V damages the SHT30).</td>
|
||
</tr>
|
||
<tr>
|
||
<td><span class="tag gnd">Ground</span> GND</td>
|
||
<td class="mono">GND</td>
|
||
<td class="mono">Pin 9</td>
|
||
<td>I2C ground (adjacent to Pin 3 / 5).</td>
|
||
</tr>
|
||
<!-- PMS7003 -->
|
||
<tr>
|
||
<td rowspan="4"><b>미세먼지 PMS7003</b><br><span style="color:var(--muted);font-size:12.5px">UART</span></td>
|
||
<td><span class="tag sig">UART</span> PMS TXD → Pi RXD</td>
|
||
<td class="mono">GPIO15</td>
|
||
<td class="mono">Pin 10</td>
|
||
<td>PMS transmit into the Pi; the data line that must be present.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><span class="tag sig">UART</span> Pi TXD → PMS RXD <em>(opt)</em></td>
|
||
<td class="mono">GPIO14</td>
|
||
<td class="mono">Pin 8</td>
|
||
<td>Optional: only for sleep/wake commands. Passive read does not need it.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><span class="tag pwr">Power</span> VCC 5V</td>
|
||
<td class="mono">5V</td>
|
||
<td class="mono">Pin 2</td>
|
||
<td>PMS7003 runs on <b>5V</b> (its UART logic is 3.3V-safe for the Pi).</td>
|
||
</tr>
|
||
<tr>
|
||
<td><span class="tag gnd">Ground</span> GND</td>
|
||
<td class="mono">GND</td>
|
||
<td class="mono">Pin 6</td>
|
||
<td>UART ground.</td>
|
||
</tr>
|
||
<!-- Camera -->
|
||
<tr>
|
||
<td><b>카메라 Camera</b></td>
|
||
<td><span class="tag exp">CSI</span> Ribbon</td>
|
||
<td class="mono">n/a</td>
|
||
<td class="mono">CSI (separate)</td>
|
||
<td><b>Not on the 40-pin header.</b> 15-pin CSI ribbon into the camera connector (see §5).</td>
|
||
</tr>
|
||
<!-- LED -->
|
||
<tr>
|
||
<td rowspan="2"><b>조명 LED</b><br><span style="color:var(--muted);font-size:12.5px">always-on</span></td>
|
||
<td><span class="tag pwr">Power</span> VCC 5V</td>
|
||
<td class="mono">5V</td>
|
||
<td class="mono">Pin 4</td>
|
||
<td><b>SECOND 5V, NOT Pin 2.</b> Must be an LED <b>module with an integrated resistor</b>, or add
|
||
a <b>~150–330Ω series resistor</b> (a bare LED on 5V burns out).</td>
|
||
</tr>
|
||
<tr>
|
||
<td><span class="tag gnd">Ground</span> GND</td>
|
||
<td class="mono">GND</td>
|
||
<td class="mono">Pin 14</td>
|
||
<td>Always lit: no GPIO, no switching, no code.</td>
|
||
</tr>
|
||
</tbody>
|
||
<caption>Combined-node master pinout. Header pins used: 1 · 2 · 3 · 4 · 5 · 6 · 8 · 9 · 10 · 11 · 14 · 17 · 20 (+ CSI ribbon). Four grounds spread over Pin 6 / 9 / 14 / 20, never stacked on one pin.</caption>
|
||
</table>
|
||
|
||
<h3>Boot configuration (Bookworm · idempotent via install.sh)</h3>
|
||
<div class="notes">
|
||
<div class="note">
|
||
<h4>I2C · SHT30</h4>
|
||
<p><span class="inline-code">dtparam=i2c_arm=on</span> in
|
||
<span class="inline-code">/boot/firmware/config.txt</span>. Verify with
|
||
<span class="inline-code">i2cdetect -y 1</span> (SHT30 at 0x44 / 0x45).</p>
|
||
</div>
|
||
<div class="note">
|
||
<h4>UART · PMS7003</h4>
|
||
<p><span class="inline-code">enable_uart=1</span> in
|
||
<span class="inline-code">config.txt</span>, and <b>remove</b>
|
||
<span class="inline-code">console=serial0,115200</span> from
|
||
<span class="inline-code">/boot/firmware/cmdline.txt</span> so the login console does not fight the sensor.</p>
|
||
</div>
|
||
<div class="note">
|
||
<h4>Camera</h4>
|
||
<p><span class="inline-code">camera_auto_detect=1</span> in
|
||
<span class="inline-code">config.txt</span>. Verify with
|
||
<span class="inline-code">rpicam-hello --list-cameras</span>.</p>
|
||
</div>
|
||
<div class="note">
|
||
<h4>Leak GPIO17 · unaffected</h4>
|
||
<p>Enabling UART / disabling the serial console does <b>not</b> affect the GPIO17 leak read or
|
||
the camera. GPIO17 is a plain input, independent of the serial peripheral.</p>
|
||
</div>
|
||
<div class="note" style="grid-column:1 / -1">
|
||
<h4>One reboot applies everything</h4>
|
||
<p>All three <span class="inline-code">install.sh</span> scripts set these <b>idempotently</b>
|
||
(I2C · UART + cmdline · camera). Run them, then a <b>single reboot</b> applies I2C, UART, and the
|
||
camera together (no per-sensor reboot needed).</p>
|
||
</div>
|
||
</div>
|
||
|
||
<h3>Power supply</h3>
|
||
<div class="note" style="border-left-color:var(--pwr)">
|
||
<h4>Use a genuine 5.1V / 3A USB-C PSU</h4>
|
||
<p>Combined draw of all five loads is <b>~1.4–1.8A typical, ~2.2A worst-case</b>, so the official
|
||
<b>5.1V / 3A</b> supply has ample headroom. <b>Avoid phone chargers and unpowered USB hubs</b>:
|
||
sag below ~4.8V triggers a brown-out → CPU throttle and <b>SD-card corruption</b>. Check health with
|
||
<span class="inline-code">vcgencmd get_throttled</span> (expect <span class="inline-code">0x0</span>;
|
||
any non-zero indicates under-voltage).</p>
|
||
</div>
|
||
</section>
|
||
|
||
</div>
|
||
</body>
|
||
</html>
|