What's new
  • As of today ICMag has his own Discord server. In this Discord server you can chat, talk with eachother, listen to music, share stories and pictures...and much more. Join now and let's grow together! Join ICMag Discord here! More details in this thread here: here.

Custom Grow Room Automation

johndough99

New member
Starting up a new soil grow here shortly. Was going to purchase $500 climate control boxes (co2,ppm,humid,temp) for each room. I recently became aware of some open-source alternative which is better and cheaper. Coding it myself (so far). It is taking quite a bit of a time but once it's built it will be expandable and reusable.

There are these DIY PLC boards out now with tons of sensors/adapters that can be used with them. These DIY boards hook up to the computer via USB but also can communicate over wifi or ethernet. Arduino is what I will be using but there are different ones out there. The sensors and adapters you can connect range anywhere from $1-$65.

So anyways I can get input to a computer and also control relays (power) at a computers request. With the data going to the computer I am wrapping up the PHP/SQL backend server code that will log climatecontrol (and security) events constantly. When a sensor is out of what I have established as its threshold by a certain %. A relay will power on causing that metric to be adjusted. As the data continues to roll in when it is within 10% of median (middle of the range I give it), it will kick off the relay. EMail notifications on discovery and resolution of all issues. Would love to do SMS or something but I have not messed with that before.

Remote Web Access will be supported so I can check in via my mobile or wherever I am at.

If anyone's done anything like this before let me know. I Will be posting updates to this thread as I move along.

Pretty well versed in computers/information security as well so if you have any privacy or anonymity questions holler at me.
 

ChaosCatalunya

5.2 club is now 8.1 club...
Veteran
Sounds great, look forward forward to seeing this develop, there is not enough of this going on. !

Try some plants in coco alongside the soil plants would be my only tip ;)
 

johndough99

New member
Definitely will give that a shot. My code is pretty dirty and unorganized right now(oh god the debugging echos and comments), but I will put it up on Github along with database table structure.

I was even thinking that as it progresses I can have it statistically analyze past events for patterns (periods of time before reoccurs) and automatically implement a strategy to keep everything as flat as possible. It's crazy that no one has some code out there for this yet. Seems like a perfect match, I mean who else would want to track soil moisture humidity but a grower.(http://www.lightinthebox.com/soil-h...ks-with-official-arduino-boards_p1141466.html). Could potentially isolate each pot and apply nutrients based on conditional results. I will put that one on my "way down the road" list :)
 

Kiva

New member
After reading your post I thought the SmartBee system I just bought does almost all of that ( i think :p) any way I just set it up and have a journal with pics of the UI and some other pics of my first grow. You should check them out. The Chief Product Officer I spoke with said they have like 6 years developing these products. But hey if you wanna tinker by all means tinker! just sayin

https://www.icmag.com/modules/Journal/viewentry.php?journalnoteid=15103#comment15103
 

Kiva

New member
Who gives a shit about UL/CSA! The system works.

and anyone reading this thread can see your on a mission to talk shit on smartbee products. Keep drinking your haterade bro
 

johndough99

New member
Sorry for lack of updates. Life is busy. Here is Github for PHP/C code that will run front and back ends. Under development and messy. PHP/SQL side is pretty solid (lots of debug code). C code for Arduino is pretty sketchy (although I do have a compiled version that can print/upload the temp/humidity). Like I said I feel like this could be a huge up to this industry if we can computerize/automate I/O functions. If condition is this then do that. Shit, that is what computers were built to do at the most basic level.

https://github.com/bh420/growroomautomation

Holler
 

johndough99

New member
and the reason I am going with the Arduino platform for this over the raspberry pi is partly because of price. I can get knock off mega boards for like 15.00 vs 30+ for a Pi. the second is I am also developing a security system that will run side by side on the same back end (different physical board though). It will use door contractors and piezo sensors on the windows (shatter detector). Its funny because other than the back end code to take and interpret data -- the code for all these sensors and modules already exists. All I have been doing is piecing it together (frankenstein style) and trying to develop some sort of logic for its decisions. I mean I'm conflicted because of the fact that I know this could be a very profitable endeavor if I wanted to market it. But my heart says fuck it keep it free. Karma is more important to me than a few bucks in the long run. If anyone wants to help code this project let me know.
 

Kiva

New member
Sorry for lack of updates. Life is busy. Here is Github for PHP/C code that will run front and back ends. Under development and messy. PHP/SQL side is pretty solid (lots of debug code). C code for Arduino is pretty sketchy (although I do have a compiled version that can print/upload the temp/humidity). Like I said I feel like this could be a huge up to this industry if we can computerize/automate I/O functions. If condition is this then do that. Shit, that is what computers were built to do at the most basic level.

