Monitor Heating Oil Tank Gallons With Email, SMS, and Pushbullet Alerting

by ventz in Circuits > Remote Control

3906 Views, 30 Favorites, 0 Comments

Monitor Heating Oil Tank Gallons With Email, SMS, and Pushbullet Alerting

2017-11-10_20-04-36_461.jpeg
2017-11-10_15-08-30_105.jpeg
alert.png

SAFETY INFORMATION: In case anyone wants to know if "this is safe to build/install" -- I have taken this to 2 different Oil companies for feedback/safety considerations, and I have run this by the fire department's Fire Prevention Deputy Chief. Per all 3 - the device is considered completely safe with no risk of fire or explosion. That said, I cannot control your individual environment/what you do with it, so please assume your own risk when installing it. Per the oil companies - electric sparks/open flames will not ignite the oil, so there is no possibility of catching fire/explosion/etc. Nothing compresses/creates a vacuum/creates air pressure to cause an explosion. My favorite quote was "even if you flick lit matches in your oil tank, it will not catch on fire."


This is a very quick and easy DIY build for a system that lets you monitor your home oil tank level (in *exact* gallons - down to the 10th of a gallon) remotely, and alert on different levels via Email/SMS/Pushbullet, etc.

The entire build is meant to be quick, clean, and less than $40!

The key parts are a Particle Photon for the "intelligence", a HC-SR04 for the "sound pulse" which will be used to measure the distance to the oil and using some data charts calculate the exact number of gallons avaiable, and a nice PVC shell for an easy build which can be directly screwed in into the tank.

I've made sure to provide a lot of images (especially of a few gotcha's) in order to make this as easy as possible.

For more information, background, and code (and feedback/comments), please go to my blog:

http://blog.vpetkov.net/2017/11/12/diy-monitor-heating-oil-tank-gallons-with-pushbullet-sms-and-email-alerting

PARTS NEEDED

2017-11-10_19-23-01_152.jpeg
2017-11-10_19-23-52_831.jpeg
2017-11-10_19-31-44_542.jpeg
2017-11-10_20-02-49_245.jpeg
2017-11-10_20-02-35_528.jpeg

1.) You need about $4-5 worth of 2" PVC:

a.) 2" Male Adapter (left side)
b.) 2" Female Adapter (right side)
c.) 2" Cleanout Plug (bottom/middle)

2.) You need a rubber gasket "sheet" that's ~3x3 or bigger. This is ~$1.25-1.50

3.) You need a HC-SR04 sensor. You can get 5-6 of them for $8-10 (don't pay more than $2/each).
This is essentially a "trigger"/"echo" supersonic module..

4.) You need a Particle Photon (wifi) - $20
(alternatively, if you don't have WIFI access, you can get the Particle Electron - more expensive, and uses SIM card that's $3/month)

5.) Cables -- Jumper cables (female-to-female), and MicroUSB cable+usbpower (not pictured - could be replaced w/ battery)

Mark the Circle and Cut It Out

2017-11-10_19-24-06_355.jpeg
2017-11-10_19-29-49_607.jpeg

Mark the circle size and cut it out. This will be used as a seal/barrier between the chambers. It will also protect your electronic components, prevent oil fumes, and add other safety solutions.

Don't worry about exact size for now. Make sure it's bigger rather than smaller -- you will trim it down eventually to fit perfectly.

Rubber Cement Male and Female PVC Together

2017-11-10_19-29-17_373.jpeg
2017-11-10_19-27-45_716.jpeg

Rubber Cement Male and Female PVC together as pictured.

The idea is two fold - create a secure PVC structure that has enough space to keep all of the components + keep any potential oil fumes out.

Mark HC-SR04 Sensor, Cut It Out, Fit It In

