As a little boy I grew tomatoes and some herbs in pots on balcony (because we didn’t have a garden at that time). Over time my hobby evolved into growing vegetables in a greenhouse. Since I also like technology and automation, now many of the repeating processes are controlled by Claris FileMaker, Raspberry Pi, Hardwario, LoRa, Node-RED, and other technologies.
As I grew up and got my own garden, I could build a greenhouse there. Thanks to the greenhouse, I can extend the growing season to begin in early spring and last until late fall. But growing vegetables in a greenhouse has its own specifics…
Issue with temperatures
Early in the spring, when the sun does not shine so much, the benefit of greenhouse is that the temperatures inside get higher. This however changes in summer, when the outside temperatures are already high enough and the temperature in the greenhouse can climb even over 70°C. Higher temperatures cause water to evaporate faster, and plants require more watering. But… not every plant needs the same amount of water, the same watering method and the same air humidity.
You can easily figure out whether it’s warm or cold outside simply by looking out the window. But it’s not so easy to imagine that when the temperature outside is 2°C and the first spring sun starts shining at the greenhouse, the indoor temperature can easily get over 30°C. To be able to measure this, I decided to collect data and analyze it using FileMaker.
To measure the temperatures, I chose the industrial IoT kit from Hardwario. I am using it to collect data inside the greenhouse and send it wirelessly, using the MQTT protocol (useful for IoT devices to communicate with each other) to a hub running on Raspberry Pi. I am then using Node-RED to save the data from the hub to a FileMaker database.
I also made a version that uses the LoRa technology to send the data, so now I can measure temperatures anywhere in our country where the LoRa signal is available. This solution has proven very good because the Hardwario kit is designed for minimum power consumption. Therefore the whole device is running on the same pair of AAA batteries for second year for me, reliably sending data to the hub every hour.
The device has already survived temperature from -15°C to +72°C and very high air humidity without any signs of damage, except for the case printed on a 3D printer, which slightly changed its shape due to the high temperatures and humidity.
Watering based on data
When I learned the reality and discovered how much the temperatures in the greenhouse change, I started looking for a way to solve the watering. I know that there are automated watering systems out there. But my starting point was a single hose bringing water to the greenhouse and I wanted to be able to remotely start or stop the watering at any time without having to bring electricity there as well.
Originally, I used battery-powered automated watering clock, but it was turning the watering on always at the same time and kept the water running for the same period. My goal, however, was to adjust watering based on the measured temperatures and current soil humidity.
So I used the proven Hardwario kit and built a module to control the water valve. I decided to use a valve made by company named Hunter with a coil controlled by 9V DC power. I programmed the Hardwario module so that it could continue to operate based on the last measured values even if it lost the connection to the hub. That way I could ensure the plants would not run out of water.
My next improvement was to connect a soil humidity sensor and program the watering control to take that into account. Watering now gets temporarily interrupted to let the water soak into the soil, then the watering continues, until the required humidity level is achieved.
In the end I built two of these modules and split the greenhouse watering to two sections. Drop watering and spray watering. Each watering type can now be turned on for a different amount of time.
Mobile app, which I built using Claris FileMaker and Xgode, lets me watch the current measured values in the greenhouse and control some of the watering components. To not have to watch the app on daily basis, I can set it to notify me when specific temperature or humidity values (or control element status) are reached. The notifications can have the form of an e-mail, or a push notification sent to my mobile phone.
I also have yet another wireless device I built using the Hardwario LCD module sitting on my desk, where I can watch current situation summary, such as current temperature, last 24 hours average, generated from FileMaker. Thanks to this I am always informed about current situation in the greenhouse.
What I haven’t connected to these technologies yet is the greenhouse ventilation. That is currently solved using automated openers, working on the principle of liquid expansivity. It is, from my point of view, very reliable solution, without any electronic elements, which are typically prone to oxidation in the highly humid environment. The next element I am preparing to add to the water valve is a flow-meter, which will allow me to verify that the water is really flowing when the valve is open, and notice potential defect of the valve or water source. It will also help me to measure water consumption.
I know the life inside the greenhouse still requires human care and it was not my goal to replace it. I just don’t have to verify the watering on daily basis now, so I can focus on other activities, such as protecting the plants against pest or taking better care of them in general.