AdvancedNewbie
Well-Known Member
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... )
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 )
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
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:
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... )
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 )
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
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: