My wifes loves to grow her own vegetables. In Summer we support our plants and flowers with with Water out of our own water tank. To get a feeling how much is left and protect our submersible pump of running try I decided to add a water level sensor, to show the water level on a home visu, visualize and supervize in my node red system which is controlling the pump as well.
To do so I added an TOF sensor the VL53L0X in to my water tank. The Laser wouldn't recognize the water level therefore I build a lean structure to get a board of styrofoam swiming on the water. The styrofoam is reflecting the laser pretty well. First issue solved. Btw I decided to go with this solution instead of an ultra sonic sensor as the ultrasonic once I haven't had good experiences with the ultra sonic.
Indeed my most problems so far have been corrosion of the sensor board or the connector. I solved that with a 3D printed enclosure, a sealed connector and some hotglue on the sensor board.
For the electrical side I started with an ESP8266 on Wifi connected to Node-Red via MQTT. This solution had some down sides. First the wifi connection hasn't been reliable. Neither by improving with external antenna. As I'm running my home system on KNX bus I decided to get a Siemens Bus coupler to get a wired connection. With this move, the secound down side of the ESP8266 came up, it's been consuming too much current. That's why I moved on with an ESP32c3 supermini directly connected and power supplied by the bus coupler.
The connection is quite easy. The Siemens bus coupler is connecting to the KNX bus and genereating 5V for the ESP. Via an UART Interface the µC's are communicating. On SW side I'm using the KNXTPUART library created by Thorsten Gehring which made the KNX integration easy going. The ESP basicly is checking the distance every secound via I2C at the VL53L0X utilizing the respective Pololu library. Afterwards creating an average value using the smoothed lib and sending the smoothed value very 30secound on the bus. And no, the components aren't inside the tank. They are located in an clean, sealed environment outside.
The information send on the bus are revceived by my ioBroker with Node-Red instance which is calculating the water level in percentage out of the distance value. This level is shown on an screen in my living room as well as on my Node-Red Visualization. In addtion Node-Red is blocking the pump if the level is below 4%. So my wife can grow her plants without thinking about my pump, which she hasn't done so far anyway











Comments