Build a 0.650 V threshold from a 3.3 V rail with resistors and a diode. It must hold at 27 °C, stay above 0.50 V at 125 °C, ignore the supply and draw at most 2 mA.
Circuit context: A 0.650 V comparator threshold taken from a diode on a 3.3 V rail that moves from 3.0 V to 3.6 V. Size a diode threshold that stays in its window when the chip is hot and the rail moves.
A comparator needs a threshold of 0.650 V. The only supply is a 3.3 V rail that can sit anywhere from 3.0 V to 3.6 V. A diode holds its voltage when the supply moves, so the threshold will come from a diode.
The diode is the model dsig: a saturation current of 5 fA, an emission coefficient of 1.08 and 1 Ω in series. It is not the diode of lesson E1.2, so that lesson's voltages do not apply here.
Design the subcircuit dref from resistors and dsig diodes. Its output must read 0.650 V ± 5 mV at 27 °C and at least 0.50 V at 125 °C. It may move at most 15 mV when the supply goes from 3.0 V to 3.6 V. The block may draw at most 2 mA.
Run your netlist as often as you like. Sweep the temperature and the supply in your own bench before you submit. Submit runs the grader's bench on your subcircuit alone.
What the Grader Measures
Your subcircuit dref (ports vdd, out) under the grader's own bench:
| Check | Rule |
|---|---|
| Output at 27 °C | 645 mV to 655 mV |
| Output at 125 °C | ≥ 500 mV |
| Move from 3.0 V to 3.6 V | ≤ 15 mV |
| Supply current at 27 °C | ≤ 2 mA |
Full specification
.subckt dref vdd out
* resistors and dsig diodes only
.ends
.model dsig D (IS=5f N=1.08 RS=1)
| Check | Rule | How the grader measures it |
|---|---|---|
| Output at 27 °C | 0.645 V to 0.655 V | dc sweep of the supply at 27 °C: v(out) at 3.3 V |
| Output at 125 °C | ≥ 0.50 V | op at 125 °C with the supply at 3.3 V: v(out) |
| Move with the supply | ≤ 15 mV | the same sweep: v(out) at 3.6 V minus v(out) at 3.0 V |
| Supply current at 27 °C | ≤ 2 mA | the same sweep: the current out of the 3.3 V source |
Nothing loads the output: the comparator input draws no current. The resistors are ideal and do not change with temperature. There are no PDK devices, so the grader runs once.
Examples
Example 1
The Starter: One Resistor from the Usual 0.7 V Guess- Design
.subckt dref vdd out R1 vdd out 2.6k D1 out 0 dsig .ends
- Measured by the grader
Output at 27 °C: 727.6 mV (needs 645 mV to 655 mV) Output at 125 °C: 575.5 mV (needs ≥ 500 mV) Move from 3.0 V to 3.6 V: 6.672 mV (needs ≤ 15 mV) Supply current at 27 °C: 989.4 µA (needs ≤ 2 mA)
At 0.99 mA this diode sits at 0.728 V, far above the window. Note that it keeps 79 % of its voltage at 125 °C.
Example 2
One Resistor Sized for 27 °C: 43 kΩ- Design
.subckt dref vdd out R1 vdd out 43k D1 out 0 dsig .ends
- Measured by the grader
Output at 27 °C: 649.1 mV (needs 645 mV to 655 mV) Output at 125 °C: 471.9 mV (needs ≥ 500 mV) Move from 3.0 V to 3.6 V: 6.27 mV (needs ≤ 15 mV) Supply current at 27 °C: 61.65 µA (needs ≤ 2 mA)
The output is right at 27 °C with only 62 µA. At 125 °C it keeps just 73 % and falls 28 mV below the floor.
Example 3
No Diode: A 40.8 kΩ and 10 kΩ Divider- Design
.subckt dref vdd out R1 vdd out 40.8k R2 out 0 10k .ends
- Measured by the grader
Output at 27 °C: 649.6 mV (needs 645 mV to 655 mV) Output at 125 °C: 649.6 mV (needs ≥ 500 mV) Move from 3.0 V to 3.6 V: 118.1 mV (needs ≤ 15 mV) Supply current at 27 °C: 64.96 µA (needs ≤ 2 mA)
Ideal resistors ignore the temperature, but the output is a fixed share of the supply. It moves 118 mV with the rail.
Constraints and Contract
- The netlist defines .subckt dref vdd out ... .ends exactly once, with these two ports in this order.
- Inside dref: resistors, diodes that name the model dsig, comments and .param lines only. Ground is node 0.
- A resistor has two nodes and one value. tc1, tc2, temp, dtemp and expressions of temper are refused, on resistors and diodes.
- A .model line cannot stand inside dref. The grader's bench defines dsig; your own bench outside dref must define it too.
- Everything outside dref is yours: the grader replaces it with its own bench.
Hints
Hint 1
Run the starter and read v(out). Then find the R1 that gives 0.650 V, and sweep the temperature with dc TEMP 27 125 1.
Hint 2
Compare the output at 125 °C with the output at 27 °C as a ratio. Measure that ratio at a low diode current and at a high one.
Hint 3
A diode at a higher voltage keeps a larger share of it when hot. A resistor divider keeps its ratio at any temperature, so it can scale a higher voltage down.
Hint 4
The divider takes its current from the diode node. Keep that current small next to the diode current, or include it when you size R1.
What the grader checks: The grader places dref on its own 3.3 V source with no load and the dsig model. Hidden .meas lines read the output and the supply current at 27 °C. They also read the output's move from 3.0 V to 3.6 V. An op at 125 °C reads the hot output. Engine: ngspice 42 (libngspice0 42+ds-3build1), measured 2026-11-12 with tools/spice-judge.mjs. It proves those four numbers for ideal resistors and this one diode model. It does not check resistor tolerance, diode spread, temperatures below 27 °C or a loaded output.
Run simulates your netlist as written, with your own analyses and measurements. Submit sends it to the grader, which keeps only the subcircuit dref and makes 1 ngspice run. The numbers come from ngspice and the SKY130 models the site pins; they prove the measured cases, not every condition a chip meets.
See all 1 steps and the final capstone