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.

Application of Nano PLC In A Growroom

manitu

Member
Found This RH% sensor , with calibrated 0-10v output.

And with temperature sensor too .Here.

Edit: Found this on the siemens website on how to connect 0-20/4-20mA sensors to the 0-10V inputs. This makes it easier to find useable sensors.
S7-200_Analogeingang_als_Stromeingang_umruesten_01_th.gif

--------------------------------------------------------------------
S7-200_Analogeingang_als_Stromeingang_umruesten_02_th.gif

--------------------------------------------------------------------
S7-200_Analogeingang_als_Stromeingang_umruesten_03_th.gif

.manitu
 

Mulletsoda

Member
Ahh... I see the difference. Your controller is prepackaged, already prepped with relays and an LCD and a CD of software. If you're interesting in doing a little more work, the AVR chips have the same capabilities, like the atmega328 I'm using. It's got 6 10bit analog inputs (these are 0 to +5V) and 13 digital purpose IO pins, a hardware UART (serial), PWM on 6 pins. You can't program it with an easy USB interface unless you go with something like the arduino, but it's not that hard.

The atmega chip, even with a voltage regulator and crystal, is <$10. Yes, you'll need a bunch more parts, but they aren't expensive either.

How much do you know about electronics? One of my next tasks is to figure out how to use an op-amp, which I guess isn't too hard... we'll see. But both of those sensors (CO2 and pH) require the use of one of those. These are what I'm looking at to give you some ideas.

CO2: http://www.futurlec.com/Gas_Sensors.shtml

This one doesn't need anything extra, it communicates with I2C and 0 to +5V analog. I'd bet you could use it with that controller you linked, too. ~>
http://www.co2meter.com/collections/co2-sensors/products/k-22-lo-co2-sensor-module

Here's some links about pH:
http://www.66pacific.com/ph/ph.aspx
http://www.nano-reef.com/forums/lofiversion/index.php/t187165.html
http://www.octiva.net/projects/ppm/
http://code.google.com/p/phduino/
http://home.zonnet.nl/rsetteur/ph_ice.org/www.ice.org/equipment/phmeter/phoper.html
 

manitu

Member
Here is my first program for the plc..
It's just heater/2-step fan/humidfier setup.

Far left , you have the inputs for temp and RH%.
next row, the two buttons are referring to two of four buttons on the PLC. I didn't use a button for the ventilation , since it will allways be on.
Next row are the constants where you put i your temp/rh values.
Then comes the comparators , wich compares the sensor values and the settings.
The Ventilation,Full output is activated by high tmp OR high RH%
Finally , outputs to the far right.

Functions will be added shortly.
fs2.jpg


.manitu
 

manitu

Member
Ok.. On/Off buttons > compare : doesn't work. The compare circuit holds the current state , when you push the "off" button. The inputs allso needs some callibration and scaling to make useable values.
Here's an updated program with lights timer (with high temp shutoff) + a water timer.
fs3.jpg


.manitu
 

Giant

Member
Wow, I cant believe I am just now finding this thread! I am just about to order my TECO Genie II SG2-20HR-D. I havent seen this brand mentioned, but it seems like a hell of a deal.. 8 DC inputs, 4 analog inputs, 8 relay outputs, and free software for $120. Here is the link: http://www.factorymation.com/s.nl?it=A&id=46&sc=2&category=1296&whence= Anyone have any experience with these?

I am currently in the process of re-wiring my room so this could not have come at a better time. I plan on wiring several outlets for relays and attaching them to this. I can basically assign each outlet a number, then pick and choose what I want to do with it! I will probably start off simple with just my lights and pumps, but I love the fact that I can expand to include my fans, A/C, dehumidifiers, and whatever else I can think of!
 

Stay Puft

Member
Giant,
I have not worked with that model but here are a couple tips. That model (SG2-20HR-D) will require a +24V DC power supply to operate and you might as well get the programming cable because i do not see it listed. You will also need relays to drive the high power devices. (such as HID lighting ballast) Since your power supply will be +24V DC, you might as well consider selecting relays with a 24V DC rated coil. AC coil relays (that are rated for you supply voltage) could be used too, since you will have to provide AC input to your +24 V DC power supply.

