Polarity selectors are occasionally desired in complicated control loops or in simple phase shift keying schemes. Figure 1 shows a classic implementation of a polarity selector. With the switch in the upper position, the input voltage arrives at the non-inverting input of the op amp. The circuit acts as a voltage follower with a signal gain of 1 and a noise gain of 2. With the switch in the lower position, the non-inverting input of the op amp is connected to mid supply (Vs/2) and the op amp's open loop gain keeps the inverting input at the same voltage. The circuit now acts as a standard inverting configuration circuit with a signal gain of --1 and the same noise gain of 2. This is one of those circuits that is surprising in its efficacy and elegant simplicity.
Figure 1: An analog switch and voltage follower acts as a simple inverter.
Figure 2 shows how to achieve the same effect even more simply. The LT1783 family of op amps combines a Shutdown feature with robust differential input and Over-the-Top capabilities. The op amp inputs can operate above the power supply rail, and with the op amp in shutdown or lacking a positive rail the inputs and outputs go high-Z. The circuit in Figure 2 uses the shutdown capability to implement the gain of 1 follower. With the op amp off (SHDN pin high), its inputs and output are essentially out of the picture, and the input voltage arrives at Vout through resistors R1 and R2. (Note that for this to work well downstream circuitry must be high impedance, which is often the case in signal chains anyway.) With the op amp turned on (SHDN pin low), the circuit now acts as a standard inverting configuration circuit with a signal gain of --1 and a noise gain of 2. Thus, polarity selection is achieved without the usual analog switch.
Figure 2: The shut down pin (SHDN) turns this op amp into a signal inverter.
Figure 3 shows results with a 5Vpp 1kHz sine wave being conditioned by the circuit on a single 5V supply. The left side of the photo shows the circuit as a follower (SHDN high). It is set to inverter mode for about 1.8 milliseconds (SHDN low), and then returned back to follower mode. Typical turn-on and turn-off response times for the LT1783 are 25us and 3us respectively.
Figure 3: 1kHz, 5VPP sinusoid applied to the simple polarity selector with a single 5V supply. With SHDN high, the circuit is a follower; with SHDN low, the circuit is an inverter.