I seem to always have trouble with Op amps and I was hoping somebody here could tell me what I'm doing wrong. The problem I am trying to solve is that I have an input (see the switch in the diagram below) and I must create a PASS/FAIL logic level such that Switch position #4 gives a logic high and all other positions give a logic low. Oh, and just to make things more interesting, the 12V supply in the circuit is highly unstable and can vary from 6V to 15V.
My faulty circuit is supposed to work like this. The output of the switch drives a resistor divider and the supply drives an identical divider. The center taps V2 and V1 are fed into an op amp differencing circuit. So the output of the op amp can be fed into the ADC on an MPU which can determine the final logic output based on the voltage. I only have one spare pin on the MPU so I have to use the op amp differencing circuit rather than let the MPU figure it out from two inputs.
Without the op amp, the resistor dividers work as predicted. ***BTW, I just realized that I labeled V1 and V2 backwards on this schematic*** V2 (labeled V1 in this schematic) is always half the supply. If the switch is on position 1 or 2, then V1 (labeled V2) is 0V. In position 3, its 6V. In Position 4, its 5.97V.
The idea is that the Op Amp differencing amp would produce 6V, 6V, 0V, and 0.03V for switch positions 1-4 respectively. The ADC can handle it from there. The only problem is that when I breadboarded this circuit, it doesn't come close to working. I get all sorts of strange voltages at the output (measured with a DVM). Not only that, but even V1 and V2 are off when the Op Amp was connected.
Does anybody know what I'm doing wrong? Or perhaps have a better way to differentiating switch position 4 from the others? The actual switch connections cannot be altered, but the rest of the circuit is fair game.

NOTE: Schematic drawing error - I switched V1 and V2 labels by accident.
My faulty circuit is supposed to work like this. The output of the switch drives a resistor divider and the supply drives an identical divider. The center taps V2 and V1 are fed into an op amp differencing circuit. So the output of the op amp can be fed into the ADC on an MPU which can determine the final logic output based on the voltage. I only have one spare pin on the MPU so I have to use the op amp differencing circuit rather than let the MPU figure it out from two inputs.
Without the op amp, the resistor dividers work as predicted. ***BTW, I just realized that I labeled V1 and V2 backwards on this schematic*** V2 (labeled V1 in this schematic) is always half the supply. If the switch is on position 1 or 2, then V1 (labeled V2) is 0V. In position 3, its 6V. In Position 4, its 5.97V.
The idea is that the Op Amp differencing amp would produce 6V, 6V, 0V, and 0.03V for switch positions 1-4 respectively. The ADC can handle it from there. The only problem is that when I breadboarded this circuit, it doesn't come close to working. I get all sorts of strange voltages at the output (measured with a DVM). Not only that, but even V1 and V2 are off when the Op Amp was connected.
Does anybody know what I'm doing wrong? Or perhaps have a better way to differentiating switch position 4 from the others? The actual switch connections cannot be altered, but the rest of the circuit is fair game.

NOTE: Schematic drawing error - I switched V1 and V2 labels by accident.