main
John Lauer
Refresh fan-stall replay for fresh latch acknowledgement and publish reviewed clip
de60863
<!doctype html><html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width"><link rel="icon" href="favicon.svg"><title>Adom Load · Fan protection replay</title><style>
:root{color-scheme:dark;font:18px system-ui;color:#eaf2fa;background:#0d1420}body{max-width:1100px;margin:4vh auto;padding:24px}small{color:#a7bbc9}.badge{color:#ffc56f;border:1px solid #8a6234;border-radius:5px;padding:7px 12px;display:inline-block}h1{font-size:38px;margin:20px 0 10px}p{color:#afc0d0;line-height:1.5}.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:28px 0}.card{background:#172334;border:1px solid #304155;padding:20px;border-radius:12px}.value{font-size:36px;font-weight:650;margin-top:10px}.good{color:#64dfc4}.bad{color:#ff937f}svg{width:100%;background:#111d2d;border:1px solid #304155;border-radius:12px}button{background:#74e3ca;color:#102326;border:0;border-radius:7px;padding:12px 22px;font:inherit;cursor:pointer}#event{min-height:52px;font-size:23px;margin-top:24px}footer{font-size:14px;color:#91a9bf;line-height:1.5;margin-top:24px}.controls{display:flex;align-items:center;gap:20px;margin-top:20px}input{flex:1}text{fill:#a6b9ca;font:15px system-ui}</style>
<div class="badge">SOFTWARE SIMULATION · NO HARDWARE CONNECTED</div><h1>Fan feedback must stay healthy.</h1><p>Replay generated by Adom’s portable C load controller and tachometer decoder.<br>Synthetic input: 5 V, a 0.75 A request, and a 7,000 RPM fan.</p>
<div class="cards"><div class="card"><small>Qualified fan feedback</small><div id="rpm" class="value">—</div></div><div class="card"><small>Commanded current</small><div id="amps" class="value">0.000 A</div></div><div class="card"><small>Controller state</small><div id="state" class="value">OFF</div></div></div>
<svg viewBox="0 0 1000 230" role="img" aria-label="Commanded current over simulation time"><path d="M60 30V185H970" fill="none" stroke="#597082"/><text x="12" y="40">1 A</text><text x="12" y="190">0 A</text><text x="56" y="215">0 s</text><text x="439" y="215">2 s · tach stops</text><text x="640" y="215">3 s · fan returns</text><text x="916" y="215">4.5 s</text><path id="curve" fill="none" stroke="#65dec5" stroke-width="4"/><line id="cursor" y1="25" y2="185" stroke="#fff" stroke-width="2"/><circle id="dot" r="6" fill="#fff"/></svg>
<div id="event">Ready to replay the software test.</div><div class="controls"><button id="play">Play replay</button><input aria-label="Replay position" id="seek" type="range" min="0" max="4500" value="0"><span id="time">0.000 s</span></div><footer>1× simulation time. The plot shows the software command, not measured current. Assembly qualification and hardware-latch inputs are synthetic test fixtures. Physical fan behavior, MCU timing, analog response, and shutdown latency remain unverified.</footer>
<script>
let data,playing=false,start=0,position=0;const $=id=>document.getElementById(id),names=['OFF','ARMED','RUNNING','FAULT'];
function show(t){position=t;let i=data.samples.findLastIndex(s=>s.ms<=t),s=data.samples[Math.max(i,0)];$('rpm').textContent=s.rpmValid?Math.round(s.rpm).toLocaleString()+' RPM':'UNKNOWN';$('rpm').className='value '+(s.rpmValid?'good':'bad');$('amps').textContent=s.setpointA.toFixed(3)+' A';$('state').textContent=names[s.state];$('state').className='value '+(s.state===3?'bad':'good');$('time').textContent=(t/1000).toFixed(3)+' s';$('seek').value=t;let x=60+t/4500*910,y=185-s.setpointA*155;$('cursor').setAttribute('x1',x);$('cursor').setAttribute('x2',x);$('dot').setAttribute('cx',x);$('dot').setAttribute('cy',y);$('curve').setAttribute('d',data.samples.filter(v=>v.ms<=t).map((v,j)=>(j?'L':'M')+(60+v.ms/4500*910)+','+(185-v.setpointA*155)).join(' '));$('event').textContent=t<100?'Waiting for qualified fan feedback.':t<=100?'ARM requested; waiting for latch acknowledgement.':t<2000?'Load enabled. Current command rises at 1 A/s.':t<data.faultMs?'Tach pulses stopped. Checking freshness…':t<3000?'Fan feedback expired. Enable LOW; DAC code zero.':'Fan feedback recovered. Fault stays latched—no automatic restart.';}
function frame(now){if(!playing)return;let t=Math.min(4500,now-start);show(t);if(t>=4500){playing=false;$('play').textContent='Replay again';}else requestAnimationFrame(frame);}
$('play').onclick=()=>{if(!data)return;if(playing){playing=false;$('play').textContent='Continue';return;}if(position>=4500)position=0;playing=true;start=performance.now()-position;$('play').textContent='Pause';requestAnimationFrame(frame);};$('seek').oninput=e=>{playing=false;$('play').textContent='Continue';show(+e.target.value);};fetch('trace.json').then(r=>r.json()).then(d=>{data=d;show(0)}).catch(()=>{$('event').textContent='Trace could not be loaded.'});
</script></html>