Anyone here controlling your grow room via PLC?

BloodShot420

Well-Known Member
yeah, its probably not quite up to code, but everything is tucked out of the way... AND lifted off the floor in case there is a flood. ;-) the door switch, and the 3 way veg, flower, off switch, and the thermocouples are the only inputs to the whole system. the door switch is from my computer, its the switch that tells if the case is open, and since i never put the case back together i figured i didn't need that ;-) the veg/flower switch looks straight ghetto, but i made it out of junk, and theoretically i should only have to touch it a few times a year... its way up by the ceiling behind the door switch. as far as having PIDs and such - the controller i'm using has 2 analog inputs and 2 analog outputs. I have an analog pressure transducer that shows you the static pressure of the room - from 0" water column, to .5" water column... i could hook that up to see, but i dont really have anything i can do with that yet... as time goes on though, i will keep an eye out for 120v variable frequency drives, which take an analog input and vary the speed of the fan - you can use the pressure of the room as an input, and you just name a setpoint (which will be a slight negative pressure... maybe .1"wc) this will make the exhaust fan run only as fast as it needs to keep the room at a slight negative pressure.. this makes it so if you have any air leaks in your room, fresh air is being pulled in, instead of letting the smell of your girls eek OUT of your room, rendering your carbon filter useless... you could also incorporate the room temp into the equation to make the fan go faster if the room got too hot... but the big missing component to that would be the VFD - which has about a $200 price tag... (you can actually control them without analog outputs, you can use an RS485 connection with modbus protocol)
 

BloodShot420

Well-Known Member
sorry for the multiple posts... its frustrating using the CGI proxy shit, it will not insert line breaks at all!! anyways, here is a shot of the plc programing application. if anyone wants an explaination, just look at the top 5 lines... in plain english it says... if X1 is on (x1 is the veg mode switch) and M16 is on (m16 is a temp check, to make sure its not too hot in the room, and its safe to run the lights) and the time is between 9pm and 3pm, turn timer 3 and timer 4 on.... timer 3 is a 10 sec. timer, and 4 is 70 sec... after you flip the switch, you have 10 seconds before the 1st light kicks on... and 60 seconds after that until the other light comes on. the next 2 lines with the t3 and t4 contacts in them just turn the lights on after the timers count down... Y1 and Y0 are the lights, as long as the X1 veg mode switch stays on, the lights will also stay on... The bottom line says if X2 is on (x2 is the door switch, so if it is "on" that means the door is closed) and m16 is on (not too hot), and time is between midnight and 6am, then turn Y23 on.. (y23 is the UV lights).. as soon as you open the door, they turn off, just like the fridge ;-) the stuff past that is mostly junk i was playing with, its the watering schedule, but not quite right...
 

Attachments

born2killspam

Well-Known Member
Bloodshot, a tip that might be convenient to know is that Alt-PrntScrn copies only the contents of the window in focus..
One question I have is why you let temperature control whether your lights come on.. I'd rather have it too warm than screw up my light cycle.. Or are these supplimentary lights to atleast one that is guaranteed to be on throughout the lighted interval? I'm more interested to see how you control accessories than the lights themselves though honestly..
 

BloodShot420

Well-Known Member
born2kill - thanks for the tip, actually the problem is I have to run all the PLC stuff through a virtual machine because my computer doesn't have any old-skool serial ports, so i had to get a USB to serial cable, which requires drivers, but none for windows x64, so i use a 32 bit VM to do my PLC stuff - and the alt-print screen wouldnt put the image on the clipboard for the real computer, so i just took a snapshot of the VM window ;-) It seems like everything i do is so technical... to answer the other questions - my room is about 3ft wide x 7ft long and i have 2KW of HPS, and some supplemental lighting (with UV)... the lights are vented seperately from the room, so i take fresh air, cool my lights and blow it into my garage (for a warm wintertime smoking environment).... if something happens and the fan doesn't come on to cool the lights/ballasts - the output temp will skyrocket and start melting shit or break the lights... so i have a room temp, and a light exhaust temp to watch, and if the light exhaust temp goes over a certain number the lights cut out... the usual exhaust temp is about 120F - so i put a cutoff at 150... which will happen about 2-3 mins after the fan fails, and could prevent my crib from burnin' to the ground... so basically the plc watches the temp, and if either of the temps cross my line, the lights cannot come on... the only accessories i have right now are 3 water pumps, 1 for each planter - the UV lights, the light exhaust fan, the room exhaust fan, and green lights so i can see when the plants are sleeping... once i get some more money in, the next thing i'm going to get is a co2 monitor, its about $200, and tells the PLC how many PPM of co2 there are, with a 2 wire, analog 0-10volt signal... then i need the co2 tank, pressure regulator, and solenoid, the solenoid will be opened by the plc, when the time is right, and will release co2 until the co2 sensor says there is about 1500 ppm... i can get a tank, and every soda machine, beer tap, and welder has a regulator, they should be under $100 with the solenoid... so $300 more gets complete customizable co2 regulation... and when the PLC is in control of the fans too it works nicely.. a few times a day, cut the fans off, pump out some co2, wait 15 mins, crank the fans back up and go to the next cycle... other co2 setups are over $600 just for the controller (which watches co2 concentration, and will open the solenoid, but every one of those has different logic, and they dont control the fans usually).
 

