I just couldn't stand it any longer. While assembling the little circuit board for the temperature controller a while back, I thought about the fact that the temperature setting would be fixed, and couldn't be adjusted. Besides, having the fans come on at 88 degrees was a little too warm for my liking. So, falling back on my extensive experience of industrial electrical maintenance, I decided to incorporate a programmable logic controller into the scheme of things. Mwahahaah....
Photo below - here's the little DL05 plc with thermocouple input module inserted into the option slot. The cost for the entire unit is $308, but it will allow me to do anything I want with the greenhouse or propagation chamber. I've been programming for several years at work, and will use the information learned to create the most technologically advanced greenhouse in the county. Heh. Yeah.....this is gonna be weird....
A plc is a device that contains a cpu, which monitors the information coming in (by switches, buttons, analog signals), and turns things on that are wired to the outputs ( in this case - lights, fans, and heaters) based on the code that is programmed into cpu memory. To make it work differently at any given time, one only has to change the program - not the wiring to the actual components. I captured the screenshots of the program written for this project, and will try my best to explain how it works.
Photo below - in this screenshot, the first program scan at power up will tell the cpu to monitor all 4 channels of the thermocouple input module located in the expansion slot to the right, and tell it that a type "J" thermocouple is being used (which has a range of -300 to 1400 degrees fahrenheit). The module can measure temperature from 4 different places, but for now I just need to monitor channel one. However, I'll use all 4 channels later, as it's capable of controlling the temperature and lights of the greenhouse, propagation chamber, shelf propagation system - as well as monitoring the outdoor temperature (all at the same time). Yeah, this is a bad little toy!
Photo below - since the plc has 12-bit resolution and 0-4095 counts represents the incoming temperature signal of -300 to 1400 degrees, I simply created a spreadsheet with excel which gives the plc count representation at any given temperature. ( -300 degrees would equal 0 plc counts, and 1400 degrees represents 4095). Based on the plc count/temperature equivalents on the spreadsheet, I use comparison instructions to turn things on or off.
The cpu doesn't understand temperature values, but represents a given value as a BCD (binary coded decimal) number. In rung #2, when the variable memory location v2000 (channel #1 of the thermocouple input module) is greater than or equal to a value of 204 plc counts (which represents 75 degrees as the spreadsheet dictates), output y0 will turn on - which energizes the little ventilation fan motor of the greenhouse (or 6 different things if I chose to).
Still looking at the picture above - when this same variable memory location has a value less than 199 plc counts (which is 70 degrees on the spreadsheet), the ventilation fan will turn off. Also, if the plc counts of the same v-memory location is less than 189, (which equals 60 degrees on the spreadsheet) y1 output will turn on a small heater, which will always keep the temperature above 60 degrees.
Photo below - sp3 is a special relay in the cpu memory that is triggered by its internal clock, which causes the counter to increase by 1 increment every minute. Based on this signal, a value of 60 would equal an hour, and 1440 would equal 24 hours.
So, with comparison instructions referencing the current value in the counter, I can simply use it to turn on output y2 (which will energize the propagation lights) for 16 hours each day - once it's time to propagate tomato plants later. It also gives me the ability to maintain the temperature within 1/10th of a degree at all times, but for now i'll go with the program as written.
I guess you figured out that this was my early christmas present, as I don't just go out and spend $300 on something for the garden. Heh. My wife would kill me! Anyway, the plc I'm using is powered up by 12 volts dc (that's why I needed the gel filled batteries), and will be a stand alone unit located about 150 feet from the house. It'll be housed in a raintight enclosure to keep the elements from getting to it - as I wouldn't want to wait until next christmas to get another one. This greenhouse is gonna be suh-weet! (EG rubs his hands together while producing a sinister laugh)
I also have a touchscreen that can connect to the plc, which can be programmed to display current temperature values, temperature trend charts, as well as programmable pushbuttons that can control the various fans, lights, and heaters manually. Yeah, there's no telling what i'll make this system do later.....Hehe. Now you understand why my head hurts all the time....
Since the temperature is supposed to be 22 degrees tonight, i'll need to move the swc's that are currently growing broccoli to the indoors. They most likely wouldn't recover from that temperature, so i'll just play it safe.
Jude will have to spend the night in our house too, but not before I put her in the bathtub! That should be interesting, for sure....
Take care, and happy gardening!
EG



14 comments:
It's been a while since I've commented, but this is just too good to pass up!
I come from a tinkering background and earned my BSME last year, so this is EXTREMELY cool!
I'm sure your wife had the same reaction as mine would if I told her I wanted to do something similar!
You should incorporate a moisture sensor too, then you could automate your watering!
I can't wait to see the final super-duper EG greenhouse 3000 ;-)
Well I haven't commented on it, but then I didn't see it either. I figured I'd wait until my husband is out of the house to listen, which means Monday.
Poor Jude. I'm guessing she hates baths as much as most dogs do, but she will probably love spending the night inside.
Phillip - Mechanical Engineer, eh? That's cool! I take tinkering to the extreme, but it really has been helpful in my various occupations over the years. I thought about the addition of a moisture sensor in the scheme of things, but decided that I'm already pushing it with the wife. Heh. It'll be really sweet when finished.
Daphne - I kinda wish that I wouldn't have posted that video, because I really messed up alot on that song! Oh well, it is what it is... The biggest problem with giving Jude a bath, is that she just wants to "bite" at the water coming from the faucet the entire time. Hehe...
That is one mean unit! Sounds like your greenhouse set up is going to be very technical, definitely over my head. Can't wait to see it in operation.
Dan - thanks. It will be pretty high tch, that's for sure!
Jude just cracks me up. Does she try to rub her wet head on the furniture? That's what Mack used to do after a bath. Uck.
Your post makes no sense to me in a nuts and bolts way but I get the gist of it. Good plan.
Stefaneener - she doesn't rub her head on anything, just plays with her toys. She's a good dog.
My husband is quite familiar with programmable controllers - something he used to do as part of his work day. I am going to have to share this post with him - as I know he will be interested in this.
Ah, to think I used to program my Commadore PET back in the day. This was way over my head, but you explained it well. Thanks and congrats!
kitsapFG - cool! I hope he enjoys it.
Sinfonian - I'm glad you could understand it, because I'm self-taught. For the first couple of years while tinkering with plcs, I was completely lost.
WOW...this looks way to complicated for my brain to comprehend. Converting numbers in my head has never been one of my strengths. I think my christmas present to myself this year will be a set of soil block makers and an indoor seed starting set up. Hopefully it won't come to 300 big ones!
You've gone way over my head with all of this. I just open one end of my hoophouse if the daytime temperatures are going to be over 60 degrees. Otherwise, it can easily reach 90 or higher on a clear sunny day.
Be sure all this stuff is moisture protected. My hoophouse last year collected a lot of condensation on the plastic. During really warm periods, it would be like rain inside. It's not a bad thing though, moist soil doesn't lose heat as fast and it can help regulate the temperatures inside.
I also place concrete inside mine for a passive heat sink. Last year I used concrete blocks. This year, I've got 100 patio pavers that I got a real deal on so I'll be using those instead. Plus, it warms the soil. Mine is a raised bed that will hold tomatoes when the hoophouse comes down in mid April. Double duty and all that.
Can't wait to see this thing in operation.
EG...atleast you can always go back and add the moisture sensor if you want. It sounds like you'll have plenty of capacity for expansion.
Latter logic is pretty neat stuff. I wish I had the ability to play around with more stuff like that. It tickles a good part of my brain!
Thomas - It really isn't that difficult, once you learn some of the basics. Probably the hardest thing is working with octal, binary, bcd, and hexadecimal numbering systems. Don't go out and buy an exspensive grow light system. Check out some of the other people's system within our gardening friends loop - as they have some good systems that are pretty cheap.
Tom - thanks for the advice. I'll deal with the moisture issues somehow. Also, I think i'll steal your idea on some kind of material to absorb heat to be slowly released at night. Thanks, dude!
Phillip - I'll definitely put some thought into the moisture issue. Surely i'll be able to come up with something. Ladder logic is fun to play with, especially when it makes a process more efficient.
Post a Comment