You are on page 1of 12

technology

workshop

living

food

play

outside

Hyduino - Automated Hydroponics with an Arduino


by austinsimonson on November 10, 2014

Table of Contents
Hyduino - Automated Hydroponics with an Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Intro: Hyduino - Automated Hydroponics with an Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 1: Gather Your Supplies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 2: Building . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 3: Wiring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 4: Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Step 5: Congratulations! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

http://www.instructables.com/id/Hyduino-Automated-Hydroponics-with-an-Arduino/

Author:austinsimonson Facebook
"Things dont have to change the world to be important." Twitter: @PancakePatrol, Google+: Austin Simonson

Intro: Hyduino - Automated Hydroponics with an Arduino


So, you may be wondering...WHAT IS HYDROPONICS?
Basically, hydroponics is growing plants without the use of a traditional dirt medium by using a nutrient rich water solution. Those mediums used to "plant" in range from
fiberglass to sand and from fired clay balls to nothing at all. Several branches of hydroponics include aeroponics, aquaponics, etc. But WHY would I want to take all this
extra time and effort to grow my plants in this "special water"? Well, hydroponically grown foods not only taste better and are more nutritional, you can change the
properties of your food, monitor what goes into your food and pollute less. You can also grow more in less space. This is especially great for those people that that
have limited areas in their backyard to grow in. With the right plant selection, you can also keep pests away; a citronella plant has oils that keep away mosquitoes and
other pests. Now if this wasn't enough for you to jump right in to hydroponics, listen to this: hydroponics uses 70 to 90 percent LESS water than conventional growing
does.
Remember, if you like this Instructable, please be sure to Favorite it, Subscribe, and vote for it in the Microcontroller Contest!

Step 1: Gather Your Supplies


