View Single Post
Old 10-14-12, 10:08 PM   #9
opiesche
Helper EcoRenovator
 
Join Date: Jul 2012
Location: Rohnert Park, CA
Posts: 99
Thanks: 4
Thanked 14 Times in 9 Posts
Default

Quote:
Originally Posted by compman723 View Post
opiesche you are doing some awesome work! I found your post after I thought about making my own controller myself. Let me know if you want to collaborate or maybe I can continus to help you add features to you what you have? I recently just installed the sandwhich system myself under 500 sqft of tile and am looking for a setup myself.

Thanks!
Absolutely!

So, here's what I'm currently thinking. I've got the sensors polled by a python script every 5 minutes (could make that configurable) to read temperatures and calculate heat loss. That data is then written to a file (I was considering a SQL database, but since it's just a few values, that would be overkill).

A second python script functions as a web backend. It accepts data from the forms posted above, and also writes the values to a file.

A third python script would be the actual controller software. This one will probably run in a continuous loop and read the values from the files the other two scripts write, periodically, to make decisions about turning on and off the pump or opening and closing a mixing valve. The pump and mixing valve would be controlled through a relay (see the heating system post for the type of valve actuator I'm looking at).

Aside from using the manually configured value, the controller also has the ability to learn a bit. For example, for any given system, it should be possible to correlate turning on or off the pump or increasing/decreasing the water temperature, with an increase in temperature on the different sensors. With that, we know how much delay the system has (depending on thermal mass, etc).
We can use that data and the current heat loss and interior temperatures to predict a good time to turn on the pump. For example, let's say the target temp is 70F. As long as the temperature is above that, or if it is below but we have a large heat gain (e.g. from the sun), we probably should keep pump and mixing valve off/closed.

Conversely, knowing the heat loss and the delay of the system, the controller can predict when the temperature will drop below 70, and turn on the pump early enough (taking the delay of the system into account) to compensate.

Even further, if we have one internal sensor for each zone, the controller can tell how temperatures react zone by zone, and suggest further opening or closing of the zone valves (for example when one zone reacts later or slower to turning on the heat).

I'd like to also take supply and return water temperatures into account for this, but I'm currently not completely sure what to do with those values. Primarily, the controller could use them for validation of its assumptions about the heat loss, and about what results a parameter adjustment would have.

I guess all in all, I'm looking for an algorithm and the proper equations to do the prediction, and to be able to adjust its own parameters (pump timing and supply temperature) based on the data it reads.


The final feature I was thinking about was to ignore errant heat loss spikes. If we have a sudden spike in heat loss with a corresponding drop in temperatures (especially if it only happens in one or two zones), it's likely that it's just because someone opened the door, say, to bring the trash out. In that case, we could remember the spike time, and adjust water temperature and pump cycling to balance out the loss once the spike is over. Only if the spike lasts more than, say, 5 minutes, we assume that it's regular heat loss and not an open door, and adjust parameters to get the temperature back up. My old furnace had this problem with a regular thermostat - someone opens the door, the furnace turns on and keeps going for 10 minutes even after the door has been shut, leading to it suddenly being too hot everywhere else, and a bunch of wasted energy.

Not much of the controller part is present in actual code yet, but I expect to have a bit of it running in a simulated loop within the next couple of days.
My pump has been ordered and should arrive next week, and I'm getting a water heater installed on Tuesday. Once both are installed, I can trial run the system proper and see what it does
Once I've got a small bit of the controller loop up and running, I'll post the code. Since some of the more detailed discussions might be out of the scope of this forum, send me an e-mail if you'd like (opiesche at gmail dot com) so we can discuss the nitty gritty, and we can post regular updates to this thread
opiesche is offline   Reply With Quote