Detecting Unconnected Analog Input

Hi everyone,

I'm doing a project where the Arduino collect data from analog sensors and these data is displayed almost in real time to the user.
Here is a summarized schematic of the input circuit:

It is possible to connect multiple sensors (using the others analog inputs), according to the user necessity.

The problem I'm facing is that I can't differentiate between working sensors from the disconnected sensors, because when disconnected, the floating input doesn't return a predictable value.

The most feasible solution I found was this:

Set the pin to digital output, set it to 1, set it to ADC input, capture value.
Set the pin to digital output, set it to 0, set it to ADC input, capture value.

If the pin is not connected to anything, you should get a high/low ADC value, since the pin has a small capacitance, which stores the voltage level. A connected sensor will set the voltage level back to 'his' value. You may have to play around with delays between setting and measurement to get reliable results.

How can I know if this method is safe for my sensor? Will it deteriorate the sensor?

I've attached the datasheet of the sensor MPX5100, the one I'm using.

Is there reliable way to detect an unconnected analog input?

MPX5100.pdf (412 KB)

Just use a very high resistor value (>=1Megohm) from input to ground, sensor side of the 1k resistor.
Anything under a certain A/D value (e.g. 50) will be a disconnected sensor.
The added >=1Megohm load is insignifficant.