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!