We are a team of students from Esslingen University specializing in Media Informatics. In an increasingly urbanized and sustainability-driven world, efficient use of water and smart plant care are becoming more important than ever. With our IoT-based soil moisture monitoring system, we aim to support healthy plant growth while reducing unnecessary water consumption in cities, cemeteries, and private households. This is just the current status of the project as we intend to improve it by testing in real world applications.
Project IdeaOur concept is a smart soil moisture monitoring solution that continuously measures the moisture level in the soil and transmits the data wirelessly to a cloud platform. The information can be accessed via Home Assistant or a web-based dashboard, allowing users to monitor plant conditions in real time. The system can be integrated into flower pots, urban green infrastructure, and cemetery planting areas, providing a flexible and scalable solution for different environments. Additionally, users can define individual moisture threshold values depending on the specific type of plant, ensuring optimal care for a wide variety of plant species.
Plants play a vital role in improving air quality, enhancing urban environments, and creating spaces of relaxation and remembrance. However, improper watering is one of the most common reasons for plant stress and failure. Too little water leads to drought stress, while too much water can cause root rot and plant death. Our solution helps prevent both by enabling precise, data-driven watering. This not only improves plant health but also conserves water resources and reduces maintenance efforts—benefiting municipalities, caretakers, and private users alike.
Concept & Technical ImplementationIn order to calculate the relative moisture value, the absolute measured moisture and some reference point has to be known. The absolute moisture is measured by the analog sensor connected to the microcontroller. The microcontroller takes 5 measurements over the course of 5 seconds and calculated the average value to rule out random spikes that can occur when drops or bubbles of moisture form. Then, the relative moisture is calculated. Therefore, the refenrence points lower border and upper border are used. They are the minimum and maximum absolute value and represent 0% and 100% relative moisture. If the measurement exceeds the value range between these borders the relative moisture is set to 0% or 100% according to the border which has been exceeded. If the absolute measurement is in the specified range, the relative value between the borders is calculated.
The upper and lower borders can be set by the user using MQTT. For more info on how MQTT is used and how to communicate with the sensor follows in the paragraph "Communication". The upper border should be set a couple of minutes after the plant has been watered to allow for the whole soil to get wet before. The lower border should be set when the soil is very dry, e.g. right before watering. In the graphic below you can see an example for adaption of moisture borders for a cactus.
Because the sensor has been used with a normal plant before, it measures low moisture for the soil of the cactus. But it is a freshly watered cactus, so in reality the relative moisture is at its peak. So we set the upper border to the current absolute moisture. This is when in the graph displays a rise in moisture from 20% to 100%. From now on a far lower absolute moisture is calculated to be a higher relative moisture, which is exactly what a cactus needs.
CommunicationThe sensor uses MQTT to be widely compatible with any system that has MQTT support. The sensor automatically subscribes to the relevant topics. The exact names topics can be changed as global variables in the code. The required MQTT topics are:
mqttAvailabilityTopic: A topic where the sensor publishes its availability as „online“ or „offline“
mqttStateTopic: A topic where the sensor publishes the relative moisture value
brokerAvailabilityTopic: A topic where the MQTT broker publishes its online state
upperBorderTopic: A topic where the sensor publishes its upper border absolute value
lowerBorderTopic: A topic where the sensor publishes its lower border absolute value
setUpperBorderTopic: A topic where the upper border can be set to the currently measured absolute moisture
setLowerBorderTopic: A topic where the lower border can be set to the currently measured absolute moisture
setLowerBorderValueTopic: A topic where the upper border can be set to an absolute value
setUpperBorderValueTopic: A topic where the lower border can be set to an absolute valueThe sensor detects when it is not connected to the WiFi or the MQTT broker and automatically performs a reconnect. The WiFi and MQTT details and credentials can be set als global variables in the code.


















Comments