BloodShot420

Well-Known Member
the two 7-segment displays on my plc controller displays the room temp right now, but i can make it display anything... it sux trying to display a 3 digit number on it though, thats why i picked the room temp... its usually under a hundred degrees ;-)
 

BloodShot420

Well-Known Member
i went to google university ;-) i didnt know shit about PLCs about 6 weeks ago, i had to get into doing something with them for work and i INSTANTLY knew what i would be doing with them as soon as i got some free time... the company that makes this controller - EATON has an awesome support line, they have ppl waiting by the phones to answer your nerdy questions, 24/7 and there's usually no wait... i've had to call them a couple times for some stupid shit, they are pretty helpful... they can answer your programming questions, and any electrical question you might have about any module...down to the most minute detail. To get started you basically have to pick out a controller, or a brain of the PLC, then you pick add-on modules for what you need it to do.. in my setup, i got the brain, and an addon that reads 4 thermocouples... (even though i'm only using 2), you can get another addon that will have 8 relay outputs, each relay has a specific name, and you can just tell it to turn on in the program based on what else is happening, you can get an addon that has inputs, for buttons, or sensors. -- there is 2 kinds of inputs and outputs, digital, and analog... the digital is on or off... the button is pushed in, or its not, the door is open, or closed... the analog inputs and outputs are like adjusting the volume on the stereo, 0v= quietest, and 10v = loudest... and it can vary in between by fractions of a volt... this is for reading things like co2 ppm, nutrient PH or TDS as inputs, and for outputs that can make the fan go faster or slower, or turn the gas up a little on the co2 generator (not sure thats realistic)... you also need a little bit of background on basic electrictiy, AC and DC, a little bit of computer know how, and about the system you are trying to automate...
 

BloodShot420

Well-Known Member
oh boy...i may have some problems - here's a fun fact i just read about solid state relays:
CAUTION: Using SSRs for driving mercury, fluorescent, or HID lamps should be avoided. If they must be used, the SSR must be severly derated and thoroughly tested in the specific application.
Ive been testing and apparently, 25Amp solid state relays are not enough to run 1KW HPS lights... the relays get pretty warm, but after they get hot enough, removing the DC voltage does nothing to the load voltage... as if there were no relay at all. it looks like i may need to get some serious relays...
 

Infamous Zero

Active Member
The only SSR's I've used have controlled either purely resistive heating circuits, and transformer vibrators. Their leakage current creates a dilema for alot of scenerios.
 

Mrnoprints

Active Member
I was just fn thinkin about some $hlt like this yesterday and here it was all along. I'm really interested in something like this because I have a spare computer in the vicinity of my experiment. I'm gonna have to read more into this thread. " I think the creator has been speaking to me through RIU". Thanks for the info.:mrgreen:
 

rolln1up

Well-Known Member
I did a grow journal documenting my build of an automatic hydro setup it uses java to control relays connected through the parrell port it has produced a. Very effecient grow room that seldom has to be touched I have a video on YouTube of the setpup just search for automatic hydro grow and it'll pop up I used the java and parrell port as it provides a cheaper setup than a plc provided youhave an extra computer laying around and uses the same basic logical programing setup there a link to the journal if your interested in my signature at the bottom


youtube video http://www.youtube.com/watch?v=fOocX6Acihs
 

BigBudBalls

Well-Known Member
Following are 3 pictures of ladder logic. And a picture of the controller.

The bare copper wire carries no current, its simply a grounding wire, for safety's sake.

Most of the control wiring is 24V DC, completely harmless to handle

View attachment 258500

View attachment 258501

View attachment 258502

View attachment 258503
Been using a PLC for about a year now. (Do PLCs as part of my job)

You say less then $100 and its an AB? Hard to believe (used yeah, ok) The RSLogix is software $1200 just to program it.
(edit: posted this before reading the post later on)

I have a fully populated 10 slot SLC500 w5/05 or 5/03 rack with a RIO scanner, basic module,bunch of I and O modules, and a few remote modules. But not using it; overkill. Using a Direct Automation DL06 with an added ethernet and A/D modules. (and the cute little c-more micro touch screen) A LOT cheaper and just as good as the AB (and the software is only $500 for full line of PLCs They offer a free 100 instruction version)

But I'd still push more the programmable relays from B&B electronics. they start at $100 new and software is free. No math, but plenty of timers, 120V supply, relay or transistor otputs. Can even get MODBus enabled version or add on modules.
 

BigBudBalls

Well-Known Member
oh boy...i may have some problems - here's a fun fact i just read about solid state relays: Ive been testing and apparently, 25Amp solid state relays are not enough to run 1KW HPS lights... the relays get pretty warm, but after they get hot enough, removing the DC voltage does nothing to the load voltage... as if there were no relay at all. it looks like i may need to get some serious relays...
I have 4 125A 480VAC SSRs sitting here.
 

BloodShot420

Well-Known Member
bigbud - i have been looking at some of those... is 125A about the biggest SSR they make? I fixed mine up a little, and i actually got everything working with the 25A relays, i just mounted them on a piece of aluminum, and put some arctic silver cpu thermal compound on the back of them, and put a 4" fan on them to actively cool them, and the big piece of aluminum they are installed on... it seems to be working pretty well. I got some old CPU heatsinks that i will strap on them if they give me any more issues, but i'm keeping an eye out for some of those 125A relays just in case... i love how silent they are though. I will get a few more devices hooked up this week - its already fully automated with no timers or anything, but now i get to hook up and play with the accessories... i'm on the lookout for an analog co2 sensor now...
 

BigBudBalls

Well-Known Member
bigbud - i have been looking at some of those... is 125A about the biggest SSR they make? I fixed mine up a little, and i actually got everything working with the 25A relays, i just mounted them on a piece of aluminum, and put some arctic silver cpu thermal compound on the back of them, and put a 4" fan on them to actively cool them, and the big piece of aluminum they are installed on... it seems to be working pretty well. I got some old CPU heatsinks that i will strap on them if they give me any more issues, but i'm keeping an eye out for some of those 125A relays just in case... i love how silent they are though. I will get a few more devices hooked up this week - its already fully automated with no timers or anything, but now i get to hook up and play with the accessories... i'm on the lookout for an analog co2 sensor now...
I got the SSR's from a machine I work on. The unit was bad, so snatched the SSRs You'd need a a pretty killer CPU heat sink. These were mounted to a 3/4 thick, by 2 feet long by 4 inches wide alum plate and then about 1/3 of it had a pretty hefty heatsink on it.

I had a link for a cheap $20 CO2 sensor, but lost it. But you'd still need a CO2 meter to calibrate it. Not sure if the output is linear.
 

BloodShot420

Well-Known Member
interesting... are the 125A SSRs about the same size as the others? mine are about the size of a business card, and prob 3/4" thick... i think the active cooling fixed them, i wonder what temp they stop functioning? for the co2 sensor, i was thinking one like this: http://www.dwyer-inst.com/Products/Product.cfm?Group_ID=20017 - its about $200, not the cheapest, but supposed to be self calibrating, and it has a 0-10v output for 0 -2000 ppm. Another thing i thought would be cool to do is get some ductwork with some kind of close-off dampers, so i can make a decision based on the temperature, whether i should exhaust the heat from the lights into my house, into my garage, or straight outside... then in the winter time i would get some free heat, and in the summer time it would get rid of all of the heat. Ever heard of any ductwork with actuator dampers or something similar?
 

BigBudBalls

Well-Known Member
Another thing i thought would be cool to do is get some ductwork with some kind of close-off dampers, so i can make a decision based on the temperature, whether i should exhaust the heat from the lights into my house, into my garage, or straight outside... then in the winter time i would get some free heat, and in the summer time it would get rid of all of the heat. Ever heard of any ductwork with actuator dampers or something similar?
For the dampers, figure $60-120 each. They have them 120VAC, 24VAC, NO & NC. I haven't seen a diverter style. I was planning the same thing. Vent the place with house air or outside air, and exhaust the same, and in any combo. Would take 4 of those dampers. but only 2 diverters.
 
Top