An op amp output that breaks into a few megahertz oscillation with no fault in the chip is usually loop instability. This page explains where the oscillation comes from and how to compensate the loop.
Negative feedback needs a total loop phase shift kept away from 360 degrees. As open-loop gain falls with frequency and extra poles add phase, the total shift can reach 360 degrees, turning negative feedback into positive; if the loop gain is still above unity there, the circuit oscillates. The key figure is phase margin: at the frequency where loop gain crosses 0dB, how many degrees short of 360 the phase is. Below 45 degrees is risky, below zero it oscillates. Load capacitance and stray poles are the usual cause.
The common fix is dominant-pole compensation: a small capacitor of a few picofarads to hundreds across the feedback resistor, or to ground at the inverting input, which lowers high-frequency gain and moves the 0dB crossing into a safe phase region. Roughly size it as C about R_f times C_load divided by R_load, then tune by measurement. For a heavy capacitive load, first isolate with a 10 to 100 ohm series resistor before compensating. Lower closed-loop gain and smaller feedback resistors also raise phase margin at the cost of bandwidth.
On site, first rule out power and decoupling: measure AC at the supply pin and add a 0.1 microfarad at the pin. Then suspect heavy capacitive load or long leads and temporarily insert 47 ohms. A feedback resistor above 1 megaohm adds a pole, so drop to the 100k range. Scope the ring frequency and add compensation capacitance from small up. A probe touch that stabilises it means compensation or ground bounce is weak; do not rely on hand-touch stability. Put the compensation cap near the input with a short ground to avoid new poles.
| Symptom | Likely cause | Fix |
|---|---|---|
| HF steady oscillation | low phase margin | feedback comp cap |
| Slow ringing | heavy cap load | 47 ohm series isolate |
| Stable only with probe | weak comp / bounce | add cap, short ground |
| Low-freq drift | poor decoupling | 0.1uF at pin |
| Oscillates at high gain | gain too high | lower gain or Rf |
| Oscillates, big Rf | Rf above 1M | drop to 100k |
| Long load wire | stray parasitics | shorten or isolate |
Op amp oscillation appears with high gain, capacitive load, long leads and high-impedance feedback. First decouple the supply, then add feedback compensation sized to the ring frequency, isolate the output with a small resistor, drop the feedback resistor to the 100k range, and confirm on the scope that phase margin exceeds 45 degrees.
The quantities and component characteristics discussed here follow current national standards and the corresponding IEC documents: Analogue stability design per GB/T 4728; safety IEC 60204-1. Always check the device datasheet and the product design file for ratings and derating.
Locate the issue with the approach above, then confirm with measurements; safety-related circuits must follow the standards and manufacturer requirements.