2017-11-10_19-34-34_833.jpeg
2017-11-10_19-35-02_402.jpeg
2017-11-10_19-30-25_833.jpeg
2017-11-10_19-30-39_931.jpeg
2017-11-10_19-38-08_659.jpeg
2017-11-10_19-39-38_166.jpeg
2017-11-10_19-40-34_646.jpeg
2017-11-10_19-37-49_568.jpeg
2017-11-10_19-40-42_766.jpeg
2017-11-10_19-46-48_291.jpeg
2017-11-10_19-46-56_619.jpeg

1.) You want to mark the sensor in the center of your disk.

2.) Cut +'s (PLUS/Xs), but do NOT cut out the holes yet. (it helps with the bending/accuracy to wait for this until the disk is the right size).

I've broken this into many images to show the problems you might run into:

a.) The FIRST problem you will probably run into is the folds (see image tags for examples). You don't want this. If you run into this, take it out, size the rubber disk down a little, and try again. Once it fits, take it out and then cut out the circles.

b.) The SECOND problem you might run into is the rubber gasket not being pushed all the way. You really want it to fit into the "lip" that's left between the male and female adapters. This is the PERFECT place to "tuck in" the rubber gasket. You can see it in one of the images.

c.) After you get a good fit (see images), take it out, and THEN cut it -- but make sure the circles are slightly smaller than the markings. You want a tighter fit.

d.) At last, rubber cement the edges.

Insert the HC-SR04 and Rubber Cement It From the Outside

2017-11-10_19-33-09_715.jpeg
2017-11-10_19-57-56_630.jpeg
2017-11-10_19-52-18_162.jpeg
2017-11-10_19-52-25_674.jpeg

The next step is to carefully bend the pins on the sensor so that they stick up. This will make it easier to connect to it when you have it inserted.

Insert the HC-SR04 sensor, and then push it all the way through.

Once that's done, use the rubber cement to "glue" the surrounding edges around the holes.

Connect Header Cables, and Add the Photon

2017-11-10_20-02-35_528.jpeg
2017-11-10_20-03-29_018.jpeg
2017-11-10_20-04-01_178.jpeg

Connect the female-to-female header cables to the HC-SR04. You need 4 of them.

1.) WHITE - to the VCC (5v)

2.) BLACK - to the GND (Ground)

3.) Purple - TRIGGER (D0 on Photon)

4.) Grey - ECHO (D1 on Photon)

You will want to connect a microUSB cable to power the photon. Ideally, you can route it through the square cap (the Cleanout Plug).

You Are DONE - Here's the Code

2017-11-10_20-04-56_687.jpeg
2017-11-10_20-05-03_924.jpeg
2017-11-10_15-08-30_105.jpeg

Final Product - you now just need to find one of the 2" `bungholes` on your tank, and unscrew the metal cap and screw in this.

The code for the Particle Photon, and some background can be found here:

https://blog.vpetkov.net/2017/11/12/diy-monitor-heating-oil-tank-gallons-with-pushbullet-sms-and-email-alerting/

If you have any comments/questions/feedback, please post a comment on my blog. I'll try to answer/help with anything that I can.

Particle Photon - Screenshots of Code/Firmware + Library

1.png
2.png
3.png
4.png
5.png
6.png
7.png
8.png
9.png

Hopefully this should clarify the:

What if you have never used a Particle Photon? Detailed Help on setup/code/flashing!

section from the blog.

It walks you through creating the "app", pasting the code, attaching the library, and then saving/compiling/and flashing.

Particle Photon - Web Hooks - Notifications (Pushbullet, SMS, Email)

Screen Shot 2017-11-26 at 6.44.48 PM.png
Screen Shot 2017-11-26 at 6.44.58 PM.png
Screen Shot 2017-11-26 at 6.45.09 PM.png
Screen Shot 2017-11-26 at 6.45.51 PM.png
alert.png

Hopefully this should clarify the:

What are these Web Hooks/Notifications – step by step instructions

section from the blog.

It walks you through creating the "webhook" - and some information about it.