EECS 1021
MINOR PROJECT REPORT
STUDENT NAME: Ahmed Abdessamad Tatech
STUDENT ID: 219965904
INTRODUCTION: This project aims to develop a Java program that uses an Arduino-compatible device to monitor and
control soil moisture levels in a plant. The system will employ a water pump to provide water to the plant when the soil
moisture falls below a certain threshold. The project seeks to create an automated and efficient solution for maintaining
optimal soil moisture conditions in plants.
CONTEXT: This project goes beyond a simple technical implementation by addressing the need for automated plant
care. It aims to exceed expectations by providing a contextually relevant solution that integrates hardware and software
to ensure plant health. The ability to monitor and adjust soil moisture levels in real-time demonstrates a practical
application of technology in agricultural and gardening practices.
TECHNICAL REQUIREMENTS / SPECIFICATIONS:
- Develop a Java program with the Grove board using
the Firmata library. Next, Implement soil moisture
sensing using the appropriate program.
- Control a water pump to provide water to the plant
when soil moisture is low, this happens upon receiving
readings from the moisture sensor. Meanwhile, Display
soil moisture data and pump operation on an Arduinocompatible OLED display.
This can be simplified in the following flowchart:
COMPONENTS LIST:
- Grove board (Arduino compatible), IntelliJ IDEA.
- Soil moisture sensor module.
- Water pump, 9V battery, MOSFET.
- OLED display (Grove board OLED display).
-A plant of the choice.
In addition to connecting wires, water hoes.
PROCEDURE:
I initiated the setup of the Arduino board with the Firmata library, to establish seamless communication between the
Arduino board and the Java program, I developed code using the Firmata library. Additionally, the system comprised a
moisture sensor and a MOSFET responsible for powering an external water pump. The process of effectively monitoring
soil moisture and regulating the water pump involved the
implementation of logical operations. Within a continuous loop
structure, the moisture sensor's voltage is measured multiple
times (24 times a day equally spaced) due to the type of my
plant, leading to corresponding reactions based on the voltage
values. Within this loop, three distinct if-statements were
utilized to represent different states. Where readings obtained
through the Grove board initiated the activation or
deactivation of the water pump. This was achieved by sending
signals to the MOSFET board. Real-time monitoring of soil
voltage by the OLED display. The display provides a visual
representation of voltage changes in the soil. Furthermore, the
Java program was enhanced to include both time-based
scheduling and event-driven functionality. This comprehensive
approach ensured that the system was capable of consistent
operation and responsive to varying conditions.
TEST:
Here a picture shows the setup (this may vary from
the video footage since I add this at the last minute)
1. Verify that the soil moisture sensor accurately detects soil moisture levels.
2. Test the Java program's ability to send commands to the Arduino and receive sensor data.
3. Ensure the water pump activates when soil moisture is below the threshold and stops when the soil is sufficiently wet.
4. Monitor the OLED display for real-time updates on soil moisture and pump operation.
5. Run the system over multiple days to observe its performance in maintaining soil moisture levels.
LEARNING OUTCOMES:
1. Testing and Debugging Proficiency: This project provided a hands-on opportunity to extensively test and debug the
Java program and customize it to the Grove board. Through troubleshooting, I honed my ability to identify and rectify
issues within the program. This process allowed me to reason critically about the program's correctness, ensuring that it
performed as intended and met the desired specifications.
2. Application Development with API: By addressing the challenge of automating soil moisture control, I demonstrated
the capability to translate a problem specification into a practical application. Leveraging the Firmata library as a suitable
API, I successfully developed a Java program that communicated effectively with the Arduino board.
3. Event-Driven Application Design: Constructing an event-driven system for soil moisture management involved the
integration of sensors and actuators to respond to real-world events. This experience highlighted my ability to create
applications that bridge the gap between digital events and physical actions. The design and implementation of the
pump control mechanism showed my competency in building event-driven solutions to address practical challenges.
4. Multidisciplinary Problem Solving: Through developing this project, I programmed a solution encompassing principles
from diverse engineering disciplines. By utilizing Java as the object-oriented language of choice, I demonstrated my
aptitude for constructing software solutions applicable to a range of engineering contexts. This experience further
solidified my ability to tackle engineering problems across various domains using a unified programming approach.
CONCLUSION: This project successfully demonstrates the creation of a Java program that interfaces with an Arduinocompatible device (grove board) to control soil moisture in a plant. By integrating hardware components and software,
the system exceeds expectations by providing a contextually relevant solution for automated plant care. The project not
only fulfills technical requirements but also addresses various learning outcomes, contributing to the enhancement of
technical, problem-solving, and time-management skills.