Hi, if you are going to use a float I would use the sharp opto distance sensor. They are only a few bucks, have a serial interface, and give a pretty fine resolution up to about a meter max. You may need to put a white flat surface disk on top of your float ball or choose a float with a flat top. There is some data on this Sharp sensor at: http://www.tinaja.com/flut01.html (see tech musings #131) and there is a lot of data on this sensor on the net. I have never worked with one but I plan to! :o) -roman Simon Nield wrote: > > >A colored floating ball in a vertical tube parallel to the main tank will give > >you depth indication. Getting that visual indicator into the micro will be a > >challenge... > > if the little coloured ball is opaque then it would be pretty easy to put an IR led and a photo > transistor either side of the tube. if daylight is a problem you could put the tube inside the sub, > or use daylight filtered opto parts, or pulse the IR led and do a comparison with the ambient level. > or whatever. > > Regards, > Simon > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > use mailto:listserv@mitvma.mit.edu?body=SET%20PICList%20DIGEST -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! use mailto:listserv@mitvma.mit.edu?body=SET%20PICList%20DIGEST