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 🙂

Finished!

The arduino thermostat is now mounted on the wall and it looks great. The white paint was definitely a good choice as it matches the rest of the wall plates.

As far as I know (without testing my heat cycling code) everything functions well. The LCD backlight auto adjust is a nice touch, I’m really happy I threw in that extra dollar for the light sensor 😉

I do need to fix a few small things, the temp graph has a 1px line to the left and the temperature needs to be calibrated, but that will be easy now that I’ve cut a USB access hole so I can update the software without removing it from the wall.

Here’s pics of my progress this week – most of my time was spent on the electrical & drywall work. I did accidentally cut the hole too high (you can see why in one of the pictures below, the thermostat for the bedroom was in the way to mount this deep 4″ box) so I had to do some patch work… But it gave me a LOT more room to work and fish wires.

IMG_0046.JPGIMG_0049.JPGIMG_0056.JPGIMG_0059.JPGIMG_0060.JPGIMG_0065.JPGIMG_0066.JPGIMG_0067.JPGIMG_0072.JPGIMG_0075.JPGIMG_0077.JPG

View all photos at Picasa Web Albums