[UPDATE 15 JULY 2011] Since last night, the greenhouse is back online again. The Xbee radio’s have been reconfigured, although the greenhouse radio is not an End-Device as expected, because we want it to be a router for other, later sensor nodes that will on a very small solar panel.
The greenhouse sensor though is now completely off-grid: A 11W solar panel is connected to a solar charge controller which charges a 12V-2Ah lead acid battery, which in turn poweres the greenhouse controller and radio. And in a few weeks the relays for lights and pump will be hooked up. And there is still some code changes to be made to the gateway and the controller node, but all that will be later. For now, let’s see how this off-grid setup holds up.
[/UPDATE]
[UPDATE 5 JULY 2011] After checking the results of about a month of consecutive monitoring and controlling, we found that it requires a bit of tweaking here and there, but mostly functions as hoped. However, the goal is to have the greenhouse controller powered off grid by solar cells. That has been tested and works fine, except that the XBee radio we use, currently consumes too much power and will eventually drain the battery slowly but surely over the period of a few weeks. To battle that, we are reading up on our XBee skills and implementing some changes in configuration and code to improve the radio’s power consumption by having it go to sleep when not transmitting.
We hope to be back online somewhere next week.
[/UPDATE]
A brief update to tell you that the greenhouse is currently offline for maintenance. It has been running non-stop for about a month and we are evaluating the data we gathered and are planning to add some more functionality. More specifically: the ability to tune the threshold values for the actuators via a webpage (the moisture level before the pump switches on, desired amount of light per day, etc).
This will require us to learn a bit more about the Xbee radio’s and the API protocol. We’ll keep you posted!
Until we are back, why not read a good book about the subject of building wireless sensor networksNetworks Books)
? We just received this great book and absolutely love it. It is such a great resource for everything Xbee/Zigbee related. There is a lot to be found online, but we found that to be sometimes incomplete, very specific, etc. This book presents you with 8 chapters and 7 projects to build.
Please consider buying this book via our Amazon-affiliate link. It helps pay the bill ![]()


