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

imnotcrazy

There is ALWAYS meaning to my madness ®
Veteran
First and foremost: There are many manufacturers of the product I will be referring to primarily. But I will be mainly referencing the Idec "Smart Relay" as this is what I have purchased therefore I hope this (hopefully) informative post isn't thought as spam.

Now that that is out of the way, let's get to business: I'm sure some of you have purchased room controller type of equipment from a grow shop/supply. When I say controller, I mean Lighting/Fan/Ventilation/Temperature/CO2 monitors and controllers.

These pieces of equipment run into the hundreds and sometimes thousands of dollars. Now what if I could offer a 1 piece fits all solution for all of the above named pieces of equipment? All you need is a couple hundred dollars, wiring ability and the ability to program ( don't be put off by this, if you can walk through an I Pod, we can walk ya through this) :joint:

Up until recently, we could have still accomplished what I am getting at by using a Programmable Logic Controller (P.L.C.) but at a cost that would be prohibitive compared to most commercially available Horticultural equipment. Now, I have found an acceptable substitute: the Nano PLC aka "Smart Relay"
idec_smart_relay.jpg


Basically, there is so much demand in industry for high levels of functionality in a small package that, in this case we can benefit from it. With the proper Input and Output components, we can make one of these function as A: CO2 Monitor/Controller, Lighting Controller/Flip-Flop (Bring room on in stages to avoid large current spikes etc), High Temperature Cutoff, Ventilation/Fan Controller, Nutrient PH/EC Monitor/Controller ETC.

We could even combine several of these functions into ONE package IE: A Self Contained Growroom Controller :muahaha: All you need is the proper model relay for what you are looking to accomplish and the proper Input and Output components to perform the operations.
 

imnotcrazy

There is ALWAYS meaning to my madness ®
Veteran
D.I.Y. Ballast Flip-Flop Part 1 (Digital Ballast Too)

D.I.Y. Ballast Flip-Flop Part 1 (Digital Ballast Too)

OK, so our first project is going to be the Digital Ballast Flip-Flop. Basically what the flip-flop allows you to do is run 2(sets) of lamps of of 1(set) of ballasts.

This can be very efficient for those looking to expand etc, but the problem I ran into is *most* commercially available flip-flops will not work properly with a digital ballast. This is due to the fact that for a digital ballast to be able to fire the bulb (soft start function), you MUST turn the power off for a little while between firings of the bulb. With a magnetic type ballast, you really don't have to cycle the power coming into the ballast to change bulbs, which is one of the reasons flip-flops for this purpose are difficult to locate from a reputable source.

I came to the conclusion that I would rather build it myself. Now I could have hard wired a circuit using several electromechanical timers and relays to accomplish this task. But taking into consideration that: 1) I would have to do MUCH more physical wiring, And 2) The expandability/adaptability of the Nano PLC for future modifications to my setup; I decided to go with the Smart Relay

To do this project we're going to need a materials list, taking into consideration that: My Flip-Flop is going to be operating 2 Ballasts which will be running 4 HPS bulbs/hoods in Two flowering tents. Now, I have to also add, with my wiring and program for the Smart Relay, you can still expand the controller to operate MORE THAN TWO ballasts using the SAME program I have written.

We will also have 6 Unused Inputs and 2 Unused outputs for either: 1) adding the functions of: A) Utilizing Two Now Unused Inputs add High Temperature Shutdown(I will modify mine for this function in the near future and post the updated program and wiring); B) Utilizing the Unused Outputs To Bring A High Wattage Flowering Room Online In Two Stages; C) Any of the Other Previously Mentioned functions.
 
Last edited:

imnotcrazy

There is ALWAYS meaning to my madness ®
Veteran
D.I.Y. Ballast Flip-Flop Part 2 ( Materials List)

D.I.Y. Ballast Flip-Flop Part 2 ( Materials List)

Ok, so I had mentioned a parts list, here it is:

1) Idec "Smart Relay" (Idec Part#: FL1D-H12RCC; 100-240Vac 8 x AC/DC Input / 4 x 10Amp Output........ If you would like to add PH/EC, Temperature or CO2 monitoring/control, you need either a different Part# or you will need to add an Analog Input Module to this list) COST @ $150

2)A Timer For carrying out the 12/12 timing of when to switch rooms COST: $15-50 (we can even control the panel with your existing timer if you would like)

