I offer a SOFTWARE designed and programmed by me - a web application for the Level meter project (Water level monitor in a well, tank). The aim of the project is to record and represent to the user the level of water (or other liquid) in the well.
The principle of measuring ultrasonic sensors is to send a Trigger signal with a length of 10 microseconds, which bounces off the surface and returns to the receiver - Echo. This method is suitable for measuring the water level in dug wells. This method is NOT SUITABLE for drilled wells due to the large beam scattering!
Based on the conversion of time with respect to the speed of sound propagation, it is possible to determine the distance between the sensor and the water level, which can be represented in liters. The project uses an ultrasonic distance sensor HC-SR04 - (detection angle 15 °), or a water test sensor JSN-SR04T (detection angle is up to 60 °). [Detection angle represents the width of the beam]. It is possible to measure the level up to 450 cm.
To operate the project, it is possible to use an Arduino microcontroller with an Ethernet module Wiznet W5100 or W5500, or a WiFi platform from Espressif Systems - ESP8266 (NodeMCU, Wemos D1 Mini), or ESP32 (Devkit). The wiring diagram for all platforms is available directly in the web application.
The ESP8266 and ESP32 microcontroller platforms can also be operated in ULP (Ultra-LowPower) mode, which dramatically reduces their consumption to the level of tens of microamperes. Suitable for battery operation.
The second operating mode is StandBy, where the platform runs in standard mode and can be extended with the implementation of Over The Air (OTA), which offers firmware updates via LAN. Arduino with Ethernet only supports HTTP connectivity and does not support OTA update or sleep mode! For ESP8266 and ESP32 platforms, it is possible to use HTTP and HTTPS encrypted connection with the web server.
If the fixed internet is not available at the given place, it is also possible to use data transmission via the IoT network Sigfox, which covers many of European states, so that's thus a suitable alternative. The SIGFOX WISOL 868MHz UART modem is compatible. Suitable for IoT applications with low current consumption, it consumes a third when transmitting compared to ESP32. Message limit 12B (used 4B for water level), custom callback from Sigfox backend performs HTTP / HTTPS POST request to write data to web interface.
To run the project, it is necessary to have a web server with Apache / Nginx support (for .php scripts) on a public IP address or in a LAN network, where the platform sends data from the ultrasonic sensor. ATTENTION, in case of Sigfox operation the server must be accessible from the Internet, otherwise it is not possible to write data! The web server runs an application that visualizes the user's latest data in a dynamic report with an indicator of microcontroller connectivity.
It also allows you to monitor historical data on the level of water for a month, week, day in clear graphs or tabular versions. The web interface also contains a record of records - the maximum, minimum value of the water level in 24 hours, 7 days, 30 days, which allows you to continuously monitor the yield of the well.
The web application also has various configurable data that are needed to correctly determine the water level - the depth of the well to the bottom (serves as a calibration value for measurements), as higher level = smaller value between the level and the sensor, which is located at the top of the well. Therefore, the measurement is subtracted from this value to determine the actual water level.
The second variable parameter is the well diameter, which can be used to recalculate the well volume in liters with the current level and also contains an estimate of the maximum depth of the well at a given diameter for the most accurate measurements without reflections.
This estimation of the maximum depth of the well is performed by trigonometry and allows the user to better select the sensor for his requirements with respect to the dimensions of his well. Source codes for all these platforms, wiring diagram, libraries for the HC-SR04 sensor are included directly in the web application. Data is sent to the web interface via HTTP / HTTPS protocol with POST payload.
Also suitable for laymen, a .pdf document is available for the implementation of the web interface, which explains step by step the setup and launch of the project on the web hosting / local web server. The project can be tested in advance with your hardware on a test web interface.
The last recalculated measured data from the web interface can be transferred to the MQTT Broker (with another microcontroller). They are distributed in the JSON format from the web interface. On request, you can try a full-featured web application with your hardware in advance. I supply exclusively a software solution.
I do not offer hardware or its installation. With a certain modification of the web interface, it is also possible to use other types of level sensors (hydrostatic, capacitive, pressure, optical ...), for which, however, I do not make a software implementation for a microcontroller.
Webapp is available in Slovak / Russian / German and English language. Language can be changed directly in webapp. You can test whole webapp for free via Homepage link. You only need to copy source code from website to your microcontroller for HTTP connectivity.
My project is used in real project too for measurement height of lake in Czech Republic.
I would like to sell project to people that can use it for their monitoring of waterwell.
He can use it for Home automation etc...
Via JSON output it can be implemented to Loxone / Domoticz / Hassio and other systems too.