https://github.com/bh420/growroomautomation

Holler


That is what the Smartbee system is doing for me at the moment. Its controlling devices based on my thresholds in the software. I dunno you sound like your on a mission heheh but you should look into it. it might do what you want already. Good luck whatever you do:tiphat:
 

johndough99

New member
Smartbee? http://smartbeecontrollers.com/ that thing? That is like hundreds to thousands of dollars man... if that is what you are referring to. That is nuts. My solution will be better and free -- I can promise you that :)

When this is all said and done I will provide material lists and code where anyone can have in depth climate control for a fraction (just need a box to host back end and the materials for PLC board/sensors) of what they pay for products like that.

I'm glad you like that product, but if you spent that much money on it I'm sorry I'm developing this so late in the game. Could have saved you some money.

Happy Friday everyone!
 
I've arduinoized my space nearly two years ago. I got 13 thermometers, 8 hydrometers, 10 relays, 11 led's, a speaker and a servo. The arduino sends the sensor data to a mysql server to store the data. It also updates the status of the relays. This php page reads the data.

View Image

The relays are the muscle of the system. The relays control fans, pumps and lights. If the heat gets too high, one of the two hps lights turns off. If the temperature drops enough and there has been a 15 minute delay, the light comes back on. If the intake area gets hotter than the main area, the intake fan goes off. If humidity gets too high an extra recirculating fan turns on. I got a big stack of timers I no longer need.

The good thing about the arduino is how customizable it is. The bad thing about the arduino is how customizable it is.
 

johndough99

New member
Badass man! Care to share any specs/code? I just got my first shipment of the devices so I can start to tinker with them. I'm a good coder so the learning curve for me is going to be the wiring of these devices. Most IC work I have done was creating RS232 circuits to interface with cable modems for uploading modded firmware.
 
Badass man! Care to share any specs/code? I just got my first shipment of the devices so I can start to tinker with them. I'm a good coder so the learning curve for me is going to be the wiring of these devices. Most IC work I have done was creating RS232 circuits to interface with cable modems for uploading modded firmware.

A bit of distance between the cpu and the sensors X a lot of sensors = lots of wire. I was stripping network cables, telephone cables, serial cables, parallel cables, ... My first run was a mess. I stuck the arduino in an old serial switch box that has 3 db25 connectors. Found some long 25 pin cables and its much neater now. A decent soldering iron and lots of shrink wrap should be on hand.

Run as many peripherals off their own power supply as possible. Sensors usually don't draw a lot of current but relays do. Hook a speaker to it so you know when it reboots.

There are so many things an arduino can do and they're so cheap, I eventually plan to have several, each devoted to more specific tasks. Then each unit talks to a pc that makes decisions.

You'll want to find arduino libraries for each sensor. It makes coding 100 times easier.

You might be great at coding but its the stuff you don't think of that will get you in trouble. What happens if the power goes off then back on? I handle that by writing the state of each relay to a file each time the relay's state changes. Then when the arduino reboots, it reads the file and sets the relays. But that method will fail if the power stays off long enough that the schedule said to toggle the relay. I should write the schedule to a file too. But I'm too lazy and changing a working system is asking for trouble.

Hopefully you got an arduino with lots of ram. My memory is a bit foggy, but it seems like some arduinos have as little as 32k and my program takes 40k. I'm not a great coder.
 

hvac guy

Active member
I'm not your bro, you think I'm on a mission, I saw the controllers and spoke to the rep at a MY tradeshow, not impressed.


Who gives a shit about UL/CSA! The system works.

and anyone reading this thread can see your on a mission to talk shit on smartbee products. Keep drinking your haterade bro
 

Kiva

New member
Oh but you are on a mission... All one has to do HVACguy is view your public profile and see your pattern of talking shit on products that are either not certified with certain logos or have not given you free shit or stroked your 25year ego. So you looked at them and talked to someone but never actually used them. But your probably one of those old guys who just learned how set a reminder on his phone. Or got all surprised when you learned you can talk to your phone. lol!

but let me ask you something... do you know the temps of your root zone while sitting in your living room watching football? Like now? I mean, like, right now?

I do and my team is winning....

want to know how? using uncertified, crappy stuff lol

Signed: Young Whipper Snapper from the 21st Century
 

Latest posts

Latest posts

Top