← PS-1 · FROM CIRCUIT TO SPEC

Anatomy of a board spec

YOU WILL BE ABLE TO
  • Read a board spec top to bottom and say what each field is for.
  • Name the five required fields and quote what the validator says when one is missing.
  • Distinguish fields that describe the board from fields that instruct the engine.
  • Predict what the engine builds — components and traces — from a minimal spec.

Every board in PCB Studio begins as a SPEC: a JSON document that describes the board you want. Not a drawing, not code that runs — a structured description. The engine reads it, validates it against the design rules you will meet in Lesson 4, and only then generates the schematic. This lesson teaches you to read and write that document by hand, because the palette can only ever click together what you already understand.

A complete, valid spec — the smallest interesting board, one LED on GP15:

{
  "name": "First Light",
  "board": { "width": "100mm", "height": "80mm" },
  "mcu": { "part": "pico2w_socket", "refdes": "U1" },
  "peripherals": [
    {
      "id": "led_1",
      "part": "led_5mm",
      "refdes": "D1",
      "color": "red",
      "pin": "GP15",
      "series_resistor": "330ohm"
    }
  ]
}

Five fields are REQUIRED, and the validator says so in plain language if you omit one: "spec.name is required", "spec.board.width and spec.board.height are required", "spec.mcu.refdes is required", and "spec.peripherals must be an array". The array may be empty — a bare Pico on a board is a valid design.

What does the engine BUILD from the spec above? Three components: the Pico socket, the LED, and a 330 ohm resistor you never declared. The library knows an LED must not hang directly on a GPIO, so the generator inserts the series resistor by construction — your series_resistor field sets its value. Count the traces: GPIO to resistor, resistor to LED anode, LED cathode to ground — three — plus one trace each for the two power rails the board always carries, 3V3 and GND. Five traces, three components. When you generate this spec in the Studio, the status line will read exactly that: 3 components, 5 traces, 0 errors.

FieldRequiredRead by
nameYESvalidator, Gerber filename
board.width, board.heightYESvalidator, board outline, DRC
mcu.refdesYESvalidator, every trace endpoint
peripheralsYES (may be empty)validator, generator
version, mcu.part, mcu.note, power, peripheral idnonothing — documentation
Field by field: who reads it. The validator and the generator are the engine's only readers.

One more constraint hides in board: physical room. The Pico socket is a 40-pin device roughly 50 mm long, and the design-rule check runs whether or not you ask for a PCB layout. A 50mm x 40mm board fails with more than a dozen clearance errors BEFORE you add a single peripheral — the socket's plated holes collide with the board edge. Measured against the engine: 60mm x 50mm still fails, with the end pins a hair inside the edge; 65mm x 55mm is the first round size that passes; 70mm x 60mm leaves a little margin; and 100mm x 80mm, the Bitsy Board's size, is a comfortable default with room for peripherals.

WORKED EXAMPLE

Predict, then verify

  1. A classmate writes a spec with an empty peripherals array on a 100mm x 80mm board. How many components and traces?
  2. Components: one — the MCU socket. Nothing else was asked for, and the generator adds parts only in service of a peripheral.
  3. Traces: two — the 3V3 and GND rail connections the board always carries.
  4. Generate it and the engine agrees: 1 component, 2 traces, 0 errors.
1 component, 2 traces — a valid, boring, perfectly legal board.

PRACTICE

Q1

Which of these is NOT required: name, version, mcu.refdes, peripherals?

Q2

A spec omits board entirely. Quote the exact message the validator returns.

Q3

Two LEDs on GP15 and GP16, both with series resistors, on a 100mm x 80mm board. How many components and traces?

Q4

Why does a 50mm x 40mm board with zero peripherals fail?

Anatomy of a board spec · PS-1 · iLearnSTEM Electronics