← PS-1 · FROM CIRCUIT TO SPEC

The parts library

YOU WILL BE ABLE TO
  • Explain why the parts library is curated and why an AI cannot add to it.
  • List what a part definition carries: footprint, pin labels, palette fields.
  • Read a V6 rejection and a V7 rejection and say what each one names.
  • Find each part's required fields and write a peripheral entry that passes.

The engine will only build from parts it knows: seventeen definitions in a curated library, each with a HUMAN-VERIFIED pin map. Sixteen are yours to add; the seventeenth, pico2w_socket, is the MCU itself — always present, never a peripheral. This is a deliberate wall. An AI can help you fill in a spec, but it cannot invent a part, because invented parts come with invented pinouts, and an invented pinout becomes a real short circuit at the bench.

Ask for something outside the library and the validator answers before the generator ever runs. Three refusals, one per failure mode:

X1: no part specified — every peripheral needs a part from the parts library
U9: unknown part "oled_ssd1306" — not in the parts library
U8: pico2w_socket is not a peripheral part — it cannot be added to the peripherals list

The second message is the one a typo earns you. Before this validator existed, a misspelled part was SILENTLY DROPPED — the board rendered "successfully" with the component missing, which is the worst kind of success. Now the spec never reaches the generator until every part name resolves.

Each part also declares extra fields it REQUIRES — the fixed entries in its palette definition. Forget one and the V7 message names both the component and the field. The pin is different: nothing in the validator demands it, but the generator cannot wire a trace to a pin that is not there, so a missing pin fails later and louder, with a trace error instead of a sentence. And an LED's color is optional — the engine accepts its absence; it is documentation for the schematic.

PartRequired fieldsWhy
led_5mmpin, series_resistorthe resistor value feeds the generated component
pushbuttonpin, pull, wiringthe spec states the design decision: internal pull-up, active low
ldr_dividerpin (ADC), divider_resistorbottom half of the voltage divider
potentiometerpin (ADC), valuethe pot's resistance
slide_switchpincommon to GPIO; ends wired to both rails
Required fields by part — the ones you will use this unit. Forget a named field and V7 tells you which.
WORKED EXAMPLE

The validator's own words

  1. Remove series_resistor from Lesson 1's spec and generate.
  2. Result: "D1: led_5mm requires series_resistor" — one message, naming the refdes and the field.
  3. Read the format: refdes, colon, part, requirement. Every V7 message has this shape.
  4. Restore the field and generate again: 3 components, 5 traces, 0 errors. Read, fix, reread — that loop is the whole workflow.
D1: led_5mm requires series_resistor

PRACTICE

Q1

Why can't the AI assist add a part the library lacks?

Q2

What message does "part": "pico2w_socket" inside the peripherals array earn?

Q3

A pushbutton entry has only pin. Quote both messages.

Q4

Name the two ADC-requiring parts in the table and the three legal pins.

The parts library · PS-1 · iLearnSTEM Electronics