Tuesday, February 21, 2012

Almost done HVAC Control app

More or less done the back end and front end now. There's still more testing and tweaking to do, but so far it's looking good.

I decided to omit the algorithm to determine when the furnace should actually start based on a scheduled time. Figured I should ensure that what I have works and then throw that feature in afterwards.

I'll finish up the tweaking tomorrow and then next time I'm off I'll start on the wiring. I ordered 4 more sensors so they should hopefully arrive by then.

I'll have one in the living room, upstairs, server room, furnace return duct, furnace supply duct and one outside. I'm debating on instead of putting one outside, I can just use data from the weather channel. Though real time actual temp would be kind of cool.

This is what the main interface looks like:

The living room sensor is not actually installed so that reading is from the sensor just sitting in the server room crocodile clipped to the circuit board. It looks good on my Playbook too and is easily usable. I will probably do a "dry run" test for a couple weeks before I do the final hookup to the furnace. I'm paranoid about it randomly dropping the serial/usb connection with the relay turned on. Could be disastrous if it happens when I'm not home. Since I'm not using the USB extender now it has not dropped though, so think I'm good.

Tuesday, February 14, 2012

Ever see an icicle grow from bottom up?

Here's one!

Been growing for a couple months at least.

Sunday, February 12, 2012

hvac control web front end

I started on the front end for the hvac control. In my mind I had really fancy ajax stuff with graphs and whole 9 yards, but then I realized I don't even know ajax so I think I will keep it simple for now, and might add on to it later, and also make it look more pretty.

This is the programming section. A program is basically a set of "rules" that will be followed for a single day. Each day has a program assigned to it. It's very similar to a programmable thermostat where you set a temp for a certain time and it will hold it till the next program starts.

There is a calendar where the program is assigned to an actual day. Note the lack of "weekly" schedule setting. I originally was going to make it so I can set a schedule on a per week basis then go back to override it but it got too complicated for nothing. I work shifts so I'm always going to be going to change it anyway. I will make the back end default to a certain program if no program is specified. Basically it will default to the vacation one.

I did not do the dashboard yet, but that will basically just be a display of the current temp, the program that is active, the temp goal, and an option to do a temporary override without changing the program. Basically an override will be a specific temp at a specific time and a specific duration. This will take priority over the program.

One thing you will notice is that instead of specifying a temp, it's a temp range. This will be more flexible and more efficient as it will avoid short cycling. I will tweak that as I go to get a balance of comfort and efficiency.

After that, I just need to do the back end, which should not be too hard as I already wrote the control class for the relay/sensor board. The back end will basically just be a looped app that checks the sensors, and checks the program, and updates/reads the sql database.

In the future I may make it plot temp graphs and stuff. There will also be some logic such as starting the furnace earlier based on the outside temp and indoor temp. I can probably figure out a formula for that, otherwise I can just make it learn over time.