3)Relays for the ballast and lamp power: These will depend on several factors: 1) Type of relay needed relates to the Current/Voltage of Ballasts, And 2) The quantity needed relates to: A) Number of Ballasts/Hoods needed switched And if you want to bring room on in stages as mentioned you need double/triple/etc that number for each stage of lighting you add. COST: Varies Accordingly

You can follow MY electrical design IF you are using 600W ballasts. Larger Ballasts May Require larger Relays/Contactors AND Wiring. I can advise you on any changes we would need to make.

4) Wiring for control and power circuit sections: Again this depends on Ballast and Lamp Current/Voltage and I can help you out here too. COST: Varies Accordingly

5) A suitable enclosure (box) to house/protect all of the components Cost: Varies According to Size of Completed System

I know it all looks a bit Vague cost wise but my Parts investment was $3-400, yes a bit expensive for a flip-flop, but every future function we add to this makes it worth the investment that much more :joint:

I already have a Program and have set-up and Proofed (tested) the control wiring and program for this project:


Just have to pull it all apart for the actual Picture Taking and D.I.Y. Walk Through :rasta:
 

Olyver

Member
You should not be using cube style relays for a flip. The voltage spike of 5000V and the operating voltage of between 300V to 500V will burn those relays out. You need to use the proper relays or all you're going to see is a fire inside that box. If you are only using 400W ballasts you may be okay, but 1000W HPS ballasts will not work on those relays. With a PLC no programming is necessary, all the timing cycles come preprogrammed with the PLC software. You can set time cycles with the buttons on the PLC, but it is a bit confusing if you're not familiar with PLCs. You can purchase a cable to run from your USB port on a computer to the PLC, but the cable costs about $100.

Olyver
 
Last edited:

imnotcrazy

There is ALWAYS meaning to my madness ®
Veteran
Umm, actually it's only wired for 600W ballasts..... AND in the testing phase which is why I have those relays in place.... ALSO to add you CAN NOT just wire this thing and go....yes the basic block functions are there but YOU MUST WRITE A LADDER LOGIC PROGRAM.... I troubleshoot machines with THOUSANDS of PLC I/O and ANALOG I/O as well ON A DAILY BASIS so don't be a condescending dick DB2004. Sorry I'm showing people how to do what you OVERCHARGE for.....

FURTHERMORE: This has been PROGRAMMED to NOT perform ANY switching with current flowing through the relay contacts = NO ARCING OF CONTACTS. Also my design will, AT A MINIMUM, meet the remote hood's wire rating of 600V 105C. Please explain how 600 Volt Rated components Will NOT work? Because if they did not, I think you'd hear of many more fires from ballasts and their wiring on these boards..........

AND FINALLY: Digital Ballasts DO NOT fire an Ignitor Spike, they perform a "Soft Start" of the bulb by changing the output FREQUENCY or the Voltage and Current Waveforms. If you had read my Original "Project #1" Posting, you would (should) have realized this. But I know the problem, you saw some of you potential sales disappearing and had to come to make a post to lead people to believe I may not know what I am doing. If you remember, I told you I'd quell your spamming of the boards with your products eventually. I just finally got the time to get around to it :joint:
 
Last edited:

Shlomo

Member
Show it my man!

I was wondering, if you don't mind...

I have always wanted to have my exhaust fan do timed air exchanges four or five times an hour, and also activate if the temperature goes too high. I would assume that, with this PLC, you would be using a relay to activate the exhaust.

So, can this nano-PLC accept somewhat complex programming? For instance, if the temps are too high and the fan activates, and during that activation a standard timed exhaust cycle comes on, can the relay manage both these functions at once to control the one relay, "on time" so to speak? Or can it only do one function at a time? In other words, does this PLC accept multiple, conditional control flow statements?

I'll be watching regardless, and thanks!
 

imnotcrazy

There is ALWAYS meaning to my madness ®
Veteran
Shlomo said:
Show it my man!

I was wondering, if you don't mind...

I have always wanted to have my exhaust fan do timed air exchanges four or five times an hour, and also activate if the temperature goes too high. I would assume that, with this PLC, you would be using a relay to activate the exhaust.

So, can this nano-PLC accept somewhat complex programming? For instance, if the temps are too high and the fan activates, and during that activation a standard timed exhaust cycle comes on, can the relay manage both these functions at once to control the one relay, "on time" so to speak? Or can it only do one function at a time? In other words, does this PLC accept multiple, conditional control flow statements?

I'll be watching regardless, and thanks!


YES, we may have to add the optional Memory Card/Chip so that we have the ability to store the extra lines of code, but it should be doable......EASILY

