I had to design a circuit for measuring the voltage of a negative power supply rail (-15 V) and feeding it into a ADC (0-3 V DC-coupled input range). This measurement is only used for diagnostics and doesn't need very high accuracy for our purposes, so I didn't think twice and just used the inverting-opamp configuration amplifier to apply a gain of -0.15 (not in dB) to get the proper scaling and 180 degree phase shift.

After talking to some colleagues I learned that there is the possibility of having stability issues depending on the opamp. They said that some opamps will explicitly tell you in the datasheet what kind of gains and configurations they will be stable in, but the opamp we currently need in other places (LM833DGK) doesn't mention that kind of data. I also tried doing some analysis using feedback theory, but I couldn't get the results I need with the plots given in the datasheet.

This is driving me nuts because it is something I've never seen mentioned at school, or The Google as far as my search results say, but makes sense.

Can anyone give me advice on how to make sure that this circuit will be stable under all conditions? (It is now, but I can't guarantee for different noise, temperature, time-of-day, etc.).

enter image description here

  • \$\begingroup\$ On the subject of there being no mention of stability in the datasheet, on the first page it says The LM833 is internally compensated for all closed loop gains, which means (if set up correctly) it should be stable at any setting. \$\endgroup\$
    – Oli Glaser
    Feb 5, 2013 at 16:12
  • \$\begingroup\$ make sure all the poles are in the left half plane, or something like that... and fwiw I think that's a punchline to an aweful signals and systems joke \$\endgroup\$
    – vicatcu
    Feb 5, 2013 at 17:35
  • \$\begingroup\$ @vicatcu: Sure, the poles need to be in the right places, but this is not useful when you don't know where the poles are or even how many of them. That's like telling someone that to win at soccer is easy, just score more goals than the opponent. Correct, but not particularly useful. \$\endgroup\$ Feb 5, 2013 at 18:13
  • \$\begingroup\$ @OlinLathrop I was providing some nerd humor, no offense :) \$\endgroup\$
    – vicatcu
    Feb 5, 2013 at 18:27

1 Answer 1


The short answer is to put a cap accross the feedback resistor. Make sure this cap has short leads and is physically close to the output and negative input pins.

A cap accross the feedback resistor will also reduce the overall gain at high frequencies. Figure out what your maximum frequency of interest is, then adjust the cap so that the low pass rolloff is a bit above that. Most likely that will still allow for a much larger cap than necessary to keep the opamp stable.

For example, let's say you are sampling this power supply voltage signal every 1 ms in the microcontroller. That means the samples can't represent frequencies in the signal higher than 500 Hz anyway. Even worse, if such frequencies exist they will become aliases and therefore noise on the desired signal.

Let's say that upon considering system response issues you decide that you don't need to know about frequency content above 100 Hz. The rolloff knee of a R-C filter is

  F = 1 / (2 π R C)

When R is in Ohms, C in Farads, then F is in Hz. To get a 100 Hz knee with a 15.8 kΩ resistor requires 100 nF. That is way more than required to keep the opamp stable (probably a few 10s of pF is enough for that).

So the answer to the example is so put a 47-100 nF capacitor accross Rf. This will not only keep the opamp stable, but will reduce unwanted high frequencies on Vout.

  • \$\begingroup\$ Great. As it turns out, I was already doing the filtering with a 100 nF capacitor, so I shouldn't have to make any changes. Thanks! \$\endgroup\$
    – Adam
    Feb 5, 2013 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.