Tag Archives: electronics

Wireless PICAXE-based water tank level sensor

[ad name=”posts-ad-1″]

Water level graph
Water level graph – February 11 2010

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.

The sensor consists of two components, each housed separately and joined by shielded cable.

Pressure sensor

Pressure sensor
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.

Pressure sensor fitted to tank outlet

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.

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.

Sensor circuitry

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.

Sensor circuit and 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.

Base station
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.

Base station

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.

PC interface
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.

PICAXE sketches

References and related links

 

[ad name=”posts-prymont-v2″]

Arduino based Thermor/BIOS weather station receiver sketch

[ad name=”posts-ad-1″]

I have finished documenting/cleaning the code for my Jaycar el-cheapo “Thermor/BIOS” branded wireless weather station receiver. The basis for the code comes from the Practical Arduino weather station receiver project.

In the end all it took was a week of analysing the RF signal from the weather station using my soundcard and wasting countless hours decoding the packets! And a little determination.

Receiving the signal is pretty straight forward – an RF receiver is connected to pin 8 of the arduino via a 1k resistor, and an LED via a 330ohm resistor to pin 6. See the Practical Arduino schematic for more info – it is essentially the same circuit, just minus the LED on pin 7.

You can also take a look at the ThermorWeatherRx Protoshield I soldered up after the recent SparkFun freeday.

I have uploaded the sketch to github: http://github.com/kayno/ThermorWeatherRx for anyone else to try. There is a small to-do list for me to complete, but that can happen later.

[ad name=”posts-prymont-v2″]

arduino weather station receiver shield

[ad name=”posts-ad-1″]

arduino weather station receiver shield
Arduino weather station receiver

Based entirely on the Practical Arduino Weather Station Receiver project, I have created my first arduino shield.

I have a BIOS/Thermor DG950R weather station (purchased from Jaycar), and whilst the Practical Arduino project sketch is for a La Crosse weather station, I have rewritten the Practical Arduino code to receive, decode and output the weather information from the DG950R. This allows me to capture the data, and store in a database.

Once I have finished fine tuning the sketch for the DG950R, I will upload it for all to see.

Update: A further post contains links to the sketch/code: http://kayno.net/2010/01/18/arduino-based-thermorbios-weather-station-receiver-sketch/

[ad name=”posts-prymont-v2″]