Wireless PICAXE-based water tank level sensor
Over the last few months I have prototyped and built a water tank level sensor for my 9000L rain water tank.
The design is based entirely on Silicon Chip’s PIC-Based Water-Tank Level Meter, but instead of programming PICs, I prototyped using an arduino, and built the final version using PICAXE microcontrollers.
An MPX-2010DP silicon pressure sensor (temperature compensated and calibrated) is mounted inside a small project case, and screwed directly to the water outlet of the tank. Water from the tank enters in via a 12.5mm threaded nipple, which is reduced to 3mm plastic tube connected to the pressure sensor.
Air remains in the 3mm plastic tube, and is pressurised by the water coming in from the tank. The more water in the tank, the more force that is placed on the air in the tube, increasing the pressure which is read by the second component of the sensor, the sensor circuitry.
The sensor circuitry consists of a 1.5V to 5V voltage step up circuit, an instrumentation amplifier to read the pressure sensor, a PICAXE microcontroller to convert the analog signal from the pressure sensor to a digital reading, and a 433MHz RF transmitter to transmit the water level and battery voltage to a remote base station and computer.
Apart from the use of an 18X PICAXE microcontroller, the circuit is essentially the same as the “Telemetry” version of the Silicon Chip project (schematic). I also left out the BCD switches as I only have one tank which negates the need for them, as well as the three-colour LED.
The 1.5V rechargeable battery is kept charged by a small solar panel.
The transmitted water level and battery voltage is received and displayed on an indoor base station, as well as being received by another RF receiver and 08M PICAXE built on a breadboard and connected to a PC, which stores the level in a database for displaying the water level on the web.
Again, the design has been based on the Silicon Chip project and the third part of their article, however the circuit was something I put together with an 18X PICAXE. I also used a “white on black” backlit LCD display, and interfaced it to the PICAXE using this PICAXE LCD interfacing guide.
My base station does not have four buttons like Silicon Chip’s, however they were not required as I only plan on reading data from one tank, and have no need to control pumps.
The simplest part of the whole project! An 08M PICAXE reads the incoming water level and cell voltage from an RF receiver, and transmits the values out over the PICAXE serial download cable for the PC to record. There is also an LED that flashes when data is received.
If you are wondering why I used PICAXE microcontrollers, I can explain in two brief sentences. The straight forward answer is because of their ease to program, compared to a PIC. The long winded answer is ‘evolution’ – I started this project using an arduino to read the pressure sensor, then I wanted to go wireless, then I realised an arduino was overkill for one ADC conversion, plus I don’t have a PIC programmer, etc, etc.
Tank level sensor, PICAXE 18X
References and related links
Silicon Chip’s PIC-Based Water-Tank Level Meter
MPX2010 differential pressure sensor
Instrumentation amplifier on wikipedia
Practical Arduino Water tank depth sensor
For more detail: Wireless PICAXE-based water tank level sensor
JLCPCB – Prototype 10 PCBs for $2 + 2 days Lead Time
China’s Largest PCB Prototype Enterprise, 300,000+ Customers & 10,000+ Online Orders Per Day
Inside a huge PCB factory: https://www.youtube.com/watch?v=_XCznQFV-Mw