← Commit history

README.html body: embedded Babylon 3D viewers (view cube) with quantized + static fallbacks

Caleb ·c790e501ec ·2mo ago ·parent 1ef9b36
4 files changed +252−1
README.htmladded+251
@@ -0,0 +1,251 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8">+<meta name="viewport" content="width=device-width, initial-scale=1">+<title>Base Scaffold Control Panel</title>+<link rel="stylesheet" href="/static/vendor/adom-3d-viewer-babylon9/style.css">+<script type="module" src="/static/vendor/adom-3d-viewer-babylon9/adom-3d-viewer-babylon9.esm.js?v=20260717e"></script>+<style>+* { margin: 0; padding: 0; box-sizing: border-box; }+body {+  background: #0d1117; color: #c9d1d9;+  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;+  font-size: 16px; line-height: 1.6;+}+.wrap { max-width: 980px; margin: 0 auto; padding: 8px 16px 48px; }+h1 { font-size: 2em; font-weight: 600; color: #e6edf3; padding-bottom: .3em; border-bottom: 1px solid #21262d; margin: 8px 0 16px; }+h2 { font-size: 1.5em; font-weight: 600; color: #e6edf3; padding-bottom: .3em; border-bottom: 1px solid #21262d; margin: 28px 0 16px; }+h3 { font-size: 1.25em; font-weight: 600; color: #e6edf3; margin: 24px 0 12px; }+p { margin: 0 0 16px; }+a { color: #00b8b0; text-decoration: none; }+a:hover { text-decoration: underline; }+strong { color: #e6edf3; }+ul { margin: 0 0 16px 2em; }+li { margin: 4px 0; }+table { border-collapse: collapse; margin: 0 0 16px; display: block; overflow-x: auto; max-width: 100%; }+th, td { border: 1px solid #30363d; padding: 6px 13px; text-align: left; vertical-align: top; }+th { background: #161b22; color: #e6edf3; font-weight: 600; }+tr:nth-child(2n) td { background: rgba(110, 118, 129, 0.06); }+img { max-width: 100%; border-radius: 6px; display: block; margin: 0 0 16px; }+.viewer-slot {+  position: relative; height: 460px; margin: 0 0 16px;+  border-radius: 8px; overflow: hidden; background: #0d1117;+  border: 1px solid #21262d;+}+.viewer-slot .mount { position: absolute; inset: 0; }+.viewer-slot .fallback { position: absolute; inset: 0; object-fit: contain; width: 100%; height: 100%; margin: 0; }+.viewer-slot .vctl {+  position: absolute; left: 12px; bottom: 12px; z-index: 10; display: none; gap: 6px;+}+.viewer-slot .vctl button {+  background: rgba(22, 27, 34, 0.85); border: 1px solid rgba(240, 246, 252, 0.12);+  color: #8b949e; font-family: inherit; font-size: 12px; line-height: 1;+  padding: 7px 11px; border-radius: 14px; cursor: pointer;+}+.viewer-slot .vctl button:hover { color: #c9d1d9; border-color: rgba(240, 246, 252, 0.25); }+.viewer-slot .vctl button.on { color: #e6edf3; border-color: #2f81f7; background: rgba(31, 111, 235, 0.18); }+.viewer-note { font-size: 12.5px; color: #8b949e; margin: -8px 0 20px; }+</style>+</head>+<body>+<div class="wrap">++<h1>Base Scaffold Control Panel</h1>++<p>The control panel is the electrical front door of the Base Scaffold System: it carries the scaffold's power and signal interface and provides the connect/disconnect that mates the scaffold to a workcell each time it docks.</p>++<p>It is a two-board pair that mate at a blade dock. One half stays with the workcell, the other rides on the base scaffold with the project.</p>++<h2>The Pair</h2>++<table>+<tr><th>Half</th><th>Role</th></tr>+<tr><td><strong>Workcell side</strong> (system)</td><td>Power-distribution hub and workcell controller. Bench supplies land here, every rail is metered, and power + debug are delivered across the dock.</td></tr>+<tr><td><strong>Scaffold side</strong> (user)</td><td>Power and I/O dock board. Lands the supply rails, USB and user I/O on the scaffold's machine-contact field, where the project is built.</td></tr>+</table>++<h3>Workcell side</h3>++<div class="viewer-slot" data-glb="/api/pages/adom/base-scaffold-control-panel/files/models/Control_Panel_Workcell_v2.0.1.glb"+     data-glb-fallback="/api/pages/adom/base-scaffold-control-panel/files/models/workcell-q.glb"+     data-img="/api/pages/adom/base-scaffold-control-panel/files/diagrams/viewer-workcell.png">+  <img class="fallback" src="/api/pages/adom/base-scaffold-control-panel/files/diagrams/viewer-workcell.png" alt="Control panel — workcell side">+  <div class="mount"></div>+  <div class="vctl">+    <button type="button" data-act="ground">Ground</button>+    <button type="button" data-act="light">Bottom light</button>+  </div>+</div>+<p class="viewer-note">Drag to orbit &middot; wheel to zoom &middot; right-drag to pan &middot; the cube snaps the view.</p>++<h3>Scaffold side</h3>++<div class="viewer-slot" data-glb="/api/pages/adom/base-scaffold-control-panel/files/models/Control_Panel_Scaffold_v2.0.1.glb"+     data-glb-fallback="/api/pages/adom/base-scaffold-control-panel/files/models/scaffold-q.glb"+     data-img="/api/pages/adom/base-scaffold-control-panel/files/diagrams/viewer-scaffold.png">+  <img class="fallback" src="/api/pages/adom/base-scaffold-control-panel/files/diagrams/viewer-scaffold.png" alt="Control panel — scaffold side">+  <div class="mount"></div>+  <div class="vctl">+    <button type="button" data-act="ground">Ground</button>+    <button type="button" data-act="light">Bottom light</button>+  </div>+</div>+<p class="viewer-note">Drag to orbit &middot; wheel to zoom &middot; right-drag to pan &middot; the cube snaps the view.</p>++<h3>Mated — how the pair comes together</h3>++<p>The two halves mate coplanar at the blade dock, with the project's molecules, jumpers and wires dropping into place:</p>++<img src="/api/pages/adom/base-scaffold-control-panel/files/docs/mated-assembly.gif" alt="Mated control panel assembly">++<h2>Block Diagrams</h2>++<img src="/api/pages/adom/base-scaffold-control-panel/files/diagrams/workcell-block-diagram-user.png" alt="Control Panel: Workcell — Block Diagram (User)">++<img src="/api/pages/adom/base-scaffold-control-panel/files/diagrams/scaffold-block-diagram-user.png" alt="Control Panel: Scaffold — Block Diagram (User)">++<h2>Input power</h2>++<p>Four independent bench-supply input to the workcell control panel. Every rail is individually metered at 20-bit precision with <strong>INA228</strong>.</p>++<table>+<tr><th>Rail</th><th>Rating</th><th>Description</th></tr>+<tr><td><strong>PS1</strong></td><td>0–60 V / 12 A</td><td>User variable power supply with full control</td></tr>+<tr><td><strong>PS2</strong></td><td>5 V / 10 A</td><td>User enabled static supply. Isolated return may float up to <strong>±2.5 V</strong> from common</td></tr>+<tr><td><strong>PS3</strong></td><td>—</td><td>User supply</td></tr>+<tr><td><strong>PS4</strong></td><td>5 V</td><td>Internal 5 V rail</td></tr>+</table>++<p>All user power supplies may be isolated by removing ground jumpers as indicated on the scaffold control panel.</p>++<p><strong>Ground scheme.</strong> Large machine-pin jumpers bond a single return-to-ground per rail (default: bridged), so each rail's grounding is an explicit, per-project choice rather than a fixed assumption.</p>++<h2>I/O available to the project</h2>++<p>The user is given full control of the nested <strong>RP2350A</strong>, with <strong>26 available I/O</strong> (<a href="https://wiki.adom.inc/adom/rp2350a-mini" target="_blank" rel="noopener">RP2350A Mini</a>) and <strong>USB 2.0</strong> capable of dual data roles and power delivery. Further, the workcell side of the control panel offers <strong>two USB-SS ports</strong> capable of 3.0 protocol and power delivery.</p>++<p><strong>Wireless.</strong> AX210-class module provides Wi-Fi 6E across all three bands (2.4 / 5 / 6 GHz) with 160 MHz channel width and 2×2 MIMO for link rates to ~2.4 Gbps, plus Bluetooth 5.3. Wi-Fi runs on PCIe and Bluetooth on USB.</p>++<p><strong>Sensing.</strong> The panel carries on-board environmental sensing (temperature, relative humidity, barometric pressure and air quality) and 6-axis motion sensing (3-axis accelerometer + 3-axis gyroscope), both available to the project through the Control Panel Dashboard. A digital microphone is also fitted for acoustic capture.</p>++<h3>User MCU I/O</h3>++<p>26 user I/O reach the machine-contact field. Every line supports digital input/output, PWM and the MCU's programmable I/O; four are additionally analog-capable.</p>++<table>+<tr><th>Machine contacts</th><th>User I/O</th><th>Capabilities</th></tr>+<tr><td>MC31–MC34</td><td>IO29, IO28, IO27, IO26</td><td>Digital I/O, PWM, programmable I/O, <strong>ADC (4 analog channels)</strong>, I²C / SPI / UART alternate functions</td></tr>+<tr><td>MC35–MC38</td><td>IO25, IO24, IO23, IO22</td><td>Digital I/O, PWM, programmable I/O, I²C / SPI / UART alternate functions</td></tr>+<tr><td>MC39–MC46</td><td>IO19 … IO12</td><td>Digital I/O, PWM, programmable I/O, I²C / SPI / UART alternate functions</td></tr>+<tr><td>MC47–MC56</td><td>IO9 … IO0</td><td>Digital I/O, PWM, programmable I/O, I²C / SPI / UART alternate functions</td></tr>+</table>++<h3>USB</h3>++<table>+<tr><th>Port</th><th>Side</th><th>Protocol</th><th>Data role</th><th>Power</th><th>Availability</th></tr>+<tr><td><strong>USB-C</strong></td><td>Scaffold (user)</td><td>USB 2.0</td><td><strong>Dual-role</strong> — host or device</td><td>Power delivery, 3.0 A; VBUS sourced from PS2</td><td><strong>PD unavailable while PS2 is floating</strong> (isolated by removing its ground jumper)</td></tr>+<tr><td><strong>USB-C</strong></td><td>Workcell</td><td>USB 3.0 SuperSpeed</td><td>Host</td><td>Power delivery, 3.0 A; VBUS sourced from PS2</td><td><strong>PD unavailable while PS2 is floating</strong></td></tr>+<tr><td><strong>USB-A</strong></td><td>Workcell</td><td>USB 3.0 SuperSpeed</td><td>Host</td><td>Power delivery; VBUS sourced from PS2</td><td><strong>PD unavailable while PS2 is floating.</strong> Its USB 2.0 lanes are muxed with Bluetooth and are <strong>mutually exclusive</strong> — USB-A is unavailable while Bluetooth is in use</td></tr>+</table>++<p><strong>USB behavior.</strong> In host role the board sources VBUS from the switched 5 V (PS2) rail through a protected path; in device role (for example, plugged into a PC) VBUS sourcing is off and back-feed into the supply is blocked. If VBUS is broken out through machine pins and CC termination is not satisfied, the CC jumper must be placed.</p>++<h2>Debug and control across the dock</h2>++<p>The dock carries the facilities needed to program and control the project's MCU without opening anything up: <strong>SWD and UART debug</strong>, plus boot and reset control of the user MCU, and low-voltage service rails. A <strong>companion dashboard application</strong> provides live control and telemetry — meter all four rails, set PS1 like a bench supply, switch rails, drive the scaffold I/O, and program the user MCU.</p>++<h2>Machine contacts</h2>++<p>Project connections land on the scaffold's machine-contact field. Two contact classes are used; both are solderless press-fit receptacles that accept a machine pin tail, a machine needle, or a bare solid-core wire.</p>++<table>+<tr><th>Property</th><th><a href="https://wiki.adom.inc/adom/machinecontactmedium" target="_blank" rel="noopener">Medium contact</a></th><th><a href="https://wiki.adom.inc/adom/machinecontactlarge" target="_blank" rel="noopener">Large contact</a></th></tr>+<tr><td><strong>Current rating</strong></td><td>~<strong>6.4 A</strong> (80 % derated)</td><td>~<strong>20.8 A</strong> (80 % derated)</td></tr>+<tr><td><strong>Mating wire</strong></td><td>24 AWG solid core (precision-bent, enamel-coated)</td><td>14 AWG solid core (precision-bent, enamel-coated)</td></tr>+<tr><td><strong>Also mates with</strong></td><td>Medium machine pin tail (Ø0.51 mm), medium needle</td><td>Large machine pin tail (Ø1.85 mm), large needle</td></tr>+<tr><td><strong>Grid pitch</strong></td><td>2 mm within a row; rows ≥ 4 mm apart</td><td>8 mm technical; 32 mm as implemented on the base scaffold</td></tr>+</table>++<p>Both ratings are <strong>contact-limited</strong> — the mating pin can carry more, so the contact sets the figure — and are quoted at 80 % derating for margin.</p>++<h2>Environmental</h2>++<p>The base scaffold and its control panel operate in a <strong>controlled 20 – 25 °C</strong> environment.</p>++<p>On-board sensing spans a considerably wider envelope:</p>++<table>+<tr><th>Measurement</th><th>Range</th></tr>+<tr><td>Temperature</td><td>−40 to +85 °C</td></tr>+<tr><td>Relative humidity</td><td>0 to 100 % RH</td></tr>+<tr><td>Barometric pressure</td><td>300 to 1100 hPa</td></tr>+<tr><td>Air quality</td><td>Gas-resistance based indoor air-quality sensing</td></tr>+<tr><td>Acceleration</td><td>±2 / ±4 / ±8 / ±16 g selectable</td></tr>+<tr><td>Angular rate</td><td>±125 to ±2000 °/s selectable</td></tr>+</table>++<h2>Relationship to the Rest of the System</h2>++<ul>+<li>The <strong>electrical boundary</strong> sits at the dock: everything upstream — bench inputs, metering and the workcell controller — is the workcell half. Everything the project touches — rails at the machine contacts, user I/O, USB and ground bonding — is the scaffold half.</li>+<li>Wiring from the panels to the control panel is bent automatically; gauges and termination are documented in the <a href="https://wiki.adom.inc/adom/base-scaffold-system" target="_blank" rel="noopener">Base Scaffold System — Wiring</a> section (James/Luke).</li>+<li>The project's connections terminate on the machine-contact field exactly like every other contact on the scaffold.</li>+</ul>++</div>++<script type="module">+// Mount Colby's Babylon viewer (the wiki's own 3D viewer bundle) on each slot.+// Load chain per slot: draco GLB -> quantized GLB (no wasm needed) -> static image.+const Viewer = window.Adom3DViewerBabylon9;+try {+  if (window.BABYLON && window.BABYLON.DracoCompression) {+    window.BABYLON.DracoCompression.Configuration = { decoder: {+      wasmUrl: "/static/vendor/adom-3d-viewer-babylon9/draco/draco_wasm_wrapper_gltf.js",+      wasmBinaryUrl: "/static/vendor/adom-3d-viewer-babylon9/draco/draco_decoder_gltf.wasm",+      fallbackUrl: "/static/vendor/adom-3d-viewer-babylon9/draco/draco_decoder_gltf.js",+    } };+  }+} catch (e) {}++document.querySelectorAll('.viewer-slot').forEach((slot) => {+  const mount = slot.querySelector('.mount');+  const fallbackImg = slot.querySelector('.fallback');+  const ctl = slot.querySelector('.vctl');+  function showStatic() {+    mount.remove();+    if (ctl) ctl.remove();+  }+  if (typeof Viewer === 'undefined') { showStatic(); return; }+  let viewer;+  try {+    viewer = Viewer.init(mount, { zUp: true, showViewCube: true, showGround: true });+  } catch (e) { showStatic(); return; }+  const tryLoad = (url) => viewer.loadModel(url).then(() => {+    viewer.frameModel();+    try { if (viewer.toggleAxes) viewer.toggleAxes('world', false); } catch (e) {}+    fallbackImg.remove();+    // Ground + bottom light toggles, matching the component-page viewer chrome.+    try {+      let groundOn = true;+      const gBtn = ctl.querySelector('[data-act="ground"]');+      const lBtn = ctl.querySelector('[data-act="light"]');+      const paint = () => {+        gBtn.classList.toggle('on', groundOn);+        lBtn.classList.toggle('on', viewer.getBottomLightState());+      };+      gBtn.addEventListener('click', () => { groundOn = !groundOn; viewer.setGroundVisible(groundOn); paint(); });+      lBtn.addEventListener('click', () => { viewer.setBottomLight(!viewer.getBottomLightState()); paint(); });+      paint();+      ctl.style.display = 'flex';+    } catch (e) {}+  });+  tryLoad(slot.dataset.glb)+    .catch(() => tryLoad(slot.dataset.glbFallback))+    .catch(() => showStatic());+});+</script>+</body>+</html>
README.md+1−1
@@ -42,7 +42,7 @@ individually metered at 20-bit precision with **INA228**. |---|---|---| | **PS1** | 0–60 V / 12 A | User variable power supply with full control | | **PS2** | 5 V / 10 A | User enabled static supply. Isolated return may float up to **±2.5 V** from common |-| **PS3** | — | User supply — spare |+| **PS3** | — | User supply | | **PS4** | 5 V | Internal 5 V rail |  All user power supplies may be isolated by removing ground jumpers as indicated on the
models/scaffold-q.glbadded
⋯ 1 unchanged line ⋯
models/workcell-q.glbadded
⋯ 1 unchanged line ⋯