IMHO:
It would be wise to make a diagram of how you think everything will connect together before ordering the first part. The diagram will help you prepare for all of the " nitty-gritty" details of your desgn. These types of actvities should be very well planned before ordering parts. But that is just my opinion. :)
Regards,
Puft
 

Giant

Member
Giant,
I have not worked with that model but here are a couple tips. That model (SG2-20HR-D) will require a +24V DC power supply to operate and you might as well get the programming cable because i do not see it listed. You will also need relays to drive the high power devices. (such as HID lighting ballast) Since you PS will +24V DC might as well select relays with a 24V DC rated coil.
IMHO:
It would be wise to make a diagram of how you think everything will connect together before ordering the first part. The diagram will help you prepare for all of the " nitty-gritty" details of your desgn. These types of actvities should be very well planned before ordering parts. But that is just my opinion. :)
Regards,
Puft
Thanks man! I actually ended up with the SG2-12HT-D, which has 6DC inputs, 2 analog inputs, and 4 transistor outputs. I already have a 24v power supply for my pH controller and peristaltic pump, so I plan on just tapping in to that. I bought 4 240v 25a solid state relays for like $40. That should pretty much cover anything I need to run for now. SSRs all the way baby, no clicking noises for me! :D

I did buy the cable and download the software, but I dont have a clue about ladder logic! This is definitely going to be interesting, but I am looking forward to it. Any suggestions for writing my code?
 

rives

Inveterate Tinkerer
Mentor
ICMag Donor
Veteran
Nice find. It looks like a really interesting little controller, particularly since it has a real time clock, calendar, and analog inputs. I don't recognize the footprint, I would think that Teco is probably labeling somebody else's controller. They have been partners with Westinghouse for years and build very high quality 3-phase motors. Hell of a price considering the capabilities. I don't know what your experience level is, but SSR's can have enough leakage current through them that they will read hot without a load connected across them when they are supposed to be turned off. If you are pushing an electronic circuit with them, a high wattage pull-down resistor across them can help.
 
Last edited:

Giant

Member
I made my first program in ladder logic today!

ladder1.JPG


Its pretty simple.. Lines one and two create a daily timer. R01 is the Real Time Clock and Q01 is output 1. On at 9:50, off at midnight (just for testing). Lines 3 and 4 are for a recycling timer. T01 is a timer that counts to x and turns on, counts to y then turns off. Lather, rinse, repeat! Any of the on/off times can be adjusted using the built-in LCD screen or the computer software. :tiphat:

I still havent received my relays yet so I cant actually test anything, but it all appears to be working. I should be able to drop this in and be good to go!
 

Dorje113

Member
Great thread, I am going to build a light controller using one of these programmable relays:

http://www.ia.omron.com/product/family/1755/index_fea.html

Functionality I need:

  • multiple lighting zones
  • independent timing for each zone
  • overtemperature shutdown
  • 15 min restart delay

I think I should be able to do this with only one of these relays, maybe an expansion unit if I need more lighting zones, and a thermostat for overtemp.

Each lighting zone would have it's own breaker and contactor for the relay to activate.

Seems simple, but I'm afraid of the programming.... I guess I can stumble through it but programming isn't one of my favorite things to do.
 

rives

Inveterate Tinkerer
Mentor
ICMag Donor
Veteran
I couldn't get your link to work, but check it against the Teco unit above that Giant found. For the price, it is the most flexible one that I have seen. It has analog inputs so you can sense temperature over a wide range rather than a digital input from a thermostat. Then you could do a whole variety of temperature-related things, like variable speeds for your vent fans, your overtemperature shutdown,etc. all with just setpoints driven by one input. Most of these little controllers don't have a real-time clock (much less calendar!) and require a separate RTC module or some programming to come up with a functional but marginally inaccurate clock. Each of these that I have seen has their own peculiarities for setting up timers, but once you get it down they are easy (like everything else in life, I guess!).
 

Dorje113

