You are on page 1of 5

EECS 1021 Minor Project Report

Joshua Keppo 210971752

INTRODUCTION

In this project the goal was to create an automatic watering system using an arduino
board hardware with a compatible voltage sensor and connecting of a pump. The software side
of the project was to use Java with imported libraries to make it compatible with the arduino
board. Using these two side I was able to create a software program was would detect when the
soil for a plant was dry which would then trigger the pump to be turned on to water the plant and
then turn off when the soil was saturated and then wait until the soil became dry once again to
repeat the cycle with no human interference.

CONTEXT:

This type of system has a wide range of usage that can be applied and is already being
applied all over the world. Automated watering systems are already used but the addition of a
voltage sensor directly in the soil would lead to optimizations on water then just standard
regularly scheduled watering with a regular amount of water. With the voltage sensor you could
see the exact saturation of the soil and then tailor the watering to the specific plants being
watered. With more sensors and individual pumps you could have multiple varieties of plants
and specific watering “profiles” for them, such as might be found in a greenhouse.

TECHNICAL REQUIREMENTS / SPECIFICATIONS

1. System should connect between the Arduino Board and IntelliJ (with appropriate libraries
installed).
2. System should take readings from the capacitive moisture sensor.
3. System should be able to turn on the pump for a specified amount of time.
4. System should turn on the pump in relation to the sensor readings.
5. System should update the user on the readings of the sensor on request.
6. System should interpret the reading into “Dry, Damp or Wet” conditions in the soil.
Flow Chart
COMPONENTS LIST:

1. Arduino Board - Used to communicate between the computer via the USB cable and rest
of the components
2. OLED Display - Used to provide updated information with the push of the button.
3. Button - Used to update the information on the OLED display
4. Compatible Cables - Used to connect all the components with the Arduino board, the
one connected to the moisture sensor was modified (by switching the yellow and white
wires on the end connecting to the Arduino board) to use the A1 pin.
5. MOSFET switch - Used to connect the 9V battery to the pump to power it along with
connecting the pump to the board.
6. Capacitive Moisture Sensor - Inserted into the soil of the potted plant to get readings.
7. Water pump - Placed in a water reservoir
8. Water reservoir - 1L clear plastic container
9. Silicon tube - Clear tube which would be angled down before going into the pot of the
plant (so the water does not drain into the pot through gravity)
10. Plastic Tray - Large plastic tray to move the setup around more easily and contain any
water spills
11. Potted Plant
12. Cable/connectors (for pump and 9v Battery to MOSFET switch) - Connectors used to
adapt the 9V battery and Pumps wiring to the MOSFET
13. 9V Battery
14. USB cable - Long micro-USB to USB cable to connect the board to the computer
15. Computer (offscreen) - Used with Intellij to code the java program used by the Arduino
board.

Photo of System:
PROCEDURE:

IntelliJ with Arduino IDE was used to create a program to communicate with an Arduino board.
The board was then connected to the computer and the Arduino IDE was used to flash the
board to be compatible with IntelliJ. Once the board was connected properly and
communicating with IntelliJ with the appropriate libraries installed (firmata4j - 2.9.4, JSSC - 2.3.6
, and SLF -1.7.3), a capacitive moisture sensor and water pump was connected to the Arduino
board. The moisture sensor connection was modified to use the A1 pin connection. The water
pump was connected to the board with a MOSFET switch which connected the water pump to
the Arduino board and to its power source.. A test program was quickly run to make sure that
IntelliJ was connecting with the board and initializing the board. Then the program was used to
tell the sensor and pump to run to ensure that they were running and communicating correctly.
Then calibration readings from the moisture sample were taken to check its readings in air, dry
soil, wet soil and water to be used in the final program. The pump was tested to see how much
water it can pump per second as well as to ensure it did not leak. Once all this was done the
plant and water reservoir/pump were placed onto a plastic tray to contain any spills or leaks.
The final program was then coded and the system was left to run for 48 hours.

TESTING:

Initial tests were done once the final program was completed. The tests mainly consisted of
placing the sensor in air and getting readings and having the pump pump water into itself since
it should read a “dry” reading in air and tell the pump to pump the water. Then as the program
was still running the sensor would periodically be placed into some water to see if it would still
turn the pump on. Test readings were done on the potted plant over the course of a week to get
the range of values from the sensor that would constitute for dry soil reading while the wet soil
readings were easier.

LEARNING OUTCOMES:
● Demonstrate the ability to test and debug a given program and reason about its
correctness. (GAI 2b)
○ The setup and program successfully addresses this outcome from seeing that the
program was created from scratch and successfully meets the requirements for
the project. Was tested and debugged using simple print statements in tests to
confirm correct sensor readings for the appropriate conditions (dry/damp/wet) as
well as test that the pump worked as well before placing the entire setup
together.
● Given a problem specification and a suitable API, build an application that meets the
given requirement. (GAI 4b)
○ The specification was to have the setup, water a plant automatically, which it
does successfully using IntelliJ communicating with the Arduino board.
● Build an event-driven application that controls sensors and actuators in order to connect
events to physical actions. (GAI 4b)
○ The program uses an event listener to update the OLED screen on the Arduino
board to the current sensor reading and tell the user whether the soil is dry, damp
or wet based on the reading whenever the user pushes the button on the board.
● Program common applications from a variety of engineering disciplines using an
object-oriented language and solve them on the computer. (GAI 4c)
○ This program uses Java which is object-oriented language to code the program
that the setup runs on, and uses this to program the automated watering of a
plant with minimal human interference (refilling the water reservoir).

CONCLUSION

The setup and program successfully watered the potted plant with minimal human
intervention which was limited to refilling the water reservoir once a week. This could be further
automated to either use another component of the board (like the buzzer) to alert that the water
reservoir is empty (which would come from the fact that after running the pump the sensor
readings would stay the same) instead of needing to check at a scheduled time. A real world
use for this is easily imagined, but would take much more work to optimize for everyday use.

You might also like