Adventures in Automation

Hot Diggity Sog

Well-Known Member
Let me start off by saying that I am a software developer by trade. Specifically, I develop in .NET and spend most of my efforts building web applications. ASP.NET, Html, Css and JQuery are my main flavors. I have a lot of experience in the aforementioned but absolutely no experience in any kind of electrical or mechanical devices and certainly not programming them.

I spent the last week learning a little bit and building my first prototype that I will be sharing in a moment. The purpose of this thread is to exchange knowledge. I know I can learn a lot from you and perhaps you can learn a little from me.

Some of the basic concepts we will initially be talking about are Web Cameras, Relay Devices and being able to program against these devices to do cool stuff.

My prototype is very crude but here is the setup:

Windows 2008 Server with a domain name so the series of web pages you are about to see can be accessed from a computer or a mobile device from anywhere in the world.

2 Logitech Webcams connected to the server

This first web page you will see is a simple web page I wrote that uses a Jquery plugin called ScriptCam. This web page cycles through every web cam that is connected to the server and cycles through them on a fixed interval. I'm currently cycling through each web cam every 5 seconds.
Here are 2 screenshots of what you would see on the server...keep in mind, this is just a plain old web browser:
Server Webcam Snapshot 1.png Server Webcam Snapshot 2.png
Every 5 seconds, the image changes to the other web cam. Instead of trying to do full blown streaming, I am taking a snapshot JPG image of each camera and saving it to disk on the server. I am not keeping multiple images per wecam...everytime a new image is created it is saved and overwrites the previously saved image.

These next set of pictures are again just a simple web page but this web page is the one that is accessible from the outside...from a computer or mobile device.
Monitoring Browser 1.png Monitoring Browser 2.png

This web page is showing the Images that are being taken by the server and this web page refreshes each image once every 5 seconds. So this is certainly not as elegant as a streaming feed but it's good enough.

Over on the left hand side of the web page, I have on/off buttons that correspond to the 4 outlet plugs you see.
The picture with the outlets is the prototype. It has a USB relay that is connected to each of the 4 outlets and plugs into the server via USB. When I toggle the On/Off switches, it uses a combination of Ajax calls and .NET code to open a connection to communicate with the USB relay and turn the specified circuit on or off.

Where I ultimately would like to take this project is to be able to automate as much as possible. Things like monitoring temps, relative humidity, opening and closing water valves, dispensing and mixing nutrients and watering. I invite anyone that is able to contribute as well as everyone that is interested in learning to join.

If you are a company trying to solicit commercial solutions, please go away. I am not interested in your solutions. However, if you are here to contribute knowledge and information about specific products that can used as a piece to the larger puzzle, then please pull up a seat, and welcome!
 

Sativied

Well-Known Member
Where I ultimately would like to take this project is to be able to automate as much as possible. Things like monitoring temps, relative humidity, opening and closing water valves, dispensing and mixing nutrients and watering. I invite anyone that is able to contribute as well as everyone that is interested in learning to join.
[...]
However, if you are here to contribute knowledge and information about specific products that can used as a piece to the larger puzzle...
Sounds like a typical job for Arduino + Raspberry pi

Former for the sensors and controls, latter as the server.

http://makezine.com/2014/11/01/raspberry-pi-and-arduino-home-automation/
 

WaterlooAcres

New Member
I would look into an Allen-Bradley CompactLogix or something similar. With your background in programming, writing a simple ladder/logic should be fairly simple. I am working on doing the same with a compactLogix (maybe upgrade to a control logix if i have enough I/O needs). Basically running thermostats, hygrometer, fan controls (both on/off and speed control), auto dampers for HVAC, timers and solenoids for my water system, all back to the main I/O chassis. (inputs being thermostat, hygrometer and timer for H2O pump and CO2 meter ) (outputs being fan control, A/C, Dampers, solenoids both water and CO2 tank.). The compact Logix i have is DIN rail mounted and has 10 I/O spots plus you can order side cars to add more I/O. using 700 series Allen Bradley timing relays that are also din rail mounted, i can go from 12v/24v inputs to the relay, relay to compact logix and then 120v line out to my outputs. eventually i would like to get some kind of HMI/touchscreen, i like the AB but they are super expensive. i did this all in AB because i have access to it but really all of this can be done with a ton of other mfgs. Check out AutomationDirect.com. Also look into software, AB has a bolt on APP called BatchWorks. you can basically program your nute regiment and if you have pumps/solenoids on your liquid nutes, Batchworks will integrate to your I/O controller and distribute your set amount of nutes at your timed interval. Yes i am in the automation industry, but not trying to sell you, just giving you my example. There are lots of mfgs out there who can do all of this.

as far as your camera setup and web based viewing, that is pretty awesome and impressive you did that your self! A buddy of mine wanted to do the same thing and ended up buying a swann DVR system http://www.swann.com/us/dvrs-kits its pretty cool, records for a few days and hooks right up to his router via Cat5. all he does is go to the website and login. he has one camera pointed at this main thermostat so he can check temp anywhere. let me know if you need any help setting up your automation, and be sure to google around to find the right mfg for you. Cheers ~S.S.~
 

Hot Diggity Sog

Well-Known Member
I would look into an Allen-Bradley CompactLogix or something similar. With your background in programming, writing a simple ladder/logic should be fairly simple. I am working on doing the same with a compactLogix (maybe upgrade to a control logix if i have enough I/O needs). Basically running thermostats, hygrometer, fan controls (both on/off and speed control), auto dampers for HVAC, timers and solenoids for my water system, all back to the main I/O chassis. (inputs being thermostat, hygrometer and timer for H2O pump and CO2 meter ) (outputs being fan control, A/C, Dampers, solenoids both water and CO2 tank.). The compact Logix i have is DIN rail mounted and has 10 I/O spots plus you can order side cars to add more I/O. using 700 series Allen Bradley timing relays that are also din rail mounted, i can go from 12v/24v inputs to the relay, relay to compact logix and then 120v line out to my outputs. eventually i would like to get some kind of HMI/touchscreen, i like the AB but they are super expensive. i did this all in AB because i have access to it but really all of this can be done with a ton of other mfgs. Check out AutomationDirect.com. Also look into software, AB has a bolt on APP called BatchWorks. you can basically program your nute regiment and if you have pumps/solenoids on your liquid nutes, Batchworks will integrate to your I/O controller and distribute your set amount of nutes at your timed interval. Yes i am in the automation industry, but not trying to sell you, just giving you my example. There are lots of mfgs out there who can do all of this.

as far as your camera setup and web based viewing, that is pretty awesome and impressive you did that your self! A buddy of mine wanted to do the same thing and ended up buying a swann DVR system http://www.swann.com/us/dvrs-kits its pretty cool, records for a few days and hooks right up to his router via Cat5. all he does is go to the website and login. he has one camera pointed at this main thermostat so he can check temp anywhere. let me know if you need any help setting up your automation, and be sure to google around to find the right mfg for you. Cheers ~S.S.~
Great info, thank you!
 

alcohol

Active Member
I run a sentenel CHHC which has a serial(WTF uses serial ports post y2k) out port. I downloaded software which is suppose to monitor room environment but I can't get it to communicate with the controller yet. I'd love to be able to graph my environment automatically, display trends and compare grows.
 

legallyflying

Well-Known Member
People get a boner for automation but the fact of the matter is that weed doesn't need a fully automated sytem. If variables like ppm and ph and temp are changing quickly, then your doing it wrong.

You want to develop something cool? Develop a system that just monitors the system and txts you when things are out of whack.

Nobody needs ph dosing and automates valves...they need to know... hey dude, your float valve is stuck and the plants are dry!!
 

weedenhanced

Well-Known Member
People get a boner for automation but the fact of the matter is that weed doesn't need a fully automated sytem. If variables like ppm and ph and temp are changing quickly, then your doing it wrong.

You want to develop something cool? Develop a system that just monitors the system and txts you when things are out of whack.

Nobody needs ph dosing and automates valves...they need to know... hey dude, your float valve is stuck and the plants are dry!!
Hey these stoners wanna geek up there systems I think it's cool as fck


Maybe in the future u will be able to grow weed from ur PC at home while u rent a grow room and fully automate it and when it's done it get mailed to ur house they shit would rock
 

ttystikk