Hi there!
Sorry in advance for being so brief, my first take at a post was highly long-winded, so, without further adieu,
I read on pachube that you had vents open and close with the heat, but you chose to stop for power-related reasons. I’m curious what other methods you tried, and which you finally settled on, if you have chosen one.
Are you using sub-irrigation with this project?
I know you check to see how dry the soil is, but how do you regulate how much water they get?
Sorry for asking so many questions, I love plants and computers, and this is a perfect fusion of the two. So needless to say, I’m highly curious and interested!
Hi Nick,
Thanks for your interest in our project. It’s good to ask questions, that is how you learn, so here are some answers that will hopefully help you get along with your project:
About opening and closing the vents/windows. I did indeed plan on using DC motors to open and close the vents and windows, but decided not to as that would mean that the doors will no longer move if the power supply somehow dies. For water and light control that is important too, but less so (in my opinion) than temperature. If I am away for a few days while it is very hot, the plants inside will surely die quicker with the doors shut. So instead I am considering to use autovents. These are mechanisms that open and close based on temperature. Usually they have a piston filled with wax or a mineral of some sort that expands as temperature rises and hence pushing open the windows. A bit of googling got me this site, which hopefully helps getting the idea: http://www.harrodhorticultural.com/HarrodSite/product/Greenhouse%20Equipment_Ventilation/GVE-004.htm
About the watering system. I do indeed measure the soil humidity by measuring the conductivity between two probes. When the measurement is below a certain threshold (450 on a 0-1000 scale in my case), it acticates a pump. The pump pushes water through punctured hoses mounted about an inch above the soil. I then do not regulate the pump’s output until it reaches a higher measurement. Instead, I turn on the pump for a given amount of time (i.e. 10, 20 or 30 seconds) and then switch off. The next moment I measure is about a minute or two later and the water has gotten into the soil increasing conductivity. If the measured conductivity is still below the threshold, the pump is switched on again once more.
To prevent jittering (i.e. measurement just below threshold, switch on the pump for a few seconds, then quickly getting below the threshold again), you could increase the time the pump is on, or implement a hysteresis (i.e. irrigate until a high-threshold is reached, for example 700. And then don’t irrigate until a low threshold is reached, for example 450.
The system is currently offline because the wireless radio modules I used use up too much power. This is not a problem with the radio, but with my relatively limited amount of experience with these units. So, I am reading up on the XBee radio’s and improving the code to decrease power consumption. Hopefully we’ll be back online in a week or so.
If you have any more questions, please do not hesitate to ask! And, if you have a project of your own, please share your knowledge!
I wish I had a project of my own! I’m looking forward to building one in the future, but I don’t have the money to build anything right now. And in addition, I’m not allowed to build anything on the property here, as it’s rented, sadly. However, I always love learning, especially about things that are as interesting as this!
I also agree that heat is more important to control than water or light. I was hoping there was something out there like that, because not only will it be more reliable, I’m sure it wouldn’t be exactly energy efficient to open and close several (potentially heavy) windows as needed.
However, what will you do if the ambient temperature is higher than the plants can handle? Where I live, the actual temperature can get to 110-115F (around 45C), not counting the humidity and heat index. I have a few potential (though perhaps unfeasible) ideas, but I’d like to hear what you think first.
Out of curiosity, what does the number 450 represent when measuring conductivity?
Also, I didn’t know code for a wireless communication device could affect it’s power usage in any significant way.
Then again, I know nothing of that aspect of technology. I’m not really even familiar with the workings of electronics or circuitry. I’d like to become familiar with them though! I think I should learn about those things before I go off and try to do anything with an Arduino, even if it is easier than normal. Any recommendations on how to learn about electronics and the like?
Thank you very much for your time!
Hi Nick,
That’s quite a few questions and comments there, I hope I can provide you with proper answers, here goes:
First off, the greenhouse this controller is monitoring is on a rented property as well and is placed in the garden and can be taken away just as easily. And to be honest; you can apply a device like this to pots or an open garden as well. Just to take measurements and see how your plants are doing, or use as an irrigation controller. You could also put it in a place in the garden for a year to see what sun, temperature and humidity are doing in that area of you garden or balcony and armed with that data, pick plants that will do well in those circumstances.
About the high temperatures you mentioned: This setup is used in the Netherlands where things can get hot in the summer, but temperatures above 30C are not very common and when they do get that high, it is usually only a few days until some heavy thunderstorms occur. In other words: there is no facility to explicitly cool the temperature in the greenhouse, other than opening up the windows. But, it would be easy to add that to the controller. If you know how to switch on and off a pump in certain conditions, it is also easy to switch on and off a heater or cooler. It means you have to dream up a causal connection between you sensory input and the actuator you connected as an output.
Then onto the conductivity number in the soil humidity: The Arduino I am using contains 6 analog inputs. That means that on each input I can “measure” a changing value from a sensor. It is capable of measuring between the minimum and maximum values in 1024 steps. So, if a temperature sensor can measure from -20 to + 80 for example, the Arduino is able to deliver that temperature range in 1024 steps (see this post in the tutorials section for more info on that subject: http://www.sindono.com/reading-temperature-from-a-temperature-sensor/). Same with the humidity sensor: It measures soil humidity in 1024 where 0 is extremely dry and 1024 is soaking wet. And it measures that by measuring conductivity between two metal rods placed apart about half an inch (1cm). The value measured does not correspond to a unit of measurement, but is instead just a number. Working with the sensor and the code will learn you what value is too dry and needs to open a valve or pump.
Finally about power consumption and wireless transmissions. The power consumption turns out to be quite high because the radio is “always on”. Since it is part of a mesh network, it remained powered on in order to “listen” to other radio’s sending and receiving messages, checking if there is anything that needs a reply, etc. While this particular device only sends a message once a minute with sensor values to another node (which logs them to a database). That means that power consumption can be descreased by switching off the radio entirely for almost a minute, until it is ready to send again. Only then should it wake up, send the measurements and go back to sleep again, not checking other radio traffic, not responding to anything.
To be honest, I have a software engineering background and was not very familiar with electronics, or microcontroller programming, let alone wireless communications (other than the wifi on my laptop). Almost everything I learned in this domain so far, was by online reading, forums and most importantly: trying and tinkering.
If you want to learn this kind of stuff too: I am sure you can. Maybe not a greenhouse controller immediately, but pick up an Arduino experimenter kit or something similar and start tinkering. First, blink a LED. Next, make some noise with a speaker, then learn about voltage dividers and start with (relatively) easy sensor inputs, outputs etc. Join a local hacker space if there is one, register at forums, etc. Especially arduino.cc is a very low barrier entry into microcontrollers!
Like the Nike comercials said: Just do it