|
| 1 | +Water Tank Depth Sensor |
| 2 | +======================= |
| 3 | + |
| 4 | +Copyright 2009 Jonathan Oxer |
| 5 | +Copyright 2009 Hugh Blemings |
| 6 | + |
| 7 | ++---------------------------------------------------------------------+ |
| 8 | +| This project is featured in the book "Practical Arduino" by | |
| 9 | +| Jonathan Oxer and Hugh Blemings (Apress, 2009). More information | |
| 10 | +| about the book and this project is available at: | |
| 11 | +| | |
| 12 | +| www.practicalarduino.com/projects/medium/water-tank-depth-sensor | |
| 13 | ++---------------------------------------------------------------------+ |
| 14 | + |
| 15 | +Water is a precious resource in many parts of the world, and many |
| 16 | +people rely on water tanks to supplement their water supply by storing |
| 17 | +collected rainwater or water pumped from a well or bore. But how do you |
| 18 | +measure how full a tank is? Tanks are constructed of opaque material to |
| 19 | +prevent algae growth and often kept closed up to prevent mosquito |
| 20 | +infestation or access by small rodents so it's inconvenient to |
| 21 | +physically look inside. And besides, having a way to measure tank depth |
| 22 | +electronically opens up a world of possibilities such as automatic |
| 23 | +control of pumps to top up tanks when they get low or to disable |
| 24 | +irrigation systems when not enough water is available. |
| 25 | + |
| 26 | +The obvious way to measure tank depth is by placing a series of |
| 27 | +conductive pickups at various heights inside the tank and measure the |
| 28 | +resistance between them. For example, placing ten exposed terminals at |
| 29 | +equal intervals attached to a length of material such as PVC tubing and |
| 30 | +inserting it into the tank will allow you to measure the depth in 10% |
| 31 | +increments by reading the resistance between the bottom terminal and |
| 32 | +each of the terminals above it. The downside to this approach though is |
| 33 | +that you'll need to do a lot of wiring and you'll also need to read an |
| 34 | +analogue input for every individual terminal - while most Arduino |
| 35 | +designs have no more than 6 analogue inputs. |
| 36 | + |
| 37 | +This project works a little differently. It uses a device called a |
| 38 | +differential pressure transducer to measure the water pressure at the |
| 39 | +bottom of the tank, and from that to calculate how full the tank is. |
| 40 | +Water pressure increases by about 9.8067kPa per meter of depth so a |
| 41 | +full tank 2m tall will have a pressure at the bottom of about |
| 42 | +19.6134kPa above ambient atmospheric pressure. The "above ambient |
| 43 | +atmospheric pressure" part is important: it's not enough to simply |
| 44 | +measure the pressure at the bottom of the tank because varying |
| 45 | +climate conditions will alter the reading. That's why this project uses |
| 46 | +a "differential" pressure transducer that has two inlets. By leaving one |
| 47 | +inlet open to the atmosphere and connecting the other to the bottom of |
| 48 | +the tank the transducer will output the difference between the two, |
| 49 | +automatically compensating for varying air pressure and giving a |
| 50 | +constant reading for constant depth. |
| 51 | + |
| 52 | +The Arduino then reads the output of the transducer and reports the |
| 53 | +depth of the tank. In this project we will use an Ethernet shield to |
| 54 | +have the Arduino connect to an online datalogging service called |
| 55 | +Pachube to generate graphs of water depth over time, but you could |
| 56 | +also have it make decisions on the basis of the reading to control |
| 57 | +items such as a water pump. |
0 commit comments