main
Caleb Version 0.3.0: new copper reader, dome via filter, every layer read from the photos, net evidence, measured confidence;… e874d7d
{
 "video": "/adom/ai-flow-reverse-engineering/render/videos/driver-re3-full-flow.mp4",
 "title": "AI Flow: Reverse Engineering, the full flow on the Driver board",
 "poster": "/adom/ai-flow-reverse-engineering/render/videos/driver-re3-full-flow-poster.jpg",
 "chapters": [
  {
   "t": 0,
   "title": "Intro"
  },
  {
   "t": 5.0,
   "title": "The board"
  },
  {
   "t": 17.0,
   "title": "The other side"
  },
  {
   "t": 31.0,
   "title": "The job"
  },
  {
   "t": 52.2,
   "title": "The flow"
  },
  {
   "t": 67.3,
   "title": "Photos"
  },
  {
   "t": 82.4,
   "title": "Scale"
  },
  {
   "t": 96.6,
   "title": "Parts"
  },
  {
   "t": 116.8,
   "title": "Blocks"
  },
  {
   "t": 132.5,
   "title": "Reading the copper"
  },
  {
   "t": 154.4,
   "title": "Dome shadows"
  },
  {
   "t": 169.7,
   "title": "Vias"
  },
  {
   "t": 192.3,
   "title": "Every layer"
  },
  {
   "t": 209.8,
   "title": "The KiCad copy"
  },
  {
   "t": 226.7,
   "title": "Against the photos"
  },
  {
   "t": 249.0,
   "title": "Every piece on a net"
  },
  {
   "t": 278.7,
   "title": "Routing what's hidden"
  },
  {
   "t": 300.7,
   "title": "Layer count"
  },
  {
   "t": 318.1,
   "title": "Measured confidence"
  },
  {
   "t": 367.2,
   "title": "Tests for the unknowns"
  },
  {
   "t": 376.5,
   "title": "The answer key"
  },
  {
   "t": 406.5,
   "title": "Not done"
  },
  {
   "t": 425.4,
   "title": "The record"
  },
  {
   "t": 432.2,
   "title": "Cost"
  }
 ],
 "captions": "WEBVTT\n\n00:00:01.958 --> 00:00:06.562\nThis is a three phase motor controller. A power connector, a bank of\n\n00:00:06.582 --> 00:00:08.193\ncapacitors, six MOSFETs.\n\n00:00:08.213 --> 00:00:13.284\nA gate driver and a microcontroller in the middle, each turned 45 degrees.\n\n00:00:13.304 --> 00:00:16.653\nWe have no design files in this flow. Just four photos.\n\n00:00:17.216 --> 00:00:20.418\nTurn it over, and the copper shows through the solder mask.\n\n00:00:20.438 --> 00:00:25.275\nPours, fine tracks, gaps between them, and more than a thousand tiny domes\n\n00:00:25.295 --> 00:00:27.638\nwhere vias push up through the mask.\n\n00:00:27.658 --> 00:00:30.706\nEverything from here on is read from pictures like these.\n\n00:00:31.289 --> 00:00:35.729\nThe job: find the parts and the blocks. Copy all the copper. Work out what\n\n00:00:35.749 --> 00:00:40.429\ncan't be seen, propose a layer count, say how sure you are, and list the tests\n\n00:00:40.449 --> 00:00:42.057\nthat would settle the rest.\n\n00:00:42.077 --> 00:00:46.908\nThen a harder bar. Put every piece of copper on a net. Make the layers match\n\n00:00:46.928 --> 00:00:51.887\nthe photos. And keep going until confidence measures 90%, or say why it can't.\n\n00:00:52.459 --> 00:00:57.078\nThis is AI Flow: Reverse Engineering. A Rust program does the measuring, and\n\n00:00:57.098 --> 00:01:00.497\nan AI supplies the judgment, like what a part is called.\n\n00:01:00.517 --> 00:01:05.453\n11 steps, from intake to report. Each one has a check that has to pass, and\n\n00:01:05.473 --> 00:01:06.973\neach one gets recorded.\n\n00:01:07.592 --> 00:01:12.025\nFirst, the photos. It finds the board edge in each one and straightens it.\n\n00:01:12.045 --> 00:01:16.486\nThe bottom gets turned over and pinned to the top through 40 holes that both\n\n00:01:16.506 --> 00:01:17.191\nsides share.\n\n00:01:17.211 --> 00:01:22.108\nWith one hole held out each time, they land within about 0.03 mm.\n\n00:01:22.682 --> 00:01:28.538\nScale comes from the board itself. Header rows have standard pitches, 2 mm and\n\n00:01:28.558 --> 00:01:29.140\n2.54 mm.\n\n00:01:29.160 --> 00:01:34.695\nThe driver chip's 6 mm body confirms which standard they are. That gives 46.6\n\n00:01:34.715 --> 00:01:36.281\npixels per millimeter.\n\n00:01:36.853 --> 00:01:42.912\nNext, the parts. 137 of them, and 103 get placed by their own pads.\n\n00:01:42.932 --> 00:01:49.055\nMarkings get read where they're legible, like this TI DRV8323S.\n\n00:01:49.075 --> 00:01:53.601\nMost small ceramics carry no marking at all, so their values just aren't in\n\n00:01:53.621 --> 00:01:56.511\nthe photos. The flow says so, and doesn't guess.\n\n00:01:57.084 --> 00:02:00.718\nSilkscreen and circuit role sort them into 11 blocks.\n\n00:02:00.738 --> 00:02:06.145\nPower entry, the power stage, sensing, the logic supply, the gate driver and\n\n00:02:06.165 --> 00:02:11.144\nthe microcontroller. Then CAN, AUX, the fan, motor temperature and the\n\n00:02:11.164 --> 00:02:12.215\nmounting holes.\n\n00:02:12.785 --> 00:02:17.374\nNow the hard part. Under solder mask, copper looks a little lighter than bare\n\n00:02:17.394 --> 00:02:20.008\nlaminate, and thin dark lines mark the gaps.\n\n00:02:20.028 --> 00:02:24.316\nThe reader follows those gaps, and the board comes apart into islands.\n\n00:02:24.336 --> 00:02:28.208\nHere's the published version next to this one. Fine tracks that used to be\n\n00:02:28.228 --> 00:02:29.522\nmissing now come through.\n\n00:02:29.542 --> 00:02:34.034\nThat's 828 pours and 2,588 tracks.\n\n00:02:34.610 --> 00:02:39.082\nLooking closely found a real defect. The dark side of each dome was being cut\n\n00:02:39.102 --> 00:02:40.190\nout of solid pours.\n\n00:02:40.210 --> 00:02:45.056\nSo the reader learned what a dome's shadow looks like, and now those pours\n\n00:02:45.076 --> 00:02:49.331\nread solid. Domes with a hole beside them dropped from 396 to 68.\n\n00:02:49.916 --> 00:02:54.713\nVias get a shading test. A real dome is lit on one side and shadowed on the\n\n00:02:54.733 --> 00:02:57.603\nother, in the same direction as all the rest.\n\n00:02:57.623 --> 00:03:02.030\nThe published filter ringed silkscreen and missed most of the domes. The new\n\n00:03:02.050 --> 00:03:03.020\none sits on them.\n\n00:03:03.040 --> 00:03:08.575\n1,329 kept. The top face shows none it can trust, so these all come from the\n\n00:03:08.595 --> 00:03:12.010\nbottom. A few are still missed along the edges.\n\n00:03:12.586 --> 00:03:17.282\nIt doesn't stop at copper. Each pixel gets sorted by material: mask,\n\n00:03:17.302 --> 00:03:20.334\nsilkscreen, metal, or a part sitting on top.\n\n00:03:20.354 --> 00:03:25.516\nSilkscreen, mask openings, exposed metal, holes and the outline all get read\n\n00:03:25.536 --> 00:03:29.471\nfrom the photos, then written into their own KiCad layers.\n\n00:03:30.049 --> 00:03:34.533\nAll of it goes into a real KiCad project, as photographed, before anything\n\n00:03:34.553 --> 00:03:38.488\ngets guessed. Here it is over the top photo, and over the bottom.\n\n00:03:38.508 --> 00:03:44.060\nEvery stage opens as an interactive board. Pick a net and all of it lights up:\n\n00:03:44.080 --> 00:03:46.346\nground, the input rail, a phase.\n\n00:03:46.926 --> 00:03:51.908\nThen a separate check compares what KiCad draws with what the photos show, on\n\n00:03:51.928 --> 00:03:54.052\ntiles the reader wasn't tuned on.\n\n00:03:54.072 --> 00:03:58.933\nGreen agrees. Red is drawn but not seen. Blue is seen but not drawn. Purple is\n\n00:03:58.953 --> 00:04:01.436\nhidden under a part, so it isn't scored.\n\n00:04:01.456 --> 00:04:07.147\nThe bottom scores 0.87. The top, 0.82, on only about half the board, because\n\n00:04:07.167 --> 00:04:08.725\nparts cover the rest.\n\n00:04:09.286 --> 00:04:13.776\nNext, every piece of copper gets a net, and a record of how it got it. Pieces\n\n00:04:13.796 --> 00:04:17.290\nget stitched into conductors wherever no gap separates them.\n\n00:04:17.310 --> 00:04:22.152\nGreen means a pad touches it. Blue, it's joined through a via. Yellow is\n\n00:04:22.172 --> 00:04:25.325\ninferred, orange only by group. Red has no net.\n\n00:04:25.345 --> 00:04:30.748\nThree quarters of the copper area now has direct evidence. But 47% of track\n\n00:04:30.768 --> 00:04:33.929\nlength is still red, so that goal isn't met.\n\n00:04:33.949 --> 00:04:38.335\nA schematic comes out too. All 77 nets are still marked inferred.\n\n00:04:38.916 --> 00:04:43.439\nNow the connections nobody can see. The flow has its own router, and it uses\n\n00:04:43.459 --> 00:04:44.515\nevery inner layer.\n\n00:04:44.535 --> 00:04:49.151\nReal vias pass through pours, so crossing copper from the photos is expensive,\n\n00:04:49.171 --> 00:04:52.242\nnot forbidden. And the length crossed gets reported.\n\n00:04:52.262 --> 00:04:57.792\nAt 6 layers, 45 of 253 connections stay open. The white crosses are where it\n\n00:04:57.812 --> 00:05:00.347\ngot stuck, mostly at the two chips.\n\n00:05:00.923 --> 00:05:03.850\nThat difficulty is how the layer count gets proposed.\n\n00:05:03.870 --> 00:05:11.579\n2 layers cross 454 mm of seen copper. 4 layers, 384.\n\n00:05:11.599 --> 00:05:16.752\n6 layers, just 11. 8, about 8. Past 6, more layers stop helping. So the\n\n00:05:16.772 --> 00:05:17.772\nproposal is 6.\n\n00:05:18.342 --> 00:05:22.814\nConfidence isn't self graded. Auditors who did none of the work judge random\n\n00:05:22.834 --> 00:05:25.651\ncrops, and some of the claims are planted false.\n\n00:05:25.671 --> 00:05:30.315\nPass one of those, and the whole sample gets thrown out. That actually\n\n00:05:30.335 --> 00:05:31.980\nhappened here, on blocks.\n\n00:05:32.000 --> 00:05:37.248\nIdentity clears 90. Vias, blocks and placement land around 60. Values are at\n\n00:05:37.268 --> 00:05:40.437\n34, because most small parts carry no marking.\n\n00:05:40.457 --> 00:05:45.360\nCopper scores 9, because through smooth green mask, an auditor mostly can't\n\n00:05:45.380 --> 00:05:50.348\ntell copper from bare board. Layers stop at 30 without outside evidence. And\n\n00:05:50.368 --> 00:05:54.681\nconnectivity is 0, because KiCad finds more missing than expected.\n\n00:05:54.701 --> 00:06:00.047\nOverall is the lowest category, so the loop reports stalled, at 0. It did not\n\n00:06:00.067 --> 00:06:04.716\nreach 90. From photos alone, it can't: values, layers and nets need\n\n00:06:04.736 --> 00:06:06.876\nmeasurements on the real board.\n\n00:06:07.452 --> 00:06:11.884\nWhatever is still unknown gets a test. 119 of them, each saying what to\n\n00:06:11.904 --> 00:06:16.211\nmeasure, what result to expect, and what to change if it's different.\n\n00:06:16.785 --> 00:06:21.462\nWe did find the real design. It went in a sealed folder as an answer key. The\n\n00:06:21.482 --> 00:06:25.793\nflow never reads it, the agents never see it, and only totals come out.\n\n00:06:25.813 --> 00:06:32.884\nReal vias went from 42% to over 95%. Vias found, from 26% to 75%.\n\n00:06:32.904 --> 00:06:38.935\nCopper match went from 61% to 67% on top, and from 80% to 89% on the bottom.\n\n00:06:38.955 --> 00:06:40.846\nAnd 6 layers is correct.\n\n00:06:40.866 --> 00:06:46.150\nPin nets barely moved. 46% to 48%. That's the weakest result here.\n\n00:06:46.718 --> 00:06:52.629\nSo this isn't a finished board. 45 connections stay open, and KiCad counts 441\n\n00:06:52.649 --> 00:06:53.238\nmissing.\n\n00:06:53.258 --> 00:06:58.560\nFiner copper also made routing harder. New design rule errors at 6 layers went\n\n00:06:58.580 --> 00:07:03.540\nfrom 6 to 594. And these thresholds came from this one board, so a second\n\n00:07:03.560 --> 00:07:05.109\nboard has to come next.\n\n00:07:05.681 --> 00:07:09.822\nEvery stage stays in the flow window, so you can step back through the whole\n\n00:07:09.842 --> 00:07:11.848\nrun and open any board along the way.\n\n00:07:12.442 --> 00:07:19.318\nFrom the first prompt to this point took about 13 hours of AI time in the main\n\n00:07:19.338 --> 00:07:23.827\nthread, with idle gaps cut out, plus 46 sub-agents.\n\n00:07:23.847 --> 00:07:28.739\nAbout 3.4 million output tokens and 634 million cache reads, across 1,811\n\n00:07:28.759 --> 00:07:33.718\nmodel calls. Next up: real measurements on this board, and a second board.\n\n"
}