This particular model has the included, as mentioned by Olyver, Pre-Programmed Function BLOCKS. What we need to do is determine a suitable configuration of those blocks to perform this task.

The Pre-Programmed Function Blocks available on MY controller:

Basic Function Blocks:
OR, NOR, NAND, NAND (edge), AND, AND (edge), XOR and NOT

Special Function Blocks
ON Delay, OFF Delay, ON/OFF Delay, Retentive ON Delay, Interval Time-Delay Relay/Pulse Output, Current Impulse Relay, Edge-Triggered Interval Time-Delay Relay, Latching Relay, Seven-Day Time Switch, Tweleve Month Time Switch, Up/Down Counter, Analog Differential Trigger, Analog Value Monitoring, Operating Hours Counter, Asynchronous Pulse Generator, Random Generator, Frequency Trigger, Analog Trigger, Analog Comparator, Stairwell Light Switch, Dual Function Switch, Message Text, Softkey, Analog Amplifier, Shift Register, PI Controller, Analog Ramp Control and Analog Multiplexer
 
Last edited:

Blunt_69

the keeper of the creeper
Veteran
Hmmm very interesting, Ive always wanted to play with PLC's(electronic background) but never had a good teacher!!lol.... SHOW ME, TEACH ME!!!! I was going to setup a micro processor based system, as i do have experiance with these, however PLC are much more simplistic and retain just as much functionality. Whenever you got the time, I'll be waiting to learn bro!
 

Shlomo

Member
My oh my that's a lot of functions!

Do you, by any chance, have a list of byte values for the individual function blocks, as well as function descriptions, or a link to the same (manual)? I've been reading up on your PLC and, if I have it right, there are 2000 bytes to work with for the PLC alone (no expansions?).

Also, can you write your own functions, or is that locked? Though I'm probably getting ahead of myself here, it's probably all assembly mumbo jumbo. Besides, it looks like there's a lot to work with already...

edit: Oh, oh! Also, is there a syntax to use so you can hook up the aforementioned expensive USB cable and write a program and upload? Or would that require propietory software (is that included)? Would you otherwise just input on the LCD? I'm just wondering because a complex program would be easier to debug if you could see it all at once, maybe emulate, kind of thing...

OK OK I'll shut up for a second :D
 
Last edited:

Stay Puft

Member
Nice work!
Well since you showed yourz.. I guess I'll show minez. :nono:
20536ZenOutside1.jpg


Whats in the box?....
20536ZenInside1.jpg

This setup is intended for 400W or less. (nothing big)
Anyway This is my entry in this "nano class" at the county fair this year.:jump:

One question: Why did you select a controller WITHOUT Real time Clock inside it?
 

PharmaCan

Active member
Veteran
imnotcrazy - aside from the other functionalities of the PLC, is the purpose of this flip-flop just to have the delay between stop and start? (Legit question. I'm trying to follow what you're doing here, but I have a simple mind.)

PC
 
Last edited:

imnotcrazy

There is ALWAYS meaning to my madness ®
Veteran
Shlomo said:
My oh my that's a lot of functions!

Do you, by any chance, have a list of byte values for the individual function blocks, as well as function descriptions, or a link to the same (manual)? I've been reading up on your PLC and, if I have it right, there are 2000 bytes to work with for the PLC alone (no expansions?).

Also, can you write your own functions, or is that locked? Though I'm probably getting ahead of myself here, it's probably all assembly mumbo jumbo. Besides, it looks like there's a lot to work with already...

edit: Oh, oh! Also, is there a syntax to use so you can hook up the aforementioned expensive USB cable and write a program and upload? Or would that require propietory software (is that included)? Would you otherwise just input on the LCD? I'm just wondering because a complex program would be easier to debug if you could see it all at once, maybe emulate, kind of thing...

OK OK I'll shut up for a second :D

Here's a link to the Product Sales Brochure, Packages Avaiable and the User Manual:
Smart Relay Documentation

The Cable I believe comes with the necessary H.M.I. software but I may be mistaken. I only purchased the LCD display and did not need to write a very complex program for my first project

Here's the link to the Software Product Sales Brochure and User Manual:
WindLGC Documentation

Hope this helps
 

imnotcrazy

There is ALWAYS meaning to my madness ®
Veteran
Stay Puft said:
Nice work!
Well since you showed yourz.. I guess I'll show minez. :nono:
20536ZenOutside1.jpg


Whats in the box?....
20536ZenInside1.jpg

