Jump to Navigation

Garden Project

I'm about a year into this project, I figure it's probably time to start posting something about it here. Roughly this time last year, I had just bought a house in Wisconsin after moving here a year or so prior to that. My wife and I had been living on her parent's hunting property while we were getting settled in and began looking for a house to buy. On a section of the property my wife's Dad had setup a pretty good sized garden. While living there we took care of the garden and then had the benefit of being able to eat what was growing there. Amazing stuff. Fresh everything, all the time, every meal, all summer and fall. I swore that as soon as we found the right house to buy, I would grow a garden of my own.

So we bought a house and I realized very quickly a very important piece of this puzzle that was missing. I don't have the foggiest idea where to begin growing a garden. Thankfully my wife and her Father do, and with a trailer load of lumber and a warm spring day we were on our way to growing my very first garden.

If you know me, the idea of dropping some seeds in the dirt, squirting some water on it and hoping for the best is not really my style. This was an opportunity to collect, and process data. It was also a perfect excuse to fire up my Arduino Mega and write some code. As it turned out it's also been and opportunity to learn how to design and build printed circuit boards (PCBs). However, due to many factors I wasn't able to get anything designed and built for last year's garden. I DID however, spend plenty of time writing and refining Arduino code, designing and building hardware, and I think... I THINK... I'm ready to go for THIS spring.

Project:
Design and build a system that will monitor and log temperature in direct sun and in the shade, measure and log soil moisture, log and measure the amount of light my garden is getting and be able to remotely water the garden. I'll explain the pieces and then in later posts, I'll go through each of the parts and explain how everything works, and you all can explain to me how I did it wrong, the hard way, I should have used a RaspberryPi, or a Beaglebone, Python, and tell me how a REAL engineer would do it. Which will make for an even better V2.0! Clearly the ultimate goal is to have the system decide when to water on it's own based on the condition of all the sensor listed above, but I get the feeling that this is going to be more or less a data collection year. I'm not a Linux/PHP/MySQL expert so my brother is doing pretty much ALL of that and I'm doing all the hardware/Arduino parts.

Parts:
Sensors:
Temp Sensors: LM34's/TMP38
Light Sensors: Radio Shack photo resistors
Soil Moisture Sensors: DFrobot SEN0114 V2's

Sensor data acquisition and hardware control:
Arduino Uno w/Ethernet Shield.

Data processing and UI:
CentOS VM (Linux)
MySQL
PHP

Misc Hardware:
12V controlled water valve
5V relay(s)

That's pretty much it. Most of these components were chosen because I had them on hand, had a good local source or knew how to use them already. My brother has a few other design requirements including drawing water from water barrels, and a few other things. So his component list varies slightly.

The Process:
The sensors are all fed back the the Arduino, the Arduino reads the sensors, and sends the data to the Linux box using the Ethernet Shield. The Linux box logs the sensor data into a database, and draws graphs, displays data, etc. The Linux box also provides a manual control panel that allows me to open and close the water valve by clicking a button on the screen. These control signals are sent back to the Arduino. The Arduino then performs the action that the Linux box told it to. The Arduino reads the sensors again and the process continues like this forever.

So, this is how it's supposed to work. As I mentioned above, following posts will go through each stage of this and talk about each of the parts, the challenges, fixes, and all the great new stuff I learned.



Main menu 2

Dracula