How is it possible to pull up an op amp's output to its negative or positive rail when its input is floating?
is it then possible to pull up the op amp's output to its around -10V negative or around 10V positive rail when its input is floating?








simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. A buffer amplifier with pull-down resistors. With SW1 closed the output follows the input. With SW1 open the output swings to -8 V.

Here R1 pulls the input down to -8 V set by divider R2 and R3. I've chosen -8 V rather than -10 V to prevent latch-up which can happen with some op-amps if driven too close to the supply voltages. You can modify this to suit your device specifications.

For a positive default just connect R3 to +10 V instead.



Now that you've revealed what your application is - a wind vane using a 330&deg; pot with a dead-zone I suggest the following:







simulate this circuit

Figure 2. Adding C1 to the buffer input will hold the reading at the most recent value when the pot is disconnected.

The advantage now is that the reading won't jump between V+ and GND every time you run off the top end of the pot and reconnect.

For this to work well you will need a very high impedance input op-amp with low bias currents and a low leakage capacitor.