We've all been there-we finally get around to purchasing our favorite pet plant and vow to keep it safe for the rest of our lives. Unfortunately with our busy lives, we sometimes forget to give our plants the water they need.
We got plants this semester to add to the decor of our rooms; but we would always have to remember to water them. On more than one occasion, we either forgot to water our plants, or overwatered them. We realized that there should be an easier solution to this problem--instead of having to remember to water plants, and making sure to give the right amount, why can't we just have the plants water themselves? That's why we created Hands-Free Plants.
Hands-Free Plants will take care of your plant watering needs, even when you're not around.
How We Built It & Technical Specs
Hands Free plants was developed and built as a team through frequent meetings in Detkin lab. We first worked on gettings the valve and sensors needed and on the circuitry on the breadboard to get them working together. We ended up using a temperature sensor and a moisture sensor, after facing hardware issues with a humidity/temperature sensor. Replacing the humidity sensor with a soil moisture sensor also provides a more accurate metric about the plant.
The next step was to program the Arduino to collect the data from the sensors periodically and to connect it to the ThingSpeak API. Using an Arduino Uni Wi-Fi and the Arduino Wi-Fi library, we pinged the temperature and soil moisture sensors every 30 seconds, and then sent this information to the cloud.
The next major part of the process was to get the processing of the data on ThingSpeak working. Using the MATLAB script application on ThingSpeak, we read the temperature and moisture data from the raw data channel; then, the data being read from the Arduino was rid of outliers. This consisted of removing data points that were more than one standard deviation away from the mean. We then put the data into a 60-point moving average filter. This allowed the effect of rapid changes in temperature and moisture to be diminished. This was necessary since our sensors were very inaccurate. Also, the trends in room temperature and soil moisture percentage could more easily be seen over time. The averaged temperatures and moistures over the past six hours are sent to a new ThingSpeak channel.
The last part was using the processed data to water the plant. To do this, we set up another Arduino, also using the Wi-Fi library, which downloads the last averaged moisture value from the new ThingSpeak channel. The Arduino then calculates the difference between our desired target moisture value and the actual averaged value, and turns on a solenoid valve, connected to a 12V power source and to the Arduino via a MOSFET, for an amount of time proportional to the dryness of the soil. From ThingSpeak we were also able to use the Twitter app to automate tweets about the plant being in high temperature or low soil moisture conditions. For the water source, we use a water bottle with the cap hot glued to the valve.
Issues and Challenges
In the beginning, several challenges stemmed from hardware issues, as our humidity/temperature sensor overheated and stopped working. After switching to our first moisture sensor, this sensor stopped outputting values properly and accurately. However, this was easily solved with another replacement. Another challenge was with getting the Arduino connected to the ThingSpeak with API. After looking through the code thoroughly and trying different hardware setups, we realized that the issue was due to the Arduino running out of memory. We were able to overcome this by using two Arduinos. Another issue was actually using the valve. Our setup was to have the valve attached to the pot, and a bottle attached to the valve with hot glue. At first the hot glue kept breaking off or having leaks, but after trying several different ways of gluing it and many attempts, we ended up with a decent fix.
A difficult part of the project was to actually code the Arduino program and MATLAB. Many MATLAB functions that ThingSpeak uses were unfamiliar to us, and we needed to figure out a way to incorporate the API, the processing of the data, and the graphs on ThingSpeak together.
What we Learned
Every step of the project was a learning process. We improved our skills with breadboard and Arduino circuitry when getting the sensors and valve to work, requiring us to do some soldering, and at programming in the Arduino program. On ThingSpeak were able to experience using API to write to and read back data on the internet with an Arduino. ThingSpeak also provided us a way to learn how to use and code on MATLAB to process the data we uploaded on there.
Hands-free plants can be improved with a more reliable and lasting mechanism for sealing the valve and holding the the water supply, like with a 3D printed attachment to the valve. This would prevent any leakage and allow it to store more water, and could possibly even allow the attachment of water bottles for storage using a standard cap model. Another possible improvement is the connection to a mobile app, where one can see the stats, like temperature and moisture, from their decide, and even control the valve if necessary.
MVP Promotional Video
Uploaded to Devpost.