DIY Grow Control: Fans, Lights, Hydro Pumps, Temp and Humidity

poppagetsbaked

Well-Known Member
I have started to gather parts and design my own Grow Control System based around a Micro Controller, Solid State Relays and Temp/Humidity Sensors.

I wanted to share it with you all so that hopefully someone else may benefit from this or even help improve it.

Basically it revolves around the Arduino MicroController making coding rather simple for those with any programming experience (once my system is assembled and in testing I will post source code, negating the need for programming exp).

Parts list:
Arduino Pro Mini
Temp/Humidity Sensors
Solid State Relays

I used 1 Arduino, 2 Temp/Humid Sensors and 3 Relays
The 2 temp sensors will be placed near the top of the canopy and near the bottom of the canopy (Adding sensors is relatively trivial) and Relays will Control the Light, Fan, and Water Pump (Adding relays like the sensors is relatively trivial), Additional relays are needed when additional lights are added as the Relays are only rated @ 8amp or if you wish to have multiple fans or water pumps on different timers the 10amp relay can support many fans/pumps).

I plan on adding schematics/drawings/layouts (once they are created).

The logic behind the system is simple enough I think.

The micro controller Keeps the lights on for 12-18hrs a day depending on growth phase, it can even control separate lights (as I intend to do once I have both a flower and veg room running).

The System will also measure Temp/Humidity and output that data over usb/bluetooth/wifi or other wireless (I'm using an XBee wireless serial device but can be easily adapted) That data is then read by a PC or other device giving you remote access (I'll probably work up a scheme for outputting to a simple webpage for access on my phone/tablet) The Temp/Humid data is also used by the system to determine if the fan(s) should be on or off.

Opinions? Comments? Questions? Can't Wait to see it?

Total cost with the Arduino, 3 Relays and 2 Sensors is right around $175 minus the wireless telemetry which adds another $50-75 but I had everything but the relays and sensors already so it didn't cost me that (which is why I went this route).
 

poppagetsbaked

Well-Known Member
Nedyah, sub up to this thread, I'll take some pics tonight and post up some of what I have started. I'm finishing up my cabinet construction this weekend, and this should be prototyped as well. I'll get some more details documented this weekend
 

poppagetsbaked

Well-Known Member
The Real Genesis for this project is the fact that I do a fair amount of travel for up to 10 days at a time and I have no one to take care of my garden while I'm out of town so eventually I want to be able to automate EVERYTHING and have the ability to remotely add xyz which is a major project but it is "off season" from thanksgiving to mid Jan so I have time to get it working or I'll bite the bullet and have to have someone drop in on them for me :/

Ok here is what I have so far...

IMG_20111008_001557.jpgIMG_20111008_001519.jpgIMG_20111008_001534.jpgIMG_20111008_001526.jpgIMG_20111008_001513.jpg
Ok I'll start explaining, The top pic is a shot of all the gear for the most part followed by successive shots of smaller groups of items.

Basically the wall wart will plug into the "Power System" which is just a 5v regulator the power will then branch off to a distro board where all sensors and relays will get there power.

I'm going to build this on perf board and put it in a project box with external plugs for all my sensors making it as modular as possible.

I'll probably run some cat5 I have for the sensors, I'm thinking I'll strip it out of the outer casing and use the inner twisted pairs maybe? or I may just run some decent size speaker wire and tin the connections.

The cable runs for the sensors will be the longest but I don't think it will be a problem if I need to get some wire from the home improvement store or rat shack I will its not a big deal...

The Temp/Humidity Sensors are from an online electronics retailer as are all the micro electronics in the screen. (I can provide their website if needed, though you can get any number of temp/humidity sensors from any online retailer should you so choose).