To build the Hydruino, you're going to need to first gather some supplies.
Arduino Mega 2560
Peristaltic Pumps (2)
Regular Pump
pH Electrode Probe and Connection to Arduino
pH Up/Down Solution
5V Relay Modules for Arduino (5 - you could also get combined ones in a shield)
12V Solenoid Valve
DHT11 or DHT21 or DHT22 Humidity/Temperature Sensor
Photosensitive Sensor for Arduino
Breadboard
Various Wires (here and here)
Grow Lights (mine are LED)
Sockets for Grow Lights
3.2" TFT LCD Shield + Touch Screen (usually has an SD card reader on the back of it)
Water Level Sensor Float Switch (2)
I2C RTC DS1307 AT24C32 Real Time Clock Module
9V and 12V Power Supplies
Hydroponics Pots (I'm using 10 - 3" pots for this)
1" PVC Pipe and Fittings + Drain Pipe and Fittings
These aren't necessarily the cheapest places to get these items, so if you're not in a rush, consider searching on a place like dx.com or on other eBay listings (may or
may not be shippnig from China) to find the best possible deal.

http://www.instructables.com/id/Hyduino-Automated-Hydroponics-with-an-Arduino/

http://www.instructables.com/id/Hyduino-Automated-Hydroponics-with-an-Arduino/

http://www.instructables.com/id/Hyduino-Automated-Hydroponics-with-an-Arduino/

Image Notes
1. You actually need more than these...this was for the first version, which I
scrapped for a better way.

http://www.instructables.com/id/Hyduino-Automated-Hydroponics-with-an-Arduino/

Step 2: Building
What I ended up doing was constructing basically a "table" for the system to sit on. The weight of the water in the drain pipe makes it heavy enough for it to easily stay on
without a problem. The nice thing about this is that it can be easily scaled to almost any size and all the instructions stay the same (except for the actual construction of
the system of course) - there would be no need to change the code...maybe just things like adding more lights, fans, etc.
I don't have a digital copy of all the dimensions of the pipe if you're looking to make a replica of what I've done, but I'll try to get everything entered in within the next
couple of days.
For the reservoir, you'll need to drill two holes for the float sensors - one at the very lowest your water can be and one at the top - and also a hole for the solenoid to fit in
(which you will glue in). To connect a garden hose to the solenoid, I used 3/4" hose to pipe adapter made by Orbit (found at Home Depot) and a 3/4" to 1/2" reducer to
get it down to the right size.
Once you've constructed the frame, you'll want to wrap the entire thing in a transparent plastic, of which you'll have to cut out a couple holes for your fans. With the drain
pipe, you'll want to drill out about 3 1/2" or so holes with a hole saw so your pots will fit in. Cut a hole in each end of the drain pipe - one is where water is pumped in from
the reservoir, the other is where water drains out back in to the reservoir to be recirculated.
I never got finished with the container for everything to fit into, however, I'm sure that shouldn't be a problem for most of you to figure out. I took the cardboard that my
relay shield came in and am working on getting everything to fit in there, since that's a really easy way to put it all together, but you can use whatever you'd like.

Image Notes
1. Soooo much easier than a hacksaw!

http://www.instructables.com/id/Hyduino-Automated-Hydroponics-with-an-Arduino/

Image Notes
1. The lights go up here.

http://www.instructables.com/id/Hyduino-Automated-Hydroponics-with-an-Arduino/

http://www.instructables.com/id/Hyduino-Automated-Hydroponics-with-an-Arduino/

Image Notes
1. Waiting for the silicone to dry...
2. Taped it so I didn't have to hold it for hours!

Step 3: Wiring
Here is a list of the pins:
A1 - Photoresistor
A2 - pH Sensor
7 - Lower Float Sensor
8 - Upper Float Sensor
20/21 - RTC
43 - pH Min Peristaltic Pump (Relay)
45 - pH Plus Peristaltic Pump (Relay)
47 - Solenoid Valve (Relay)
48 - Grow Lights (Relay)
49 - Fans (Relay)
50 - Temperature/Humidity Sensor
53 - SD Card
For the float sensors, you're going to have to add in a resistor on each, as shown here, for it to work effectively with your Arduino.

Image Notes
1. Using one 12 VDC transformer to hook up 2 pumps since only one will be on at
a time.
2. Extension cord to hook up grow lights.
3. For the solenoid.

http://www.instructables.com/id/Hyduino-Automated-Hydroponics-with-an-Arduino/

Step 4: Code
Attached is the most current Arduino code for the project. It will be updated based on feedback given by others; I don't expect my way to always be the best way! I
haven't had weeks to test it "out in the real world" so there may still be a few kinks in it. Be sure to adjust the lux value for measuring the time for the supplemental
lights...the optimal value may vary depending upon your sensor. Also, if you're using a different pH sensor, the calculations may need to be changed to fit that particular
one. Big thanks to BillieBricks for working out a lot of the code.
Most Recent Update: v1.0 - November 10, 2014

File Downloads

Hydroponic_Controller.ino (43 KB)


[NOTE: When saving, if you see .tmp as the file ext, rename it to 'Hydroponic_Controller.ino']

Step 5: Congratulations!
Congratulations! You've successfully (hopefully!) built your first (or second, or third...) hydroponics system! You're now able to grow your plants in a smaller area while
also using less water. Remember that you'll have to keep track of how often to add nutrient mixture. This system could be easily modified or scaled to fit your
needs/desires. Please feel free to leave feedback, especially on the code, as there is always room for improvement and it will only help everyone!
Also, please vote for me in the Microcontroller Contest! It would be amazing to have any of those prizes that they're giving out! Thank you!

Related Instructables

IKEA HACK
MODULAR
STACKABLE
HYDROPONIC
WINDOW
GARDEN by
MalikIvan

Automated
hydroponic led
indoor by
CharlyBro

The Plant Arm Garduino


Upgrade by Akin
Yildiz

My First
Hydroponic
Plant
(Beginner's
Guide) by
ASCAS

Plant Health
Monitor by Akin
Yildiz

Small Indoor
LED Plant Grow
Room by tgvoss

Advertisements

Comments
25 comments Add Comment

bilalalrawi says:

Mar 9, 2015. 1:54 AM REPLY

can i add ec to it or not

HPGalang says:
I like your project. but I just have some questions regarding it and I already sent you a private message. I hope you'll reply. :)

http://www.instructables.com/id/Hyduino-Automated-Hydroponics-with-an-Arduino/

Feb 17, 2015. 1:44 AM REPLY

brian.balcos says:

Dec 12, 2014. 1:33 PM REPLY

I think this will be my first full instructable project. Great Job.

NicolaP says:

Dec 9, 2014. 2:27 PM REPLY

hi, good project i'm waiting the missing parts

chucka48 says:

Dec 6, 2014. 4:51 PM REPLY


I must be missing something. We would love to build this for our makerspace, but without any pictures of the complete setup and a wiring diagram or
schematic, it seems to be something of a crapshoot. Clearly, you know what you are doing and have posted a reasonably good partial description, but there
seems to be a lot of missing information. Is there another site where I can find this or has anyone else actually built one? Any additional information would be
much appreciated.

iam_maker_leo says:

Nov 19, 2014. 4:03 PM REPLY

Good.... project...
I feel that there are many one who buy it with some plants with ethernet shield to control via internet.

JamesNewton says:

Nov 17, 2014. 2:55 PM REPLY


Great project! Love the design and documentation. I have one concern: How long that Ph sensor is going to last, or more importantly, how long it will give
accurate readings. Can you please check it and let us know how long it actually works?

robbtoberfest says:

Nov 16, 2014. 4:17 PM REPLY

Sweeet!!!!

dgateley says:

Nov 16, 2014. 11:06 AM REPLY


For your next project, and the last word in hydroponics automation, combine this with one of the spectrometer projects on Instructables to give a readout of the
nutrient concentrations and a mechanism for adding them based on the measurements. :-)

