A couple of months back I was lucky enough to win an Arduino starter kit from the folk at Mindkits. With the Christmas break upon us we’ve finally had some time to get our first project underway – a wireless water tank level gauge.
Our main water tank for the farm is out of view of the house so a visual water level gauge wouldn’t be much use. Most of the time we can only tell when the tank is empty the hard way, although I’ve added some plumbing to the tank so we always have some water in reserve.
The first task was to find a simple, robust way of physically measuring the water level. I got an idea on this blog about using a string of resistors on a pole that short out below the water level, giving you a variable resistance that can be read by the arduino. In theory, all you needed was a long enough string of resistors running down a substrate, with a return path for the current.
Here’s Dave with the first prototype to prove the concept – resistors soldered together and hot-glued onto a piece of polybutylene plumbing pipe. There is a piece of nichrome wire hot-glued on the back to complete the circuit.
Dave and I breadboarded this prototype and it worked! By worked, I mean we got varying numbers returned by the arduino as the gauge went up and down in the water. We still had to determine if the numbers meant anything, but I felt that part of the process sat more with Dave as the software guy than me as the fabricator :-) The arduino is the little PCB attached to the blue USB cable.
The next step was a full-size prototype (although it will probably become the actual gauge). Once the tank was measured I cut some aluminium channel to length and mounted a longer piece of polybutylene down the channel. 20 1k resistors got soldered together and hot-glued down the length of the pipe. This should give us 5% increments of water level. I added cable ties as a backup to the hot glue in case the water in the tank made it too brittle to stay attached. In this picture you can see the leads attached for easier testing.
The final step in the prototyping was to take the contraption outside to a water tank near the house to test and calibrate the gauge in a real situation.The resistance varied as the gauge was submerged more or less in the water. We collected values at 0%, 25%, 50% and 100% submersion and the resistance values that came back are very close to a linear relationship (close enough to assume it’s our measuring that’s out). This means we can interpolate a fairly granular level of water measurement from the resistance levels returned.
There are a few more steps in the project now:
Wireless comms – we’re looking at using the farm’s existing 802.11 wireless network to send data from the gauge approx 200m back to the house.
Solar power – the arduino will happily run on 12v DC so a small solar cell and a car battery should keep it running 24/7
Software – Dave has volunteered to write a web app to present the data in a prettier form.
Phase 2: once we’ve got the gauge running well, we can look at future features that go beyond passive monitoring like alarms based on water level, auto-starting the water pump, calculating flow rate and tripping alarms or a shut-off servo if the flow is too high for too long (indicating a pipe break) – the possibilites are endless.