This setup is intended for 400W or less. (nothing big)
Anyway This is my entry in this "nano class" at the county fair this year.:jump:

One question: Why did you select a controller WITHOUT Real time Clock inside it?

Stay Puft: Looks good and proves these setups are doable.. I had no Idea some others here had some D.I.Y. Systems already. This unit has a real-time clock I mentioned in the Available Function Blocks Post (probably while you were posting lol) BUT I had originally planned to use Hard wired Relay Logic to perform my Flip-Flop Task. Then, I took into consideration, the possibility of future expandability. I see you don't have an external clock so I can also post the programming changes to free up the 2 used inputs.. Although, I see no point for me to do this as there are only 2 free relay outs available.. 6 Inputs should be plenty...
 

Xtrakritical

Active member
Yeah for sure!

Yeah for sure!

These guys are pretty hi-tech for potheads! :muahaha:

Looking good INC. nice thread too btw...
I like the way you said "furthermore" you're so fucking eloquent

Eloquence (from Latin eloquentia) is fluent, forcible, elegant or persuasive speaking in public. It is primarily the power of expressing strong emotions in striking and appropriate language, thereby producing conviction or persuasion. The term is also used for writing in a fluent style.

Eloquence derives from the Latin roots: ē (a shortened form of the preposition ex), meaning "out (of)," and loquor, a deponent verb meaning "to speak." Thus, being eloquent is having the ability to project words fluidly out of the mouth and the ability to understand and command the language in such a way that one employs a graceful style coupled with the power of persuasion.

Seriously tho, nice write up!

Xtra
 

imnotcrazy

There is ALWAYS meaning to my madness ®
Veteran
Flip-Flop Sequence Of Operation

Flip-Flop Sequence Of Operation

Basically what I had set out to do, was to design a flip-flop circuit that would allow my digital ballasts to preform their soft start function.

In order to do this you need to keep the following in mind:

1) All switching of Ballast Output from Lamp #1 to Lamp #2 is to be done with ballast input power removed. This prevents the cold, unfired bulb from being connected to the ballast after soft start.

2) Allow delay time in between each step of the program that causes a relay to change it's state (turn on or off). This prevents Arcing and premature failure of your Ballast Output to Switched Lamp relay(s). Because it ensures that the relay has fully closed mechanically before power is applied to the relay contacts.



Based off of these two rules, we know we need:

(1) Single Pole Single Throw Relay (120Vac Ballasts) OR (1) Double Pole Double Throw Relay (220Vac Ballasts) per stage of lighting,

IE: If the room is to turn on all at one time you need (1) relay that can handle the load of ALL your ballasts combined. If you'd prefer to turn the rooms on in 2 or more stages, you'll need to add (1) more relay per stage.

(1) Double Pole Double Throw Relay per ballast: This is for the actual lamp/room selection relay

Now, we need the Sequence of Operation figured out for the above relays so that the flip-flop will work properly:

So, starting from the Flip-flop's Idle Configuration, Meaning all relays are OPEN/DE-ENERGIZED, from the 0 hour

1) Ballast Power Relay(s) (BPR) is/are OPEN, Ballasts are De-Energized and Lamp/Room Select Relay(s) is/are in the "Lamp #1" position.

2) Power is applied to flip-flop control circuitry.

3) After sufficient time delay: BPR(s) CLOSES and Energizes Ballast(s) and maintains power ON Lamp(s)/Room #1 for a time period of 12 hours .

4) Timer passes 12 hour mark: BPR(s) OPEN.

5) After sufficient time delay: LSR(s) CLOSE connecting Lamp/Room #2 to the Ballast(s).

6) After sufficient time delay: BPR(s) CLOSE and maintains power ON Lamp(s)/Room #2 for a period of 12 hours.

7) Timer passes 24 hour mark: BPR(s) OPEN

8) After sufficient time delay: LSR(s) OPEN, Flip-flop Returns to Idle state and cycle restarts.
 

imnotcrazy

There is ALWAYS meaning to my madness ®
Veteran
PharmaCan: We posted @ the same time and I missed yours.... My previous post should answer you question.

EDIT: Almost forgot, I have to order a larger Enclosure to house all of the components. Once It arrives, I'll start assembling the Flip-flop and posting the actual work step by step.
 
Last edited:

Shlomo

Member
Looking forward to the party!

I just ordered my FL1D for $145 and I splurged on the attendant software and pricey cable for $70. I don't think I'll need an expansion for just my ventilation program, but that may change if I can elegantly replace all of my timers with this.
 
Top