WEB BROWSER CONTROL OF YOUR HOME
Part1
THERMOSTAT
By Jürgen G. Schmidt
Learn how to control the thermostat
(or thermostats) in your house without
getting out of your chair or bed.
This project shows how to build a hardware interface to connect your thermostat to
the Internet, and then control it from your computer or cell phone browser.
Ihad just settled down for the evening. The cat was in my lap, my favorite beverage was at hand, and I’m
reading the latest issue of Nuts & Volts. All of a sudden, I
hear the upstairs air conditioner turn on. I forgot to turn it
off before coming downstairs again. I now have a couple
choices. I can: A) Listen to it waste electricity while I try to
relax or, B) get up and disturb the cat, who will probably
not return when I do. Eventually I do B, and start thinking
about avoiding this in the future.
Just as frequently, I’m sitting at my desk in a room that
is not close to the thermostat. The temperature in my
office does not correlate well with the temperature in the
hallway where the thermostat is, and I have to make
frequent adjustments to stay comfortable. Doing that from
a browser window on my computer would be much more
convenient than getting up from my desk and walking
down the hall.
The true mother of invention is laziness and this child
was just begging to be born. In approaching this project,
the first question to answer is what device do I want to
use as my remote? What device is always near me, even
when I go to sleep? Is it the TV remote, or the X- 10 or Z-Wave home automation controller? It’s the cell phone! My
latest model — an HTC EVO — has a web browser and Wi-Fi access. My house has a Wi-Fi access point for my
laptops. So, clearly, I need a browser interface for my
thermostats.
When I built my house a little over 10 years ago, I put
in a lot of CAT- 5 network cable for computers and
telephones, including running a cable to each of the
34 September 2011
thermostats — assuming it would come in handy some
day. Well, that day finally arrived. These cables terminate
in a wiring closet containing — among other things — the
network router and Wi-Fi access point. The CAT- 5 cables
will provide both power and a network connection to the
thermostats.
As I thought more about this, I settled on some basic
requirements:
1. Anyone familiar with a basic home thermostat
should be able to understand and operate the new
one.
2. The browser interface must coordinate with the
wall-mounted units.
3. The thermostats have to continue working even if
the network fails.
4. The overall size and shape of the wall-mounted
portion should not be much different from the
current one.
I’ve been working with Microchip microcontrollers for
a while, and have used the Microchip TCP/IP network
software stack along with stand-alone Ethernet modules to
interface my microntroller projects to networks. Relying on
this background, I mocked up a proof of concept using a
breadboard. This consisted of a Microchip ENC28J60-
based Ethernet module connected to a Microchip
PIC24HJ128GP202 28-pin dual inline package (DIP)
microcontroller. The results can be seen in Figure 1.
I made DIP prototype modules for the temperature