The well-being of a plant is largely determined by three influencing factors: The environment of the plant (ie the indoor climate) the sunlight and of course the moisture in the flower pot. These factors can be easily measured with sensors from the M5Stack series:The environment sensor for measuring temperature, air pressure and humidity, the light intensity sensor and the soil moisture sensor.For the evaluation of the sensors and for the visualization of the measurement results an M5Stack Core is used, in our case we decided for the M5Stack Gray, but the setup also works with other cores. How to connect the sensors correctly can be found in the respective operating instructions.The programmingThanks to the integrated screen, the M5Stack can easily display all measured values. To ensure that the raw numbers are not interpreted by the user but by the main module itself, we define fixed limit values (minimum and maximum values) in the program and use icons to show on the screen whether all measured values are in the green range. The M5Stack Gray can be programmed with many different tools, including the Arduino IDE. Probably the simplest method is "UIFlow", the development environment from M5Stack. The graphical programming language is intuitive to use and very easy to learn.Now only the desired emojis have to be loaded into the program and then the measured values are polled cyclically and compared with the limit values. This is best done with a concatenation of "if-do-else-if" building blocks. To display the current sensor data, text modules (labels) are placed on the screen, which are constantly updated via the program.Now that the program is finished and loaded into the M5Stack, all you have to do is put the Soil Moisture Sensor into the flowerpot soil and the screen will show you the current health of the plant.Through additional modules and program adjustments, many additional functions can be integrated. For example, it is possible to set the limit values conveniently using the three freely programmable buttons. The battery of the M5Stack can be saved by adding a motion detector, which activates the screen only when a person is near the plant. Thanks to the WLAN connectivity, it is even possible to retrieve the current status for the smartphone or other devices in the household.
Published November 14, 2019
Comments