About Waterwell (Sump) monitor - Arduino ESP8266 ESP32
Webapp for data analysis, graphs. Microcontroller measuring, sending datas
I offer a SOFTWARE designed and programmed by me - a web application for the Hladinomer project. The aim of the project is to record and represent to the user the level of water (or other liquid) in the well, tank. 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 dug wells. 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 Deep Sleep mode, which dramatically reduces their power consumption to the level of tens of microamperes, making them 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 fixed internet is not available at the given place, it is also possible to use data transmission via the IoT network Sigfox, which some countries in Europe, America, Australia. It is a suitable alternative. The SIGFOX WISOL 868MHz UART modem is compatible in Europe (or other MHz based on the country standard). Suitable for IoT applications with low current consumption, it consumes a third of the transmission 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! An application runs on the web server, which visualizes the user's last data in a dynamic report with a microcontroller connectivity indicator. 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 variable 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 diameter of the well, which can be used to convert the volume of the well 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 start-up of the project. 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. I supply exclusively a software solution. I do not offer the hardware or its installation, you must provide it yourself. Other types of level sensors (hydrostatic, capacitive, pressure, optical ...) can also be used with a certain modification of the web interface.