Well-Known Member
I run a sentenel CHHC which has a serial(WTF uses serial ports post y2k) out port. I downloaded software which is suppose to monitor room environment but I can't get it to communicate with the controller yet. I'd love to be able to graph my environment automatically, display trends and compare grows.
No one else can, either. Those things are POS for such an application.
 

ttystikk

Well-Known Member
People get a boner for automation but the fact of the matter is that weed doesn't need a fully automated sytem. If variables like ppm and ph and temp are changing quickly, then your doing it wrong.

You want to develop something cool? Develop a system that just monitors the system and txts you when things are out of whack.

Nobody needs ph dosing and automates valves...they need to know... hey dude, your float valve is stuck and the plants are dry!!
What if the system could be bought with the basics and then advanced stuff- like control of peristaltic pumps to maintain EC and pH ranges, for example- could be layered on later as desired? Best of both worlds, no?
 

Hot Diggity Sog

Well-Known Member
So the next step in my prototype is going to be geared towards the ability to access water. This product looks promising and could be tied into a water line presumably.
http://www.smarthome.com/smarthome-select-electronic-water-shutoff-valve-3-4-inch-12v-dc.html
So being able to fill a water vessel should be quite simple.

Does anyone have any insight into nutrient dispensing? Some of the solenoid products I've been looking into would work in theory but they dispense too much for this application. I stumbled upon this but it is now 11 years old.
http://hmeter.sourceforge.net/controller.html

Any idea what kind of technique could be used for accurate dispensing of nutrients?
 

legallyflying

Well-Known Member
Hi, I spent thousands of dollars on a auto feed and ph system because....why exactly? Oh, your ph climbed 2 points over a day?

We are not growing cucumbers folks. Plants need trimming, training and eyes on them, multiple times a week. all else being equal, the key to yield is training. Period.

yeah its neat, and I was having a key build me a custom system with all the bells and whistles and finally said.. fuck it dude, you don't understand what the hell we are doing.

I get the feeling someone was just stoned and was like Ohhh yeah!! How about this!!

Want to make some money? Design a roomba with the power of a shop vac. Or a robot that trims the understory.

I can say this, if you have a system that is all auto and be ignored it is going to be slick as hell and then one day you will go to your room after ignoring it and fuck!!! Bad things happening.
 

ttystikk

Well-Known Member
So the next step in my prototype is going to be geared towards the ability to access water. This product looks promising and could be tied into a water line presumably.
http://www.smarthome.com/smarthome-select-electronic-water-shutoff-valve-3-4-inch-12v-dc.html
So being able to fill a water vessel should be quite simple.

Does anyone have any insight into nutrient dispensing? Some of the solenoid products I've been looking into would work in theory but they dispense too much for this application. I stumbled upon this but it is now 11 years old.
http://hmeter.sourceforge.net/controller.html

Any idea what kind of technique could be used for accurate dispensing of nutrients?
Peristaltic pumps, available from sparkfun.com
 

ttystikk

Well-Known Member
Hi, I spent thousands of dollars on a auto feed and ph system because....why exactly? Oh, your ph climbed 2 points over a day?

We are not growing cucumbers folks. Plants need trimming, training and eyes on them, multiple times a week. all else being equal, the key to yield is training. Period.

yeah its neat, and I was having a key build me a custom system with all the bells and whistles and finally said.. fuck it dude, you don't understand what the hell we are doing.

I get the feeling someone was just stoned and was like Ohhh yeah!! How about this!!

Want to make some money? Design a roomba with the power of a shop vac. Or a robot that trims the understory.

I can say this, if you have a system that is all auto and be ignored it is going to be slick as hell and then one day you will go to your room after ignoring it and fuck!!! Bad things happening.
This is an excellent point, which goes to mindset; if you're buying automation and monitoring capability to free you up to do other plant husbandry chores more effectively, it's a great thing. If you're buying it so you can spend more time on the couch with World of WarCraft, it's going to be a disaster.

No matter how sexy the grow op, if the grower doesn't treat it like a job they like and want to keep, then my advice is simple; go find a job you like and want to keep, because neither you or the plants will be happy or worth a damn.
 

Uzzi

Well-Known Member
Are you concerned about running your system over the net? I travel a bit for work so bought one of those camera's that work over wireless. I figured that I could position the camera to view my grow, meter etc and log in externally to monitor it all. The security concerns me... though maybe it's no worse than posting here anyway:/
 
Top