So after a couple months we’ve found really no use for the ad-hoc mode as implemented. We both didn’t really like going into the schedule screen to edit the temperature and it didn’t drop to “Auto” when completed, so the next day the thermostat would continue on the “Ad-Hoc” mode until we changed it back.

Turns out we really wanted these two features. 1) Quick adjustment of the current zone/time’s temperature, leaving the scheduled time intact, and 2) The ability to pause the thermostat for a couple hours while we’re out.

I’ve posted the new code, although it’s pretty similar to the last version just hacked around a bit to add the functionality. I also did a small video demo of the new feature and the harmony remote setup I forgot about earlier.

MVI_0004.AVI
View all photos at Picasa Web Albums

Well I had to bust out some modifications to the code today (again, very pleased I cut that USB hole!) to control temperature over-shoot, allow me to view the temp before rounding, and to add a larger font for the manual mode temp set screen.

The over-shoot was a problem I originally anticipated, but commented out in the code because I wasn’t sure if it was necessary. It is. When I have both the electric baseboard and the gas fireplace on, the temperature rises too fast for the [designed] 5 minute relay interval. This caused the temp to briefly surpass the set temperature for about 10 minutes until the room started cooling back down.

Here’s how I’ve controlled the over-shoot:

At the start of each cycle, I calculate the difference between the current temperature, and the last cycle’s temperature. If this number is positive (temp is rising) then I check it against the difference between the set temperature and the current temperature – to find how long until we’ll reach our target.

If that time is less than 5 minutes, I set a timer to expire exactly when that target will be reached. The timer then calls the heat off function.

Testing this revealed a shocking 100% accuracy. With the buffer set to 0 and the temp set at 21, the heat turned off at exactly 21.00 degrees. In practice I have a buffer of .35 degrees, to allow the temp to rise in this case to 21.35. I chose to do this so that the heaters would remain off for longer, but the display would still round to the desired set temperature.

I’ve also posted the code here, due to requests from members of arduino.cc :)

 

May 2012
M T W T F S S
« Dec    
 123456
78910111213
14151617181920
21222324252627
28293031