Each of the Temp/Humidity Sensors will send its data back to the Arduino and the Arduino will then send that information out over the XBee wireless serial link to my server which has an XBee attached to a USB Port and I will write a simple app to read the serial port and output the data to a webpage or something ( haven't figured that part out 100% I want access on my phone and tablet remotely)

The Relays are for the lights and hydro as well as fans, I have another relay not shown (identical). The Microcontroller will also control these Hydro will probably start at something like 5min off 45sec on? I'm building a modified Stinkbud LP Aero system so I'll have to play around and dial it in, but this is easily adjustable by changing some values in the application and uploading it to the controller.

The Lights will obviously be set depending on growth, I will be popping my seeds as soon as I get back from my DC Trip next week. so I'm going to start at 24hrs on for the first couple of days then drop to 18/6 until after I've taken clones and flowered them to sex my plants. but again changing the lighting schedule is pretty simple once its setup.

There are most elegant programming techniques that allow for bi-directional communication with the Arduino which I plan to explore once I have a functional system that works as a replacement for a Recycling Timer as that is a big cost with DIY Hydro/Aero...

I also plan on running my fans off of a relay controlled by the Arduino, I will have at least 1 Intake and 1 Oscillating Fan to start which will eventually expand to an exhaust and another oscillating fan or 2.

I almost forgot the Ultrasonic Range sensor, I am not sure about this one yet, I am contemplating using this to detect reservoir levels but I'm not sure that would be a good idea and really that isn't in my initial plans for version 1 but it was handy :D

I will detail a little more how I would like this to progress over the few months, I plan on adding more Lights, Fans and Pumps, though many items can run on 1 pump generally I will have different schedules. My Grow cab (which I will detail in my journal when I get back) is setup for a 28in x 28in x 4ft mother area and above it a 28in x 28in x 4.5ft clone area (really the height isn't set in stone yet and could be moveable I suppose... but directly next to it is a 28in deep x 4.5ft wide x 8.5ft tall flowering area. In these areas I'll have Lights and water pumps on the same schedule for the clones and mom(s) on the veg side and the same for the flowering side the fans will be controlled differently, while the lights are on the oscillating fans will be on, when temps get above 75 intake and exhaust fans need to be on.

Ok hope that helped... I know I rambled a bit... sorry damn tweeds!
 

Kdn

Member
I am right there with you buddy I have a couple setups running now as testers. You will find it works really really well. Over the last year or so I have refined some of the code and have created a few designs to help replace some of these crap timers and stuff out there. My main test setup is basically controlling the whole grow minus a couple things that are still in the works, but I am impressed with how well it works especailly for the price of the componenants.

Here is one design this little guy could control most of a grow, but it is intended for a slave(wired/remote) unit. It has breakouts for wifi/BT and can accept a few analogs inputs as well as more outputs.
ST1.JPG

This is one of my relay units its ment to replace switchs or be placed into project boxes wall sockets etc... really cheap and qite reliable from my test, I keep trying to kill them and they just keep ticking.
RB2.jpg

Here is a simple fixed gain/offset pH amp-interface I also have some that are more robust but cost a bit more these are easy to make and cheap to buy and can interface any common pH probe with a BNC connector.
SimplepHAmp.JPG

I have a few beta stand alone units one of which one will be going to LuciferX (creator of Herb.Iq<- nice piece of software too i must say) to add support for the sensors and that. I just started adding touch screens in front of some serial GLCDs which seems to make one hell of a nice controller user interface and I have been have great results with my current test setups. Most of my controllers are monitoring energy usage as well which is a nice little bonus that doesnt take much more to accomplish.

LuXcontroller1ne.jpg
I am in the process of gettin a site up to document all the build and have schematics, downloads and resources for anyone who would like to build their own setup. i will also stock a few of the boards if people want to build a setup but not have to make their own pcbs or use breadboard. Happy programming Poppa if you need any help let me know and I hope you do the same if I hit a road block :)
 

420hydro

Well-Known Member
I'm subscribed. I have an Arduino and have researched sensors for my tent.
Will contribute when I can.
 

TechnoMage

Well-Known Member
Very interesting stuff. I was looking around the other night for temp/humidity sensors that I could connect to my network but most are designed for data centers and don't have relays.
 

Kdn

Member
The temp and humidity sensors are really really easy(especially if you do a 1wire or I2C digital temp sensors) the lm335a is a decent and cheap analog temp sensor, put it into a stainless or titanium tube(or even heat shrink tube) and seal it with expoy and you have a pretty damn good temp probe. the HIH-4030s are good humidity sensors but they cost a lot, you can also get condensing version if needed. Pop an atmel 168 with 4 temp senor inputs and a couple humidity(1 on board and one probe) and you have a nice slave unit that can send a digital signal back to the base unit(serial, i2c, 1 wire pretty much however you want to do it)
 

poppagetsbaked

Well-Known Member
I'm still here... somehow I wasn't subbed to my own thread :/

Anyways I've gotten a board design that allows a fair amount of modularity in it... My board will allow you to connect 6 sensors or relays to each slave board and up to 6 slave boards to a master board (same actual board design just different software on the micro controller) allowing any combination of Sensors and Relays up to a total of 36 devices. The boards are designed around The Arduino Mini Pro, RJ11 connectors and cables for the sensor cables as well as communication between master and slave modules as well as the server PC (I am going to make a simple RJ11 -> Serial converter or use an XBee as I'm only sending data back to the server.)

I'll post up the board design (Done in Eagle) if anyone is interested...
 

poppagetsbaked

Well-Known Member
I am right there with you buddy I have a couple setups running now as testers. You will find it works really really well. Over the last year or so I have refined some of the code and have created a few designs to help replace some of these crap timers and stuff out there. My main test setup is basically controlling the whole grow minus a couple things that are still in the works, but I am impressed with how well it works especailly for the price of the componenants.

Here is one design this little guy could control most of a grow, but it is intended for a slave(wired/remote) unit. It has breakouts for wifi/BT and can accept a few analogs inputs as well as more outputs.
View attachment 1827819

This is one of my relay units its ment to replace switchs or be placed into project boxes wall sockets etc... really cheap and qite reliable from my test, I keep trying to kill them and they just keep ticking.
View attachment 1827855

Here is a simple fixed gain/offset pH amp-interface I also have some that are more robust but cost a bit more these are easy to make and cheap to buy and can interface any common pH probe with a BNC connector.
View attachment 1827843

