Hello, world. It's been awhile.
(styling unapologetically plagiarized with sincerest thanks to Pure.css)
Welcome, weary traveler. This blog adventure is to sort out all things YARG - what is it, why it is, where it is. A design and build log, an impromptu place to document this project. Just an old guy shaking his fist at the cloud and muttering incoherent rambling.
Probably be easiest if I just c/p the .md file I have in the project. Here goes nothing... (it almost worked. Here's a cleaned up version)
YARG
Yet Another Robotic Garden. Not that there are many out there mind you. 'Adventures in architecting a minimalistic approach to an automated ebb and flow hydroponic garden' seemed too long, and let's be sensible - AIAAMATAAEAFHG is simply gibberish, isn't it.
Completely inspired by LED Gardener and his past projects
General Design Considerations
The core objectives of the YARG project are as follows:
- To design and implement a fully autonomous hydroponic garden capable of operating independently for extended periods, reducing the need for constant human intervention.
- To create a self-contained system that functions without relying on cloud-based services, ensuring data privacy and security.
- To develop a comprehensive scheduling system for managing the entire growing season, encompassing feeding, lighting, environmental conditions (temperature and humidity), and reservoir management.
- To integrate automatic pH and EC measurements using Atlas Scientific sensors, with the potential for expansion to include dissolved oxygen (DO) and oxidation-reduction potential (ORP) readings.
Technical Aspects:
The YARG project encompasses several technical components:
- The system is designed to accommodate four plants initially (for this test proof of concept at least), fully expandable and modular, each housed in a separate 3" net cup within a 20L plastic pail, providing an environment for optimal growth.
- Flood detection mechanisms have been implemented to prevent potential overflow, leveraging moisture sensors that promptly signal adjustments to the ebb and flow cycle.
- The system incorporates maintenance tracking for critical components, including pumps, solenoids, and flow meters, ensuring smooth operation.
- Inventory tracking is integrated to monitor the levels of essential chemicals, with potential features for automated procurement when stock reaches predefined thresholds.
- To maintain ideal conditions, the YARG project includes provisions for regulating water temperature through water chillers or heaters as required.
Software and Control:
The software architecture of the YARG project is comprehensive:
- The software follows the MVC (Model-View-Controller) design pattern and is developed as a C# web application using .NET 5. It incorporates Bootstrap, JQuery, and Plotly JavaScript libraries for enhanced functionality and user experience.
- The application is compiled for ARM64 Linux and is hosted on a Raspberry Pi 3, leveraging NGINX for web server functionality. Database management is handled by MariaDB on an SSD drive for data reliability.
- Secure MQTT communication is established for seamless device interaction through a Mosquitto broker on the same Raspberry Pi, ensuring data integrity and privacy.
- Authentication mechanisms are in place, allowing local user accounts and exploring the possibility of third-party sign-ons such as Google authentication via Microsoft Identity.
- The project follows a strict "No Entity Framework" policy, allowing for fine-grained control over the database layer. This includes crafting custom stored procedures, optimizing queries, and hand-coding the Data Access Layer (DAL) for optimal performance and control.
- The YARG project embraces a multi-language approach, offering support for English (as the default language) and plans for future expansions to include French, Spanish, Ukrainian, and more, to accommodate a diverse user base.
- At its core, the project aims to provide a platform for skill enhancement and continual learning. The open-source, do-it-yourself (DIY) philosophy aligns with budget-conscious principles, fostering collaboration, and encouraging community participation in the spirit of shared knowledge.
Language Support and Educational Goals:
Language diversity and educational growth are essential aspects of the YARG project:
- The project aims to offer multi-language support, starting with English (default), and plans to expand to include French, Spanish, and Ukrainian, with potential for additional languages in the future.
- At its core, the YARG project serves as a platform for skill enhancement and continual learning for myself. It provides an opportunity to stay relevant in an ever-evolving technological landscape.
- The project upholds an open-source and DIY ethos, emphasizing a budget-friendly approach that encourages collaboration and community participation.
Microcontroller and Control Logic:
The hardware and control components of the YARG project are meticulously designed:
- ESP32 microcontrollers play a central role in interfacing with external components, controlling solenoid relays, and managing L298N motor controllers for peristaltic and circulatory pumps.
- An ATMega microcontroller is responsible for precise pH and EC measurements using Atlas Scientific sensors, with serial communication to ESP32 devices, facilitating data transfer to the central server.
- Communication within the YARG ecosystem is achieved through secure MQTT channels with SSL encryption, ensuring robust and reliable data exchange.
- Flow meters are integrated into the system, providing accurate measurements for all pumps. The YARG project embraces flexibility, allowing user-configurable pulses per liter for freedom from vendor lock-in.
Physical Setup and Aesthetic:
The physical configuration of the YARG grow room as follows:
- The grow room occupies a 4' x 5' space, with each plant allocated a 2' x 2' area. Spider Farmer SF1000 LED grow lights are strategically positioned directly above each plant, offering an optimal lighting environment.
- The hydroponic setup features 20L plastic buckets, each equipped with a 3" net pot and a false bottom. These components integrate essential elements such as pumps, water flow sensors, solenoid switches, and moisture sensors to ensure precise and efficient operation.
Current Status and Future Prospects:
The YARG project experienced a brief period of inactivity, but it was recently reinvigorated in July 2023:
The documentation and sharing of progress are planned through a WordPress this personal blog, serving as a platform to provide regular updates, insights, and milestones achieved in this ongoing journey of technological horticulture.
Sharing on Github is scheduled for end of September 2023. Honestly guys, there's a lot of dead code, irresponsible code, and some of it is embarassingly bad; give me a little bit to get over my code anxiety to spit and polish a little
Ta for now.