{
  "schema": "anacode.challenge-template",
  "schemaVersion": 1,
  "metadata": {
    "slug": "precision-voltage-divider",
    "title": "Precision voltage divider",
    "difficulty": "Foundation",
    "domain": "DC",
    "status": "draft",
    "topics": [
      "KCL",
      "Ohm's law",
      "Tolerance corners"
    ],
    "estimatedMinutes": 25,
    "author": {
      "displayName": "Your name"
    },
    "contentLicense": "CC-BY-4.0"
  },
  "statement": {
    "summary": "Choose an E24 divider that produces a precise 1:2 ratio without wasting current.",
    "objective": "Produce 2.50 V nominal from a 5 V source while meeting the stated ratio, current, and power limits across tolerance and supply corners.",
    "context": "This exercise tests divider loading, preferred values, tolerance analysis, and power checks using a fixed two-resistor topology.",
    "specifications": [
      {
        "id": "nominal-output",
        "label": "Nominal output",
        "requirement": "V(out) shall be 2.50 V when V1 is 5.00 V.",
        "verification": "public-check"
      },
      {
        "id": "ratio-error",
        "label": "Worst-case ratio error",
        "requirement": "Divider ratio error shall not exceed 0.5% across the declared tolerance corners.",
        "verification": "hidden-corners"
      },
      {
        "id": "source-current",
        "label": "Source current",
        "requirement": "Source current shall not exceed 1 mA at any checked supply corner.",
        "verification": "hidden-corners"
      },
      {
        "id": "resistor-power",
        "label": "Resistor power",
        "requirement": "Neither resistor shall dissipate more than 250 mW at any checked supply corner.",
        "verification": "hidden-corners"
      }
    ]
  },
  "workspace": {
    "starterSchematic": {
      "kind": "built-in-circuit-preset",
      "presetSlug": "precision-voltage-divider",
      "circuitDocumentVersion": 1,
      "instructions": "Keep the source and fixed topology intact. Change only R1 and R2, then inspect V(out) before submitting."
    },
    "allowedComponents": [
      {
        "kind": "ground",
        "minimumCount": 1,
        "maximumCount": 1,
        "editableParameters": []
      },
      {
        "kind": "voltage-source",
        "minimumCount": 1,
        "maximumCount": 1,
        "editableParameters": []
      },
      {
        "kind": "resistor",
        "minimumCount": 2,
        "maximumCount": 2,
        "editableParameters": [
          "resistanceOhm"
        ]
      }
    ],
    "analysis": {
      "id": "analysis-op",
      "name": "Operating point",
      "type": "operating-point"
    },
    "probes": [
      {
        "probeId": "probe-vout",
        "label": "V(out)",
        "purpose": "Observe the divider output voltage.",
        "role": "public-check"
      }
    ],
    "nativeView": {
      "preferredInstrument": "dc",
      "acquisitionMode": "live",
      "captureDurationS": 0.001,
      "captureSamples": 8192,
      "probeNodes": [
        "vout"
      ],
      "sourceStyle": "vertical-with-ground-return",
      "stimulus": "preserve-reviewed-preset"
    }
  },
  "grading": {
    "mode": "fixed-topology",
    "graderId": "voltage-divider-fixed-topology",
    "implementationVersion": "divider-fixed-topology-v2.0.0",
    "problemVersion": 1,
    "serverAuthoritative": true,
    "topology": {
      "rejectAdditionalComponents": true,
      "rejectStimulusEdits": true,
      "requiredComponents": [
        {
          "reference": "GND1",
          "kind": "ground",
          "role": "Reference node"
        },
        {
          "reference": "V1",
          "kind": "voltage-source",
          "role": "Fixed 5 V stimulus"
        },
        {
          "reference": "R1",
          "kind": "resistor",
          "role": "Upper divider resistor"
        },
        {
          "reference": "R2",
          "kind": "resistor",
          "role": "Lower divider resistor"
        }
      ],
      "connectionConstraints": [
        "V1 positive connects to R1; R1 connects to R2 at the output node; R2 returns to ground.",
        "V1 negative connects to the same ground reference as R2."
      ],
      "editableReferences": [
        {
          "reference": "R1",
          "parameters": [
            "resistanceOhm"
          ],
          "instruction": "Choose an E24 value from 1 kΩ through 1 MΩ."
        },
        {
          "reference": "R2",
          "parameters": [
            "resistanceOhm"
          ],
          "instruction": "Choose an E24 value from 1 kΩ through 1 MΩ."
        }
      ]
    },
    "publicChecks": [
      {
        "id": "topology",
        "label": "Required topology",
        "criterion": "The submitted electrical graph must exactly match the declared fixed topology."
      },
      {
        "id": "preferred-values",
        "label": "E24 values",
        "criterion": "R1 and R2 must be valid E24 values from 1 kΩ through 1 MΩ."
      },
      {
        "id": "ratio",
        "label": "Divider ratio",
        "criterion": "Worst-case ratio error must not exceed 0.5%."
      },
      {
        "id": "current",
        "label": "Source current",
        "criterion": "Worst-case source current must not exceed 1 mA."
      },
      {
        "id": "power",
        "label": "Resistor power",
        "criterion": "Worst-case resistor power must not exceed 250 mW."
      }
    ],
    "hiddenCorners": {
      "policy": "server-only",
      "description": "The server recomputes the trusted divider equations across undisclosed combinations inside the published tolerance and supply envelopes. Browser waveforms never decide acceptance.",
      "dimensions": [
        {
          "id": "supply",
          "label": "Supply variation",
          "publicDescription": "V1 is checked at multiple values inside the published 4.5 V to 5.5 V range."
        },
        {
          "id": "resistor-tolerance",
          "label": "Independent resistor tolerance",
          "publicDescription": "R1 and R2 are independently checked at the published ±0.1% endpoints."
        }
      ]
    }
  }
}
