Uploaded by taylourbeigh2018

ENGR266 Final

advertisement
ENGR 266 Final
Taylour Beigh
06/08/2023
Abstract
As part of our enrollment in ENGR266, students are required to complete a final presentation.
The presentation should be focused around the implementation and usage of an Arduino control
board and Arduino IDE. I decided to build a live-feed moisture sensor for my plants. The choice
for this particular project was from a few main reasons;
1) I wanted to find something that could tie into my hobbies/interests outside of school.
2) It needs to use Arduino IDE
3) It must allow for room for expansion in the future
This term's work has accumulated into a working Arduino-based moisture reading sensor that
allows the user to calibrate to a certain level of moisture, then makes the sensor determine if the
soil is, in fact, wet or not.
Aim
As stated earlier, the goal of this project was to build something based around an Arduino board
while utilizing our skills learned from our MATLAB lessons. Specifically, my goal was to create
something that would be useful for myself, and allow for future modifications to be possible. This
all needed to be completed through Arduino IDE.
Introduction
The setup for this project is quite simple. Below is the wiring diagram I used to get a functioning
moisture sensor.
As seen above, we simply needed 3 wires to sense our moisture level; red to indicate the 5v
power, black to indicate the ground, and yellow to indicate an auxiliary channel. While the 5v
and ground are fairly self explanatory, the auxiliary channel is used for the capacitive sensor to
communicate to the board. It simply allows the sensor to establish one way communication to
the board.
The Arduino Uno r3, or in our case the Elegoo uno r3 (which is essentially the exact same
model just made by a different manufacturer), allows the user to tie directly into the board via a
USB connection to the computer. This allowed for a simple and easy method of allowing the
board to read the code, and to display the output it measures from the sensor.
Below is an image of the completed and set up circuit.
Method
The code I used for this project was fairly simple; I used a loop to continuously evaluate the
value that the sensor is recording, simultaneously I also had the arduino spit out the value of the
moisture level into the serial monitor. Below is my code used.
Results and Discussion
After I uploaded the code to my board, the arduino instantly began reading the moisture content
and continuously spit out the moisture content value. Attached are 2 separate points of time
after allowing the sample of dirt to gradually become more saturated.
Dry:
And Wet:
A few notes about the sensor;
In order to calibrate it, one needs to first allow the sensor to run in DRY soil, then gradually add
water to the soil and allow time for it saturate. After a sufficient enough time that the water has
fully saturated the soil (or enough for the user to want to indicate a change in state from dry to
wet) The value can be then used as in a if-else loop where the value determined can be set as
the threshold between wet and dry. This could look like such:
Conclusion
In total, my objective for this project was to build, implement, and test a project that would meet
the 3 goals set from earlier;
1) I wanted to find something that could tie into my hobbies/interests outside of school.
2) It needs to use Arduino IDE
3) It must allow for room for expansion in the future
Of those 3, I completely fulfilled 2 of them, and the last one to allow the circuit to be expanded in
the future, is still in the works. MATLAB Simulink offers a powerful way to visualize and set up
complex and difficult circuits and machines. Using Simulink I would be able to allow the Arduino
board to read different values and spit them out like already done, but take that a step further
and allow the arduino to make changes and alter features to do what it thinks would be the best
for the given situation. For example, if I have a flower and the sensor is reading very dry the
Simulink assisted circuit could then (after determining that the soil is in fact “dry”) operate water
irrigation hoses.
Overall, I feel like I produced a project that fulfilled the requirements and showcased the
learnings and skills from this course.
Download