Hello everyone, I wanted to share my recent project to automate and track my heating oil tank levels. This was a fun DIY challenge that I tackled to avoid the hassle of manually checking the oil level in the cold winter months. I know it might seem a bit lazy, but isn’t that the whole point of home automation? ![]()
The Project Overview
I decided to use an M5Stack AtomS3 Lite with a VL53L1X laser time-of-flight sensor. After experimenting with various sensor types like capacitive, ultrasonic, and pressure sensors, I found the laser sensor to be the most reliable and easiest to install. Here’s what I did:
-
Hardware Setup:
- Sensor Unit: The VL53L1X laser sensor accurately measures the oil level in my tank. It’s mounted inside a custom 3D-printed cap that screws into the tank’s 2" NPT bung.
- Power Supply: Since my HVAC unit is nearby, I used a 240VAC to 5VDC DIN power supply to power the ESP32, eliminating the need for batteries.
-
Custom 3D Printing:
- I designed a cap to hold the hardware, using ASA plastic for UV resistance. While the threads weren’t perfect on my first try, I used silicone caulk to ensure a water-tight seal.
-
Software Integration:
- I set up the sensor using ESPHome and created a YAML configuration to report the raw sensor measurements. The oil level is calculated by subtracting the measured distance from the tank’s total height (1067mm in my case).
- The data is converted into volume using a lookup table based on my tank’s specifications. Finally, a template sensor provides the oil level as a percentage for easy monitoring.
Results and Future Plans
The system has been running smoothly for a few weeks now. It automatically reports the oil level, and I’ve set up alerts for when the level gets low. While the initial setup was a bit challenging, especially with the 3D printing and ESPHome configuration, the end result has been well worth the effort.
I’m planning to upload the 3D model and complete documentation to make it easier for others to replicate this project. If anyone has suggestions for improvements or alternative approaches, I’d love to hear them!
This project not only solved a practical problem but also gave me a great sense of accomplishment. It’s amazing how a combination of hardware, software, and a bit of creativity can make our homes smarter and more convenient. Happy tinkering! ![]()