Urban Stalk Automated Hydroponic Pod
Urban Stalk is a vertical farming start up, hoping to sell a fully automated hydroponic growing system which can be placed in diverse internal environments to clients like Loblaws. The goal was to grow microgreens more quickly and efficiently through careful control of the growth environment.
Project Details
The system had to maintain specific temperature, relative humidity, and carbon dioxide levels in each growth chamber, as well as automated management of pH and overall dissolved solids content of the nutrient solution fed to the plants, as well as schedule lighting cycles and floods of the hydroponic trays. It also had to be self-contained, demonstrate modularity and expandability, and have remote management capability.
The requirement for modularity made the architecture more complex. Not all capabilities could be doubled, the chiller (a mini-fridge) and batch tank (and associated pumps and valves) would be shared between the two chambers. So each module required a microcontroller (a Raspberry Pi Pico) to connect to its local sensors and actuators (a heater and thermistor, two pairs of two dampers, two fans, an SCD40 CO2/temperature/humidity sensor, a water valve, and two float switches), and then a Raspberry Pi served as overall controller, arbitrating shared resource needs, logging data to a MariaDB database (local or remote), and running an interface for local or remote management.
I designed and implemented a custom JSON-based protocol for inter-device communication and control (over USB serial in this version) and wrote a few thousand lines of C++ and Python code between the microcontrollers and the Pi to control everything, as well as a basic demonstration remote management interface using the Anvil web app framework. When I started this project, I had written maybe 100 lines of Python, total. After completing it, I consider myself quite fluent with the language. I also learned SQL for this project.
This project was the first I was tapped to work on at my current employer. While I worked with a team, in the end the bulk of the software and electrical work fell on my shoulders. I learned a lot here, and made a number of mistakes I've mostly avoided repeating.