The Core Topology: Non-Inverting Schmitt Trigger
When you route a portion of an amplifier's output back to its non-inverting (+) input, you create an op amp positive feedback circuit. Unlike negative feedback, which forces the op-amp into a linear, stable state, positive feedback drives the output violently toward the supply rails. The most practical application of this behavior is the Schmitt trigger—a comparator with built-in hysteresis that prevents output chatter when processing slow-moving or noisy analog signals.
For this design, we are using the non-inverting Schmitt trigger topology. It is mathematically cleaner for single-supply designs than the inverting variant and requires fewer resistors.
- $V_{in}$: Analog input signal.
- $R_1$: Input resistor connecting $V_{in}$ to the non-inverting node.
- $V_+$: Non-inverting input node (the summing junction of $V_{in}$ and $V_{out}$).
- $V_-$: Inverting input node, tied directly to a fixed reference voltage ($V_{ref}$).
- $R_2$: Feedback resistor connecting the output ($V_{out}$) back to $V_+$.
- $V_{out}$: Op-amp output pin.
Why This Topology Over the Alternatives?
If you use negative feedback, you get a linear amplifier (useless for digital logic interfacing). If you use no feedback (open-loop), you get a basic comparator. However, an open-loop comparator will oscillate wildly (chatter) if the input signal has noise or a slow slew rate crossing the threshold. Positive feedback introduces hysteresis: two distinct trip points (Upper Threshold $V_{TH}$ and Lower Threshold $V_{TL}$). Once the output switches, the threshold physically moves, requiring the input to reverse direction by a defined voltage margin before it can switch back.
Design Walkthrough: Calculating Real Component Values
Let’s design a 5V logic interface. We need to convert a noisy 0-5V analog sensor signal into a clean 5V digital square wave. We want the output to go HIGH when the input crosses 3.0V ($V_{TH}$), and go LOW when it drops below 2.0V ($V_{TL}$). This gives us a 1.0V hysteresis band.
The LM358 Trap vs. The MCP6002 Solution
Most hobbyists grab an LM358 for 5V single-supply work. Do not use the LM358 here. The LM358 is not rail-to-rail on its output; its high-level output voltage ($V_{OH}$) drops to about $V_{CC} - 1.5V$. On a 5V supply, your "HIGH" output will only be ~3.5V, completely destroying the hysteresis math and failing to trigger 5V CMOS logic.
Instead, we will use the Microchip MCP6002, a true rail-to-rail I/O op-amp. On a 5V supply, its $V_{OH}$ is ~4.95V and $V_{OL}$ is ~0.05V, allowing us to use ideal 5V and 0V math with less than 1% error.
The Math and Component Selection
For a non-inverting Schmitt trigger, the thresholds are defined by the reference voltage ($V_{ref}$) and the resistor ratio $R_1/R_2$:
- $V_{TH} = V_{ref} + (V_{ref} - V_{OL}) \times (R_1 / R_2)$
- $V_{TL} = V_{ref} - (V_{OH} - V_{ref}) \times (R_1 / R_2)$
Assuming ideal rails ($V_{OH} = 5V$, $V_{OL} = 0V$) and setting $V_{ref} = 2.5V$ (the exact midpoint):
$3.0V = 2.5V + (2.5V - 0V) \times (R_1 / R_2)$
$0.5V = 2.5V \times (R_1 / R_2) \implies R_1 / R_2 = 0.2$
To keep input bias current errors low but avoid excessive power draw, we target the 100kΩ range for the feedback network.
- Choose $R_2$ (Feedback): 100 kΩ (1% tolerance)
- Choose $R_1$ (Input): 20.0 kΩ (1% tolerance, E96 series. If restricted to E24, use 22 kΩ, which shifts thresholds to 3.05V / 1.95V—perfectly acceptable for most noise margins).
- Choose $V_{ref}$: A simple voltage divider using two 10 kΩ 1% resistors from 5V to GND, bypassed with a 100 nF ceramic capacitor to ground to maintain a stiff 2.5V reference.
Behavior Matrix: Tuning the Feedback Network
Understanding how component drift or deliberate changes affect the circuit is critical for debugging. Here is the behavior matrix for this specific topology.
| Parameter Changed | Effect on $V_{TH}$ (Upper) | Effect on $V_{TL}$ (Lower) | Effect on Hysteresis Band |
|---|---|---|---|
| Increase $R_1$ (Input) | Increases | Decreases | Widens |
| Increase $R_2$ (Feedback) | Decreases | Increases | Narrows |
| Increase $V_{ref}$ | Increases | Increases | Unchanged (Shifts up) |
| Decrease $V_{CC}$ (Supply) | Decreases | Increases | Narrows (Assuming $V_{ref}$ tracks $V_{CC}$) |
Failure Modes at the Extremes: Open and Short Scenarios
When a circuit fails on the bench, it is usually due to a cold solder joint (open) or a solder bridge (short). Here is exactly how this op amp positive feedback circuit breaks at the extremes, providing a failure-mode contrast to standard linear configurations.
- $R_2$ Opens (Feedback Lost): The hysteresis band collapses to zero. The circuit reverts to an open-loop comparator. If your input signal has high-frequency noise near 2.5V, the output will chatter at hundreds of kilohertz, potentially overheating the op-amp output stage or causing logic faults in downstream microcontrollers.
- $R_2$ Shorts (Output tied to $V_+$): The non-inverting input is forcefully pulled to the output rail. The op-amp latches permanently to whichever rail it hits first. It will not recover until power is cycled or the short is removed.
- $R_1$ Opens (Input Lost): $V_+$ is now solely determined by $V_{out}$ through $R_2$. Similar to an $R_2$ short, the circuit latches to the rail. The input signal is entirely ignored.
- $R_1$ Shorts (Input overrides feedback): $V_{in}$ is tied directly to the non-inverting pin. The feedback current from $R_2$ is shunted to the low-impedance signal source. Hysteresis drops to zero, and the circuit acts as a basic, noisy comparator.
Breadboard Verification: Step-by-Step Testing
Do not trust the math until you verify it on the bench. Follow these numbered steps to validate the trip points using a function generator and an oscilloscope.
- Power the IC: Insert the MCP6002. Connect Pin 8 ($V_{DD}$) to your 5.00V bench supply and Pin 4 ($V_{SS}$) to GND. Verify with a multimeter that the supply is exactly 5.00V ±0.05V.
- Establish the Reference: Connect two 10 kΩ resistors in series between 5V and GND. Tie the midpoint to Pin 2 ($V_-$). Measure Pin 2; it must read 2.50V. Solder or clip a 100 nF capacitor across the bottom 10 kΩ resistor to kill power supply ripple.
- Install the Feedback Network: Insert the 100 kΩ resistor ($R_2$) between Pin 1 (Output A) and Pin 3 ($V_+$). Insert the 20 kΩ resistor ($R_1$) between your function generator output and Pin 3.
- Configure the Stimulus: Set your function generator to output a 50 Hz triangle wave, 0V to 5V amplitude, with a 2.5V DC offset. This slow slew rate makes the hysteresis clearly visible.
- Probe and Trigger: Connect Oscilloscope Channel 1 to the function generator output ($V_{in}$) and Channel 2 to Pin 1 ($V_{out}$). Set the scope trigger to Channel 2, rising edge, at 2.5V.
- Verify Trip Points: Use the scope's cursor function. Place Cursor A on the exact moment the Channel 2 square wave rises. Read the Channel 1 voltage—it should be 3.0V. Place Cursor B on the falling edge; Channel 1 should read 2.0V.
Decision Tree: Positive Feedback vs. The Alternatives
Not every signal conditioning task requires hysteresis. Use this decision matrix to determine if an op amp positive feedback circuit is actually what you need, or if you should pivot to a different topology.
| Application Requirement | Signal Condition | Required Topology | Concrete Part / Value Pick |
|---|---|---|---|
| Need exact analog scaling (e.g., 0-2V to 0-5V) | Clean, low-noise analog | Negative Feedback (Non-inverting amp) | TLV2372, $R_f=30k$, $R_g=20k$ |
| Need fast edge detection, signal is already clean digital | Fast slew rate, no noise | Open-Loop Comparator (No feedback) | LM393 (Open-collector, needs 10k pull-up) |
| Need digital transition from slow/noisy analog sensor | Slow slew rate, >100mV noise | Positive Feedback (Schmitt Trigger) | MCP6002, $R_2=100k$, $R_1=20k$ |
The Final Verdict and Default Recommendation
If your goal is to interface a messy, real-world analog signal (like a thermistor, LDR, or long cable run) into a microcontroller GPIO, the non-inverting Schmitt trigger is the undisputed correct choice. It requires no software debouncing and prevents interrupt storms caused by noise chatter.
Default Pick: Stop debating whether to use an LM358, LM393, or TL072 for 5V single-supply logic interfacing. Default to the Microchip MCP6002. Pair it with a 100 kΩ feedback resistor and a 20 kΩ input resistor to achieve a robust 1.0V hysteresis band centered at 2.5V. This specific combination provides optimal noise immunity for 5V systems while keeping quiescent current draw under 200 µA, making it ideal for both bench prototyping and battery-powered field sensors.






