I'll try and explain the system as a whole, here goes:
I have a PT100 temperature sensor (2-wire configuration) and the voltage across the sensor (driven by a 1mA constant current source) along with a 100ohm fixed reference is fed into a differential amplifier. That bit works fine and produces a nice 0-1V output signal. However I have come across a problem where by when the sensor is disconnected the output of the differential amplifier saturates at the supply rail, not what I need!
So I had the idea of setting a reference voltage (2v) and the output of the PT100 into a comparator and through an analogue mux which is connected to the output of the differential amplifier, along with the second input being pulled to ground. So when the sensor is removed, the output of the comparator goes low and mux disconnects the differential amplifier and connects the output of the circuit to ground.
Or so I though... The comparator does not produce a perfect ground signal which, for some reason, means the 0v signal coming out of the mux is not 0v, rather 0.04v which is around 4degC on this circuit, again not what I wanted.
I have connected the mux up with a switch connected directly to the supply and ground and this problem goes away, hence my thinking that the output of the comparator not being exactly 0v is causing the problem.
Thanks.