Keeping An Eye On Heating Oil

Energy costs around the world are going up, whether it’s electricity, natural gas, or gasoline. This is leading to a lot of people looking for ways to decrease their energy use, especially heading into winter in the Northern Hemisphere. As the saying goes, you can’t manage what you can’t measure, so [Steve] has built this system around monitoring the fuel oil level for his home’s furnace.

Fuel oil is an antiquated way of heating, but it’s fairly common in certain parts of the world and involves a large storage tank typically in a home’s basement. Since the technology is so dated, it’s not straightforward to interact with these systems using anything modern. This fuel tank has a level gauge showing its current percentage full. A Raspberry Pi is set up nearby with a small camera module which monitors the gauge, and it runs OpenCV to determine the current fuel level and report its findings.

Since most fuel tanks are hidden in inconvenient locations, it makes checking in on the fuel level a breeze and helps avoid running out of fuel during cold snaps. [Steve] designed this project to be reproducible even if your fuel tank is different than his. You have other options beyond OpenCV as well; this fuel tank uses ultrasonic sensors to measure the fuel depth directly.

70 thoughts on “Keeping An Eye On Heating Oil

    1. Unfortunately, in many places, that “electricity” thing isn’t reliable enough or/and sufficient in supply to use for heating. There may be no other viable option. Natural gas is available where I am (northeast US), and I need a no-electricity-required option due to the frequent loss of power (which, fortunately, with hydronic isn’t as hard as it seems) I’d live to be able to go to heat pumps, but there isn’t enough solar available during heating season and the utility fails to meet its obligation. Years ago, I live in a rental with oil-fired steam heat. No electricity at all for that one. I never looked closely at how the burner worked, but it was ancient even then. The tank was outside and the burner was in the basement, so it was gravity feed that far.

        1. Electricity works great right up until it doesn’t.

          For whatever reason, the utility company did a great job keeping the gas lines buried but then strung the power lines practically from tree to tree. Electricity goes out every time the wind blows or snow falls.

      1. If the heating system ran with no electricity then you had ancient gas fired thermopile system. It used the pilot to generate millivolts to operate the gas valve just like a gas fired water heater.

    2. Yeah, why burn fossil fuels when I can pay someone else to burn fossil fuels and provide me with the electricity!

      As stated by others, electric heating is often WAY more expensive.

      1. Because a heat pump can move 500-600w of heat from outside your house to inside your house using only 100w of electricity. Even at the $0.16-20/kWh they’re charging for electricity here in PA, that’s still cheaper than $5/gal for heating oil (which is usually just #2 diesel without all the taxes). Burning fossil fuels or using electric space heaters are at most 100% efficient. But electric heat pumps can exceed 100% efficiency.

      1. 100% increases approved by Governor Sununu, for Eversource (his biggest campaign finder).

        It’s a farce: 50% of NH’s power comes from Seabrook (nuclear), tge rate increase means corporate profits are doubled.

        1. Largely the huge price hikes come from Seabrook providing incredibly expensive power, and since natural gas prices are high they are not pulling down the price. I don’t have any issues with the safety of nuclear power but the issue is due to financing construction costs it tends to not be cheap power.

    3. Oil is very common for heat and hot water in the Northeastern US, and using electricity for heat tends to be very expensive here. When you buy a house, you’re stuck with whatever sort of infrastructure it has, unless and until you’re willing to spend a lot of money (tens of thousands of dollars, possibly) to convert to another type of system.

  1. In the US northeast, heating with oil is pretty common, and it’s surprisingly efficient as well (in these parts resistive electric is by far the most expensive option, heat pumps are pretty efficient but struggle when it gets deeply cold).

    In my case the oil tank is under the stairs and is fitted with an old fashioned float gauge – since the location is right next to the closet my network gear lives in, I have a Raspberry Pi perched where it can take a photo of the gauge once-per-day (or on-demand), lighting up a few white LEDs for the photo to provide sufficient light. No auto-reading (yet), but it’s a quick-and-easy check every few weeks to see how much we’re consuming and order oil more when appropriate.

    Same Pi also serves as a network monitor and power monitor (cabled to the UPS to pull stats and trigger actions if we lose utility power), and I’m fitting it out as a network backup as well (if ISP goes down, which is likely in winters, the Pi will take over ISP duties using a cellular hotspot so everything on the wired/wireless home network will continue to run seamlessly, although slower).

    1. What do you call “deeply cold”?

      Most areas of the US are served by a heat pump using R410A that can heat the inside of your house efficiently to 15°F outside temperature.

      Locales that need to deal with lower outside temperatures can use newer more modern tech that heats the inside of your home efficiently to 0°F outside temperature.

      1. Like the two heat pump mini-splits in my son’s place that fully heat his six room house overlooking the Gulf of Maine? Or the three that heat my 4000 sq ft house in NH with $2000 of electricity instead of $3500 of oil? No supplemental

        1. It is a multi part issue. Southern NH has a design temperature of around 7-8F. So 99% of the year will most like be above those temperatures. That is easily within the operating temperatures of of modern heat pumps. But a large issue is that BTU output from a heat pump falls as outdoor temperatures fall. While the BTUs required to maintain the house temperature goes up as temperatures fall. So just because a heat pump can operate at a temperature doesn’t mean it can actually heat the house. The solution is to install larger heat pumps to compensate for the loss in capacity as temps drop, but there is a limit because residential heat pumps max out at 5 tons approximately 60000 BTUs. This makes it so decent sizes house might require multiple heat pumps when before they only need one 150000 BTU oil boiler or furnace.

          All of this factored in I fully switched my house from Oil over to an air source heat pump with electric heat strip backups.

          Also check the link below to figure out the design temperature for your area. You might be surprised what it is.

      2. Heat pumps don’t work in winter for most of Alaska. Here in Fairbanks, the most northern “city” in the US, temps from Oct though April are routinely from -30F to +20F. Heating fuel and wood heat are the norm around here. Heat pumps just won’t cut it.

    2. I switched from oil to resistive electric and found to my considerable surprise that electric was slightly cheaper. Just doing BTU-to-BTU comparisons don’t tell the whole story. Resistive electric is close to 100% efficient once the electricity is in the house, an oil furnace might be 85%. An oil furnace will pull cold outside air into the house, usually through cracks throughout the house unless explicit provisions are made to control input air. With resistive electric, it’s easy to make zones roomsize or even smaller. Finally, oil heat systems FAIL: tanks and pipes and exhausts leak, burners don’t burn. Repairs are outrageously expensive and repair organizations are only occasionally competent.

      I personally am $60,000 poorer because an underground tank rusted out and leaked, and state law required cleanup before the house could be sold.

      1. I had one of those.

        Use an optocoupler on the oil burner AC line. This gives you a logic signal when the burner is on. Next, when you have your burner serviced, ask the tech to tell you what nozzle is on there. Mine (fortuitously) had a 1 gal/hr nozzle, meaning (you guessed it) it used a gallon an hour.

        Last step is to hook a timer to that logic signal, and reset the timer to the number of gallons in your tank when it gets filled. Subtract [nozzle size] gallons for every hour that logic signal is active.

        Since mine was 1 gal/hr, I took a shortcut and found a 120VAC resettable hour meter (like this ), which gave me a direct readout of the number of gallons used since the last fill (assuming I remembered to reset it)

      1. My house (built in 1723 and move to its current location in 1835) had a 1000 gallon oil tank buried outside next to the house. Needless to say, that was removed and soil tested prior to my purchase.

        Meanwhile I have a typical 275 tank in my basement, that is sometimes forgotten…So this is a good hack. Thank you.

      2. Yup. Remembered the surprise when that got pulled out of the ground. It did put out some great heat for the time. Had a wood burner down there one time, but that was a pain to deal with. Moved outside and ran hot water inside. Still a pain especially keeping the couplings from degrading and leaking. Plus the wood/coal and the ash.

      1. I took this as commentary on the article’s commentary. Oil heat is very common and I’ve never seen an oil tank installed where it couldn’t be checked pretty easily. The author sounds out of touch to anyone who lives with this day to day, and there are a lot of us.

        1. Project author here. My tank is in a dark corner of my basement workshop. It’s not so much that it’s difficult to check on it, but more the fact that it’s easy to forget to do so. It’s made worse that I’m on “automatic” oil delivery from my provider, but their deliveries are just based on vaguely informed guesses about my usage. I’ve run out before, and deep in the middle of New England winter, that sucks. Because it’s been their foul-up with their algorithm, I’ve never had to pay any extra fee, but it is still a hassle.

          My elderly parents have an outdoor tank under a 3 foot tall crawlspace under part of their house, so it’s a real pain in the neck (literally) to check the float gauge.

  2. I did a similar project using a Raspberry Pi Zero W & a SparkFun VL53L1X time of flight Qwiic breakout board (SEN-14722) to measure the fuel oil level directly.

    I epoxied the VL53L1X ToF board inside a pipe cap, looking out. I attached the pipe cap to a short piece of pipe and that pipe into an unused port on the top of my oil tank. The Qwiic cable was routed out a hole drilled into the pipe cap and sealed around the cable with more epoxy.

    The reported sensor distance is a little jittery, so in my python code I read it 50 times (takes like 1-2 seconds) and then it takes the average of those readings and uses that distance to calculate the volume and quantity of oil remaining. This data gets saved to a CSV file every hour and then I use dygraphs to make a pretty webui graph on the Pi. This data also gets fed into Home Assistant where I do a rough “Days till empty” calculation by divided the remaining oil by total oil used in the last 7 days.

    I’m not sure how calibrated it is (I manually measured from sensor to oil level during my first fill up with a ruler) so the total may be 1-2 gallons off in a 275 gallon tank, but the daily delta is pretty accurate, I checked it with the boiler run time per day times gallons used per hour and everything lined up.

    It’s been running for a little over a year so far and I’ve had no issues at all.

    1. That’s definitely the right way to do it, and I may eventually build one like that. I liked this approach for the non-invasiveness, especially not violating UL safety regulations or local codes that might impact homeowners insurance. There’s also a certain Rube Goldbergian charm to it.

      1. To each their own, I didn’t worry too much – per the internet “heating oil has to be heated to 140°F and vaporized before it will ignite”, the fact that the tank is always vented to the outside, and that is grounded through the oil feed tube to my boiler, there’s not really a safety concern IMO.

      1. The ONE time I used multivariable calculus outside of school, was to calculate the number of gallons remaining based on the stick reading (I had a spherical buried tank, and the oil company had no table for it)

  3. You also might want to consider a beefier than average padlock to keep an eye on your exterior oil tanks this winter. Some “scallywags” will be out with the siphoning gear for sure.

      1. You could probably go with something like a real estate agent’s door lock … put the actual padlock key in the combo-locked case, then make sure the delivery company has the code documented with the account. Most delivery companies have a field in the order/account for delivery instructions.

        Seems wrong for Hackaday, though – a locking mechanism that can auto-unlock when detecting the oil delivery company would be cooler! (“Is there a big truck in the driveway …?”)

  4. I worked for a candle company for a while and our storage, batch, and station tanks were monitored by ultrasonic level sensors. A quick internet search shows them available however intrinsicaly safe ones are pricey. I would think one of these coupled with a microcontroller and properly calibrated would get you to within ounces and maybe less. I do like the authors solution though!

    1. I did exactly what you said. My heat oil uses a simple ultracsonic sensor hooked up to an esp-32 on home assistant. Built and programmed it in about an hour and never had issues since. This project is the most over designed thing I’ve ever seen.

      1. Antiquated? Dated?

        Heating oil is on the cutting edge of renewables generation reducing emmissions and dependence on fossil fuels.

        It contains more energy in it than propane, natural gas, wood, electricity, etc. Its burns cleaner and more efficiently than other fuel sources as well with the newer equipment available today.

        All you monkies preach electricity but it comes from fossil fuels and cost triple what oil does to heat a home with in the Northeast. Those windwills and solar panels you all drool over use far more diesel fuel to produce than they will ever displace. Wake up. Electricity is not now and will never be our savior.

  5. As someone who works in the Home Heating Oil industry, this article is laughable and can’t be serious right? Antiquated? There are so many modern products to monitor your fuel levels, the efficiency of equipment is fantastic once the old “antiquated” system is replaced and with the blending of bio-fuels quickly accelerating from B5 to B20 and beyond to B100 someday, the fuel is largely becoming a renewable fuel.

  6. I also have a ToF sensor on my oil tank. It connects to the wifi (esp8266) and serves up a page that has the tank level and also the temperature values for various parts of the heating / hot water system so I can confirm it’s working. Apparently oil tank levels are a very popular target for hacker interest here, haha.

  7. Ping the tank. Literally. Measure the resonant frequency of the air volume. Don’t like to do FFTs? Then just push a known volume of air in and measure the pressure change. Infer from that how much volume is not air: “Air-displacement plethysmography ”

    This is used every day to measure the volume of both people and cows — put either in a tank, measure their volume, compare with their weight, compute density, infer how much is fat… lots of money in it. The human version is the Bod Pod.

  8. I’m surprised no one has pointed out that merely burning oil for heat is as inefficient a way to use that oil as running electricity through a resister.

    Just as we can use electricity to power an electromechanical heat pump, we can use oil to power an absorption heat pump, which can heat and cool one’s home.

    Or, we can use oil to power a cogeneration system, which makes both heat and electricity.

    Or, we can use oil to power a trigeneration system, which creates warmth, coolth, and electricity.

  9. I’m mystified by the claims you can use an oil burner to heat your home without electricity.

    I’ve used a pot stove to keep a cabin warm (using Jet A-1, no less :-) ) which is gravity fed and requires no electricity. But they’re pretty awful to heat a house except in an emergency situation: inefficient, dangerous and high maintenance.

    Any oil furnace I’ve seen requires electricity to run the blower and oil injector pump, electricity to run the igniter and electricity to run the air handler too.

    I’ve lived with electricity-free *gas* water heaters and gas furnaces (pilot light and millivolt thermocouple-driven gas valves), using convection (no air handler) for air circulation. But I can’t see it work with oil. Any examples available?

  10. I was fortunate enough to have an electric outlet near my oil tank in the basement, for $18, I purchased a WiFi camera that I can check from anywhere I have a data signal right on my cellphone, no more trips into the basement to check the level. Sweet!

  11. I know its not the Hack-a-Day way but there is a commercially available IOT device to do this, the benefit is it replaces the in tank sensor as well.

    The basic float sensors are notoriously inaccurate, in my 275gal tank it can be off by 30-40 gallons.

  12. I’m using a Beckett rocket gauge for 6 years.. super simple to install in my basement oil tank and I plugged the receiver into a wall outlet in my kitchen that I see multiple times a day :)
    It works great and since getting to my basement is via an outside hatch door, this Beckett gauge saved hassle & stress of wondering when I need to prepare for an oil delivery.

    On another note I installed a Fujitsu VRF heat pump and had my first winter 21-22 with it. My house was way more comfortable with the Fujitsu then with my oil Viessmann because th heat pump likes to run on low vs the Viessmann let the house get colder then blows very hot air full throttle. And the annual cost saved me $ with the Fujitsu.
    The Fujitsu’s nice consistent comfortable temp felt like last house that had baseboard hot water.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.