Introduction: How to Build a Basement Hydroponic Garden
This is the hydroponic garden I started a few months ago in my basement. It is automated by a Raspbery Pi, and some control boards.
What I'm growing currently
Kale, beans, tomatoes, radish rat tails, peppers, lettuce, radicchio, rhubarb, parsley and basil.
- Electrical wiring
- Rough wood working
- Minor electronic
- Intermediate Linux
This instructable just covers the build, not the setup and maintenance of the plants.
I must apologize that although I took many photos during the construction of this project, I still missed a number of bits here and there, so some photos are after the fact, and I've added a couple raw Blender-images to aid comprehension. This instructable is more organized than how I actually setup the garden, so some image content may not seem consistent, but should be applicable to the steps.
Why did I do this?
I've dabbled in hydroponics off and on for years, and earlier in the year my wife an I heard about companies retrofitting shipping containers into hydroponic operations to primarily produce a single type of non-flowering vegetable - see Growtainers or Freight Farms. A 40 foot container can apparently produce the rough equivalent of an acre of farm produce.
We became very interested in this as possibly something to work towards and be involved with in the future, but wanted to learn more -
- Could you produce multiple varieties of vegetables in a single system?
- Can a small space in a home be used to supplement, or even remove the need of buying certain produce? How big would it have to be?
- Can it be cost effective?
As I tend to be a learn-by-doing person, I decided to clean my basement (finally a good reason) and convert the old 6x7 foot coal room into a hydroponic garden as dense as I could make it to try and answer these questions.
An added benefit, as with any home garden (without pesticides), is children tend to be fascinated by the seemingly "magical" creation of food you can just pick and eat when it springs from the ground. My son has been helping me on this project and has this fascination now too. The more understanding our children have in how food can get on the table, the better! The added benefit of hydroponics in this case is plants will often grow much faster than a standard garden, so it can seem more magical.
Step 1: Overview of the Setup
My setup consists of 2 flood and drain tables (also called ebb and flow) under specialized LEDs as vegetative growth zones, and a set of 4 flood/drain tubes under a 400 watt metal halide lamp as a flowering zone. Each zone has its own water/nutrient reservoir and pump.
Also involved is an exhaust fan (to minimize humidity build up and chances of mold issues), a space heater, and an aquarium water heater to help bring up the temperature of the nutrient water during re-fillings.
All day to day operations of the pumps, lights and fans come from a bank of 8 independently controlled 120 volt sockets. These sockets are managed by an 8 port Sainsmart relay board, which is controlled by a Phidget interface board and a Raspberry Pi, for which I wrote a Python based time and sensor event system.
Why Python? I've worked in most other languages, but wanted to learn Python, so why not?
I also have a PHP page on the Pi which interfaces with the Python program to allow viewing current status of all sensors and relays, and to control each socket manually - Everything can be manually operated by smartphone!
There are sensors attached to the Phidget I/O board to measure:
- Watts used for the whole room - What is this costing me in electricity?
- Light (in Lux) from the metal halide bulb - Is the bulb wearing out?
- Ambient temperature - Trying to keep the room at about 20 C.
- Humidity - Don't let it get out of control and start mold issues.
For nutrient setup and maintenance, I also have a digital handheld PH and PPM meter. The PH meter is a tool to measure the acidity of the nutrients, and the PPM meter provides parts-per-million measurement of the dissolved solids (plant food) in the nutrient water.
I've tried to ensure all materials used (such as the PVC) are potable (safe to drink from), but not all required bits were potable, so I've let that slide a bit, but kept it to a minimum. We don't want nasty chemicals leaching off surfaces and picked up by the produce we intend to eat.
Many thanks to the folks at Ontario Growers Supply for providing much knowledge, and putting up with my many questions.
Step 2: Safety
The disclaimer - If you try this yourself, it is at your own risk.
- If you don't know how to work with electricity, please don't attempt this without having an electrician help.
- The plumbing is fairly basic, but if you're not familiar with this work, and since it requires you to cut into existing drain pipes, I recommend you find a plumber friend to help you along so you don't get yourself into a tough spot.
- Heat-treating or gluing PVC should be done in a well ventilated area.
- Ensure any objects you are cutting or drilling are secured, and be careful of hand and fingers while cutting and drilling.
- Metal halide lamps are ridiculously hot, so beware.
hmm...What else can I nag about before going on....
Step 3: Pick a Space
You will want to choose a space with nearby/easy access to:
You first need to find a space where you can vent air to the outside - I can't emphasize this enough!
You will have lots of vegetation, operating moving water and hot lights in a small space - it is going to create quite a bit of humidity. If you don't want mold to ruin your home or health, you must have a way of venting the air outside.
You will need electricity of course. So your location needs to be wired already, or the ability to be wired - preferably using a dedicated circuit.
Water & drain
As the nutrient water needs to be occasionally replaced, and cleaning the various parts of the system will also need to be done from time to time, you will want to have direct access to water and a drain. I installed a laundry tub.
Step 4: Add Vent, Electricity and Rough Drain Plumbing
Add a vent
This job is equivalent to installing a bathroom or dryer style vent to the side of your house. In my coal room, the old coal chute has been boarded up, which made it easy to cut a hole and install a small vent to the outside.
This project has raw electricity in close proximity to water - Ensure the circuit you use has a ground fault interrupter (GFI) installed. This will help protect you and your equipment.
The lights and pumps in my project will likely not use beyond 600 watts or so at any one time, but the heater uses close to 800 watts on its low setting which combined, is getting to the top a single 15 amp circuit can provide. Therefore I setup a 15 amp circuit dedicated only to this project - you don't want other devices accidentally tripping your breaker, and killing your lights - it takes a few minutes to properly start up a metal halide lamp, and power interruptions can confuse it so it won't start again until a long power-cycle is performed.
I wired the room to have an electrical outlet on each of the 2 framed walls, and one overhead light. GFIs as part of a breaker tend to be quite expensive, so as seen in the pic, I opted to put a socket-based GFI in-line.
However you do it, please follow your local electrical codes for your own and others safety, or hire an electrician.
Rough in drain for laundry tub
The room will need to be sealed with plastic, but that would make setting up the drain plumbing difficult. So before we get that far, rough in the drain plumbing...
There was a drain running through the room already which made it easy to temporarily install a small laundry tub, setup the drain plumbing, and then removed the tub.
Call your plumber friend to help.
Step 5: Wrap Room in White Polyethylene Sheeting
Acquire white polyethylene to cover your whole space with.
I bought a 25' roll (10' wide) of poly sheeting from the local growing store. It is black on one side, and white on the other. I've also seen this at many hardware stores as well, so it shouldn't be too hard to find.
You want the white to the inside so the plants get as much light as possible from the reflection.
We also want to make the room a negative-pressure space - where air from the house will seep into the room (while the to-be-install exhaust fan is running), and air from the room goes outside - thereby not letting moisture into the house and creating mold issues.
Completely cover the walls and ceiling with the poly using a staple gun. If you have air-ducts in the way like I did, this will be tricky in places. As two of my walls were unframed, the poly there is just stapled at the top and hangs. I like to leave the poly a little long and let it come in on the floor a few inches. I don't put poly on the floor, as any water would make it crazy slippery and dangerous.
Ensure you cut a hole to allow access to the air-vent, and your electrical sockets.
Cover the seams with packing tape to seal the room, but don't worry too much about it - you do not want it to be perfectly sealed anyway, as we do want to allow some air in.
While covering, keep note of where your wall beams, and ceiling joists are - possibly use a permanent marker to mark the odd spot on the white poly - you will need to know where the wood is to attach hooks, boards etc...
Step 6: Re-install Tub and Bring in a Water Source
Permanently re-install the laundry tub.
As described - call back your plumber friend.
Bring in a source of water:
As I had the source water for the house coming in just on the other side of the wall by the tub, I brought my water in using a garden hose. The hose is connected to a Y-splitter, and I have a short sprayer hanging over the tub, and a length of extra hose with another sprayer to reach anywhere in the room if necessary.
I always keep the source water turned off at the main pipe while not in use - I can't imagine coming home to find a hose burst somewhere.
Step 7: Seedling Tray, Shelf and Light
Sorry, I don't have any in-progress pictures of putting in the shelf for the seedling tray. But it is very rudimentary - the board sits on a 2x2" cross-piece attached to wall studs on the left side, and the right side of the board is screwed to a 2x2" attached to the ceiling.
The location for the seedling tray basically came down to where the heck could I fit this thing - the rest of the room was going to be full. The only space I had left was above the sink. This is actually very awkward to put up and down as a stool is needed, and I would prefer another spot, but just don't see alternatives other than the floor - which I was concerned about bugs.
As it isn't taking too much room, I could put it elsewhere in the house, but then I'm breaking my rule of keeping everything in the same space, maybe it should just be a bit lower than it is.
I'll let you instructable folks figure a better place for this seedling tray and send me suggestions
The seedling tray is just a regular covered garden seedling tray. The light is a 24" T5 fluorescent designed specifically for young plant growth, along with a reflector to send more of the light downward.
Step 8: Install Flood Tray Shelves, and Hooks for Metal Halide Lamp/reflector
Install heavy-duty shelves
I mean it - Make sure they are heavy-duty!
My shelves are metal framed with 2x5' footprint. I will be making the flood trays 2x4' with 2x6's to support the sides.
This means I will be pumping upwards of 60 litres of water up onto each shelf and 120kg weight of water total.
A bit of a tilt is needed for each shelf so water will flow toward the drain side. To create a tilt, add wood shims between the metal frame and the shelf as required and fasten them to the shelf with small screws.
Install 3 fairly heavy-duty hooks into the ceiling joists surrounding the area the lamp will be going. By installing a triangle of hooks around the area, and using chains between, you can come up with any possible position for the metal halide lamp and reflector. As I want my reflector tilted, the surrounding chain can also be hooked to the reflector to create that tilt.
Step 9: Prep Flood Table With Sides and Liner
Flood trays could be bought outright and put on the shelves. That would be the quick and easy method, but can be pricey.
As usual, I opted for the difficult way - 2x6 boards for support of the sides, the shelf itself to support the bottom and a pond liner to hold the water. This part along with the drain, overflow and the rest of the plumbing, should really be an instructable on their own. Maybe another time.
Make flood table sides
So build a wall using 2x6 boards around the edges of the shelf. In my case, the shelves were 5 feet wide, but I only used 4 feet for the flood zone and left the rest for storage space.
Drill drain and overflow holes
Drill holes for the drain and overflow tube using hole saws - we need the hole to just allow the drain and overflow parts for a tight fit.
Install pond liner
Acquire a pond liner - a very thick vinyl which will be supported by the shelf itself with 2x6 sides for support. I found one just large enough (8x6 foot) to cover both flood shelves from Home Depot online for a very reasonable price.
Cut the 8x6 pond liner in half, and lay each piece into the flood tables. It's tough to get it neatly into the corners, but trimming excess material, and making careful folds helps as you go - but don't trim too much!
You need to have the liner sit right into the corners of the box, or when the water fills the first time it will pull it down the sides on you. As well the liner needs to be as flat as possible - creases will contain water when emptying, and can drown roots.
After-thought - maybe gluing the liner to the shelf, and placing a large weight while it dries would help make the liner more flat in the end.
I left a number of inches of the liner hanging over the sides to allow for stapling.
Secure pond liner
I started stapling the edges of the pond liner into place for the first shelf, but decided not to do it for the second till later. It will more or less fall into place when water is filled, so only a rudimentary stapling is required.
Step 10: Install Flood Table Drain and Overflow
I purchased a 1.5" wide tub drain with a long threading to be able to go through the 3/4" of the shelf, and still have room to add the rubber and anti-friction gaskets on the bottom side, as well as the lock-nut of course. Also the 1.5" threaded end can be forced onto a 1.5" electrical PVC coupling fairly well as the start of adapting down to the 3/4" hose.
The overflow consists of a 3/4" female threaded PVC adapter, a 3/4" wide 2.5" long male threaded PVC piece, and a 3/4 female elbow threaded the same. This threading piece is long enough to have the adapter on top, the elbow on the bottom and still have room to thread both sides to a tight fit.
Cut an X in the pond liner over top of the holes for the drain and overflow - but keep the slits slightly less than the extent of the hole. Do not cut a whole circle out! We want the extra liner to help make a tight fit.
Apply silicon caulking around the underside flange of the tub drain your are installing. Push the threaded end through the cut vinyl X and through the hole in the shelf. Thread the lock nut onto the underside tightly - but be careful, the unset silicon will act as a lubricant and the drain will try to spin while you do this.
You may need to hold the drain from the top with a pair of pliers.
Apply Teflon tape to the threading tube on both ends. Screw the threaded portion into the top adapter, leaving enough room to go through the liner, shelf, and still connect to the elbow. Apply silicon caulking to under the edge of the adapter which will face the liner. Push the threading through the liner, and attach the elbow tightly.
Leave everything for many hours so the silicon can set.
We will get to the rest of the adapter parts later...
Step 11: Install the LED Lights
The lights didn't come with mounting brackets, but they have an indent along the sides at the top.
To support them, I cut a segments of 1.5" ABS drainpipe which I cut a slice off the side which let it pinch the indent and hold the light. The backside of the ABS held a screw-in hook to attach to the chains.
For the lower flood table, I added hooks to the underside of the upper shelf, and attached chains across with hooks holding the LEDs.
For the upper flood table, I installed the metal shelf bars above with no shelf, and just wrapped the chains around. Again hooks were added onto the chains to support the LEDS.
This way I can raise the lights if required as the plants grow.
Step 12: Build Frame for Tubes in Flower Zone
For the flowering zone, to get the most number of plants into a small footprint, I decided to use a tube setup with the frame hung and angled out from the wall using 2 - 5' 2x4s.
To do this I screwed a 4 inch wide 5/8 inch thick piece of plywood along the wall at a height of just over 6 feet.
I attached a hinge to one end of both 5' 2x4s, and the other end of the hinge was screwed into the pine board.
To hold the bottom of the 2x4s out from the wall, I used scrap pieces of 2x4 screwed into the bottom ends of the frame.
Note to self - Bottom supports look flimsy - will have to shore up.
Step 13: Build Tubes
The tubes are 4" PVC, which came in 10' lengths. I used 2 of these, and cut 4 - 4' segments out of them.
Remember to lightly sand and clean each section of PVC where you will be applying cement.
For each tube perform the following...
Preparing the tube
- Cut a hole large enough to fit a 1.5" threaded PVC adapter completely through as close to the end of the tube as you can, but still leaving room for a cleanout adapter to be attached beside it on the end - about a 3 inch gap.
- Heat-treat the side of the tube opposite the hole ( see this instructable for help on heat treating PVC ), and mold it to create a flat space. Let cool. This will be the surface we install the overflow tube onto.
- Cut a hole centered in this flat spot only just large enough to fit the threaded end of the PVC adapter.
Cut a hole 6 inches towards the middle of the tube from the hole you just made. It should be about 3/4", but check that it will fit a threaded brass valve. You need to be careful with this as this is the weakest point of this system.
- On the other side of the tube, cut 6 - 3 inch holes spaced evenly apart. This will be the holes for your plant's grow baskets to sit in.
Installing the overflow
- You need to have the female and male ends of the 1.5" PVC adapters screw together tightly, sandwiching the flat area you made in the 4" tube. To make this happen, I had to cut some of the threads off the adapter.
- After being happy with how it test fits, remove, liberally apply silicon caulking to the threads, and where threads flare to the rest of the adapter, and install screwing the female end on tightly from the outside.
- Let the silicon set. And do your best not to bang this part around from here on.
Finish the tube
- Install the 4" PVC cap on the end furthest from the overflow with your PVC cement.
- Install the cleanout adapter on the other end with PVC cement.
- Install the brass valve into the small hole temporarily, and trying to keep it from threading into the inside the tube. It needs to drain the water, so you don't want it having a lip inside the tube. At this point it is in place just to help position the plumbing, but is too fragile to try to permanently seal for now.
Step 14: Install the 4 Tubes
The tubes were hung with 2 - 4" pipe hangers for each tube, attached to the angled 2x4's. 2 screws for each hanger.
Take care to hang the tubes slightly off level with the downside toward the drain end.
Step 15: Build Connectors to Attach Hose to Drain and Overflow Fittings
The adapters I used to get from the 1.5" threaded drain end to the 3/4" hose on the flood tables is almost identical to what is needed for the overflow off the 4" tubes.
For adapting to the overflow on the 4" tube, we start with:
- 3/4" PVC adapter with barb insert on one end, and 3/4" threading on the other. Wrap the threading in Teflon tape, and screw into...
- A 3/4" threaded female adapter. Space was an issue, so I cut the length of this down to just the threading, and cemented into...
- A 1.25" female-female adapter. This just fits over the above adapter. Again as space was an issue, I cut this down to about 1.5 inches long, and cemented into...
- A short piece of 1.5" PVC tube, pre-stretched by heat treatment on this end to fit over the above adapter. The other end is cemented into...
- The 1.5" PVC female adapter which is already on the tube.
For adapting to the drain on the flood table:
Perform the same steps as above, but for step 1, install a threaded brass valve instead of a PVC barb insert, and for step 5, use a 1.5" female PVC adapter for electrical conduit - usually grey in colour. The reason for using the conduit version is the threading on the conduit version better fits the drain threading (still not right though).
Step 16: Finish Plumbing
Assemble hoses for all connections except the main feed
So this includes:
- Overflows from both tables and the 4 tubes.
- The feeds/drains for both tables
Cut hoses with lengths required to reach the reservoirs plus a bit extra for each of these.
Attach and clamp the hoses
Assemble main feed
The main water feed/drain was a bit more complicated. This was a crazy chain of tees and short hose bits to each valve from the pump and is much harder to describe.
- The tees are all 3/4" barb insert ends.
- Each valve has a barb end attached to fit the hose diameter.
- The hose from the pump goes to a tee as source for the lowest tube valve, then continues to a tee for the valve on the next tube up, then to a tee for the third tube valve, then the hose goes directly to the valve on the top tube.
Double check everything is well clamped!
Permanently install the valves for the tubes
- Unscrew the hose from the 4 valves.
- Remember the direction each valve was facing, and remove them.
- Apply a large amount of silicon caulking on the threading around the end of the valve
- Re-install to be facing back in line of with the hose connectors.
- Reconnect the hoses.
- Apply more silicon caulking around the outside of where the valve meets the tube.
- Step back, let the caulking set and cross you fingers - I had to do this a couple times.
Test the tubes
When you are ready to test the tubes, fill the reservoir for about 50 litres, and start the pump.
- Inspect reservoir for leaks.
- Inspect all connections for leaks.
- As the water will travel easier the lower the tube, you will have to adjust the valves so the lowest valve is closed the most, with the others slightly less so as you move up. The top valve can be left fully open. This will be trial-and error work, trying to get the tubes to fill to the overflow level simultaneously.
- Ensure you let the water go into overflow tubes, and check those connections for leaks.
- If you do find leaks, then drain, dry, fix, and try again.
Also - I had to drop in a short piece of 1.5" PVC into the overflow adapter to slightly raise the water level for the plants.
Step 17: Setup Reservoir and Pump
The reservoirs are just rubbermaid (or similar) tubs.
If possible, you want the tub and lid to be opaque so light doesn't come in. Light into the tub will allow for greater algae growth in the container - gunking things up and taking the nutrients away from your plants.
You should also ensure the material the tub is made of is "soft". I tried a harder-plastic tub at first, and it turned out to be brittle enough that when filled with water, the bottom cracked and leaked right away.
Note: My reservoirs aren't opaque enough - I need to cut some more white/black poly sheeting to cover them.
I use 4 submersible pond pumps - one pump for each reservoir, and a smaller maintenance one to remove water from the reservoirs when cleaning and refilling.
I'm not going to delve much into how to choose a pump, because there are lots of resources on the internet, but do want to note that when looking for pumps for systems of this size, the flow rate is likely not as important as the "head" height. That being the maximum height the pump can still push water. Make sure the pump you choose can push water much further than the height of your trays or tubes.
You should already have done so by now, but ensure your pumps are all using hose clamps.
Step 18: Setup Raspberry PI
If you don't want the troubles of building your own logic controls for this project, there are a number options available to purchase ready to go systems, or sets of timers. But if you do, please read on.
Acquire a Raspberry PI model B+, the proper power source, and a micro SD card of at least 2GB. Mine came from Newark element 14.
Careful of your power sources - I started with a model B I had lying around, but then accidentally fried it messing with how I was supplying the power. This forced me to run the control programs off a spare Linux PC for a couple weeks while I had another Pi shipped.
Install the Raspbian distribution of Linux - Visit www.raspbian.org for information on this. Attach it to your network to ensure your can connect to it. Once it is installed with the logic boards, you can fine tune how the devices and event config is setup.
Ensure you install Python, PHP and the Apache webserver, and any requirements for the autoHP program you will need next.
Install the autoHP Python program and web interface - Information will be at the autoHP GitHub page here.
Step 19: Build Socket Box and Connect Control Boards
The whole logic setup is mounted to a 1/4" plywood board.
The socket box consists of 4 standard electrical boxes ganged together, and screwed into the board.
The power source to the box is from an extension cable with the socket end cut off.
If you are not used to handling wiring for electricity, please consult an electrician.
As each socket-pair is split - controlled separately - they need to be handled like a split-socket installed in a kitchen. The hot (brass) side of the socket needs the tab between the top and the bottom of each removed.
The ground wires from the source and each socket are connected together. Due to the number of wires, this took pig-tailing a few groups together at a time.
Like the ground wires, the neutral wire from the source, and each socket-pair is connected together. Again done in groups.
The hot source and all the feed lines to the Sainsmart relay board are connected together.
The switched-hot lines coming back from the relay board go to the top and the bottom hot (brass) side of each socket.
The relay board is mounted to the plywood with stand-off screws and plastic grommets.
The hot feed lines from the socket box go to the middle connector of each individual relay. The switched hot lines go back from the left side of each relay.
10 Wires connect between the relay board and the Phidget board - One ground, one 5V+, and 8 I/O lines from the digital out ports.
Note: I need to change this - the power to control the relay board is coming from the I/O board. For protection, the 5V supply to the relay board should come from a separate source.
The Phidget is also mounted to the plywood with stand-off screws and plastic grommets.
Besides connecting to the relay board, this has a USB cable to the PI, and its power supply connected.
The PI is mounted to the plywood with stand-off screws and plastic grommets as well.
It has its own power source, and is also connected to my home network.
All of the devices on the control board are connected to a UPS- except the socket box. The socket box is connected directly into the wall. This is a small UPS which will provide backup to the logic system probably for hours, but isn't big enough to support the lights and pumps for any time. We just want to keep the logic from being damaged.
Due to the amount of water around, for safety, I've installed this control board from a 2x2 hanging from the ceiling.
Step 20: Finish Up and Get Growing!
The main build is over, but to finish up...
- Configure the autoHP automation software - see the program instructions for this.
- Plug lights, pumps, and anything else to be automated into the correctly configured socket.
That's how I put my hydroponic garden together, and if you followed through too, you're ready to go.
I had been adding steps for starting seedlings, setting up nutrient water, and other aspects, but it was just getting too complicated an instructable that no one would want to read in one go. So I'll have to write new ones for the running of this system another time - And it's still a work in progress.
I hope you enjoy!
Participated in the
Indoor Gardening Contest