Arduino duemilaennove:unplugged sensors read error

Hi,
I really need to know if is possible to solve this problem:
I have some sensors attacched on analog inputs on an arduino duemilaenneove board. Inputs read works fine, but sometimes i need to know when a sensor is unplugged, so i

unplugged one and the result is:

I don't understand why voltage isn't 0 when I have no input on the port.
I can fix that using a range of accepted values, but with a 0 value is easier.

Is it a mine mistake? :cry: :-?

No its not a mistake, analogue inputs float and so are influenced by any manner of noise in the system or adjacent cabling etc. Depending on the impedance of your particular sensor you could put a weak pull down resistor to ground. It might/will effect the sensor readings but it will give predicable readings if its unplugged. Often the fact that the reading are unpredictable gives it away that the sensor connection is awry.