Skip to main content

Updated 3 min read7 views

AI as a Sensor, Math as the Brain: Building an MCU Library to Help Prevent Board Burn-Downs

Why probabilistic LLMs struggle with physical hardware tolerances, and how code checks and IPC-7351 math turn raw datasheets into reviewable silicon contracts.

Felix S. Pavel

Founder & Lead Architect

The Typo Hardware Never Forgives

In software engineering, a hallucination or an off-by-one bug shows up as a stack trace. You fix the code, push a hotfix, and redeploy.

In hardware engineering, a 0.2 mm pad misalignment or an inverted power rail means a scrapped board and weeks of delay. Once copper is etched and parts are reflowed, probabilistic guesses do not work.

Yet as AI tools spread through engineering, some teams treat datasheets like generic text, asking chatbots to “generate a KiCad footprint” or “summarize the pinout table.” The risk is predictable: a model can fabricate pin mappings, guess pad dimensions, or miss a grounding note in a footnote.

The Golden Architecture: AI as a Sensor, Math as the Brain

When we designed the extraction pipeline behind DatasheetVend and our MCU component library, we set one operating principle:

The DatasheetVend Golden Rule

“We use AI as a sensor, to find raw facts on PDF pages. Code owns the decisions: the AI does not draw CAD pads or decide pin classes; it reports what the page says, and code checks it.”

Here is how the two layers divide responsibility:

  • AI (the sensor): reads the PDF's pages, text and images, and reports the tables and values it finds, with the page each came from.
  • Code (the brain): checks pin counts against the package the part number names, calculates land patterns from lead dimensions when the datasheet gives none, and writes the .kicad_mod files, which are loaded with kicad-cli as a file-format check.

Three Failure Modes, and What Catches Them

Failure Mode 1

Family Package Collision

Family datasheets cover several packages in one table (the STM32H743 in LQFP144 and LQFP100, among others). A reader can merge pins from both. When the part number names the package, our pinout engine rejects a pin table whose count does not match it.

Failure Mode 2

Thermal Pad Rules

QFN and DFN exposed pads often carry an electrical rule: connect to VSS, or leave floating. Miss the note and you can short a rail or lose a ground return. Read the EP note before you draw the footprint, whatever made the footprint.

Failure Mode 3

Alternate Function Collisions

Pin multiplexers assign peripherals (SPI, UART, CAN, timers). An invented pinout puts a peripheral on a pin that cannot carry it. Our output keeps the peripheral groups from the datasheet's own table, and a regression test fails if the STM32H743's PE2 loses its ETH, FMC or SPI groups or gains a UART tag it does not have.

IPC-7351 Land Pattern Calculation

When a datasheet does not print a recommended land pattern, our calculator works one out from the stated lead dimensions, for quad flat (QFP), small outline (SOIC) and no-lead (QFN) packages among others, with a simplified form of the IPC-7351B equations:

IPC-7351 Land Pattern Formulation (Quad Flat Gull-Wing)

// Outer land extent (Z), inner land extent (G) and land width (X)
Zmax = spanMax + 2 * JT + rss(Cspan, F, P)
Gmin = heelSpanMin - 2 * JH - rss(Cheel, F, P)
Xmax = leadWidthMin + 2 * JS + rss(Cw, F, P)

Where, for gull-wing leads in our calculator:
  spanMax      = the largest stated lead span, toe to toe
  heelSpanMin  = the smallest span minus both foot lengths
  JT, JH, JS   = toe, heel and side fillet goals
                 density level N (the default): 0.35, 0.35, 0.03 mm
                 density level M: 0.55, 0.45, 0.05 mm
  C*           = the stated tolerances (max - min)
  F            = fabrication tolerance (0.05 mm)
  P            = placement tolerance (0.025 mm)
  rss          = root-sum-square

A pattern the datasheet recommends always comes first; a calculated one is labeled as calculated and flagged for review. At fine pitch, the land width is clamped to keep a copper gap, and every clamp is reported. The KiCad files are then loaded with kicad-cli, which proves they open in KiCad. It is not a design rule check, and an engineer still reviews the footprint.

Microcontrollers Across Dozens of Manufacturers

We indexed microcontrollers from dozens of semiconductor vendors, from STMicroelectronics (STM32), Texas Instruments (MSP430), Espressif (ESP32) and Raspberry Pi (RP2040) to classics like Zilog.

Catalog parts link to a stored copy of the datasheet, and to the manufacturer's own link where we have it. Pin data is attached to the parts we have extracted.

Stop guessing. Check your hardware contracts.

A new account gets five free passes. Each pass runs up to two modules, pinout and footprint included, on a PDF up to 25 MB.

Sources

  1. DatasheetVend, How an extraction is checked (pin counts, IPC-7351 land derivation, kicad-cli)
  2. One Datasheet, Eight Packages (STM32H743)
  3. DatasheetVend KiCad module

Was this useful?

A like tells other engineers it is worth their time.

Keep reading

All articles

Cookies. Strictly necessary cookies keep you signed in and remember this choice. Optional analytics (Google, Microsoft, PostHog) show us how the site is used. Cookie details