This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Non Invasive Tank Level Sensor build
Hello All,

I was interested in getting tank level measurements from my water and fuel. There were no access hatches at the top of the tanks, and I didn't want to drill holes unnecessarily. I had seen some projects which use capacitive sensors to provide an indication of tanks status being full, half full, quarter full etc. But I was wanting to understand 'fullness' as a percentage of the total capacity.

I had seen a handful of projects documenting a solution using a DS1603L Ultrasonic Level Sensor, together with some resistors and ESP-8266. I hadn't been able to get those to compile and my programming knowledge was non existent.

I was most interested in a solution that would send data to OpenPlotter and SignalK. The ESP-8266 is not supported on SignalK 2.0 or above and documented workarounds did not resolve the issues. So I ditched the ESP-8266 for a esp32 wroom from AZ-Delivery and set about learning how to stitch bits of python code and some libraries together.

Using a couple of projects documented here as inspiration I created this project. One sensor currently costs £25 on Amazon.

I'm completely new to programming - so if someone could tell me how I could make tank height and the signalK path for the level output configurable at run time that would be the icing on the cake (for me at least !?!)
  • Install the code on a esp32 wroom from AZ-Delivery using Visual Code. Before uploading the code go to line 148 and change the tank height to the height of your own tank.
  • Connect all four leads from the sensor to the corresponding pins on the esp32. The yellow lead of the sensor goes to Pin 16, the white to pin 17. Connect sensor ground to ESP32 Ground, and Sensor power to the ESP32 5v pin. Note, no resistors, or hardware serial converters etc are required between the sensor and the esp32.
  • Power up the ESP32.
  • The ESP32 will create a wireless access point. Connect to the wireless access point using the password 'thisisfine'.
  • Once connected to the wireless access point a Wi-Fi configuration page will be displayed on Use that page to connect to your boats Wi-Fi.
  • Using a mobile phone or similar that is connected to your boats Wi-Fi you will then be able to access the ESP32 using the address http://sensesp.local
  • From this portal you can check the status of the ESP32 and make run time configuration changes to Wi-Fi settings and sample rates as well as rebooting the device. At this point you can also change the device hostname sensesp.local to something more meaningful to your set up - e.g. watersensor.local.
  • Configure SignalK to accept data from the sensor following SensESP documentation
  • Test the sensor using methods outlined on this site.
I did this with capacitive foil sensors on the outside of my plastic holding tank and uses and ESP32 with SensESP to send info over wifi to Openplotter. Worked great. Sold the boat though and I don't know where my code is, but there should be a reference thread on here about it. Might have even posted the code. SensESP made it easy, as I am not much of a programmer, but was able to figure it out.

Forum Jump:

Users browsing this thread: 1 Guest(s)