Build a common-gate current buffer that biases itself. It must show a photodiode at most 3 kΩ and pass 98 % of its current into a 50 kΩ load.
Circuit context: A self-biased common-gate buffer between a photodiode and a 50 kΩ load resistor to a 1.8 V supply. Build the current buffer that sits between a photodiode and its load resistor.
A photodiode is a current source with a large capacitance. A low input resistance keeps its voltage still, so the capacitance costs little speed.
Build the buffer cgbuf between the photodiode and a 50 kΩ load. The load goes from the output to the 1.8 V supply.
Lesson E3.6 biased its stage with ideal sources. Here you build the gate bias and the bias current from the supply.
The bias current also flows through the load, so it sets the output level. The whole circuit may draw 30 µA.
The starter shows 4.6 kΩ and loses 15 % of the signal. Both numbers must improve.
What the Grader Measures
Your subcircuit cgbuf (ports in, out, vdd) under the grader's own bench, one run per corner (tt, ss, ff):
| Check | Corner | Rule |
|---|---|---|
| Input resistance | tt | ≤ 3 kΩ |
| Input resistance | ss | ≤ 3 kΩ |
| Input resistance | ff | ≤ 3 kΩ |
| Current gain into the load | tt | ≥ 0.98 |
| Output level | tt | 800 mV to 1.2 V |
| Supply current | tt | ≤ 30 µA |
Full specification
.subckt cgbuf in out vdd
* resistors, capacitors and SKY130 1.8 V FETs (sky130_fd_pr__nfet_01v8, sky130_fd_pr__pfet_01v8)
.ends
| Check | Corner | Rule | How the grader measures it |
|---|---|---|---|
| Input resistance | tt, ss, ff | ≤ 3 kΩ | ac at 1 kHz: |v(in)| for a 1 A test current |
| Current gain | tt | ≥ 0.98 | ac at 1 kHz: the load current for that test current |
| Output level | tt | 0.8 V to 1.2 V | op: v(out) with no photodiode current |
| Supply current | tt | ≤ 30 µA | op: the current out of the 1.8 V source, load included |
The grader runs at 27 °C with .lib sky130 tt, ss and ff. The photodiode pulls its current out of the node in.
Examples
Example 1
The Starter: The Lesson's Device over a 30 kΩ Resistor- Design
.subckt cgbuf in out vdd RG1 vdd g 400k RG2 g 0 600k RB in 0 30k XM1 out g in 0 sky130_fd_pr__nfet_01v8 W=4 L=0.5 .ends
- Measured by the grader
Input resistance: 4.594 kΩ (needs ≤ 3 kΩ) Input resistance at ss: 4.743 kΩ (needs ≤ 3 kΩ) Input resistance at ff: 4.456 kΩ (needs ≤ 3 kΩ) Current gain into the load: 0.8469 (needs ≥ 0.98) Output level: 1.279 V (needs 800 mV to 1.2 V) Supply current: 12.22 µA (needs ≤ 30 µA)
The device has too little g_{m} for 3 kΩ. The resistor takes 15 % of the signal current.
Example 2
A Mirror Sink Under a Minimum-Length Device- Design
.subckt cgbuf in out vdd RG1 vdd g 400k RG2 g 0 600k RREF vdd nb 150k XMB nb nb 0 0 sky130_fd_pr__nfet_01v8 W=4 L=2 XMS in nb 0 0 sky130_fd_pr__nfet_01v8 W=8 L=2 XM1 out g in 0 sky130_fd_pr__nfet_01v8 W=20 L=0.15 .ends
- Measured by the grader
Input resistance: 5.279 kΩ (needs ≤ 3 kΩ) Input resistance at ss: 4.549 kΩ (needs ≤ 3 kΩ) Input resistance at ff: 6.129 kΩ (needs ≤ 3 kΩ) Current gain into the load: 0.992 (needs ≥ 0.98) Output level: 1.036 V (needs 800 mV to 1.2 V) Supply current: 24.26 µA (needs ≤ 30 µA)
The mirror keeps 99 % of the current. The short device has a low r_{o}, so the load lifts the input resistance to 5.3 kΩ.
Example 3
A Mirror Sink Under a Wide 0.5 µm Device- Design
.subckt cgbuf in out vdd RG1 vdd g 400k RG2 g 0 600k RREF vdd nb 150k XMB nb nb 0 0 sky130_fd_pr__nfet_01v8 W=4 L=2 XMS in nb 0 0 sky130_fd_pr__nfet_01v8 W=8 L=2 XM1 out g in 0 sky130_fd_pr__nfet_01v8 W=100 L=0.5 .ends
- Measured by the grader
Input resistance: 2.723 kΩ (needs ≤ 3 kΩ) Input resistance at ss: 2.725 kΩ (needs ≤ 3 kΩ) Input resistance at ff: 2.721 kΩ (needs ≤ 3 kΩ) Current gain into the load: 0.9961 (needs ≥ 0.98) Output level: 1.034 V (needs 800 mV to 1.2 V) Supply current: 24.28 µA (needs ≤ 30 µA)
The input shows 2.72 kΩ in every corner and the load receives 99.6 % of the current.
Constraints and Contract
- The netlist defines .subckt cgbuf in out vdd ... .ends exactly once, with these ports in this order.
- Inside cgbuf: resistors, capacitors and X instances of sky130_fd_pr__nfet_01v8 or sky130_fd_pr__pfet_01v8. No sources.
- Keep each NMOS body at node 0. The grader supplies vdd, the photodiode and the 50 kΩ load.
Hints
Hint 1
The input resistance is close to 1/(gm + gmb). The output level fixes the current, so gm must come from the device.
Hint 2
Whatever sinks the bias current also hangs on the input node. The signal splits between it and the transistor.
Hint 3
The 50 kΩ load reaches the input through ro. Compare a short device and a longer one at the same current.
What the grader checks: The grader measures input resistance and current gain at 1 kHz, plus the output level and supply current. All numbers come from ngspice 42 with the pinned SKY130 models, measured 2026-11-12. It does not check bandwidth with the photodiode's capacitance, noise or supply rejection.
Run simulates your netlist as written, with your own analyses and measurements. Submit sends it to the grader, which keeps only the subcircuit cgbuf and makes 3 ngspice runs. 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