Physical control of old thermostat

Hi All,

I'm thinking of using an Arduino for my first micro-controller project; the idea is to have rule-based control over a servo motor, which in turn will move the handle on an old-school thermostat. I know it's not the most elegant solution but it will be fun :smiley:

Anyhow I'm not sure if the Arduino is the right fit here. I love the fact that it can drive a servo 'out of the box' and is easily programmable, but I'm hoping to have the following features:

  • rules updated through a simple website served from the Arduino (over WiFi)
  • rules based on a real-time clock

So I think I'll need an Arduino, plus a Real Time Clock Shield, plus a WiFi Shield. Does this still sound like a reasonable approach to those with some Arduino experience under their belts?

Thanks in advance for any advice ...

It sounds like a reasonable project but not as a first project.

The programming involves some advanced concepts that I think you will struggle with until you are more experienced.

I'm actually not too worried about the software side of things. I've been writing software for a living for over a decade, & have pretty solid experience in C, & some old-school assembler (Z80 for an Amstrad CPC 464) so I'm happy with being close to the bare iron.

The thing that I'm new to is the hardware ... I've never done any control systems whatsoever.

That's kind of Rube Goldberg. Why not put a meter across the leads on the thermostat and see what kind of V the thing is controlling?

Ok so you know what it takes to write a program driven from a parameter file or array. The rest should be straight forward.
Get it going with fixed rules first derived not from the code but from an array. Only when that is working go on to extend it by updating that array.
You can either use the arduino to keep track of time or add an external real time clock chip. If you make it battery backed, it will retain the time during power down cycles.

What sort of user-defined rules do you have in mind?

If you're aiming to recreate the behaviour of a programmable 'stat i.e. where the set point varies at specific times of the day, that would seem simple enough; just imagine how you would store the configuration for one of those, and design a sketch to enter and store it and then apply it based on the RTC.

If you're looking for something more complex, then the only limit I can see is your ability to understand your requirements.

I have a similar project in mind, so let me throw some ideas your way.

First, you can get a digital thermometer on a chip that speaks a simple protocol, for which libraries already exist. (See Adafruit for the Dallas 1-wire temperate sensor.) No need to automate an existing thermostat when you could replace it more easily. In my case, call for heat is controlled by a relay shorting the 24v common and heat leads. I don't have A/C, and no fans (hot water baseboard heat), so mine is literally two wires poking out of the wall. Yours will likely be slightly more complex, but not by much.

Try the Chrono Dot for an easy RTC solution. Although, for this task, a good and accurate crystal and a timer interrupt to advance seconds will get you a decent enough clock for this purpose, if you don't mind adjusting the time two or three times a year. Chances are you already will because of daylight saving time.

WiFi is possible, but is an awful lot of overhead. Maybe you could set your schedules ahead of time and add WiFi later? In my case, I'd like to have living room, basement, and per-bedroom zone control. So for me, it's better to have an ATmega8A-based zone 'stat in each room, with a local sensor, and have them report back to a central controller (optionally with Ethernet / WiFi) for schedule updates. YMMV.

If you want to stay simple, get an ethernet shield and use a web page to set the thermostat via a servo to the temperature you want. Not rocket science, even a long time ago like below.

http://web.comporium.net/~shb/t-stat.htm

duncan_bayne:
I'm thinking of using an Arduino for my first micro-controller project; the idea is to have rule-based control over a servo motor, which in turn will move the handle on an old-school thermostat. I know it's not the most elegant solution but it will be fun :smiley:

Personally, I wouldn't go that route; too complex and prone to failure.

Better would be to control the switching of the various pairs (there's only 3 or 4 plus common for most standard whole-house A/C and heat pump units, IIRC - basically something like fan on/off, heat on/off, emergency heat on/off, and cool on/off), which will be at something like 24 VAC, with relays - contacts of the relays should be a rated for a few amps. Control the relays per the playground examples.

Then use thermisters (and code) to control the relays (per your programming); in effect, you would be making your own digital thermostat (but you would have total control over the code). You could later add extra thermisters (maybe one for outside temperature?) as well as other special things for controlling the system.

Hmm - thinking about my current situation, right now my wife and I like to open the windows at night, but as the hot season wears on, we'll want to shut things down and start to use the A/C (of course, I'd need control over open/closing windows, blinds, etc).

:smiley:

blinds, etc

http://web.comporium.net/~shb/blindtilt.htm

Minor nitpick -- the 24vac lines are usually less than 100mA transformers that trigger relays or solid-state controls on the furnace / pump / whatever. Your average thermostat relays are not capable of directly switching loads. So, getting a relay suitable for a few amps is certainly harmless, but probably overkill.

That said, in my garage, a P.O. wired up 120vac straight through the old 1970s-era bimetalic strip mechanical switch. I found that out after removing the cover and unscrewing the faceplate. I was really glad I didn't go probing at anything first!

SirNickity:
That said, in my garage, a P.O. wired up 120vac straight through the old 1970s-era bimetalic strip mechanical switch. I found that out after removing the cover and unscrewing the faceplate. I was really glad I didn't go probing at anything first!

Here in the UK, it is normal for the old mechanical stats to switch mains voltage (240 VAC), and the modern electronic programmable stats also switch 240 VAC (at trivial current, since all they're doing is closing a relay in the boiler).

Really? Yikes. I'm not a plumber, nor a mechanical engineer, so I had no idea that was commonplace. Mine switches a large fan on the back of a ceiling-hung radiator, so it's certainly an appreciable load. I never would've imagined the tiny switch in mine would be rated for that kind of abuse. Sometimes I'm amazed at what passes code inspection, and equally by what doesn't.