Saturday, September 28, 2013

An Alternative Take on Thermostats

For most thermostats (including NEST), there seems to be a power/location problem.   At best you have 24VAC control lines you can parasitically suck for power or (worse case) you have some AA batteries that you hope will last a couple of years.  With batteries you start to seriously limit what your thermostat can do (a reminder htat your thermostat is NOT a general purpose computer).  With parasitic sucking off the control lines you start playing games with how to ensure that you always have enough power (OMG,  HVAC off for maintenance or power outage and what should the thermostat do?).

So okay, we've got a power management problem.

A question:

Why is your thermostat's primary User Interface (UI) mounted to a wall (and often in a place not where you are comfortably located)?

The location of your thermostat probably has a lot to do with the "best" place to measure room temperature (out of the sun) and where you can run HVAC wires.  There are other factors, but it doesn't matter.  I have to get up and go there to read or adjust the temperature. (Of course, with NEST and other networked thermostats you can change temperature from almost anywhere).

A proposal:

Don't put the UI into the thermostat.

What?  But where do we put it?  Surely not rely on the smartphone, right?  Yes. But consider this:

The thermostat will now consist of a small discrete box (hide it behind a picture frame or paint it to blend in) with a temperature sensor (maybe), the required solid state relays to control the HVAC, a couple of AA (or AAA) batteries, and an small RF transceiver (433MHz if you desire).

Pick a convenient location (or two) and install the UI there (and a temperature sensor too). It can be on the wall, on the kitchen counter, maybe a shelf, etc.  The only requirement is that you have AC power (see where I am headed?).

Now, let's rename this UI a "control center". This control center (still very small) can not only host the UI but can also support Bluetooth and/or Wi-Fi, so you can use your phone to control the HVAC from your bed or couch.

If we do the RF correctly it can be safe (validated/encrypted) and reliable.  Because the control center is plugged into AC, we don't have power management issues. The thermostat itself is running off of batteries or even parasitic power.  We still have some power mgmt issues, but we can duty cycle the RF to reduce the overall power consumption. (A thermostat's control loop is *never* under immediate control of your thermostat's UI -- you "advise" the control loop what to do, so a couple of second lag is okay).

Now, with this setup we can put a lot of sophistication into the control center. It can be a (shudder) computer and suddenly our thermostat can become something much more interesting...

Thoughts of a Haskell (or Erlang or Lua) powered thermostat starts to become more of a possibility.

/todd

Friday, September 27, 2013

A Better Thermostat (or is the Nest the best we can do)?

I've been reading about the Nest and I am convincing myself that it is too gadget-y.
I'm thinking about my household and the usual elder market that I am currently designing stuff for.

Do I really need my thermostat to be Internet enabled? Do I really need to become a honeypot for Black Hats?  Do I really want my thermostat to have software "updates"?  Also, it is yet another device to be managed whenever I swap out routers or change wi-fi passwords.

However, I do think that we can do a lot better than the HVAC's perception of what a digital thermostat is.   Honeywell Prestige 2.0 and Ecobee Smart are the current competitors for the Nest. But they seem to think that we all want bling in our thermostat interfaces. Lots of color, lots of funky icons -- yes! Just a slide of a finger.  Here is where I think the Nest got something right. Grandma can just turn a dial to get the desired temperature. No capacitive touch screen (what about those with crippling arthritis?) and no busy trompe l'oeil effects for those with bad eyes.

Nest, apparently, runs Linux on a Cortex A8. That is a power hungry beast. No wonder it has a rechargeable Li-po battery inside.   It uses the 24VAC to charge it. (If you don't have a Common wire, and I don't, it does this clever but dangerous trick of pulse the fan/AC/heat trigger line to complete the circuit and trickle charge the battery -- apparently that cause the start/stop ping of death on HVAC units that don't debounce away the false triggers).

Then there is the problem of what if you use the interface too much, run buggy software updates or spend too much time on wi-fi. You'll drain the battery, right?  (The trickle charge takes time and you are always running off the Li-po).

I don't think Linux is ready yet for 24x7 systems that run off of battery.  (A tickless kernel is a must for battery longevity, and that is just a start). But I could be wrong.

There are advantages to running an OS. It opens up development options: I'd love to try and get some Haskell code into an "embedded device".  Without thinking about embedded development issues, you can focus on the algorithms.

What about the power miserly Cortex M4s?  They are starting to come with a lot of RAM and massive flash spaces.  I've even seen Haskell (and Lua) running on STM32F4 Discovery boards. But we are still only talking about kilobytes of RAM. Until I see real applications run, just blinking LEDs and toggling a few GPIO pins doesn't convince me that you can write serious sized applications for it (where memory allocation can kill you).

For a smart thermostat, it is all about the algorithms. There are, at most, 3-5 interfaces to the HVAC systems. These are basically switches (relays or solid state relays).  It is all about when to turn these switches.

I've been toying with the idea building upon Forth to do smart thermostat stuff.  If I stick to an ANS flavored Forth, I can implement it on bare metal and eventually up port it to an OS when they become appropriate for battery based systems.

What about Wi-Fi and stuff?  I have more to say about that later (e.g. I'd be happy to just use my smart phone in local proximity with Bluetooth to control and data-mine the thermostat).