http://alaskanshade.blogspot.co.uk/2013 ... ow-to.html (for the hardware)
https://github.com/sculley/raspberry_pi ... -interface (design inspiration)
Some different shots of the hardware here:
- Drill two holes in the top of a brand new £800 oil tank (eeek! )
- Python script running as a daemon on the rpi - I know c type programs would give me a higher level of accuracy being lower level, but this pi is only doing one thing for me and a small variance in quantities I could accept.
- Once this script captures Indoor Temperature, Tank Temperature and Distance to Oil - It submits that to my webservice (just a simple form based webservice on a HTTP GET request)
- A PHP script on my server logs the request onto a MySQL database along with the calculated Tank Quantity - This was a lot of fun(!) because although the Tank was brand new - I had no clue what the exact internal dimensions of the tank were to calculate volume. What I did know was the tank WAS empty and I had 1000 Litres pumped into it from the oil company. So a dipstick measurement and some simple maths gave me a magical "Litres per mm" value. All I needed to do now was calculate the distance of the maximum quantity for the tank was in mm (1070 Litres) and then subtract that value from the measured distance value of the sensor to get the number of mm's remaining in the tank. Multiply that by your magical "Litres per mm" figure and hey presto you have an estimated (but pretty darned close) litres remaining reading.
- Finally theres a frontend page based on Scully's work that plots the internal & tank Temps as well as remaining quantity of oil onto a google chart (based on a php JSON file) and then some simple maths to work out litre consumption and costs per day.
- Thermal volume expansion of oils - this ones a new one on me but makes sense - I couldn't work out why the capacity of the tank was fluctuating so much (2-3 litres in the 1000 litres in there every day) - I then spoke to an chemicals engineer for an oil company and realised volume changes and there is a rule of thumb on the volumetric change - so I may be able to minimise the "jitter" in the code, but would appreciate any help people can give me on that.
- Dual Y axis google chart - so the scale isnt so skewed out showing 2 extremes (0-1000). Never got my head around Google Charts dual axis using a Json response (from the feeder)
- Other reporting, e.g. cost since last fillup, cost over last 7 days etc
- Integrate with my HotPi project - I wrote a little project last year that controlled the central heating via a Rpi and Relay board etc, I'd like to know when the boiler is turned on how much oil is consumed etc - Oil aint gettin cheap and I'd like to remote control the heating. This will take a while - I need to dust off the old vero board and get it working.
Let me know what you think