[Sell] - Waterwell monitor project over internet - Arduino / ESP32 / ESP8266

Waterwell monitor project uses a web interface to visualize the measured data on the water level in the well, reservoir.Responsive web interface in the Bootstrap Bar template adapts to any screen on which the data is visualized. Datas are readable on watches, smartphones, computers, Smart TVs and other devices. The web interface of the project uses a backend written in PHP, which processes incoming data supported by the POST request method, converts the measured temperature to the actual water level, calculates the well volume based on known data on depth and well diameter entered into the system by the user. The data is sent to a web server by a microcontroller, which performs measurements every 300 seconds - i. For 5 minutes, or in the case of transmission via the Sigfox IoT network, the data is sent every 11 minutes.

Water level measurement is performed using ultrasonic sensors - HC-SR04, or its waterproof variant JSN-SR04T, or UART sensor URM07 (SKU SEN0153) - available only in a special version of the project Level meter. It can measure distances up to 750 cm, due to the large detection angle does not fit into a large number of wells ... The principle of measuring ultrasonic sensors is to send a Trigger signal with a length of 10μs (microseconds) and based on the time when the signal returns to the receiver - Echo is possible calculate the distance between the sensor and the surface. An important parameter in both ultrasonic sensors is the beam width, in other words the detection characteristic. The HC-SR04 sensor has a 15 ° detection characteristic. The beam is relatively narrow and the sensor is also suitable for narrower wells and tanks, but it is not waterproof and has a high risk of corrosion (oxidation). The JSN-SR04T waterproof sensor has a detection characteristic of 60 to 75 °, which does not allow it to be used in narrow wells, as the beam expands greatly with distance and requires a well with a diameter of several units (6 meters at 4.5 well depth).

The web interface uses trigonometry to estimate the measurable maximum depth of the well at a known well diameter (another parameter for calculating the well volume). The web interface allows the user to calculate to what maximum depth of the well each of the sensors is suitable based on its characteristics. The project is so easy to use even for laymen who do not know which sensor is more suitable for application in their well. The microcontroller used also plays an important role in the system. The project used the Arduino (Uno) platform connected to an Ethernet module / shield from the Wiznet model W5100 and W5500 series, respectively, which provided HTTP connectivity and enabled the microcontroller to transfer data to a remote web interface on the Internet.

As the level meter is an outdoor project, many users would also like the possibility of using a WiFi platform without having to pull Ethernet connectivity to the well. WiFi platforms from Espressif Systems - ESP8266 and ESP32, which are used in the project, allow operation in various modes - StandBy, Deep Sleep (deep sleep with WiFi modem turned off), StandBy + OTA - allows you to remotely upload to the board new firmware directly from the board Arduino IDE environment. On request, it is also possible to create a Remote OTA update, which is distributed remotely via the Internet from a web server, you can use the Github repository, which can distribute the update to the client in RAW format .bin. For the Deep Sleep operating mode, there is a modified wiring diagram for the ESP8266 platform, which uses a signal that is fed to the RST to wake up the WAKE microcontroller.

At the same time, this connection does not allow the program to be updated without disconnecting this jumper. For ESP32, the Deep Sleep mode is used using an RTC timer, which wakes up ESP after a certain time. Platforms can communicate with the web interface via HTTP, but also HTTPS protocol. The ESP8266 platform uses a fingeprint of the web server's public key in SHA1 format, but requires more frequent renewals, as they are valid for a maximum of one year or 2 years, respectively. The microcontroller from the ESP32 series uses the certificate of the root certification authority, which issued a certificate for the web server - the ROOT CA certificate in .pem format for the HTTPS connection. From the point of view of operation, this option is better, as the certificate of the certification authority is also valid for 20 years and no renewal of the certificate is necessary.

For locations where there is no coverage of the fixed Internet, it is also possible to use the IoT network Sigfox, which covers almost 90% of Slovakia, BTS broadcasting stations are located on TowerCom transmitters. This technology allows you to transmit small volumes of messages up to 12B in size. In the case of the Level meter project, the 4B water level value is sent. As Sigfox allows a maximum of 140 messages to be transmitted per day, the data transmission interval is extended to 11 minutes. In both cases, the message does not contain the full length that it can, i. 12B. Payload reports can also be supplemented with various system information

Waterlevel monitor project - Callback settings in Sigfox Backend:

  • Callbacks --> Custom --> New
  • In Custom payload config we write: cislo1::uint:16
  • To URL pattern: http://arduino.clanweb.eu/studna_s_prekladom/data.php (or another URL of your web server where the project will run), the possibility to use HTTPS
  • In the HTTP method, select: POST
  • To the Body (body of the message) we add:
  • hodnota={customData#cislo1}
  • At Content-Type select: application/x-www-form-urlencoded

Source codes for Arduino with Ethernet Wiznet W5100 / W5500, ESP8266 and ESP32 are available at Github repository (use HTTP examples only, because test web interface doesn't support HTTPS):

**For Sigfox UART Node use this sketch: **

All source codes are sending datas to web interface, where you can in real-time see your datas.
You can try it for free with your hardware for testing. Web interface have same funcionalities that I offer. There is also available schematics for all microcontrollers that are supported.

If you have any questions, feel free to ask at: martinius96@gmail.com
Price for software: 30€
Preferred payment method: PayPal

Screenshots of webapp:




This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.