← Commit history

custom HTML readme: extends the wiki Adom Babylon viewer with an exploded/assembled toggle

John Lauer ·82ef58b42d ·3mo ago ·parent 72dece6
3 files changed +168−5
package.json+1−1
@@ -2,7 +2,7 @@   "slug": "bq25792-charger",   "title": "BQ25792 Charger",   "type": "component",-  "version": "0.1.5",+  "version": "0.1.6",   "description": "BQ25792 Charger - buck-boost 1S-4S battery charger board by Adonis, with real 3D copper traces and measured stackup.",   "tags": [     "hardware"
page.json+12−4
@@ -4,9 +4,16 @@   "slug": "bq25792-charger",   "title": "BQ25792 Charger",   "brief": "Buck-boost 1S-4S battery charger board (TI BQ25792) with 14 Adom machine pins, by Adonis",-  "version": "0.1.5",+  "version": "0.1.6",   "tags": [-    "hardware"+    "adom",+    "adom-modular",+    "component",+    "charger",+    "battery",+    "bq25792",+    "power",+    "usb-c"   ],   "license": "proprietary",   "component": {@@ -49,13 +56,14 @@     "email": "[email protected]"   },   "visibility": "public",-  "description": "BQ25792 Charger - buck-boost 1S-4S battery charger board by Adonis, with real 3D copper traces and measured stackup.",+  "description": "BQ25792 Charger - a buck-boost 1S-4S battery charger board (Texas Instruments BQ25792) designed by Adonis in Fusion 360, with 14 Adom machine pins for the modular stack. Interactive colored 3D model, schematic and layout views.",   "dependencies": {},   "files": [     "README.md",     "page.json",     "*.glb",-    "*.png"+    "*.png",+    "readme.html"   ],   "hero": {     "type": "image",
readme.htmladded+155
@@ -0,0 +1,155 @@+<!DOCTYPE html>+<html lang="en">+<head>+<meta charset="UTF-8">+<meta name="viewport" content="width=device-width, initial-scale=1.0">+<title>BQ25792 Charger</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=20260611d"></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; padding:0 0 32px 0; }+  h2 { color:#e6edf3; font-size:18px; margin:28px 0 10px; }+  h3 { color:#e6edf3; font-size:15px; margin:20px 0 8px; }+  p  { font-size:14px; line-height:1.55; color:#9da7b3; margin:8px 0; max-width:900px; }+  strong { color:#c9d1d9; }+  code { background:#161b22; border:1px solid #21262d; border-radius:4px; padding:1px 5px; font-size:12.5px; }+  table { border-collapse:collapse; margin:10px 0 4px; font-size:13px; }+  th,td { border:1px solid #21262d; padding:5px 10px; text-align:left; }+  th { background:#161b22; color:#e6edf3; font-weight:600; }+  td { color:#9da7b3; }++  /* viewer block */+  #viewer-card { border:1px solid #21262d; border-radius:10px; overflow:hidden; background:#0a0d12; }+  #toolbar { display:flex; align-items:center; gap:8px; padding:10px 12px; background:#161b22; border-bottom:1px solid #21262d; }+  #toolbar .label { font-size:13px; color:#8b949e; margin-right:4px; }+  .tbtn { font-size:13px; padding:6px 14px; border-radius:6px; border:1px solid #30363d; background:#21262d; color:#c9d1d9; cursor:pointer; }+  .tbtn:hover { background:#30363d; }+  .tbtn.active { background:#0b3d33; border-color:#00b8b1; color:#5ff5e8; }+  #vstatus { margin-left:auto; font-size:12px; color:#6e7681; }+  #viewer-wrap { position:relative; width:100%; height:560px; }+  #viewer-wrap > * { position:absolute; inset:0; }+</style>+</head>+<body>++<div id="viewer-card">+  <div id="toolbar">+    <span class="label">3D view:</span>+    <button class="tbtn active" id="btn-exploded" type="button">Exploded stackup</button>+    <button class="tbtn" id="btn-assembled" type="button">Assembled</button>+    <span id="vstatus">starting viewer...</span>+  </div>+  <div id="viewer-wrap"></div>+</div>++<p style="margin-top:10px"><strong>Exploded stackup</strong> separates every fabrication layer (6 mm per slot) so you can see the+whole build, including the inner copper layers 2 and 15 that no schematic-level 3D view shows.+<strong>Assembled</strong> is the real board: 3D copper traces visible through the translucent soldermask.+Drag to orbit, scroll to zoom. This viewer is the wiki's own Adom Babylon viewer with a model toggle.</p>++<h2>What this board is</h2>+<p>A buck-boost battery charger around the Texas Instruments <strong>BQ25792</strong> (1S to 4S, up to 5 A, USB-C + DC+input, I2C control, integrated power path and 16-bit ADC), designed by <strong>Adonis</strong> in Fusion 360+Electronics. It integrates 14 Adom machine pins for the modular stack. FR4 outline+<strong>50.40 x 26.40 mm</strong>, 109 components, 4-layer.</p>++<h2>Board stackup (exact physical fabrication stack)</h2>+<p>From the design rules: <code>layerSetup (1+2*15+16)</code> = 4 copper layers, <code>mtCopper</code> 0.035 mm each. A+4-layer board is fabricated as copper / prepreg / copper / core / copper / prepreg / copper: the FR4+is <strong>not one slab</strong>, it is prepreg + core + prepreg. Dielectric split fitted to the measured board+(1.516 mm total): outer prepregs 0.200 each, core 1.046. Exact z in mm:</p>+<table>+<tr><th>#</th><th>Layer</th><th>z bottom</th><th>z top</th><th>thickness</th></tr>+<tr><td>1</td><td>Components (seated on top mask)</td><td>1.582</td><td>varies</td><td>per part</td></tr>+<tr><td>2</td><td>Top silkscreen</td><td>1.582</td><td>1.582</td><td>ink</td></tr>+<tr><td>3</td><td>Top soldermask</td><td>1.516</td><td>1.582</td><td>0.066</td></tr>+<tr><td>4</td><td>Copper L1 (top, traces)</td><td>1.516</td><td>1.551</td><td>0.035</td></tr>+<tr><td>5</td><td>Top prepreg (FR4)</td><td>1.316</td><td>1.516</td><td>0.200</td></tr>+<tr><td>6</td><td>Copper L2 (inner)</td><td>1.281</td><td>1.316</td><td>0.035</td></tr>+<tr><td>7</td><td>Core (FR4)</td><td>0.235</td><td>1.281</td><td>1.046</td></tr>+<tr><td>8</td><td>Copper L15 (inner)</td><td>0.200</td><td>0.235</td><td>0.035</td></tr>+<tr><td>9</td><td>Bottom prepreg (FR4)</td><td>0.000</td><td>0.200</td><td>0.200</td></tr>+<tr><td>10</td><td>Copper L16 (bottom)</td><td>-0.035</td><td>0.000</td><td>0.035</td></tr>+<tr><td>11</td><td>Bottom soldermask</td><td>-0.065</td><td>0.000</td><td>0.065</td></tr>+<tr><td>12</td><td>Bottom silkscreen</td><td>-0.065</td><td>-0.065</td><td>ink</td></tr>+</table>+<p>Copper L1 and L16 are the real exported 3D bodies. Inner copper L2 and L15 are the real gerber+layers (<code>copper_l2.G1</code>, <code>copper_l3.G2</code>); Fusion does not export inner layers as bodies. Both+soldermasks come from their gerbers with real pad openings.</p>++<h2>Files (everything exportable is here)</h2>+<table>+<tr><th>File</th><th>What</th></tr>+<tr><td><code>bq25792-charger.f3d</code></td><td>Fusion 360 archive (native)</td></tr>+<tr><td><code>bq25792-charger.step</code></td><td>STEP 3D (full board)</td></tr>+<tr><td><code>bq25792-charger.usdz</code></td><td>USDZ 3D (PBR)</td></tr>+<tr><td><code>bq25792-charger.brd</code> / <code>.sch</code></td><td>EAGLE board + schematic source</td></tr>+<tr><td><code>bq25792-charger.fbrd</code> / <code>.fsch</code></td><td>Fusion-native board + schematic</td></tr>+<tr><td><code>bq25792-charger-gerbers.zip</code></td><td>Fabrication gerbers + drill (13 files)</td></tr>+<tr><td><code>bq25792-charger-bom.csv</code></td><td>Bill of materials</td></tr>+<tr><td><code>bq25792-charger-cpl.csv</code></td><td>Pick and place</td></tr>+<tr><td><code>bq25792-charger-exploded.glb</code> / <code>-assembled.glb</code></td><td>The two 3D models above</td></tr>+</table>++<p style="margin-top:16px;color:#6e7681;font-size:12.5px">Source of truth: the live Fusion 360 design (Main project, v222). Pipeline: Fusion exports (STEP,+gerbers, EAGLE source) processed with the Adom step2glb molecule optimizer; stackup measured from the+exported bodies + design rules.</p>++<script type="module">+(function(){+  const status = document.getElementById("vstatus");+  const wrap = document.getElementById("viewer-wrap");+  const btnE = document.getElementById("btn-exploded");+  const btnA = document.getElementById("btn-assembled");+  const MODELS = {+    exploded:  "/blob/component/bq25792-charger/bq25792-charger-exploded.glb",+    assembled: "/blob/component/bq25792-charger/bq25792-charger-assembled.glb",+  };+  function setStatus(t){ if(status) status.textContent = t; }++  const Viewer = window.Adom3DViewerBabylon9;+  if (typeof Viewer === "undefined") { setStatus("viewer bundle failed to load"); return; }++  // Same Draco decoder config the wiki viewer page uses (CSP blocks the Babylon CDN).+  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) {}++  let viewer;+  try {+    viewer = Viewer.init(wrap, { zUp: true, showViewCube: true, showGround: true });+  } catch (e) { setStatus("viewer failed to start: " + (e && e.message)); return; }++  let busy = false;+  function show(which){+    if (busy) return;+    busy = true;+    setStatus("loading " + which + "...");+    btnE.classList.toggle("active", which === "exploded");+    btnA.classList.toggle("active", which === "assembled");+    Promise.resolve(viewer.clearScene && viewer.clearScene()).then(function(){+      return viewer.loadModel(MODELS[which]);+    }).then(function(){+      viewer.frameModel();+      try { if (viewer.toggleAxes) viewer.toggleAxes("world", false); } catch(e){}+      setStatus(which + " view");+      busy = false;+    }).catch(function(err){+      setStatus("load failed: " + ((err && err.message) || "unknown"));+      busy = false;+    });+  }+  btnE.addEventListener("click", function(){ show("exploded"); });+  btnA.addEventListener("click", function(){ show("assembled"); });+  show("exploded");+})();+</script>+</body>+</html>