FAN BUS Controller - Part 6 the tank level meter

One of the problems with the old cooling system for the AMD was that it had a small leak somewhere, not enough to wet the motherboard or anything but enough that I had to keep on filling the system every 3-4 weeks. I decided to solve this my including a level meter in the tank.
The level meter consists of a brass tube that hangs in the water and a 100nF capacitor. One end of the capacitor is connected to a pin on the mega8, the other on the brass tube and one of the brass pipe connectors is connected to ground. Heres a picture of the circuit:-

And heres a chart of the output from the calculation against the height of water in the tank.

The code consists of a GetRC command and abit of bit rounding as the output value isn't linear and thats it.
part 7 - Bling Bling