# Why is my op amp railing? So I have a LM358 Dual opamp. I only care about the first op amp, the second I just have set to put out 12V to keep it from floating. The the first is reading in feedback from a 1k potentiometer from 10-0 volts. The voltage divider knocks it down to the uC analogue voltage level. it all works fine, but when the pot is disconnected the output of the op amp rails to 24 volts. Why is that? if you have 0 volts on the non inverting input it should be 0 for the output correct?

EDIT: Maybe this picture is easier to follow • This would be a lot easier to read and understand if you used the op-amp symbol rather than a box. Nov 13, 2020 at 22:23
• ...and explain what "receptor X" is and where R11 is connected to... Nov 13, 2020 at 22:26
• "when the pot is disconnected.." this is not a 0 Volt input, it is an open circuit. Add a pull down resistor across C10, and see what you get. Nov 13, 2020 at 22:28
• Sorry, just used what TI provided. Receptor X is just the name of a signal going to the microcontroller (uC). Nov 13, 2020 at 22:35
• Chris, ok I will. Nov 13, 2020 at 22:46

This kind of op-amp has a bias current that flows out of the input, so opening it will cause the output to go to about +22V.

If you connect a resistor (say 100K) from the pot wiper connection to ground you will affect the linearity slightly, but an open wiper will result in an output voltage of only a few mV typically (worst case could be maybe 50mV).

Linearity will be affected by 0.25% (slight droop at 50.0%).

C62 is a really bad idea and can cause oscillation. Put it across the power supply instead.

• Hi, Thanks for answering! So you are saying that the expectations is if the non-inverting input is floating then it will rail. So what if I put 10V instead of 24V for the op amp operational voltage? Do you think that would be worse for the resolution than the 100k pulldown Resistor? Nov 16, 2020 at 14:25
• That would introduce a new problem- the op-amp output would only go to +8 or a bit less when the pot wiper is opened up, but it would also not follow the input above that same voltage. Nov 16, 2020 at 15:36
• Ok, so maybe I can look at clamping it with a Zener diode. I just don't want 7 volts going back to the microcontroller. Nov 16, 2020 at 23:19

If you disconnect a pot and leave the top end of R11 floating then the bias current from the non-inverting input will charge up C10 until it reaches one of the power rails.

Since you have a voltage following buffer circuit the output will just follow the input.

• So if I measured across C10 I should see the max supply voltage? Nov 13, 2020 at 22:44
• You might. Your voltmeter will discharge C10. You can estimate the time constant from $\tau = RC$ where R is the resistance of your meter - probably 10 M$\Omega$. Nov 13, 2020 at 23:01