Introduction: Hyduino - Automated Hydroponics With an Arduino

Picture of 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

Picture of Gather Your Supplies

To build the Hydruino, you're going to need to first gather some supplies.

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 or on other eBay listings (may or may not be shippnig from China) to find the best possible deal.

Step 2: Building

Picture of 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.

Step 3: Wiring

Picture of 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.

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

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!


brian.balcos (author)2014-12-12

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

iam_maker_leo (author)2014-11-19

Good.... project...

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

robbtoberfest (author)2014-11-16


dgateley (author)2014-11-16

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. :-)

garethllewelyn (author)2014-11-16

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

peppypickle (author)2014-11-11

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

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 (author)austinsimonson2014-11-16

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!!!

dragonator (author)2014-11-13

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.

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 (author)2014-11-13

nice projet

gada888 (author)2014-11-11

Nice project

AlanS203 (author)2018-01-17

How much did all the parts cost roughly?

SimonQ1 (author)2017-12-21

Great idea! Thank you for sharing!

jpatel32 (author)2017-11-04

Thank you for this project.

Brother, you can create tutorials on TFT Screen Programming.

So that we have the flexibility to make another Progaram.

riaz.sulaimi (author)2017-04-07

Do you have any pictures where you pump in the water to circulate it? Thanks

andregoncalves85 (author)2017-03-25

hello. i have this problem .... help please !!!!!

C:\Users\peeva\Downloads\FSR83MHI2G1F678\FSR83MHI2G1F678.ino: In function 'void setup()':

FSR83MHI2G1F678:123: error: 'class DateTime' has no member named 'get'

start_time = now.get ();


C:\Users\peeva\Downloads\FSR83MHI2G1F678\FSR83MHI2G1F678.ino: In function 'void LightControl()':

FSR83MHI2G1F678:1548: error: 'class DateTime' has no member named 'get'

seconds_for_this_cycle = now.get() - seconds_elapsed_total;


FSR83MHI2G1F678:1549: error: 'class DateTime' has no member named 'get'

seconds_elapsed_total = now.get() - start_time;


exit status 1

'class DateTime' has no member named 'get'

Magg58 (author)andregoncalves852017-03-31

Hi, i have the same problem,could you solve it?, i think is because of the rtc library, i dont know if is and older version of it, if you solve the problem, could you please share the solution with me please?, thanks

andregoncalves85 (author)Magg582017-04-01

hee. i try look what is the problem .....but i dont know ......i m looking.....

nguyensum (author)2017-02-28

Good job!

Thank you so much!

ChrisC693 (author)2017-02-23

When I try to upload the code to the Arduino I get this error message:

fatal error: UTFT.h: No such file or directory

BishIMikeBe (author)2015-12-17

Can you PLEASE make the pin wiring for for the shield to the arduino and other involved components more clear. I have everything else figured out! PLEASE

acampanella1 (author)BishIMikeBe2016-04-18

Im stuck on updating the code and find the libraires. mind sharing yoour updated code?

cstoudt (author)acampanella12017-02-22

Can you share the updated code?

LandonF4 (author)2016-12-12

Do you have a schematic of the over all wiring?

cstoudt (author)LandonF42017-02-22

Were you able to get the schematics of the wiring?

Gl0ckage (author)2016-11-08

This looks great however I can't figure out what I need for the setup I want.

Just pH, ec and water temp.

brahmanisuresh (author)2016-09-26

could you please mail me more specifically regarding this with more details. and also the cost of the entire project?

MijailC (author)2015-12-02

what is the RTC for?

Carl AntonB (author)MijailC2016-08-31

to log the date/time

YogeshD23 (author)2016-08-27

Great post, will definitely try and post the outcome..
Thanks a lot for initiative

AustinC46 (author)2016-08-09

Can it store data?

FrancoG4 (author)2016-03-03

Congratulation!. ¿What sd card did you use to be compatible with that LCD TFT touch?

Thank you

SajalD (author)2016-02-16

very good

JeffP33 (author)2015-12-28

I was looking at your arduino code. It seems like you could use a switch statement or two to improve the readability and save a ton of if statements from being written.

TheCoffeeDude (author)2015-12-24

Epically cool!

BishIMikeBe (author)2015-12-14

Could you provide more detail on the wiring of the components? Like pin numbers for the screen and a clear display of connection points? This guide was great until they end! It's just hard to follow from someone without a bunch of experience.. I also had to update some of the arguments inside a couple of the added libraries because they have updated. This is a great guide no doubt! Really hoping to hear back from you.

BishIMikeBe (author)2015-12-14

Could you provide more detail on the wiring of the components? Like pin numbers for the screen and a clear display of connection points? This guide was great until they end! It's just hard to follow from someone without a bunch of experience.. I also had to update some of the arguments inside a couple of the added libraries because they have updated. This is a great guide no doubt! Really hoping to hear back from you.

AldoL5 (author)2015-11-21

well i read many about this project, its sounds really good, i think i understand all to star working, except how to connect the 3.2" TFT LCD Shield, anyone can help me with that please? Thank you so much

maxwellmoojw (author)2015-11-11

Great project

carcharodon (author)2015-09-02


RyanM27 (author)2015-08-20

Can you share more detailed wiring information please

rgonzo2 (author)2015-05-26

rgonzo2 (author)2015-05-26

Could you share the libraries needed for code?

rgonzo2 (author)2015-05-26

bitsandbots (author)2015-05-08

Do you have any pictures to offer with plants successfully grown using this system?

mormonkid (author)2015-04-03

Did you write the code for this project? Because your post seems to imply that it is all your code and idea, with minimal input from Billie, but the inverse is true; you just copied his project, added a function for light control, removed the comments at the top giving Billie credit as author, and then took credit for it all.

You're young; here's a lesson in life, your reputation is more valuable than what internet people think of you, stealing ideas and taking credit for them as your own is a huge blow to your reputation and credibility. Especially having used your actual name with a picture attached.

Original project by Billie:

mormonkid (author)2015-04-03

lol, offended that you got called out for ripping off someone elses work and calling it your own?

mormonkid (author)2015-03-28

Here's a youtube video of the system in action by the guy who actually designed the whole thing:

drewskee (author)2015-03-26

Nice work on the write-up, but shame on you for not giving credit where it's due! Your code is almost a complete rip of Billie-s-Hydroponic-Controller ( . At least give credit where its due and avoid misdirection if folks want the real source and perhaps even contribute to it. Thanks again for spending the time to do a decent write up, but please, at least cite the resource you used to avoid confusion.

About This Instructable




Bio: "Things don’t have to change the world to be important." Twitter: @PancakePatrol, Google+: Austin Simonson
More by austinsimonson:Ninja Turtle CupcakesHyduino - Automated Hydroponics with an ArduinoSand "Clay" - Preserve Your Sand Creations Forever!
Add instructable to: