A gain-of-25 stage loads its sensor: the input resistance is 2 kΩ. Name the loop it uses. Then reconnect the same amplifier so the input resistance rises above 2.5 MΩ and the output stays stiff.
Circuit context: A gain-of-25 stage between a piezo sensor and an ADC, built around a fixed amplifier with 50 kΩ of input and 2 kΩ of output resistance. Rewire a sensor amplifier whose feedback connection loads the sensor.
A piezo sensor has about 100 kΩ of source resistance. The stage below should amplify its signal 25 times and drive an ADC. On the bench the signal is 50 times too small.
The stage uses a ready-made amplifier, the subcircuit oa. It has 50 kΩ between its inputs, a gain of 5000 and 2 kΩ of output resistance. You cannot change oa. You can change how the resistors connect around it.
Rewire the subcircuit fbamp. The grader measures three things at 1 kHz. The input resistance must be at least 2.5 MΩ and the output resistance at most 40 Ω. The size of the gain must lie between 24.5 and 25.5.
Those limits are 50 times better than the bare amplifier at both ports. Work out which feedback topology moves both resistances the right way.
What the Grader Measures
Your subcircuit fbamp (ports in, out) under the grader's own bench:
| Check | Rule |
|---|---|
| Input resistance | ≥ 2.5 MΩ |
| Gain | 24.5 to 25.5 |
| Output resistance | ≤ 40 Ω |
Full specification
.subckt fbamp in out
* resistors, and X instances of the amplifier: Xname inp inn out oa
.ends
| Check | Rule | How the grader measures it |
|---|---|---|
| Input resistance | ≥ 2.5 MΩ | 1 V of AC on in at 1 kHz: 1 divided by the source current |
| Gain | 24.5 to 25.5 | the same run: |v(out)|, with no load on out |
| Output resistance | ≤ 40 Ω | input AC off, 1 A of AC into out at 1 kHz: |v(out)| |
The grader adds the amplifier oa itself. Your subcircuit must not define it.
Examples
Example 1
The Starter: An Inverting Stage- Design
.subckt fbamp in out * gain = R2/R1 = 25, but the sensor sees about R1 X1 0 n out oa R1 in n 2k R2 out n 50k .ends
- Measured by the grader
Input resistance: 2.01 kΩ (needs ≥ 2.5 MΩ) Gain: 24.86 (needs 24.5 to 25.5) Output resistance: 10.74 Ω (needs ≤ 40 Ω)
The feedback and the input meet at one node, which the loop holds almost still. The sensor sees little more than R1.
Example 2
The Same Stage with 5 MΩ and 125 MΩ- Design
.subckt fbamp in out X1 0 n out oa R1 in n 5meg R2 out n 125meg .ends
- Measured by the grader
Input resistance: 5.017 MΩ (needs ≥ 2.5 MΩ) Gain: 16.61 (needs 24.5 to 25.5) Output resistance: 671.3 Ω (needs ≤ 40 Ω)
A larger R1 raises the input resistance, but 125 MΩ against the 50 kΩ inside the amplifier leaves almost no loop gain. The gain is wrong and the output is soft.
Example 3
A Unity-Gain Follower- Design
.subckt fbamp in out X1 in out out oa .ends
- Measured by the grader
Input resistance: 250.1 MΩ (needs ≥ 2.5 MΩ) Gain: 0.9998 (needs 24.5 to 25.5) Output resistance: 399.9 mΩ (needs ≤ 40 Ω)
The source drives the non-inverting input and the loop makes the other input follow it. Both resistances are far inside their limits. Only the gain is wrong: all of the output is fed back.
Constraints and Contract
- The netlist defines .subckt fbamp in out ... .ends exactly once, with these ports in this order.
- Inside fbamp: resistors and one X instance of oa, with comments. No sources and no capacitors.
- Everything outside fbamp is replaced by the grader's bench.
Hints
Hint 1
Find where the feedback arrives. In the starter it reaches the same node as the input signal, through R1. What does that connection do to the input resistance?
Hint 2
The output side is already right: the network connects across the output, so the loop senses voltage. Keep that.
Hint 3
Return the feedback to the other input of the amplifier, so the source drives an input that carries almost no current. Then choose resistor values that neither load the 2 kΩ output nor are loaded by the 50 kΩ input.
What the grader checks: The grader places fbamp under its own bench with the amplifier oa. It measures the input resistance, the gain and the output resistance at 1 kHz. Engine: ngspice 42 (libngspice0 42+ds-3build1), measured 2026-11-12 with tools/spice-judge.mjs. The amplifier is a linear model without poles, so the check says nothing about stability or bandwidth.
Run simulates your netlist as written, with your own analyses and measurements. Submit sends it to the grader, which keeps only the subcircuit fbamp 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