Make a Diving Depth Gauge

Sorry for the poor image quality. I may replace them someday, but I think these are good enough to illustrate the process.
Materials

The next thing you will need is a piece of a hard flat ruler to glue your scale and tube to it. You will also need some epoxy resin and/or a laminator to glue and waterproof the printed scale, but I recommend you use both. You'll probably need a syringe, a syringe needle and some lighter fluid to clean the tube from the ink.
The Theory
The gauge consists of a clear plastic tube whose end has been closed and a scale. When you dive, the surrounding water pressure compresses the air inside the tube, lowering its volume and allowing water to fill the rest of the tube. By knowing how volume of air and volume of water inside the tube relate, we know the pressure of surrounding water which is directly proportional to the depth. Therefore we can make a scale showing the depth according to length of air column.
Boyle's law
states that volume and pressure are inversely proportional. That means that if you double one, the other will halve. So at pressure two times larger than atmospheric, the volume of air inside the tube will be half of the volume at surface. Since tube is cylindrical, volume is proportional to length so we don't need to know the volume to determine the pressure (if length halves, the volume will too).
So if we know that atmospheric pressure is approximately 1 bar, we also know that the length of air column at 2 bar will be a half of full length of the tube. At 3 bar, it will be a third, at 4 a fourth and so on. But how do we know what pressure corresponds to which depth? Well we know that 1 bar is 100000 Pa or 100000 N/m^2. A newton roughly corresponds to weight exerted by object that weighs 100g. The density of water is 1000 kg/m^3. Therefore, a cube of water with 1 meter long edges would weigh 1000 kilos.
What we want to know is how tall would a cuboid of water with one square meter face have to be to weigh 100000 newtons or 10000 kilos. You could imagine that cuboid as a stack of those meter-edge cubes that weigh 1000kg. You need to stack them ten to get a 10000 kilo cuboid. So for every ten meters you get an additional bar of pressure.
So to get the pressure observed at a depth you have to add the atmospheric pressure of 1bar and 0.1 bar per meter - p=1+d/10. To get the length of the air column in the tube at that depth, you just divide the length of the tube by the pressure.
For those of you who are wondering how air doesn't escape from the tube, it doesn't do so because of the surface tension of the water. However, if your tube is too wide, it will come out and the gauge will be impossible to use.
Prepare the Capillary


After you've cleaned your tube, rinse it with water and allow it to dry. When dry, find the slight widening on one end of the tube where it used to be attached to the tip of your pen and melt it with a lighter to close that end of the tube. Be sure that the seal is airtight by blowing in the open end while the closed end is immersed in water and observing if there are any bubbles coming out. Measure your tube now (from the opening to the end of hollow part) as precise as you can, and you are ready for the next step.
Make the Scale

To read the depth on your depth meter, you need a scale. To make one you can either use a utility I wrote and print it, or calculate where to put the marks and make one yourself. The utility is in the attachment.
My utility isn't very powerful, but I think it's pretty much self explanatory. Fill the form and press "Make scale". It will make a pdf file in the same directory it's in. One thing worth noticing is that you must enter the tube length in milimeters, not in inches. If you measured your tube in inches, just multiply the length with 25.4 and you will be left with correct length in millimeters.
When you print the scale it is of crucial importance that you check the print dialog for any scaling. The document absolutely shouldn't be scaled, or else the depth gauge will not work. When you print the scale, also check that the length of the line printed in the middle matches the length of the tube you measured.
To make your own scale, just calculate how far the mark should be from the closed end of the tube by the formula: d=l/(D/10+1), where d is the distance from the closed end of the tube to the mark, l is the length of the closed tube and D is the depth in meters.
If you have access to a laminator, be sure to laminate the scale.
EDIT: It appears that they don't allow me here to upload an exe file, so i put the utility up on dropbox. Here's the download link: http://mojoblak.srce.hr/public.php?service=files&t=0346637d04cf546aa733272a9033018e
Put It All Together
Use
