Renewable Energy and Sustainability Forum
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Anyone wishing to register as a new member on the forum is strongly recommended to use a "proper" email address - following recent spam/hack attempts on the forum, all security is set to "high", and "disposable" email addresses like Gmail, Yahoo and Hotmail tend to be viewed with suspicion, and the application rejected if there is any doubt whatsoever
Recent Articles: Navitron Partners With Solax to Help Create A More Sustainable Future | Navitron Calls for Increased Carbon Footprint Reduction In Light of Earth Overshoot Day | A plea from The David School - Issue 18
   Home   Help Search Login Register  
Pages: [1]   Go Down
Author Topic: My 1.99 oil tank monitor  (Read 1151 times)
Full Member
Offline Offline

Posts: 143

« on: December 15, 2017, 07:14:22 PM »

A friend gave me a spare watchman that he didn't need.  I replaced the batteries and it worked OK for a while but the readings were a bit flakey and then it just stopped working altogether.

So I finally decided to do something about it.  I love messing with Raspberry Pi's so decided to see what I could do - turns out that ultrasonic measurement isn't difficult.
So I grabbed a spare Pi Zero W some wire and a HC-SR04 1.99 ultrasonic sensor from eBay.

A bit of messing around with Python and I now have the sensor mounted on top of the tank and every 30 minutes it measures the distance to the surface of the oil from which I can calculate the depth of oil (it actually takes 10 measurements and averages them out) and then uploads some data to my Initial State site where all my temperature and power data is also sent.


in a waterproof box on the tank

data displayed by Initial State

It's accurate to within about 3mm and I've also written the app so that it worksout how many days oil we've got left and emails my two suppliers when the level gets low to ask for quotes.

Happy bunny, should have done it years ago and saved the agro of running out a few times!

Hero Member
Offline Offline

Posts: 2206

« Reply #1 on: December 16, 2017, 06:07:53 PM »

love it!
Sr. Member
Offline Offline

Posts: 294

« Reply #2 on: December 16, 2017, 06:35:11 PM »

Nifty genuflect

I,m just using the same idea to build an movement sensor to ring the doorbell when anyone walks down our driveway....


4kwp south facing array  SMA 4000TL grid connected.  2x30tube Navitron solar thermal panels (east/west). Arada 5kw S/C WBS. 25000Ltr underground rain water tank. KTM E-Bike  Cool
martin W
Hero Member
Offline Offline

Posts: 700

what do you mean my snoring is too loud!

« Reply #3 on: December 18, 2017, 06:18:45 PM »

 genuflect genuflect genuflect genuflect genuflect

Woodstove owner since Feb 2011 Tongue (yes it's finally off the pallet)
Solar Water Heating since 17th March 2009, 2.94kW PV since Dec 2011
Chicken Owner - Self sufficient in chicken c*@p, boy watch those tomatoes grow. Allotment owner since August 2011
Now an Lister wannabie Tongue
Jr. Member
Offline Offline

Posts: 78

« Reply #4 on: December 22, 2017, 07:56:20 PM »

Hi Sharkbait.

Well, your post has finally got me to buy a Raspberry Pi to try and do the same. I could do with learning how to programme the thing really, as I have no end of ideas of what I could monitor with one. I also noticed that they now have wireless interfaces, so that I don't need to bother too much about running network cables, power is all it needs.
Problem being that I have until now always avoided python but it looks like that's the way to go....

I got the pi booted with raspian now and it's on the network, hurrah.

Any chance you might be willing to share your code so I can hack it around and learn what I'm doing?

Pages: [1]   Go Up
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines
Simple Audio Video Embedder
Valid XHTML 1.0! Valid CSS!