This is apartment building I live in. A lot of storeys, a lot of balconies and a lot of people who have plants.

For example, me. I am close to never at home and, you can guess, my plants are in a rather bad condition.

So, I decided that I should do something against that. Water my plants for example. But I'm way to lazy to water them myself. On a dusky evening, I came up with an idea: Why don't we use IoT to control the water flow according to weather and/or sensor data? And that's where Project BalconyGardener comes in..

Step 1: What Do We Need?...

If you want to build a system that controls water flow in the one or the other, you will sooner or later come to the point where you know, that you have to buy a water solenoid valve.

For example the one displayed above. It's a Hunter PGV 100, Gardena has similar ones, and you get simply get them on Amazon. They are about 15 Euros each.

You will also need a relay (or a relay board if you want more than valve in your system) and a 24v DC power supply to open and close the valve. Opening the relay results in opening the valve.

Step 2: Sensors, Sensors, Sensors...

In our setup, we used a wide range of sensor.

For example, a temperature sensor, a air moisture sensor and one to control if the earth is dry, which is displayed above. We will use their values later on to control when to water our plants.

All of these are also available for example on Amazon and cost something below 10 Euros each.

Step 3: The Heart of It: Intel Galileo

The heart of the Balcony Gardener is a Intel Galileo, which can be compared to Arduino boards or Raspberry Pis, but is far more powerful.

We connected a shield to it for easier cabling and linked up the mentioned sensors to the board. In a simple c++ program, we polled the sensor data and sent it to a server in the cloud.

On the Galileo, compute the values the sensors deliver to you to make a decision whether to water your plants. You have to do some measurements to find nice values for that and if the sensor values drop below a given threshold, open the valve to water your plants.

Step 4: The 'Architecture'

Balcony Gardener consists of 3 basic parts.

On the one hand, we have 2 Apps, one for Android and one for iOS, polling the sensor data from the server and displaying it in a table and also showing the user a nice chart containing the last couple of hours of captured data.

The probably most important part is a simple php server in the middle. It connects the app and the Galileo, saves the sensor data in a SQL database, which can be queried using predefined requests.

Near the plants, you put your Galileo, which updates the sensor data on the server and fetches manual watering requests.

Step 5: Manual Watering Requests

Reading the last sentence in the last step, you were probably confused. Manual watering request? You didn't tell me that we would do something like that!

Of course we do! I mean, you want to show off with this system and impress your friends with the power of IoT, right?

The simple app we developed contains a watering button which you can see on the bottom left side. If you press it, it sends a request to the server which recognizes it and saves it locally. When the Galileo sends new sensor data to the server, the servers response contains whether it should water now or not. Like that, we have no direct communication from the server to the Galileo which spares us the fight against dynamic IPs, etc.

Step 6: Wire It All Up!

You can also hook up a LED display like we did and display the data on spot which is rather nice for debugging.

If you did everything correct, you should now be able to control the valve using the Galileo.

This project was created during a 24h hackathon in Munich (Intel IoT Roadshow).

If you need any more information, you can also check our Hackerleague documentation .

If you want to get in touch with us, simply write us an e-mail (peterd [at] in.tum.de)

Step 7:

<p>Very nicely done! </p>

About This Instructable




More by DanXMuc:Balcony Gardener 
Add instructable to: