BlueStrawberry

Project idea

Build a self watering device that uses a soil moisture sensor and temperature sensor to decide when a DC motor runs a water pumper. Connected to the phone through the blynk app, temperature and soil moisture readings will be recorded and a button will allow the user to override the automatic watering process. The goal is to allow a plant to grow on its own after being planted.

Team members

Hunter: write the code of sensor input Tess: write the code of motor response Combined efforts for physical assembly

Parts needed for Project

Arduino Uno Wifi 1N4007 High Voltage, High Current Rated Diode Transistor Wires 221 ohm Resistor 5V DC Motor Water tube Glue Water container Bread board Soil Moisture Sensor Temperature Sensor

Share this project:

Updates

posted an update

BlueStrawberry

Project idea

Build a self watering device that uses a soil moisture sensor and temperature sensor to decide when a DC motor runs a water pumper. Connected to the phone through the blynk app, temperature and soil moisture readings will be recorded. The goal is to allow a plant to grow on its own after being planted.

Why we chose this project

The idea seemed to apply multiple things that we learned about throughout the semester: IoT, motors, temperature sensor, etc. Personal interest in gardening and trying to apply knowledge gained from the class made the project seem like the right choice.

How we made our project

Our water pump was delayed but up to its arrival, we worked on the rest of the hardware and code ahead of time. To try and replicate what it would be like to have the water pump, we included an LED light that would light up when we wanted the water pump to run.

Subsystem of the Project

Software:

We had two total boards, on MKR 1000 and one Arduino Uno. The MKR 1000 did the majority of the logic and connected to the Blynk app. Every iteration of the loop function first makes sure that the water pin is set on low. After connecting to Blynk, the temperature function runs which reads the analog value from the temperature pin. The arduino makes some adjustments to the temperature reading from the temperature pin: first converting the value to millivolts, then to celsius, and then fahrenheit. The final fahrenheit temperature value is sent to the Blynk virtual 5 pin.

The MKR 1000 then reads the soil moisture sensor and sends the value to the Blynk virtual 6 pin. If the soil moisture is above a predetermined dryness value, the water pin is turned on high. The loop is delayed 1000 milliseconds so that the loop function is not constantly running. If the Uno input pin has a high input, another digital output pin is turned on.

Hardware:

A constant 5V supply from the MKR 1000 connects to the soil moisture sensor and a red LED to show that the supply is reaching the soil moisture sensor. The output of the soil moisture sensor gets sent to the A1 analog input pin.

There is a connection from the MKR 1000 digital 0 output pin that connects to the digital input pin on the Uno. The water pump directly connects to a digital output pin on the Uno and connects back to the same ground as the MKR 1000.

Problems encountered:

Although we tested on an LED to prepare for the water pump, the maximum output from a MKR 1000 pin is around 3.3 V which is not enough to power the water pump. After hours spent finally realizing this problem, we looked up information on relays and transistors. The transistor did not seem to work despite multiple variations in the set up. We finally decided to use an Uno to act as the switch, but connecting the soil moisture sensor to the MKR 1000 and Uno cut the soil moisture readings by half, making the difference between watering and not watering harder to distinguish. We finally connected the soil moisture sensor only to the MKR 1000 and used another MKR 1000 pin to instruct the Uno to turn a digital pin on and off because the Uno pins can output 5V.

Real Product Application

Forgetting or not knowing when to water plants is a common problem, and a simple IoT device to automate the process and prevent dead plants would appeal to many people. Our project could provide additional value to people growing sensitive plants since it removes human error in watering amount and frequency and provides users with real-time temperature and moisture data through Blynk. To develop our project into a real product, we would have to make the construction more user friendly and durable. The hardware would need a compact, water and dirt resistant housing and our tubing would need to be more flexible and discreet. We would also have to re-evaluate the pump we used since ours was not strong enough to move water reliably. The ability to use larger pumps would increase the scalability of our project and allow it to be useful for larger or multiple plants.

Possible Improvements

As mentioned in our description of problems we encountered, we now need two arduinos in order to drive the pump. The first improvement we could make would be to add a relay or transistor to our design so that we could power the system with just one arduino. Adding a relay would also let us use a stronger pump which would be an improvement to the weaker one we currently have. Another improvement would be to use a more reliable moisture sensor. While the sensor worked well enough for our purposes, it sometimes gave inaccurate readings. More flexible tubing would make the system easier to use as well since ours was stiff and difficult to keep in place.

Log in or sign up for Devpost to join the conversation.