Member
I couldn't get your link to work, but check it against the Teco unit above that Giant found. For the price, it is the most flexible one that I have seen. It has analog inputs so you can sense temperature over a wide range rather than a digital input from a thermostat. Then you could do a whole variety of temperature-related things, like variable speeds for your vent fans, your overtemperature shutdown,etc. all with just setpoints driven by one input. Most of these little controllers don't have a real-time clock (much less calendar!) and require a separate RTC module or some programming to come up with a functional but marginally inaccurate clock. Each of these that I have seen has their own peculiarities for setting up timers, but once you get it down they are easy (like everything else in life, I guess!).


Thanks, fixed the link.

It is basically the same controller as the Teco, with a very accurate clock, calender, and analog inputs.

I think I will still use a commercial co2/temp/humidity controller for now, replicating the functionality of some of these units may be more work than I want to do.... my IGS-220 has a self-adjusting co2 control system, full control of hysterisis bands and center points, keeps track of duty cycles, etc...

Have any of you used growtronix computer based grow system? You pay a lot for software, but get a nice GUI and a lot of functionality as far as datalogging, graphing, etc that would be a lot more difficult to pull off with a plc, and it is infinitely expandable...

http://growtronix.com/store/
 

Giant

Member
I just ordered a couple of LM35 temp sensors from digi-key for about $10 shipped. These take a DC voltage in and give you a completely linear +10.0 mV per °C out that you can then attach directly to your analog inputs. I dont know why people were linking to $100+ sensors in this thread before.

Link to product information page: http://www.national.com/mpf/LM/LM35.html#Overview
 

sixth6

New member
Could I get a link for some decent relays for a setup like this??

The Relays are the hardest part of this so far.
 

Giant

Member
I got mine off of ebay.. This is exactly what I used. In fact, I paid a bit more than that (but they were brand new). There is tons of shit out there, you just have to know what you are looking for..
 

Pain Killer

New member
24waymasterunit1o4.jpg


Carter, could you go through this picture and help identify stuff? Like what kind of enclosure and mounting system, what the fuses are and where, what all the boxes inside are called, etc. I really like the organization and quality of your build, the details like perfect crimps and labels, bends and routing, etc, and am trying to use it as a guide to do something much smaller but well built. I have some ideas on how it goes together, but I'm sure most of them will be incorrect ;) I'm trying to source components, so at least the names of things will help a ton in figuring it out.

Thanks for your contribution so far, and thanks in advance!
 

Giant

Member
I finally got everything finished up this weekend!

DSC_0819.jpg


DSC_0820.jpg


I had a custom aluminum backplate machined to hold everything comfortably in the enclosure. The aluminum acts as a heatsink, spreading out the heat from the solid-state relays, and a 92mm fan on the front exhausts the heat. I used the LM45 temp sensor attached to an analog input to monitor the temperature in the enclosure and trigger the fan if needed.

Each relay is hard wired directly to an outlet on the other side of the room. I currently have two outlets on a daily timer (18/6 or 12/12) and one recycling timer for the pumps, but that can be changed with the programming cable or the unit directly. I will probably have to get an expansion unit at some point, because 4 outputs doesnt appear to be enough. :lol:

My program looks something like this now:
ladder.JPG
 

rives

Inveterate Tinkerer
Mentor
ICMag Donor
Veteran
Looking good, Giant! It looks like if you do much growing, a larger can is going to be in order too. I assume the brick behind the fan is the power supply - what are the details on that? Keep us posted.
 

Giant

Member
Thanks rives! You got it, that brick is a 24V 3A power supply. Its a bit larger than some of the others out there, but for $15 on ebay it was hard to beat. I was really hoping to pick up one of the SOLA guys, but this is what I ended up with.. :dance013: If I get an expansion unit I will probably have to take that out of the enclosure and mount it externally somewhere, but that shouldnt be a big deal.

I am pretty happy with the enclosure, so I hope I can continue to use it for a while. Its made by hoffman and rated at nema 4x... err.. It was until I drilled big ass holes in it for the fan.. :laughing:
 

Latest posts

Latest posts

Top