Inspired by our inability to keep houseplants alive, and enabled by a course at UNCC (MEGR 3171), we developed a system to notify you when your plant needs watering. Our system consists of 2 parts. Part 1 uses a Sparkfun soil moisture sensor to monitor the plants moisture. When part 1 determines the soil is dry, it send a signal using particle.publish to the second part of the system. Part 2 consists of a flag on a servo and a limit switch, which raises the flag if the soil is deemed too dry by the first part of the system. When the limit switch is tripped on part 2, part 1 is reset and will resume looking for when the soil is dry.
Video Overview and Demonstration with ThinkSpeak integrationDevelopment
1 / 4 • Both the moisture sensor and notification flag system
Our development process consisted of independently developing the 3D printed parts and the Argon code. The code development consisted to leaning how to uses each aspect of the final product independently. This included testing servo control, particle.publish/subscribe, and the moisture sensor independently. The most important testing that took place was the tests on the moisture sensor because it is critical to the success our project. As a result, we performed two tests on the moisture sensor, one test to simulate a relatively constant soil moisture and another to simulate the moisture loss of an actual plant. The first test consisted of a moisture sensor connected to an Argon that sent the raw moisture data to the Particle Console every hour. The sensor was placed indoors in a non-humidity controlled environment, in heavily saturated clay soil.
As shown in the graphed results, several hours of sensor data was lost due to the Particle Console not saving data sent to it when the computer running the console is not constantly awake. This test also demonstrated that the sensor had high variance and is somewhat dependent on humidity, as the environmental humidity increased at the start of day 3. Test 2 took place indoors in a sunny, humidity controlled environment and the plant was watered at the start of day 3. The code for this test was identical to the previous test.
Like the previous test, some data was lost due to the Particle Console. This test also showed the moisture sensor had a high degree of variance. As a result, we concluded that a form of signal processing was needed. We also concluded that, for that particular plant and composition of soil, a sensor values of around 3130 is considered dry soil. We decided that 3 out of the last 5 sensor values must be below the set threshold to activate the notification flag in order to prevent false positives.
Once this test was competed, the individual parts of the final code was combined to form that is the final code. In the final code for the moistures sensor Argon, the Argon reads the sensor value every hour and determines if 3 of the last 5 sensor values are below the threshold. If the that is true, the Argon sends a signal that tells the other Argon that the soil is dry. The moisture sensor argon repeats that signal every hour to safeguard against the notification Argon missing the first dry flag and never activating.
The once the notification Argon receives the dry flag from the sensor Argon though particle.subscibe, the servo activates and puts the flag up to notify the user that the plant is dry. Around every hour, the servo returns to its intended position, up or down, in order to prevent confusion if the flag gets moved accidentally. The moisture sensor resets when the flag is manually rotated down and touches the limit switch. The servo then moves up slightly to indicate that the reset is received.
Remote Monitoring via Thinkspeak
View of our thinkspeak channel
An important tool for remote monitoring it the ability to remotely view the status of the system. In this project we used Thinkspeak integration and Particle Webhooks. We are outputting the percentage of the threshold in order to prevent confutation if the user does not remember his/her threshold. As such, any value under 100% is under the threshold.