ECSE 2010 Omega Lab MS1 Proof of Concepts
Voltage Divider
Circuit Schematic

Description
We designed two voltage divider circuits. One is used to convert the 12V power supply into a 6V reference voltage () for the subsequent voltage comparator; the other is used to generate the input voltage () for the voltage comparator. This input voltage is determined by the resistance of the photoresistor (LDR) through the voltage divider circuit.
Analysis
Calculate , given
Step 1: Total series resistance in that branch
Step 2: Branch current (Ohm’s law)
Step 3: Voltage at midpoint ()
is the voltage across (because it’s the resistor from midpoint down to ground):
Equivalently:
Calculate , given:
Step 1: Total series resistance in that branch
Step 2: Branch current
Step 3: Voltage at midpoint ()
is the voltage across the bottom resistor (the LDR):
Equivalently:
Simulation
Running LTSpice with following config

We got this result
|
|
Experimental
With this setup

we powered with 12V DC as initially designed.

Then measured the

and the

Discussion
Here’s how the hand calc, LTspice, and bench measurement line up, plus the percent error of the measurement vs. the design target.
| Node | Design (calc) | LTspice op point | Measured | Abs. error (Meas − Design) | % error |
|---|---|---|---|---|---|
| 6.000 V | 6.000 V | 6.066 V | +0.066 V | +1.10% | |
| 8.000 V | 8.000 V | 7.967 V | −0.033 V | −0.41% |
both measured voltages are very close to the ideal divider predictions (within about ±1.1%). LTspice matches exactly because it uses ideal component values unless you add tolerances.
Why the measurement differs from the ideal (most likely causes)
-
Resistor tolerance (biggest for ) With two “1 kΩ” resistors, is exactly 6 V only if . If exactly, my measured implies the ratio is slightly off:
about 2.2% higher than , totally plausible for common 5% (and even possible with 1% parts depending on pairing).
-
LDR isn’t a fixed 2 kΩ (it changes with light + temperature) Using my measured , , and , the inferred LDR value is:
So the LDR at measurement time was basically ~1.98 kΩ, which explains why is very close to 8 V.
Operational Amplifier as a Comparator
Circuit Schematic

Description
This part is a voltage comparator. The previously generated 6V reference voltage from the voltage divider circuit, along with the signal, is fed into an OP37 operational amplifier. Once the signal output from the voltage divider circuit containing the LDR exceeds 6V, the final output becomes high (lighting up the LED), and vice versa.
Analysis
Step 1: Use the divider results (inputs of the op-amp)
From my earlier values (and assuming ideal op-amp inputs draw zero current, so the dividers are not loaded):
-
from over :
-
from over :
Step 2: Compare op-amp input polarities
From the diagram connections:
- The top input is “−” (inverting) and is connected to
- The bottom input is “+” (non-inverting) and is connected to
So:
Step 3: Ideal op-amp output behavior (open-loop comparator)
For an ideal op-amp (infinite open-loop gain):
- If ⇒ output drives to the positive rail
- If ⇒ output drives to the negative rail
Here:
So the output goes high.
Step 4: Output rail values
The op-amp is powered from:
Therefore, based on an ideal op-amp only:
Real OP37 behavior may not swing exactly to the rails.
Simulation

|
|
Experimental
With this setup

we powered with 12V DC as initially designed.

Then measured the

Discussion
Below is the calc vs. LTspice vs. measurement comparison for the OP37 used as a comparator, plus % error.
Comparator node voltages (with error %)
| Node | Ideal | LTspice op point | Measured | Abs. error | % error | % error |
|---|---|---|---|---|---|---|
| 6.000 V | 6.572 V | — | — | — | — | |
| 8.000 V | 7.237 V | — | — | — | — | |
| 12.000 V | 11.138 V | 11.454 V | +0.316 V | +2.84% | −4.55% |
What this says:
- my measured output is very close to the LTspice OP37 model (only 2.84% high vs sim).
- my output is below 12 V because OP37 is not rail-to-rail, and output swing depends on load current and headroom.
Why LTspice shows “weird” and (6.57 V and 7.24 V)
In an ideal comparator assumption, the inputs draw ~0 current, so the dividers stay exactly at 6 V and 8 V.
But my LTspice operating point report shows this:
- while
- while
Those mismatches mean the divider midpoints are being loaded, and the amount is:
(same 1.1442 mA shows up on the other divider too)
Input clamp effect
The OP37 has back-to-back input protection diodes between its inputs, and if the differential input exceeds ~0.7 V, those diodes conduct and you must limit the current.
the ideal differential would be:
That’s well above ~0.7 V, so in a real device (and many macromodels), the input protection network can conduct and effectively pull the two input nodes toward each other, which is exactly what my sim shows:
- LTspice differential becomes right near the diode clamp region
Because my divider resistors are only 1 kΩ, even ~mA of clamp current will shift node voltages by hundreds of mV, explaining the ~ movement in and .
In Total
- The comparator output behaves correctly: since , the OP37 drives high, and you measured , close to the simulated (2.84% error).
- The output doesn’t reach 12 V because OP37 output swing is limited (not rail-to-rail) and depends on load/headroom.
- LTspice shows the input nodes shifting because in open-loop comparator use, the input differential can exceed the internal protection diode threshold; the model then allows input clamp current (~1.14 mA) which loads the 1 kΩ dividers and moves up and down.