>3. Continuous range from say 1 cm to say 30 cm deep, with 1mm accuracy. Does it really need to be perfectly linear instead of stepped? One way to do this is have a long piece of Perspex which thins down in = steps. shine an opto reflector down it, and then measure the light = coming back. As the steps in the Perspex go under water they stop = reflecting the light. For your purpose the rod could be at an angle in = the ballast tank. It may be possible to make a truly linear one using a tapered rod, = especially if it is grooved in minute steps all the way down, a bit like = a fresnel lens. at the top I would be tempted to have a tiny groove between the led and = the sensor to try and remove crosstalk between the two caused by light = going straight across instead of down the rod. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.