Page 1 of 32 123 11 ... LastLast
Results 1 to 10 of 314
Like Tree55Likes
Grow Room Design & Setup

Arduino Controlled Grow and PC Program - Work In Progress

in the

The Grow Room

forums; Hey everybody, first post, first ever grow. I have a simple ebb and flow setup, and everything is going great. ...
  1. #1
    Ganja Smoker Pot Head
    Join Date
    Apr 2012

    Posts
    303

    Default Arduino Controlled Grow and PC Program - Work In Progress

    Hey everybody, first post, first ever grow. I have a simple ebb and flow setup, and everything is going great. While buying everything necessary for the grow, and having some background in controllers, programming and computers in general; when I found that 24 hour / 15 minute interval timer costs me about $20, a thermostat with 120V plug costs ~$70, a pH/PPM meter and all this stuff that didn't talk to each other and say 'hey, mix some new nutrients, and start the fan it's too hot in here!' I thought to myself, "Really???"

    So I bought 2 timers, a pH pen, a pump, a rubbermaid container, a cheap plastic table and a 1000W ballast with a HPS bulb; just to get me started.

    Well, all I can say is everything's great - my babies are beautiful and my setup is VERY analog and yet VERY simple. ( I like simple - but something can be made that's just as reliable and does a better job... )
    Grow.jpgGrow 2.jpg

    But, still - I wanted to later on upgrade my system with time, and that just means forking out the money on the control units, etc, right? WRONG.

    If you've never heard of an Arduino, it's basically a C++ based development platform, but is VERY comparable to a 'PLC'.
    From Wikipedia, the free encyclopedia:
    "A programmable logic controller (PLC) or programmable controller is a digital computer used for automation of electromechanical processes, such as control of machinery on factory assembly lines, amusement rides, or light fixtures. PLCs are used in many industries and machines. Unlike general-purpose computers, the PLC is designed for multiple inputs and output arrangements, extended temperature ranges, immunity to electrical noise, and resistance to vibration and impact. Programs to control machine operation are typically stored in battery-backed-up or non-volatile memory."

    - I'm using an Arduino Duemilanove for this project - with 5 Analog Pins and 13 digital pins - 2 of which are needed for communication
    - The PC Program is coded in VB.NET

    So let's compare some costs of some hardware, starting with the consumer available product first, then compared to the Arduino route (5v PLC, basically):
    120V 24-hour / 15 minute timer: $24
    25A SOLID STATE RELAY 4-32VDC INPUT 48-660VAC: $15

    4 Timers: 4 * $24 = $96
    4 Channel DC30V 10A AC250V 10A: $12

    Temperature/Humidity Display: ~$15
    I got 5 temperature/humidty Sensors on ebay for: $1.57 (the value from this can be used to control a 120V or up to 660VAC - thereby eliminating the cost of a $70 120V thermostat)

    pH pen: ~$30
    pH sensor: $20, and Adapter: $15 - a little over the price of the pen here, but does the pen log the data? Can it turn on and off anything? Tested: I got it to match the value of my pH pen +/- 0.03

    Ethernet Shield for Arduino: $15

    Wireless (up to ~100m): 2 for $6 (one to transmit, one to receive)

    5V (control) 120V (operation) Solenoid Valves: $5 - $45 (probably best go with a reliable one)

    Submersible Pump: ~$25

    Yadda, yadda, yadda...

    Anyways, I've loaded my Arduino up with the Firmata example sketch ( comes with arduino software = no coding for me ); although I did change the code just a little bit to get the analog I/Os working.
    Next I started coding up a VB.NET that I've dubbed, "ArduinoFirmata_Lab" - originally it was "ArduinoFirmata_Grow", but I thought I might be able to use this for controlling other things later on, and didn't want the program to be associated with "growing" <--- You guys are lucky however to see the growing part associated with the project...

    The control software, right now, can control all pins and get all analog raw data (0V - 5V reading computer reads as 0 - 4096 (I think) ) so the raw data gets punched though a calculation (which can be calibrated) and output anything you want (if it's a pH sensor, then use the pH calculation).

    What works so far:
    1) all readings from sensors (analog i/o)
    2) all digital outputs (to control 5V pin off of controller, which in turn could run anything you can think of; in this case a relay to control something that is 120V or 240V or what-ever...)
    3) all graphs / guages
    4) all water timers (with any interval you want ---> think 15 minute water cycle is too much? Customize!)
    5) light timer
    6) history log - really an alarm log, I guess (pH too high, pH too low, High Humidty, Low Humidity, High Temp, Low Temp, and anything else you can think of - reservoir temp, plant temp, lumens, whatever!)

    Currently working on (Busy right now - give me a week and a half :P)
    1) pin configuration (add/remove sensor, relay, etc or change pin)
    2) user log
    3) Customizable interface ---> add a tab for each room and the associated stuff you want to control in that room. - right now you can add an image or button and move them anywhere you want and label the button anything you want it to and, instead of adding individual images, you could just take a picture of your whole room and load it as a background and just add buttons on top of that image
    4) Still can't save settings / extra pages / button, image locations
    5) Email Alert
    6) Maybe I'll add webcam support - but there's already so many apps that already do this and probably more securely.
    7) Waiting for my ethernet module and wireless modules to arrive
    8) Might need to add an SD card for a log / settings - ~$15
    9) I'll add wifi later when I need it (maybe a couple years down the road when I have the setup I really want - I don't want to go overkill on a simple ebb and flow setup for now; just set myself up for what I really want later...) <-- Range? Up to you really - repeaters, internet, etc....
    10) Maybe a phone web interface? We'll see, a little overkill right now.

    So there you have it, a look inside my brain a little bit. I'm still waiting on most of the parts, so I'll keep you guys posted as the work continues (a little busy right now). The "to-do-list" is pretty easy stuff and half programmed already - won't take long at all... The next thing I'm going to do though, is update the arduino code so the arduino does not need the PC to run, but rather use the PC to connect up to the arduino and change its settings (then you won't need to run your PC all the time) - also, while not being fed with a 9V wall adapter, it can use a 9V battery as backup power - thereby never losing its settings.

    Pics:

    pH Sensor and Arduino.jpgOutlet.jpg
    Screenshot1.jpgScreenshot2.jpgScreenshot3.jpgScreenshot4.jpgScreenshot5.jpg
    Last edited by AdvancedNewbie; 04-16-2012 at 08:47 AM.
    orknork, 4 2 0, PjA and 12 others like this.

  2. #2
    rmx
    rmx is offline
    Able To Roll A Joint Able to roll a joint rmx's Avatar
    Join Date
    Apr 2012

    Location
    Manila
    Posts
    56

    Default

    Hey AdvancedNewbie,

    That looks amazing! Major kudos on your work so far, and coming up with the idea in the first place! I dabble in programming and software development, but nothing as advanced as this. Brilliant stuff. I've not done a search, but is there anything similar out there? If not, you could be onto something here! This seems like it could be universally handy for all sorts of indoor growing, not just the mj scene. Huge potential audience out there if you were to release this as 'shareware' - I hope your idea comes to fruition, very cool! Will definitely keep an eye on this.

    Great lookin' green there too
    Opm likes this.

  3. #3
    Ganja Smoker Pot Head
    Join Date
    May 2010

    Location
    the big pond
    Posts
    205

    Default

    sub'd

    Curious on how you'll keep the PH measurements actually in check over time etc. Should be interesting if you're willing to keep this thread up to pace with the progress.

    Thanks in advance for the efforts.

  4. #4
    Ganja Smoker Pot Head
    Join Date
    Apr 2012

    Posts
    303

    Default

    Well, so far I've tested different water samples with pH up and pH down added, and compared the values to a pH pen I had bought... But I have ordered some buffered pH solution to calibrate with later on. But the sensor does seem to be agreeing with the pen. In the last screenshot, there is a calibrate column and in each cell there's a button so you can put in your formula (in a new window). I looked on the datasheet for the sensor (just googled it) and found there was a suggested formula to use when converting the raw signal value into a useable value. This is common with other sensors too, like thermistors, etc. I did however find that I needed to tweek the formula a little, but got it working pretty quick using their forumla as a general baseline.

    @ rmx: I haven't found anything as cheap as this just some updates I want to straighten out first and I'll probably post the code somewhere... But I did find a program (and hardware) called, 'Growtronix'... It's a pretty similar design concept as what I'm buidling, but I'm trying to stay free and open source... I think people should have the right to add a feature if they think of something that's missing... and that missing thing is usually different for every user.
    Last edited by AdvancedNewbie; 04-15-2012 at 11:51 PM.
    neosapien likes this.

  5. #5
    Ganja Smoker Pot Head
    Join Date
    May 2010

    Location
    the big pond
    Posts
    205

    Default

    Quote Originally Posted by AdvancedNewbie View Post
    ... but I'm trying to stay free and open source... I think people should have the right to add a feature if they think of something that's missing... and that missing thing is usually different for every user.
    On the PH its more sensor drift over time. Obviously this isn't a leave it for 60 days approach or anything. Just figuring it will suffer the same slings and arrows all the pens do with needing calibration/drifting/etc.

    And of course, I cant double rep you for this alone. I'll just make sure that when I can I do. I spend time on that side of the fence as well so I'm really looking forward to this. Especially since I hate origin work.

    "
    • You must spread some Reputation around before giving it to AdvancedNewbie again.






  6. #6
    Ganja Smoker Pot Head
    Join Date
    Apr 2012

    Posts
    303

    Default

    If you were to leave for 60 days, you could re-mix nutes automatically and compare the pH value to what it usually is after a remix? That would let you know approx. how much the pH value is off (if your concerned while monitoring remotely), other than that calibration is always a necessity. - No real plans to have a robotic arm or something dip into calibration pH buffered solution or anything like that though....

    As I posted on another thread:
    Automated Nutes.jpg

    Edit: You would need a one way valve comming off that pump so when the pump turns off the nutes don't backflush through the pump.
    Last edited by AdvancedNewbie; 04-16-2012 at 11:42 AM.

  7. #7
    Able To Roll A Joint Able to roll a joint The Scooby Master's Avatar
    Join Date
    Jan 2009

    Location
    On the train to Bangkok Aboard the Thailand Express
    Posts
    56

    Default

    Sweet. I was just looking through the forums to see if anyone had experimented with this in the past. It is nice to come across an active thread that is just beginning.

    In building a new grow room, I was thinking about putting together an arduino based data collection system and using a Rainbird sprinkler controller to control hvac. But now I am thinking I will build exactly what you did. Consider me subscribed and when you are ready for "beta-testing" keep me in mind.
    "Our first stop is in Bogota, To check the Colombian fields. The natives smile and pass along a sample of their yield. Sweet Jamaican pipe dreams. Golden Acapulco nights. Then Morocco, and the East. Fly by morning light."

  8. #8
    Ganja Smoker Pot Head
    Join Date
    Apr 2012

    Posts
    303

    Default

    You bet Scoob', I just finished the e-mail alert function, cleaned up the 'design-your-own-interface' code up a little bit too, and everything seems to be working great. What kind of arduino do you have? I'm interested to see if the code's compatible with more than my Duemilanove.

    I'm hoping to release a beta here pretty quick.

  9. #9
    Ganja Smoker Pot Head
    Join Date
    Apr 2012

    Posts
    303

    Default

    I'll post some code either later today or on the weekend.

  10. #10
    Ganja Smoker Pot Head
    Join Date
    Apr 2012

    Posts
    303

    Default

    Everything has been posted to: http://sourceforge.net/projects/arduinovblab/

    Download page: http://sourceforge.net/projects/arduinovblab/files

    Merry 420.

    Edit: Don't get too excited though, it's still in alpha stages :P
    Last edited by AdvancedNewbie; 04-19-2012 at 05:34 PM.

Page 1 of 32 123 11 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •