← PS-2 · DESIGN YOUR FIRST BOARD

Write the spec

YOU WILL BE ABLE TO
  • Turn written requirements into a parts list drawn from the library.
  • Budget pins in a table before writing a line of JSON.
  • Choose between two parts that satisfy the same requirement, and say why.
  • State the library's power limits for driven loads and where real designs get their power.

A board does not start as JSON. It starts as REQUIREMENTS: sentences about what the thing must do. This unit designs one board start to finish — a reaction timer: it shows a score from 0 to 9, it has a button you slap when the light demands it, and it beeps. Three sentences. The design process is the walk from those sentences to a spec the validator blesses.

Step one: requirements to parts. Read each sentence and shop the library — you have seventeen parts and the palette shows sixteen. "Shows a score 0 to 9" is one digit: sevenseg_cc. "A button you slap": pushbutton. "It beeps": buzzer_passive. Some sentences admit two answers — a knob could be potentiometer (smooth, analog, needs an ADC pin) or rotary_encoder (clicky, digital, three ordinary GPIOs) — and choosing IS design.

RequirementPartGPIOsComponents it generates
show 0-9sevenseg_cc78 (module + 7 resistors)
react buttonpushbutton11
beepbuzzer_passive12 (buzzer + resistor)
Requirements to parts, with cost: what each sentence buys, and what it spends.

Step two: the PIN BUDGET. The Pico gives you 26 assignable GPIOs, and only three of them — GP26, GP27, GP28 — can read analog. Every part in your table bids for pins, one peripheral per pin, and greedy parts bid hard: the seven-segment display alone takes seven. Write the pin plan as a table BEFORE the spec, exactly the way you check nets before trusting a schematic. The engine's own demo board runs 14 parts and consumes 21 of the 26 — running out is not a beginner mistake, it is the normal condition of real boards.

SignalPinNote
segments a-gGP2-GP8seven consecutive, easy to read in code
buttonGP14any digital pin
buzzerGP13any digital pin; PWM makes the tone
free for laterGP10-GP12, GP26-GP28, and moreencoder or knob slots in Lesson 4
The reaction timer's pin plan — written before the spec, the way nets are checked before the schematic is trusted.
WORKED EXAMPLE

Budget check

  1. A classmate's board wants: a rotary encoder, an RGB LED, a pot, and two plain LEDs. Total pins, and any constraints?
  2. Encoder 3 + RGB 3 + pot 1 + LEDs 2 = 9 GPIOs.
  3. The pot's one pin MUST be one of GP26/GP27/GP28; every other pin is an ordinary GPIO.
  4. Nine of 26 — comfortable. The constraint is the KIND of pin, not the count. (The engine agrees: that board validates clean, 11 components, 23 traces.)
9 GPIOs, one of which must be an ADC pin.

PRACTICE

Q1

Requirements: "a knob that scrolls a menu and clicks to select." One part or two?

Q2

Why write the pin plan before the spec, when the validator would catch conflicts anyway?

Q3

A 250 mA motor on the transistor driver: work the base-current math and give a verdict.

Q4

Which requirement CANNOT be met by this library, and what is the honest answer: "amplify a microphone signal"?

Write the spec · PS-2 · iLearnSTEM Electronics