I have a few beta stand alone units one of which one will be going to LuciferX (creator of Herb.Iq<- nice piece of software too i must say) to add support for the sensors and that. I just started adding touch screens in front of some serial GLCDs which seems to make one hell of a nice controller user interface and I have been have great results with my current test setups. Most of my controllers are monitoring energy usage as well which is a nice little bonus that doesnt take much more to accomplish.

View attachment 1827858
I am in the process of gettin a site up to document all the build and have schematics, downloads and resources for anyone who would like to build their own setup. i will also stock a few of the boards if people want to build a setup but not have to make their own pcbs or use breadboard. Happy programming Poppa if you need any help let me know and I hope you do the same if I hit a road block :)
Thanks for the offer I will surely be giving you a shout when I need some help!!!
 

Kdn

Member
I'm still here... somehow I wasn't subbed to my own thread :/

Anyways I've gotten a board design that allows a fair amount of modularity in it... My board will allow you to connect 6 sensors or relays to each slave board and up to 6 slave boards to a master board (same actual board design just different software on the micro controller) allowing any combination of Sensors and Relays up to a total of 36 devices. The boards are designed around The Arduino Mini Pro, RJ11 connectors and cables for the sensor cables as well as communication between master and slave modules as well as the server PC (I am going to make a simple RJ11 -> Serial converter or use an XBee as I'm only sending data back to the server.)

I'll post up the board design (Done in Eagle) if anyone is interested...
Sounds like you got a great start, and I like the idea you have of chaining the modules together. I think this is the way to go and allows the most flexibilty with out any major downsides except maybe some communication overhead between units. with some careful design you can squeeze these into wall wart style boxes and have little remote outlets and that. I am interested in you project and love to see it where it goes, hopefully in a few weeks I will have most of my writeup finished, I am just about done with the pH sensor/energy monitor detailed docs. I have also started documenting the larger project writeups but with some many parts its hard to keep good documentation as I go, since i just want to keep refining instead :) In the end I should have writeups on all sorts of stuff ranging from multimeter attachments for a smart phone to wifi garage door adapters (handy with the location triggers in iOS and andriod) to usb to smartcard interface.
 

poppagetsbaked

Well-Known Member
Thanks KDN, I've got my pump relay control working and I have finished up my board design, I've found a place that will get me 10 pcbs (unpopulated of course) for $30 shipped so I'll probably be ordering them in the next couple weeks, then chinese lead time etc I should have them back by 1 Dec or so, I only need 1 board for my current grow but I may populate and sell the others if there is interest :D
 

Kdn

Member
Your quite welcome poppa, I am just happy to see others taking interest in this endeavor as the more that participate the better our results will be especially if we share our failures and successes with others. I am starting toget better at documenting as I go, but I needed to restart some of my "experiments"to retrace my steps so I could catch back up. At least now I can finish my write-upsfor what I have working so far with confidence :)

If you need some pH interfaces or anything let me know, I just finished upfinalizing a couple designs one of them with a micro-controller on it to allowfor digitization for use with I2c, 1wire, serial, wireless etc... And I amgoing to order a panel of them to get a decent price break. And have added some of the details on my site.

10 pcbs for $30(depending on size) is a pretty good deal really, And I willtake one off your hands sure I got 67 relay boards from my last panel order butI have literally put these things into everything I can hehe. If you want a couple raw ones from me let me know.
 

poppagetsbaked

Well-Known Member
@Kdn Sure I would be happy to swap some boards with you once everything is setup... I'll send you a PM so we can talk details...
 
you're are making my fantasies come true!!!
my med mj ones anyway, "wink, wink, know what i mean.."
am watching closely for maximum assimilation.
 

randomseed

Active Member
I'm still here... somehow I wasn't subbed to my own thread :/

Anyways I've gotten a board design that allows a fair amount of modularity in it... My board will allow you to connect 6 sensors or relays to each slave board and up to 6 slave boards to a master board (same actual board design just different software on the micro controller) allowing any combination of Sensors and Relays up to a total of 36 devices. The boards are designed around The Arduino Mini Pro, RJ11 connectors and cables for the sensor cables as well as communication between master and slave modules as well as the server PC (I am going to make a simple RJ11 -> Serial converter or use an XBee as I'm only sending data back to the server.)

I'll post up the board design (Done in Eagle) if anyone is interested...
So your saying you could run
Master -> flower room slave board
Master -> veg room slave board

and then all the sensors for each room to that rooms control board?
I like it, big issue I have with my growtronix system is that everything has to be serial so I have cables doubling back to where they came from in a few places to get to the outlaying power controls.
 

randomseed

Active Member
Also this xbee got me thinking, what about all wireless sensors?
Would add to the cost but would really differenciate it from other systems on the market.
 

Kdn

Member
Also this xbee got me thinking, what about all wireless sensors?
Would add to the cost but would really differenciate it from other systems on the market.
I just upgraded my pH sensor interface with a microcontroller added to it for pretty much this reason, the sensor itself is baiscally a stripped down arduino now but still quite reasonable at only 21 bucks. I broke out serial Tx/Rx, I2c and a couple other pins. I also have a USBtoXbee/rs232 board for those that may want to use their pc as a base station or to program DIY arduinos etc...
 
Top