Awesome Greenhouse With Automatic Watering, Internet Connection & Much More

3,134

61

13

Introduction: Awesome Greenhouse With Automatic Watering, Internet Connection & Much More

Welcome to this Instructables. On beginning of march, I was in a garden shop and saw some greenhouses. And since I wanted to make a project with plants and electronics for a long time already, I went ahead and bought one:

https://www.instagram.com/p/B9eZSupnqT5

Before reading, I ask you to check out the other Instructables in the "indoor gardening" contest and vote for your favourites (maybe also my one?) =) Thanks.

I wanted to have the following features:

  • Soil humidity sensors
  • Pump for watering
  • DHT11 for air temperature and humidity
  • Automatic ventilation
  • Time-lapse function
  • Internet control

It also sends you an E-Mail once the water tank is empty.

Since you probably do not have the exactly same functions in mind, and also not the same materials as me, I will write this Instructables more generally.

Step 1: The Water Source

What I learned that you should definitely begin with looking for a water source. Because now afterwards, I could not manage to add a big enough container in the box. My initial plan was to 3D-print a container, but I quickly realised that it is not the best and most reliable solution.

I then tried to use a 0,5l water bottle and make an adapter for it, but once again it was not tight at higher pressures. What I ended up doing is just zip-tieing the bottle to my box. Also, I cut the tube and then in the end about 20cm missed. I 3D-printed a small pipe to add a new piece. However, that is not the best solution yet and I am still searching for a better alternative.

Step 2: The Greenhouse and the Wooden Box

After looking for a good water storage, I would beginn with the greenhouse. I found one in a local store for a pretty affordable price, and also with sufficient space. Do not underestimate the needed space for all the electronics!

I began with building a wooden box, whose wood I reused from an old guinea-pig shed. Obviously, you will have to find your own dimensions. I decided to use 3D-printed corners to get a nicer connection to the round greenhouse. While this does look nice and also is easier, I think it would have also be good if I only printed an adapter for the top part.

Later I decided to add two handles (which I had to remove of for the bottle) and also hinges to use for the greenhouse top and some mounts for a rubber band. Everything was designed with the great CAD-program Autodesk Fusion 360 and printed on my Ender 3 with Redline PLA. You can find the files on thingiverse because I think they are useful for many applications.

Step 3: The Arduino and Circuits

I chose to use an Arduino MEGA 2560 simply because I had one laying around and also to have enough pins. I ordered a ENC28J60, because it was way cheaper than the alternatives, however I only later realised that it is a really old module with limited functionality. I got it to work with Blynk, however it is very sensible to the power input, for example when the pump is activated. Powering is also a big problem, because it is very hungry. I soldered a shield using a buck converter and also added a big capacitor.

I do recommend choosing one of the more expensive modules. Also, a crimping tool is highly recommended. However, I do not have one and thus, I decided to solder an adapter circuit which connects everything. Solid copper wires were used.

The copper wires were also used as soil sensors. For that, we need a voltage divider. I did the same with the water sensor. For the pump, I used a relais and for the camera, an ESP32-Cam board, as well. Initially, I wanted to run it all the time, but I realised that pictures were not visible at night, though the flash was used.

Powering everything also turned out to be more challenging, every time the pump was activated, the ethernet adapter lost connection. I am still waiting for a bigger wall plug, but I think 9V, 2A should be fine. I did connect the adapter with the on-board jack on the Arduino, though I am aware that this is not the best solution because it needs to go through the PCB of the Arduino. I recommend looking for a different solution, like a breakout-board or so.

To connect the components on top, I made a small adapter so that the wires for the servo motor are enough and also could be removed if needed. Two cheap SG90 servo motors were used and I found them to be completely enough.

Also, I made my own soil humidity sensors from a 3D-printed part and some copper wire. Those work really fine.

The ESP32-cam board was powered over another relais. I followed this tutorial from BnBe club, however I set the timer to 30 minutes. He also helped me at my first try to use a transistor, however the ESP is just too sensible for that. I printed a really nice case made by Electronlibre on thingiverse.

Step 4: Mounting Electronics

Next, you should find a way to mount everything. For the Arduino as well as for the adapter board I printed a small piece. I am not exactly happy with the case for the Arduino, because assembly is very difficult. However, I am very happy how the ventilation flaps worked out. It is a print-in-place design, so the hinge is included. I used a piece of wire to be able to pull the flaps up.

The soil sensor is also available on thingiverse. I printed 6 of them.

Step 5: Water Circuit

I decided to make a wooden frame to hold the water pipe. The plan is to make small holes where the water can flow out. A big difficulty is to make everything water-tight. I learned that you should think very much about making holes into the plastic form...

There is also a pipe that will go back to the water tank. I found the pipe to be too short, therefore I made a hole into the bottle.

There is even a water sensor in the bottle, which is just a wire taped to the pipe. I noticed it began to rust after some time, a friend on Instagram recommended to use switching current (NOT directly out of the wall, obviously...) to prevent this. Now after a few days, there is electrolysis, so I highly recommend not to do this!!! Better use a ultrasonic distance sensor or so. Or you might try using a relais to turn it on only a few times in a hour.

I am pretty happy with the pump, you should choose one which is beginning to pump automatically! Mine can be powered from 6V to 12V, so 9V was fine.

Step 6: Programming

Since I am neither very good, nor does it make fun to me, I decided to use Blynk over programming everything. I also bought some more energy in the app to have more freedom. The sketch is pretty easy, you might need to adjust it!

You will have to insert your key and your email.

The app is fully customisable, so you can design it how you want.

Step 7: The Final Result

Last steps were to assemble everything and - obviously - plant something. I decided to go with basil.

It is important that it has enough water, so I began with manually watering it.

I had it running only for testing, so I will keep you updated as soon as the wall adapter arrives.

Edit: The wall adapter also did not help much. But I am very sure that the problem is the ethernet card, because the Arduino has no problems switching the pump without blynk. So, you should definitely buy a better module!

I hope this Instructables inspired you, or gave you some helpful tips. If so, maybe consider voting for the "Indoor Plants" challenge and check out the other Instructables! Thank you for reading.

Indoor Plants Challenge

Second Prize in the
Indoor Plants Challenge

Be the First to Share

    Recommendations

    • Water Speed Challenge

      Water Speed Challenge
    • Backyard Contest

      Backyard Contest
    • Summer Fun: Student Design Challenge

      Summer Fun: Student Design Challenge

    13 Comments

    1
    diy_bloke
    diy_bloke

    1 year ago

    Impressive, Well done. Allow me a few remarks:
    using a ultrasonic distance sensor for your tank is a good solution, but most US sensors dont do very well in humid circumstances so it may give out soon.
    There are several approaches: A watertight US sensor.....usually pretty expensive. Instead of a metal for sensors, use carbon rods. No electrolysis. How about a capacitive sensor. Glue two wide strips of alu foil on yr bottle and consider that a capacitor. The amount of water is the dielectrum.
    Other options: a load cell under yr bottle, or a simple float switch.

    I understood you have connection problems when the Relay is activated? You already added a capacitor but maybe a more beefy capacitor over VCC may do miracles.
    Anyway Einsame Spitze

    0
    matti04_electronics
    matti04_electronics

    Reply 1 year ago

    Hey, thank you so much for your comment, I really appreciate that.
    Okay, I didn't knew about humidity being a problem, good to know. I also though about using a time of flight sensor, maker.moekoe used that once for the same appliance. https://www.makermoekoe.net/post/attiny-fill-level...
    Oh, and yeah, there are massive connection problems. I already have a voltage regulator and a 1000µF capacitor on the secondary side of the regulator for the ethernet module.
    However, I am very sure that it's the ENC28J60 what causes problems, since without blynk, there are zero problems switching the relais.
    Thanks again for your input, I consider to build a second version with a better water detection and also a different ethernet module, or even better a wi-fi connection.
    Matteo

    0
    diy_bloke
    diy_bloke

    Reply 10 months ago

    Sorry to bud in again but if you are building a new one, consider just using the esp32 cam. It has wifi and pins to spare for your application

    0
    matti04_electronics
    matti04_electronics

    Reply 10 months ago

    thanks for your suggestion. i have considered to do that, but my problem was mainly that there was no wifi access, just ethernet. Thank you a lot though :)

    0
    diy_bloke
    diy_bloke

    Reply 10 months ago

    That makes sense. 😁😇

    0
    diy_bloke
    diy_bloke

    1 year ago

    Oh, I forgot to mention one thing: if you use it as propagator as well, heating might be important. You could buy a heating mat but that's no fun.
    I am currently experimenting with a 'greenhouse' somewhat like yours (actually they are called propagators) where I have a fan blow air through some 33 resistors that are getting current at their full power rating (250mW), giving me an 8 watt heater in there. That seems to work well.

    0
    matti04_electronics
    matti04_electronics

    Reply 1 year ago

    I am very interested on your project, do you share your build progress somewhere? =)

    0
    diy_bloke
    diy_bloke

    Reply 1 year ago

    I will in due time

    1
    angelcruzdev
    angelcruzdev

    Reply 11 months ago

    Hey man, I'm very interested too!! I need to do something like that.

    0
    diy_bloke
    diy_bloke

    Reply 10 months ago

    Still working on it but it is basically a pro mini +lcd.
    It controls a fan a d two heaters. One for soil and o e for air. Measures temp and humidity as well as soil moisture.
    Heaters are simple self built. Pic of the air heater

    20200905_212306.jpg
    0
    matti04_electronics
    matti04_electronics

    Reply 1 year ago

    Oh, well okay that's interesting. I didn't know about propagator, but I have it on my window board, so it rather to hot than too cold :)

    Cheers, Matteo