Arduino Controlled Greenhouse (With Blynk As Interface)





Introduction: Arduino Controlled Greenhouse (With Blynk As Interface)

First Time Author Contest

Runner Up in the
First Time Author Contest

Automation Contest 2017

Second Prize in the
Automation Contest 2017

This will not be a step by step guide on how to exactly
make a greenhouse automation like mine; this will more be a presentation so you can have some inspiration.

I wanted to make a greenhouse that could run for itself a few days without all the plants wither away. The two most important factors for the plants in the greenhouse are water and temperature so the focus on the automation system is to control those two factors.

A summary of the system:

I collect rain water from the roof and store it in tanks. From one of the tanks a submersible pump is installed. This pumps water into a smaller feeding tank inside the greenhouse, on the feeding tank there are 7 pumps connected that do the actual watering to the plants.

The plants are planted in pots and grouped so 4 pots are connected to one pump. One of the pots in this group of 4 there is a soil moisture measurement that feeds the Arduino the moisture level. In the phone I can set the level of moister for when the watering of the 4 pots should begin.

There are 2 temperature transmitters installed to record the temperature inside the greenhouse. If it gets to hot I start a fan that force in outside air into the greenhouse. (In top of the greenhouse there is normal automatic greenhouse windows that open/close depending on temperature) And if it gets to cold I have a small heater inside that will prevent it from getting to cold.

The following steps I will go into some of the details of the different parts of the system.

Step 1: Rain Tanks

I have two rainwater tanks, each tank is connected to the downpipes of the roof and collects the rainwater. The collection objects have an automatic overflow protection inside so this needs to be leveled with how full I want the tanks to be. The tanks are connected with a hose and make a siphon between them to get the same level in both tanks.

From the tank closes to the greenhouse I have a submersible pump and a ultrasonic distance measurement that is measuring the level of water in the tank. This is all connected to the Arduino inside the greenhouse and level is displayed in my phone and that interface I will show later. The distance measurement will also prevent the pump to start if the water level is below the pump intake.

Step 2: ​Feeding Tank

The water is pumped from the rain tank to the feeding tank that is located inside the greenhouse. Here I have 7 pumps mounted, this is actually cheap windshield washer pumps. An ultrasonic sensor is measuring the level and the level is controlled to be between 50% and 75% when the system is in automatic mode. Filling is done from the rain tank.

Pump 1-4 is connected to the 4 pots each, pump 5-6 is a spare and pump 7 is a pump to a mist spray nozzle, this is more for experiment for mainly two purposes.First; cooling the greenhouse and second; in dry conditions making a more humid environment (The cucumber likes higher humidity).

Step 3: Moisture Sensor in Pots

Moisture sensors installed in the pots that records the moisture every 30 minutes. Setpoint and values is displayed and changeable on the phone.

Step 4: Water Sprinkler in Pot

Picture of the water sprinkler in the pot. Hoses is wired to 4 pots from one pump.

Step 5: Cooling Fan

Here is a picture of the cooling fan. This is controlled from a temperature set-point in the phone and PWM (pulse width modulation) controlled depending on how far from the set-point the actual temperature is inside the greenhouse.

Step 6: Temperature Sensors

Temperature sensors are one-wire sensors called DS18B20. I have two sensors, one high up in the greenhouse and one low down in the greenhouse. I sample a value each 10 seconds. From these sensors I control the cooling fan if its to hot or the heater if its to cool.

Step 7: Humidifier

Spray nozzle for humidification and cooling if the fan can't cool down the greenhouse enough.

Step 8: Arduino Control System

I will not publish any code for this project right now. But here is the look of the arduino with connections to different relays etc... Looks like this because of all changes I have done when testing everything.

Step 9: Blynk Interface

Here is the interface for controlling the greenhouse. This is done with the app Blynk.

First picture: Level of water in the tanks indication of low level or signal error. If any of those happens I stop and prevent the pumps from starting. And also history graph of the level in both tanks.

Second picture: Temperature monitoring of the greenhouse with a history graph. Here we have set-point for max temperature and set-point for minimum temperature. We see the average temperature together with the percentage the cooling fan is running when the temperature is over the set-point. We can also see if the heating is activated.

Third picture: Moisture measurement in the pots and the set-point for when it should be watered. Counter that counts down to the next measurement, each measurement is done every 30 minutes. And history graphs on the measured values.

Fourth picture: Possibility to run the pumps manual mostly for testing issues. Here I can also put different systems in automatic mode. And set how long the watering pump should run each watering session.

- Pumps Auto: Here the watering pumps and feeding pump is put in automatic mode. Which means filling the feeding tank and watering the plants.

- Watering KL13:00: If in auto it will force to water the plants minimum once each day in the middle of the day.

- Cooling Auto: Fan is put in automatic and will start when the temperature is above the set-point, the fan will run faster the higher over the set-point the temperature gets.

- Heater Auto: Here the heater is in automatic and will start when the temperature is below the set-point. The hysteresis is 1 degrees C so it will stop when its 1 degree above the set-point.



    • Epilog Challenge 9

      Epilog Challenge 9
    • Paper Contest 2018

      Paper Contest 2018
    • Science of Cooking

      Science of Cooking

    We have a be nice policy.
    Please be positive and constructive.




    Very nice project. I was thinking doing something similar to let my plant sprout, maybe adding also artificial light. Since I don't know them I was hesitating between Arduino and Raspberry system. Know I guess Arduino can do the job or would you for some reasons recommend Raspberry instead ?

    Arduino is a micro controller, pi is a micro processor. For this project you need a controller. Because u want to control the greenhouse. You can use pi too but you will have problems with the analog signals. But for this project pi is good for one thing "pi-server". If u make a pi server than you wont need Blynk too. It will become full customizable with help of some html and Apache knowladge.

    Hello, the best reason to use arduino is, more resources available, there is more people using arduino than pi, so you'll find more libraries, examples and help...and is cheaper haha

    You beat me to it.
    I am planning a control system for my greenhouse and enclosed raised beds.
    I was given an automation system but I will have to get creative using it. I also intend installing grow lights as we get poor quality light most of the year. I plan to run the system from a large solar panel and wind generator. It will have 3 water butts, two for the greenhouse and one for the raised beds but all controlled through the one unit and hopefully only one pump.

    I like this and a lot of work has gone into it.

    If anyone has a greenhouse, they will know it's like having a pet. You can't leave it alone for a day without some disaster happening - too hot, too dry etc.

    Automating is the way to go and obviously for commercial growers, it is the only way. It's what microcontrollers were made for.

    I hope you do get around to publishing the code etc., especially on instructables.

    You have got it pretty much covered.I would like to suggest that you install some shade netting that can be retractable according to the levels of sunlight.This can help control temperatures as well as the ventilation.

    From there you can go on to energy saving screens.

    These also affect the microclimate in the structure.

    I work with these products and will happily explain the installation if you are interested.

    I tried using shade netting to cool my greenhouse, but found that the reduced sunlight really cut down the photosynthesis and the plants did poorly.
    Granted, I'm not much of a farmer. . .

    Very cool! I have a similar greenhouse in Sacramento, and I'm having serious heat issues. I like your mist nozzle idea, as I have a few laying around. I was worried about excess humidity and mold issues.

    congrats! It's a great project!
    Did you think about opening and closing the windows automatically?