School · Kristiania · 2024
Greenhouse system
Monitoring a greenhouse with sensors. Live readings, alerts on your phone and history over time.

Summary
The Greenhouse Monitoring System is designed to optimize the growth conditions of various crops by combining sensors and IoT technology. The system is built with Arduino and a suite of sensors from Adafruit, including temperature, humidity and light sensors.
Through detailed research, I identified the key factors influencing the growth of Goldfinger bananas and Cayenne pineapples. By integrating sensors to monitor these factors, I created a system that ensures optimal growth conditions. The final product includes real-time data visualization and alerts, making the greenhouse easier and more efficient to run.
The process
Research
I started by researching the growing conditions of bananas and pineapples. I found that these fruits can grow together, complementing each other in terms of shade and environmental needs. I then identified which factors could be monitored using ESP32 sensors and chose ThingSpeak for cloud data management because it is easy to use and well documented.

Real-World Scenario
In a real-world scenario, the program would be optimized for specific fruit varieties. Based on my research, I chose Goldfinger bananas and Cayenne pineapples for their complementary growth needs. Alerts were tailored to ensure optimal growing conditions for these fruits.

MVP to Final Product
After completing the research, I built MVPs for each function and integrated them into a single program. Alerts were added for out-of-range sensor data, and functionality for sending data to ThingSpeak was implemented. The final product included a dashboard with gauges for temperature and humidity.
Code Documentation and Structure
The code is well documented with comments and divided into five main sections: global variables, setup, helper functions, main functions and loop. Each function includes a brief description, making it easier for others to understand the code's structure and functionality.

Alerts
The system includes alerts for various conditions, such as light intensity, temperature and humidity. A Pushsafer alert notifies users if the greenhouse door remains open, incorporating weather data from the OpenWeatherMap API. This ensures users are aware of any critical conditions affecting the crops.

Cloud Setup
The cloud setup follows a tutorial from Random Nerd Tutorials, adjusted for the ESP32. This setup enables real-time data monitoring and storage, providing a comprehensive overview of the greenhouse conditions.
Extending the Solution
To extend the solution to multiple sites, data collection and visualization can be centralized on a single IoT platform. This allows for individual visualizations for each site and advanced analysis through a centralized database.
Libraries Used
The project uses these libraries: ThingSpeak by MathWorks, Adafruit_SHT31, Adafruit_DotStar and Adafruit_LTR329 by Adafruit, and ArduinoJson.