Heating oil fuel gauge that is compatible

There are many pre-made tank level sensors but you might consider rolling your own.

Option ONE: Using a SR04 type ultrasonic or laser TOF/LIDAR devices to measure volume. These are a common starter project using Arduino, ESP8266, ESP32 and nRF devices. You measure how far from the top of the tank the current oil level is, and by process of subtraction from full and empty, you calculate how much is left.
Certain assumptions are made: your tank has parallel sides, or if not, the height of the oil level is proportional to the volume remaining.

Instructables website has many, many examples. This is the very first one a quick search found. Carefully check the pros and cons of each design shown. For instance, this one is rechargeable battery powered, but that issue has conveniently been ignored as to how to keep the battery charged. If you already have suitable power next to the tank for a pump, using it for a sensor board should be simple.

Do your research and come back with what you propose. You may rise to the challenge to design and build something, or you just might want to buy something that just works. Be acutely aware that your first choice may not be final - experience of hitting obstacles in your way will lead to redesign of your requirements, so go buy the cheapest ESP32, SR04 sensor and have a play before you lock yourself into the final design, and learn along the way.

Issues to consider:
How are you going to power it? Do you need power 24/7 or a simple solar panel to take a few measurements during daylight hours? Will a simple phone charger provide enough power? A power hungry ESP32 vs a BBC MicroBit board?
How to mount it to prevent rust and spiders from affecting it inside your tank lid?
Are the fumes from the oil going to degrade any plastic components?
ESPHome, Tasmota, MQTT, start from scratch, or modify an existing device? Tuya compatibility? Can a generic device be reflashed with your own code?
Do you already have any parts lying around you can repurpose? Old Raspberry Pi, ESP development board, parking sensors, cell phone chargers, long wire runs, etc?
Reliable communications to get your data into the HomeAssistant automation ecosystem. Wireless WIFi, BLE, LoRa, 433Mhz, hardwired RS485, etc.
How often do you need to check the level? Every second, every hour, every day, every week? Is consumption consistent, or intermittent?
Do you need to know to the thimbleful how much you have left? Is tank empty, one quarter full, half full, three quarter full, etc good enough measurement granularity? If so, a simple float switch with four levels is going to be easy to implement.
Parking sensors built into your car fender/bumper bar also can be sourced from your local car part breaker/wrecker that are designed for robust outdoor survival. Their range/distance of measurement may be good enough for your tank height. Read the data sheet carefully to ascertain suitability.

Option TWO: The old farmer’s ‘float connected to a piece of string hanging over the edge of the tank on a pulley’, monitored by a camera is another option.

Option THREE: You may be able to monitor volume consumed by a simple flow meter in-line with your tank outlet pipe. You would have to reset the starting point each refill of the tank. Each pulse measures a given volume of flow, and you just count the pulses and subtract them from the total tank volume to show what is left. You could locate this flow meter at point of consumption, not necessarily at the tank itself but at the other end of the supply pipe, thus saving on wiring, power and data transmission overheads. Be sure your flow sensor is rated for oil, not just water, and is of adequate diameter connection and suitable flow rate, as you will not have high flow rates and the readings will be mostly approximate if the consumption is start/stop. Add a safety isolation shutoff ball valve next to it in case it breaks in use, as often they are only plastic. This one was mains powered, and could have easily been powered off a phone charger instead. The discussion on how to wrangle the yaml code to get the correct sensor data will be edifying.

Some places to start for option ONE:

Some light reading, and you should be confident to build your own.

2 Likes