TOF sensor - VL53L4CD on ESP32-S3 (T-DISPLAY) as a water level in a small 10L tank.

OH2323
Posts: 1
Joined: Tue May 23, 2023 10:40 pm

TOF sensor - VL53L4CD on ESP32-S3 (T-DISPLAY) as a water level in a small 10L tank.

Postby OH2323 » Tue May 23, 2023 10:47 pm

Hello all,

I need some help with a project I'm working on trying to help a disabled elderly family member. basically he have a 600L aquarium that stands on a cabinet, inside the cabinet are all of the aquarium support systems and one of them is small rectangular 10-15L that holds clean water with some nutrient/fertilizers mixed in ( can't remember exactly the name of this tank ) and every once in a while a small amount of water 100/300ml from this tank gets pumped up to the aquarium. its challenging for him to get up every time to check how full or empty the smaller tank is since he needs to squat/bend over to open the cabinet doors which he really having hard time to do. so I suggested that maybe I can help and put some kind of a sensor that will measure the water level ( in % ) in the tank and show it on a small TFT display that I can mount on the outside of the cabinet door. that way he doesn't need to unnecessarily go to the cabinet and check, only when actually that tank reads low and needs to be filled up.
I'm no experience coder and the whole sensoring application world is very new to me.

I actually experimented in the last 2-3 weeks with some sensors like the HC-SR04 ultrasonic sensor and the waterproof A02YYUW since I could find some very informative YouTube tutorials. it worked a bit but after very short time both of the sensors started to give inaccurate reading and one of them even stopped completely working.

so after more indept searching I came to find out abut the VL53L5CX and the VL53L4CD sensors that would perfectly fit my purpose, after reading a bit further I understood that the VL53L4CD would fit my needs better.

I used a LILYGO ESP32-S3R8 since it has a nice big 1.9" TFT display ON BOARD.

What I kindly want to ask, is if someone can help me out with a step by step of what i need for this project to work. I really don't need any fancy wifi/autmatic/blynk or any kind of extra applications just a straight up water level measurements that show up on the tft display as PERCENTAGE units. I know that some changes needs to be done to the sample code the ST provides for that sensor and that is basically where I need the help I'm looking for.
I'm working with platformio ( also have Arduino IDE installed but found it easier for me to work with platformio ).
I'm basically trying to recreate the ST YouTube video "Liquid Level Monitoring using ST’s Time-of-Flight: VL53L5CX"
but instead of output readings in mm id like a level %s.
hopefully, I've explained myself in a decent way since English is not my first language.
I'd greatly appreciate anyone who can work with me on this one as I'm pretty much ready to quit on this.

some additional info :
distance of the sensor when the container is empty is 30cm
distance of the sensor from water level when tank is full is 2cm

thank you in advance

MicroController
Posts: 1136
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: TOF sensor - VL53L4CD on ESP32-S3 (T-DISPLAY) as a water level in a small 10L tank.

Postby MicroController » Sat May 27, 2023 10:15 pm

Hmm. I'm skeptical about the reliability of using IR/LIDAR toward a water surface...

However, it should not be very hard to adapt the STM32 Arduino driver to ESP-Arduino. Is that an option for you?

First of all though, I would try and figure out what killed the other sensors. They may have succumbed to some connection or environmental factor which, if not corrected, might kill the next sensor as well.

greg-dickson
Posts: 24
Joined: Sun Nov 01, 2020 1:51 am

Re: TOF sensor - VL53L4CD on ESP32-S3 (T-DISPLAY) as a water level in a small 10L tank.

Postby greg-dickson » Sun May 28, 2023 1:49 am

I agree with MicroController
If you had something floating on the surface the sensor would be more reliable.
However
But maybe an even simpler solution would suffice.
Why not add a simple float to tank that attaches to some visible indicator.

There are many physical solutions even float valves that will just add water when required and an overflow port for the excess.

Not everything needs an LCD and a micro controller.

Who is online

Users browsing this forum: No registered users and 63 guests