DIY WiFi Programmable Thermostat

Post details of your projects here.
basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: DIY WiFi Programmable Thermostat

Post by basicchip »

Just checked on the TSOP version of the MCP73871, while on the datasheet, it doesn't seem to really exist. I was going to get a couple samples from MicroChip. They are usually a good source for a couple devices.

So I guess I am going to try my hand at soldering a small QFN with my hot air station. I know that may beyond most hobbyists, but hot air stations are really useful and not all that expensive on eBay.

Here is a really good howto

http://hackaday.com/2010/05/04/qfn-or-m ... der-paste/



basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: DIY WiFi Programmable Thermostat

Post by basicchip »

Not much progress this weekend, as I took time out to attend a hackathon. I was under the impression these were to hack into websites/servers whatever. Actually this one was sponsored by Microsoft and NASA to get a bunch of people for a defined period of time (32 hours for us) to build a project mostly from scratch.
spaceapps.jpg
spaceapps.jpg (54.11 KiB) Viewed 22187 times
Interesting, and I learned a few new programming tricks, met some local techie types. Getting dangerous again.

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: DIY WiFi Programmable Thermostat

Post by basicchip »

Finally back at it. I was originally thinking I could steal the power supply from the existing thermostats, but as the 2 examples I found so far ran at digital clock like power levels. So here is a design that will accept a single thermostat control pair and charge a battery from that, or take power from a heat/cool 3 wire setup. The bridge rectifiers charge a big cap and that is switched down to 5V using an OKI-78SR which is a quick way to handle that efficiently.

The optional MCP73871 charges the battery and supplies power when the batter is not place. That will be the first one I build. Without the battery charge circuit, I can run a spare 24VAC line for power and just jumper the power to the Vin of the Lua module, this assumes I use the Lua module, which are easier to solder.
thermo.pdf
(32.74 KiB) Downloaded 878 times
Now onto board layout, and some probing of the thermostats...

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: DIY WiFi Programmable Thermostat

Post by basicchip »

Back at the teardown of the existing thermostat. An interesting piece of 60s and 90s technology. The base board all thru hole, a half dozen transistors, a triac and triac driver for the heat demand switch. Looks like 2 different diode bridges, not sure why that is and an LED not visible from anywhere, must be used in testing. I won't bother tracing out too much of the base board, as all I want to save is the display board. The display board has a single chip micro mounted as chip on board, display, a pot and some bypass caps. The bypass caps are still through hole (really??). It runs off between 5 and 50 microAmps at 1.6V. And at least it keeps temperature, not sure I can fool it into indicating on or not, might just have to add an LED for that.

After reading a number of blogs I see this also has a bi-metal fail safe which shorts out when cold (the copper thing I bent away from the board). Got the old can of cold spray out and verified that. Not sure what it is set at probably around 40 degrees. Seems like newer one has no such thing, and the newer thermostats don't seem to have that anymore. I assume with fewer and all SMT parts reliability is improved by orders of magnitude.
parts.jpg
parts.jpg (233.83 KiB) Viewed 22063 times
Not sure what the need for the temp sensor on the battery is for (the small black thing hanging below the display board), I doubt they are trying to charge the silver type battery.

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: DIY WiFi Programmable Thermostat

Post by basicchip »

actually that is the temp sensor for the whole thermostat hanging off for better thermal isolation. It seems to be checked every few seconds. In the upper left hand corner of the display board there are 4 jumpers, not sure what those select. Looking to figure out what some of the other 6 connections do.

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: DIY WiFi Programmable Thermostat

Post by basicchip »

Finishing up custom PCB, here are the connections to the micro/LCD board.
thermo_connect.jpg
thermo_connect.jpg (365.88 KiB) Viewed 22037 times

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: DIY WiFi Programmable Thermostat

Post by basicchip »

Well up until now it was either summer or working as a consultant for others. Now it is winter, and I have some time off, maybe a good time to reacquaint myself with this project. I have some more knowledge of ESP8266 WiFi connections.

My goal is to control the heat from the thermostat side, as that is pretty safe. Only 24V AC and functions by being either open or closed, like the old mercury switch thermostats.

First doing some measurements on the thermostats and controller. The Erie thermostats act like about 14 ohms when demanding heat. Opened up my 7 zone controller (we use 6 and I think 4 would better, with 3 zones in parallel). As much as 100 ohms will trigger the demand, and that still puts 6V AC at the thermostat. 50 ohms and 3.3V at the thermostat also works. The equivalent resistor in series with the thermostat seems to be about 330 ohms, though I see big 470 ohm power resistors on each zone.

The stock Erie thermostat, draws less than 1 mA running, time to measure that next. And it uses a small battery to power the display when it demands heat, as the voltage drops to around 1V.

So I'll need to power the thermostat when it is demanding heat. This might be a rechargeable battery or supercap. Need to do some monitoring of the heat system on a cold night. Mine is an in-floor hydronics, so it is relatively slow to heat up. I think the house is well insulated, but I need to measure some of that.

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: DIY WiFi Programmable Thermostat

Post by basicchip »

Looking over the earlier design, we were thinking of using EMW3165 WiFi modules as in theory we could get BASIC running on that, and we actually did have a version limping.

But if there is ever a need for multiprocessing the WiFi connection is that. So it will probably come down to an ARMstamp and an ESP8266.

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: DIY WiFi Programmable Thermostat

Post by basicchip »

Some notes to myself--

The idea is to only modify the thermostats, not the controller -- could be expensive proposition if I break it

No rewiring the house

Thermostats are pretty simple -- they receive 24VAC at 75 mA, and short out when they want heat
My controller provides 75 mA on the nose, and detects a short with 300 ohms across the line, but not 500. If I take advantage of that, then I can still power the controller from the line while "shorting" it out. Will still probably use a battery, need to do some number crunching on how big, and how long it needs to last. Even on a cold day here the heat is not on all day long.

I was thinking of hacking that display, but I think it actually has the thermostat smarts in it. Pretty impressive design, as it runs on 120 microamps at 1.6V. Uses a small battery (357A button), and I haven't replaced them in 18 years, maybe I should check the next time the power goes out, though I think when it does it sets the temperature setting to 72 degrees, and I would notice that.

New Haven Displays has some 1x8 character displays that run on 3.3V at a couple mA available at Digikey. The biggest power hog will be the ESP8266, but it seems there are some sleep modes it has, will need to look into those.

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: DIY WiFi Programmable Thermostat

Post by basicchip »

Was wrestling with the idea of using slaved thermostats where I want to combine the zones. My initial thought was to protect the thermostats from 3 time 75 mA. Well the triac in the T200 is a 4A rated T410-600T.

Well 225 mA no big deal for that even without a heat sink. Might need to have to remeasure the equivalent resistance when the Thermostat is requesting heat.

As a test I ran the spare thermostat on the bench with 425 mA into the triac (double what I expect) and it only gets slightly warm. So in reality it will be dissipating less than 1/4 watt so I can use one thermostat for 3 zones.

In my replacement design I'll use an isolated SSR which will consume even less power.

Post Reply