3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Indoor Grow Space Automation Part 1

Indoor Grow Space Automation Part 1
«
  • IMG_1581.JPG
  • garden1.jpg
  • gar0911.jpg

Disclaimer: The author assumes no liability for any incidental, consequential or other liability from the use of this information. All risks and damages, incidental or otherwise, arising from the use or misuse of the information contained herein are entirely the responsibility of the user. Although careful precaution has been taken in the preparation of this material, we assume no responsibility for omissions or errors.

This will form Part 1 of a series to achieve an automated indoor grow space.

What I'll cover in this instructable:
1) A Relay that switches a light on and off on a timer.
2) The use of a Light Dependent Resistor.
3) 3 x DS18B20 temperature sensors daisy-chained.
4) 2 x Moisture sensors.
5) The arduino sketch.
6) C# program, Serial interface, MySQL API.

Project Mission: Create a solution that will automate indoor plant growth, be safe and remotely manageable. Maybe include some external weather information. All aimed at learning new tools.

Project End Goals (What I ultimately want to achieve):
1) Measure temperature and light in the grow space, my room and outside, mostly because the data should be interesting and defines the environment in and around the grow space. Values to be saved in a database (MySQL in this case) and be graphed through MS Excel through an odbc connection. The light and temperature will also be used as control to ensure the light mentioned in point 2 below, does actually switch on.
2) Switch a 220volt light system on and off on a configurable timetable.
3) Measure soil moisture. I'm going to measure the moisture content in two pots and may even look into setting up checks for possible water overflow or leaks, as a control measure.
4) Switch a 220volt water pump on for a period of time to water the plants, when moisture levels drop below a certain threshold.
5) Control the temperature with the use of a fan/extractor fan.
6) Video Cam to remotely monitor. Website for remote access and control.

Warning: When working with water and electricity, place all plugs, connectors, relays, etc, higher than your plants and lights. Run cable's down. Insolate properly. Use common sense. Watch your humidity and condensation.
 

 
Remove these adsRemove these ads by Signing Up
 

Step 1Component List

Component List
You can scale your own project up or down, depending on your design needs.

Software used:
1) Arduino IDE. Refer to Arduino website on where to buy and how to setup your Arduino. I got my kit from Earthshine Design.
2) Microsoft Visual C# 2008 Express Edition.
3) MySQL. Many sources. Try http://sourceforge.net/projects/phpdev5/ Note this will install a host of other software that we might use in later parts of this series.
4) MySQL/Net 5.2.  I struggled a bit to get this API working in C#. Your luck may vary. This provides you with these definitions on the forms code:
using MySql.Data;
using MySql.Data.MySqlClient;
5) Microsoft Excel.
6) MySQL Connector/ODBC 5.1. For MS Excel to connect to MySQL through ODBC.
7) SendEmail
8) Fritzing
9) HeidiSQL

- I will not spend time explaining the installation of these. If there is enough interest I'll consider covering some in a later series, but most of the above is well documented already.

Hardware used:
1) Arduino Duemilanove
2) 1 x TIP-120 NPN Transistor
3) HFS41
4) 3 x DS18B20
5) 1 x 1N4001 Diode or others
6) 4 x Galvanized Nails
7) Some Cable (I like to use UTP Cat5 cable)
8) 1 x Light Dependent Resistor
9) A breadboard
10) PC or laptop
11) A grow light of sorts
12) Some Jumper Wire
13) Pots and plants.
14) 1 x 1.5Kohm resisor
15) 4 x 4.7Kohm resistor (Does not have to be exact)
« Previous StepDownload PDFView All StepsNext Step »
13 comments
Jul 10, 2010. 4:54 PMbigjeff5 says:
Hey nice project. I'm just getting into micro-controllers (the Arduino platform specifically) myself and am contemplating something along these lines as a future project.

Just a couple of thoughts on your over-all design:

You seem to be taking a lot of readings for something that is relatively static - for example the plants should need only a small trickle of water over the course of a week, which means all you need to test for is a high/low condition and trigger a response for each (add water when low, alarm when high) when they are met. Similarly the grow light - you could use a simple timer on the Arduino itself connected to the light sensor to figure how much sunlight the plant has received, and how much more light it would need for the day. Ditto for the temperature sensor, and the timer would probably not even be necessary for that function.

Juggling all these is well within the Arduino's capabilities, and polling a few times a day for sensor data to plot trends would be no problem at all.

Conceptually it seems much simpler to me to do it this way instead of constantly collecting fresh data. I actually can't see it being much more complicated than the Arduino code you are already using, and you could put the whole thing on the Arduino instead of relying on a PC to house a relatively large database of information that changes very little. Except for catastrophe situations (something breaks and floods your setup, or something), nothing should need changing in the system more than twice a day (on/off for the lights), with watering a couple times a week, and temperature hopefully not at all.

If you were to add an Xbee wireless module to the Arduino, you could run the entire system on the Arduino and only use the PC to collect statistical data (how much sun it got, daily moisture value, any temp spikes, etc) and make configuration changes.
Nov 17, 2009. 11:14 AMkillprogram says:
Yes I Love What You've Done I Was Actually Doing Some Research Into How Feasible It Would Be To Have Entirely Robotic Farms, And I Was Thinking Of Having Some Sort Of Mount For A Robotic Arm, And A Hydroponics System, How Much Do You Think This Would All Cost?
Apr 19, 2010. 6:45 PMkillprogram says:
To automate the harvesting.........
Nov 18, 2009. 4:09 PMdeadfish2000 says:
Nov 17, 2009. 11:25 AMtigerfish365 says:
Looks great! Now even I can be a chef with fresh herbs in the kitchen. It would be interesting to plant some control specimens in your window sill. Please let me know how the project develops.
Nov 15, 2009. 12:33 PMlordhazzard says:
ooooh i see your growing some curry plant.
Nov 15, 2009. 10:33 AMmastoras says:
That was Groovy man!
Keep up the good work!
Nov 15, 2009. 9:35 AMoctopuscabbage says:
Is the main use for this to grow pot? or should i get my mind out of the gutter?

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
9
Followers
1
Author:Lolander