I built a hydroponic garden as a covid hobby. I wrote software to maintain the garden, water it on schedule, apply ph changes to the water, turn lights on / off, humidify, as well as monitor statistics (temperature, humidity, water temperature, water ph, water conductivity).
Rough guess would be that I spent 50 hours actually working on the software.
There's a handful of raspberry pis involved. I wrote everything in elixir and used https://nerves-project.org. The dashboard is written with phoenix live view. One of the raspberry pis is the "brain" and basically runs the dashboard and controls devices. The devices are all in an elixir cluster. I also run timescale db for some basic history of metrics.
Once I start a grow I don't use it that much actively, but it passively runs all the time. I check in every few days or week to make sure nutrients are looking good.
I've grown strawberries, lettuce, jalapenos, and cayenne peppers.
What do you use for valve automation? Is it a commercial or custom part? I've been wanting to do the same myself, but I hear there's all sorts of quality issues with automatic valves.
I originally bought some solenoid valves to experiment with, but ended up simplifying my approach. I use a submersible pump that is plugged in to power. I can just automate turning on/off power to that outlet (I have two TP-link / Kasa HS300 strips). The nutrients / water are in a tank below the tray of plants, so when the power is "off", gravity brings the water back through the pump into the tank again.
What a clever and simple solution, I love it. I have been thinking about such a grow system for a long time for my chilli plants, and after having had a few split solenoid valves on a different irrigation project I was very hesitant. Thanks for the inspiration.
Not OP but I use motorized ball valves from Amazon [1] which are hooked up to a four way water hose manifold to create four different zones. It's wired up to an ESP32 that controls them with relays via GPIO, using the ESPHome sprinkler controller module (which does pretty much everything OP's code does). I've never had a problem with them and the last time I even touched them was over a year ago. They're pricey but you can DIY them.
The usual sprinkler valves at hardware stores need quite a bit of water pressure to change state which is probably what most people have a problem with, especially if they're trying to feed them with the kind of pumps they get at hydroponic stores.
Not OP, but I made one of these for my partner and I’s bonsai garden.
I use standard 3/4” sprinkler valves from the big box stores, connected to a manifold via unions on each side. This enables me to swap if needed, but these are ruggedized and will last a while. They do take 12VAC, so you need a transformer and use relays to turn them on, but they work very well.
Any chance of making your code public? I'm thinking of dabbling in aquaponics in the near future, and what you've built sounds almost exactly like what I would end up working on myself.
In practice aeroponics is very fragile. All it takes is a failure for a few hours for roots to irrecoverably dry out and kill the plants. Most hydroponic methods give you a safety margin of days or even weeks.
I use two pumps from Atlas Scientific - one for a jar of base and one for a jar of acid. I have a sensor for PH so I can see in the live dashboard, and can click a button on the dashboard to disperse a set number of ml to the tank. I should have been clearer - PH is the one thing I didn't "close the loop on" because it'd be a little volatile. For instance when you first add nutrients to the water the PH drops steeply but stabilizes over hours or a day, I didn't want to respond too constantly to those changes. I should spend more time on this aspect though and maybe just have notifications for when it makes decisions.
Not OP but I use aquarium peristaltic dosing pumps that pump General Hydroponics pH Up/Down solution controlled by a Raspberri Pi with an Atlas Scientific pH sensor.
Rough guess would be that I spent 50 hours actually working on the software.
There's a handful of raspberry pis involved. I wrote everything in elixir and used https://nerves-project.org. The dashboard is written with phoenix live view. One of the raspberry pis is the "brain" and basically runs the dashboard and controls devices. The devices are all in an elixir cluster. I also run timescale db for some basic history of metrics.
Once I start a grow I don't use it that much actively, but it passively runs all the time. I check in every few days or week to make sure nutrients are looking good.
I've grown strawberries, lettuce, jalapenos, and cayenne peppers.