Water level control box

A nice little and practical project that I’ve been practicing a bit with.
It’s a water level control that works over the internet and visually with a display. An ultrasonic sensor and an ESP32 controller are used.
I’m relatively new to the wonderful world of electronics with this type of parts and it’s nice that my ugly soldering is hidden on the inside of the box :wink:

The control box has a little Velcro on the underside and is placed by the water tank in my RV. While I was playing with the small electronic parts and programming the gadget, I found a controller that will be able to handle it all in a quarter of the space my box takes up now, that will be another project…
The box itself is drawn/made in LightBurn, it’s 3mm baltic birch plywood and 3mm Acrylic as a cover plate. Everything is (as always) a little too tight, so no screws or glue are used. :wink:
The holes (Ø12) for the ultrasonic sensor, I have also cut with my laser in the blue cover, it is PE approx. 6mm thick. The sensor is screwed to an acrylic plate which fits perfectly and tightly into the design of the tank cover.

8 Likes

Nice! Maybe you should do an Instructable on this.

I would be interested in the details. Could you Message me about it? I have a friend that is soon taking a 9-month RV trip.

I have sent you a PM.

1 Like

I would also like to hear about your project - I’ve tried to do this in my Campervan using capacitance on a plastic tank, but it varies too much with environmental factors. Now I’m using 5 gallon Cornelius kegs so metal - capacitance won’t work, but an tof ultrasonic sensor could.

1 Like

This is what I wrote to Mike,
I sent it as a PM because I figured no one else would be interested in such a long description…, but here it is.

Thanks, but besides the fact that it looks technical and the box I made in LB is cute, it’s actually pretty low-tech :wink: .

In most RVs there is a water level gauge that only indicates in 3-4 steps and after a few years the 4 pin system only shows full or empty and this is not accurate either :wink:

You can buy professional solutions that can even be integrated into the RV/ship’s bus-controlled electrical system, but it has a proud price.
“My” solution is far from optimal and has too many components.
If I want to make it today, I will make it with the same sensor, but with an ESP32 C3 or C6, they have a built-in small display and Li-Po charger on board, so the only thing missing is a battery…For about 30 to $ 35 US you can build the same, just smaller and more professional.

The program is not complicated, in fact I can barely program but get a lot of help from DeepSeek. I’m sure the other AI solutions can help just as well and help with writing the little program.

I’ve programmed the controller so that it has an AP, I select it on my phone and enter a fixed IP address. On it there is a very simple graphic display of the water level and there is also the possibility of fine adjustment/compensation.

In the program there is a part that converts the measured height from the ultrasonic sensor to a volume value in liters.

It can also be done over BT, but I couldn’t figure out how to make an interface for my iphone…, for Android systems it’s easy.

I’ve had all the parts lying around here in my workshop, so I used them to test and play with, it’s a bit clunky but works fine and I’ve had a good time and it was fun.

In my next version I’ll also use something like deepsleep, i.e. the system goes into sleep until “I want to know how much water I have”. The battery should last up to several weeks until it needs to be charged directly via USB-C.

In 14 days I will have my RV back home, it is in winter storage right now, then I will install my system and calibrate it. Then I will test how stable and precise it is. But, with what I have already tested, it works as expected.
You are welcome to write if I can help you further, but remember, I am only an amateur :wink:

Greetings Bernd

4 Likes

I would love to hear more about this specifically. I just realized last month that I need an ultrasonic sensor on the bottom of my galvo tower connected to a small DRO that shows me the exact height to the objects surface. I am quite tired of measuring with a focus stick, and feel this is the true end game for Z height.
Any info on the sensor and any circuitry/modules that you use would be a huge help. I am definitely going to dive into this.

Hi John,
I have been toying with the idea of ​​making an automatic height adjustment/focusing for my laser, it is certainly possible. I even had a test setup where I could precisely see and hear the distance from the sensor to the machine bed.
As a sensor I will use an ultrasonic type sensor, for example HC-SRO4, which is one of the cheapest at $2 or as I have good experiences with an “a0221au ultrasonic sensor” which costs around $20. There are quite a few useful and cheap sensors, I would value one that has a low starting measurement, i.e. can measure down to a few cm/mm distance, it may be a “short distance meter”, a car distance sensor also works fine.
As a microcontroller I will choose one of the nice combined types with an integrated display on one side. “ideaspark® ESP32 Development Board 1.14 in ST7789 135x240 TFT LCD Display,WiFi+BL Module,CH340,Type-C for Arduino Micropython” or “T-Display-S3 ESP32 S3 with 1.9 inch ST7789 LCD Display Development Board WIFI Bluetooth5.0 Wireless Module 170*320 Resolution” are some examples, they cost between $10 and $25, depending on where in the world you shop.
You can also use a cheaper processor and connect an external small OLED… there are many options. If you only want to see the height, the simplest is to use a small Li-Po battery and connect USB-C when it needs to be charged, the charger is usually integrated into the ESP32 modules. (You can also put a 5V cable directly up to the ESP32.)

This provides an extremely compact and neat solution.

Programming is, as I wrote in the first post, no problem. It is done in Arduino IDE or MicroPython and there are many examples for direct down/upload to the processor, otherwise the nice AI lady will be happy to help :wink:
You can decide for yourself from where to where the distance should be measured, compensate and fine-tune and set it up as for example. Focus 0 point. I made a small LED bar that indicated how close from 0 I was, I also tested a beeper in this setup, it all works very well and was very funny and educational for me.

3 Likes

I built a system to show toggle through graphs and be somewhat configurable based on ESP32s. The display was some flavor of ESP32 T-Display and cost around $5 from Aliexpress. My code had a http server built in - so it could be accessed by a phone (if you connected to it’s network - or you had it on the same network). I did not ever go down the bluetooth path.

I had a noname power system that was not connected, and had it’s display in an impossible to see place. So the system was built around independent units. I had an ESP32 Camera module that displayed the remaining power and two straight ESP32s that were trying to monitor fresh and gray tanks. When I replaced the power station and I couldn’t get the capacitance sensing to work I dropped the project. I didn’t think that the tof sensors would work with clean water so didn’t try that.

If I get time I might try to restart using an ultrasonic distance sensor. Thanks!

1 Like