Micah Miller's Senior Project V1
The project has taken a while to complete. This will act as somewhat of a user guide to setting up the project, and it will not be comprehensive. This is just to give you a decent understanding of what needs to happen for this project to function. Things explained will include .env file and passwords, physical materials, and general code structure. At a future date, I might include details on how to physically wire everything up, but for now, I will just include some pictures and a diagram. I will likely not include things like setting up Express.js server stuff. It will be up to you to figure out. For setting up the server, the code can be found in my CSC437 folder. It should have everything you need. The two branches to use are NoLogin and RestOfLabs. These branches don't include login settings because I can't be bothered. That means that whatever data you end up transmitting to the website, it will be public, so be careful.
To start this thing off, some files have been removed. The .env file is one of them. The reason why this file is not included is that it contains sensitive login info for MongoDB. If you are trying to set up this project yourself, you need to re-add that. Additionally, you will need to add a consistent api key between the .env file and the .ino file for the ESP board so that they can communicate.
A format for the .env file follows:
MONGO_USER=millermicahn_db_user
MONGO_PWD=
MONGO_CLUSTER=
TOKEN_SECRET=
API_KEY=
Now it's time for a brief overview of how the whole system functions. So the system currently can monitor 2 zones. Each zone has a moisture sensor, temperature sensor, and pump. The Nucleo board currently checks every ten minutes (editable in the files, and make sure to edit it in the main file and the .ino file), where if the sensors and reservoir sensor come back with okay levels (<40% mosture, >32 temp, reservoir == 1), the system will water for 2 seconds. The components are listed in the following section. After it checks zone values, even if a watering event didn't happen, the Nucleo board will send a packet of data through UART to the ESP board, where it will then HTTP POST the data over wifi to the server. The server then reads the data, now saved in MongoDB, and displays it dynamically as more and more data comes in.
You might have already noticed that something is off with the reservoir sensor. You'd be correct. The reservoir sensor had to be substituted with two wires that would connect with water. The reason why it was substituted was due to faulty component issues. More about this can be seen in my formal paper that I've linked at the end. Additionally, the pumps, voltage relay, tubing, and moisture sensors were obtained from a kit listed. You can find all of the parts individually, but personally, I got the kit because it came with an Arduino board.
This is an in-progress user guide. Expect more to come.
