Intro: Create the Arduino Driven LED Growbox
A while ago, I noticed many people using the Arduino controller for all sorts of home projects. I knew I just *had* to have one.
After I received it through the mail and exploring its possibilities, it struck me that this would make it possible to make a (more or less) self-supporting closed greenhouse.
In a closed environment the Arduino would be able to control all parameters like water, light and temperature. I chose to go with LED lighting because LED lighting is becoming more and more promising when it comes to growing plants. This would also prove a neat experiment in using this alternative light source.
Imagine placing a plant in this machine, setting the controls for growing and when the plant has grown to the preferred size, setting it for blossoming and presto! Just like having a home bread making machine for plants!
This instructable will show you the basics of the system I have developed and (where needed) the pitfalls I have encountered. The only thing you will need is some basic electrical knowledge and a lot of common sense!
Additionally, I will share future growing experiences with you in this instructable.
Please ignore any language inconsistencies as English is not my native language...
**DISCLAIMER, PART 1** I am not an electrical engineer. If this machine burns your house down, kills you (or something really bad happens), I am not responsible!
Remember: you are working with electricity (and water!) and you should always make sure you work safely!
As for the power LEDs: THEY ARE EXTREMELY BRIGHT! You should not look directly into them as you might damage your eyes.
**DISCLAIMER, PART 2** Although it might be suitable for it, I do not promote growing a specific type of weed in this machine. Whatever you do, make sure it is legal in your country or area you live in! I highly recommend growing radish or lettuce.
** UPDATE **
From experimenting it seems that seedlings will do well once matured a bit. When growing from seeds, the light will fall short a bit. The plants will stretch and not develop right.
As a result, I am currently looking into using normal energy saving lamps (SL lamps) which generate a huge amount of wide spectrum light at 18 Watts.
Bear with me, more to follow!
Step 1: Overview
To give you an idea of what it should do you can look at the image below.
The heart of the system is a box in which the plants will grow. Next to it is a controller box which contains the Arduino and some PCB circuitry (schema's will be discussed later on). The box is located OUTSIDE of the growing area to prevent shortage and potentially dangerous situations.
The controller box measures temperature (both inside and outside) and can control a fan to influence the inside temperature and provide the air circulation needed for healthy plant growth.
Located in the bottom of the cabinet, a reservoir of (fertilized) water is placed with a pump in it. The plants will be suspended above this reservoir so all water pumped up to the plants will eventually pour back into the reservoir. The pump will be driven by 12 Vdc for safety reasons.
To prevent dirt from building up in your water container (possibly clogging the pump) you should not use earth but a combination of steelwool and hydro-pellets. This allows the water to fully drain after watering. So in effect, this is a hydrophonic system.
The lights are also regulated by the controller box. The setup basically has two modes for plant growth: grow mode (about 24 to 18 hours of light) and flower mode (about 12 hours of light). This will enable us to grown plants which are sensitive to shorter lighting periods and encourage them to respond by creating flowers or fruit. The cabinet should be carefully light-proofed to exclude external light sources.
Again, it is important to point out that I have chosen to run everything on 12 volt DC. The main reason here is safety. After all, we are working with water here! If you decide to use 220 / 110 V the please make sure the relays used are capable of switching the load intended and that you *ALWAYS* use the earthing provided by your grid!
Step 2: LED Lighting Theory
A lot is still not known about using LED lighting for growing plants. The general opinion is that plants use a limited amount of wavelengths for growing.
Apparently the peaks are in the colors deep red, orange and blue. According to some sources, the blue component influences the internode distance of the plants and the red/orange component influences plant growth.
Because especially the power LEDs we are using come in a very limited number of wavelengths I can only hope the wavelengths used come close to those peaks.
The reason I picked the 1W type LEDs is because the colors I use are driven by the same current. When you use 3W type LEDs the blue LEDs require a lower current than the red LEDs. This would mean installing more than one driver, increasing cost (most likely also the effectiveness of the setup in a positive way, however).
The LEDs I use provide 27 lumen per piece (about the same as 20 ultra bright 5 mm LEDs). A total of 4 LEDs is installed, raising the luminous flux to about 100 lumen. By installing lenses (to narrow the beams to 25degrees) we further enhance this number.
The sad part of the story is that a normal HPS lamp used in commercial environments delivers a multitude of this number. However, the true home automation enthusiast is not scared off by this number!
Step 3: Parts List
- Arduino controller (www.arduino.cc). The software has been developed and tested on Arduino Duemilanove (2009). At this moment this is the most cost-effective Arduino platform. A Mega version will do as well.
- an old cabinet with a (minimum) base dimension of 60 cm x 60 cm, height depends on what you grow in it
- PC case fan (the bigger the better)
- controller box (might as well be a lunch box or old salad container).
- Four 1W star-type emitters (I used Luxeon emitters), three red and one blue. Check for online stores as prices can differ enormously! [spam mode ON]I ordered mine at http://www.dotlight.de as they provide excellent service.[spam mode OFF]
- One driver for driving the LEDs at a fixed current (this is important to not kill your precious LEDs or fiddling with resistors)
- Two LM335 temperature sensors
- An experimenting PCB for easy soldering
- A pump used in camping gear (caravans/RV's)
- Lots of wire, connectors and 1K resistors.
- ULN2003AN for controlling the relays, allowing the Arduino to handle the relays without blowing it up.
- Heat sink(s), salvaged from an old PC.
My budget looked something like this:
- LEDs and driver: 60 EUR
- Electric components (connectors, IC's, relays, PCB): 30 EUR
- 12V pump and water tubing: 10 EUR
- Wood: 0 EUR (use junk material when possible)
- DC adapter: I had an old ATX power supply so I decided to use that. An instructable quite worth reading is the "Build a lab bench power supply with an ATX power supply, but (depending on the total load) a normal DC adapter might also do the trick! Be sure to fuse the signal lines, however.
- Arduino: 26 EUR
Step 4: Controller Schematic
The schematic for the electric circuit does the following:
It allows for a couple of pushbuttons to change the setting of the control box;
it provides an interface to the inside and outside temperature sensor for the arduino microcontroller;
it handles the three relays (arduino cannot handle loads directly, maximum load for Arduino is about 40mA)
The schematic can either be done by etching a real PCB, but an experimenting PCB will most likely do the trick equally well. Using a real PCB will give a less cluttered solution, however.
1. Buy the electric components and a piece of experimenting board (16x10cm will suffice).
2. Solder the components and wire them according to the schematic.
3. Test your setup with only the relays attached. Use the debug mode of the software and the serial interface of the Arduino to look at the feedback from your controller board. Remember to check the pins used in the controller source!
I have included the Eagle files for the schematic. A free version can be downloaded from the Eagle website. These files are also attached as image to this instructable!
Step 5: Controller Software
The controller software is quite simple but hopefully effective. It is written in C (the main language for Arduino development) and should be fairly readable. The top of the program listing contains a number of pin assignments. You should either match your pin assignment to the PCB or change the pin assignment in the software.
The software can operate in three modes: grow mode, flower mode and test mode. The differences between the grow modes can be seen in the sketch.
The main purpose for the test mode is testing your setup as it will rapidly run through all the cycles: lighting, pump and fan. One of the buttons provides a convenient way of switching the grow box between all the modes.
The logic for reading the temperature sensors is build for the LM335 a temperature sensor. When you are using (for example) the LM35 this logic might need to be modified a bit, google is your friend here as there are enough examples to be found on the web.
The buttons are connected to the interrupt pins 2 + 3 of the Arduino to make them responsive. Otherwise the software would only see the press of a button when the loop() function is entered.
Simple load this sketch and upload it to your Arduino (check the pin assignment!)
Step 6: Finishing the Controller
This picture shows the controller PCB and Arduino fixed in the controller box. The controller box was actually purchased at the local household store at about 3 euro.
The three net connectors are not used in this setup because I changed my plan about using grid power to run the lamps so ignore those.
The Arduino is mounted on top of the relay PCB to lessen the wire jungle in there. I have used metal screws in my initial setup but it is more wise (and a lot safer) to use plastic spacers.
The EAGLE files included in this instructable enable you to make a more compact PCB: about 5 x 10 cm! I am currently in the process of rebuilding the PCB using this eagle layout. It is much more compact, allowing me to fit it into a small box. A picture of the board under construction is added to the photos below.
The PCB was etched using the "photopaper transfer method". Search for instructables covering this topic!
Step 7: Building the "green Area"
The green area I have made exists of an old wallpaper table and some used pieces of wood (re-use galore!). I have painted the inside as white as possible (not on this photo yet), which provides additional light diffusion to spread the light through the entire growing area. Prefer a non-gloss white to make the reflection more diffuse.
In the top of the area I created an opening for the PC fan. The lights will be mounted on top.
The bottom of the storage cabinet will contain the water reservoir and the pump. I have located the PC fan near the ceiling because that way the generated heat can be disposed of more effectively.
Step 8: Installing the Lights
Because the base of the power LEDs can get very hot if not properly heat-sinked, I have mounted them to an old PC CPU heat sink to dissipate the generated heat. Preferably use aluminum as copper dissipates heat even more but oxidizes more as well (educated guess).
Do not try to use powerLEDs at full power as they will burn or melt within minutes!
The lamps should be as close to the plants as possible while keeping enough distance so that the plants will not be "scorched". A simple mechanism of being able to raise either the lamps or the plants themselves is enough.
In this case, I have chosen to fix the lamp ceiling and raise the plants themselves by raising and lowering the water compartment.
The pictures below also show the tests I have done with only the lights, securely (aaargh) suspended over a plant with a couple of bamboo rods.
Step 9: Installing the Pump / Wet Zone
Depending on the type of pump used you can use a piece of hose which is closed at the end and pierced on the locations the water should feed the plant.
Do not forget that roots need air in addition to water!
Step 10: A Word About Nutrients
Seriously, I am not a plant expert. Chances are, other "hydrophonic" instructables and websites provide very useful information!
What I used is a generic plant food solution which has a NPK rate of (TODO)
Step 11: Results
I used two plants, one of which is constantly outside (the weather is a bit bad at times but there are sunny days). The other one is outside during the day, in the evening when light began to fade, I placed it under the LED lights.
After only a couple of days, the stem and leaves were looking healthier than the plant who was constantly outside: the stem was thicker and the leaves greener.
That same plant was placed in the growbox continuously after 2 weeks. (work-in-progress)
To make sure seeds will germinate under the lamps, a small pot with radish seeds was placed in the grow area. The seeds reacted within 2 days and started to sprout. See pictures below.
Future growing reports will be included here.
Step 12: Final Words
This is my first, uneducated attempt at creating a grow box using LEDs and the great Arduino platform. I hope you will have as much fun as me finding out the wonderful Arduino world and creating something useful at the same time!
If you find an error in the design or schematics: please share them with me. I might just learn a thing or two :-)
Remember that this is my first instructable ever, so be gentle... :-)