tasslehawk says:

Nov 16, 2014. 10:08 AM REPLY

would love to have TDS supported as well great build

richard1948 says:

Nov 16, 2014. 9:35 AM REPLY

Is there a picture of the finished product? That helps me visualize. Thanks.

garethllewelyn says:

Nov 16, 2014. 9:22 AM REPLY

Super, will try this in the new year for veggies outside.

peppypickle says:

Nov 11, 2014. 1:55 PM REPLY

awesome job, thanks so much for sharing! how long did this project take you?

austinsimonson says:

Nov 11, 2014. 1:59 PM REPLY


no problem! thanks for the compliment! It wasn't *too* time consuming after I had planned everything out. If you had all the parts or were able to go to a
local store to get them, you should probably be able to finish it in a weekend.

Darkkeep says:

Nov 16, 2014. 8:10 AM REPLY


It's funny finally seeing a project such as this on here. I have been toying with the idea for a little while and using the Mega ADK. However...have you
looked into the use of a different light spectrum? The F3 light spectrum works fine to mimic summer early fall...but Nasa has released the X5. 6500
Kelvin white with blue mixture. Also...a varient of the octostroller would work but would require a beagle bone to drive it and a 60amp power supply
for the 5v. Still yet...great design!! I've honestly debated on using MISO/MOSI and controlling other microcontrollers to do pH.
Once again...THANKS FOR SHARING!!!

TobiasH says:

Nov 16, 2014. 5:28 AM REPLY


Can you add some diagramms and schemantics to your instruction, where we can identifiy the wiring of the water-pipes (in and out directions), the eletronic
wiring to the eletronic parts (lights, pumps, water-switches) this would help us to understand the already great instruction better. A drawing with pencil and
basic symbols on white paper would done the job so I thing. An higher-level overview of the System.

http://www.instructables.com/id/Hyduino-Automated-Hydroponics-with-an-Arduino/

dragonator says:

Nov 13, 2014. 3:53 AM REPLY

Great project, I am working on my own, but if I didn't, I would probably have used your design.
One question though. In the pin numbers you mention pin 53 for SD chip select, but you use pin 51 and 52, which are used for communicating with the SD
card. Is this a typo or is this really true, cause if it is, you won't be able to use the SD card.

austinsimonson says:

Nov 13, 2014. 2:15 PM REPLY


You're totally right in pointing that out! Yes, apparently I mistyped the pin numbers in the list...thanks! Good luck on your project!

tareq.sultan1 says:

Nov 13, 2014. 9:43 AM REPLY

nice projet

Jfaranda7 says:

Nov 12, 2014. 4:41 PM REPLY

What was the cost for the entire set up?

bunny999 says:

Nov 12, 2014. 4:26 PM REPLY


What if i want the result to be displayed on my smartphone?? How can i control it from my smartphone? If possible what are further modifications?

diy_bloke says:

Nov 12, 2014. 4:37 AM REPLY

oops, not 46 but 56

diy_bloke says:

Nov 12, 2014. 4:37 AM REPLY


Was just wondering... the RTC has 46 bytes of non volatile ram.
I am not sure how much EEPROM memory you use in the Arduino.. I saw some eight write/read actions with bytes. integers and floats, but I guess rather
than write to eeprom, you could store yr values in the RTC.
Reason for this is that the RTC claims to have no limit on the number of write actions, whereas the Arduino I think does have a limit (100.000)

diy_bloke says:

Nov 12, 2014. 4:24 AM REPLY


great project. I made a basic controller that can be used for a greenhouse or a growbox, and i was thinking of doing some auquaponics with it as well... so i
may steal yr idea of using 2 peristaltic pumps for the pH.
Do you have any results with the LED lamps? supposedly some people swear by them while others say it doesnt work

gada888 says:
Nice project

http://www.instructables.com/id/Hyduino-Automated-Hydroponics-with-an-Arduino/

Nov 11, 2014. 6:27 AM REPLY

You might also like