# Controlling central heating system via pc

A

#### AndyHod

Exactly what type of interface, sensors(analogue vs digital) and controllers do I need to control my central heating system from my PC (inexpensively).

B

#### Brandon Nichols

I'm doing a furnace upgrade and controls design on the home my wife and I just purchased. The two most important questions are 'what kind of system do you have' and 'what do you want it to do?'

Most forced-air systems are essentially single-zone, with one thermostat. A single 24V contact closure starts and stops the furnace. If this is what you have and are happy with it, then its very simple to control with your PC.

Personally I would stay with recognized industry names; for example the Honeywell T7300F looks very capable for a typical home forced-air system (and if your PC is gunnysack you can still program it by hand):
"http://content.honeywell.com/building/components/T7300promo.asp":http://content.honeywell.com/building/components/T7300promo.asp

Read further down on the page and you'll find the LonStat communication software, and the interface cable spec. All done!

However, if you have a multizone system (or a single-zone system that you'd like to upgrade to multi-zone, which is my design challenge), then a more sophisticated controller is required.

I'm weighing the relative complexity / cost / reliability / other benefits of an X10 based system (e.g. www.smarthome.com) vs. an industrial standard mini-PLC such as the Allen-Bradley Micrologix:

"http://www.ab.com/plclogic/micrologix":http://www.ab.com/plclogic/micrologix

The jury is still out, but the work needs to be done before next winter!::

Good Luck,
Brandon Nichols, PE
www.bwnichols.com

F

F

A

#### Anonymous

To start, you will need to measure temperature within the house. It may also be a good idea to measure temperature outside the house too; if it's a warm day outside, you may not need to switch the heating on so early, if it's very cold, you may want it to come on sooner.

You may like to zone your house, and fit control valves to your radiators. This would allow you to only heat those parts of your house that need it. ie bathroom only in the morning and late evening etc. And of course, you will need to switch the
main circulating pump on and off.

Audon Electronics is one company that has a range of products for home automation applications. See "www.audon.co.uk":http://www.audon.co.uk

B

I think you will find that controlling your central heating system from your PC will likely not be inexpensive. You can buy a really fancy thermostat for under $100 that does everything you could possibly want. There are home automation product available for your PC (search home automation on your favorite web search engine). One question I have is given the track record of most home PCs for uptime, why would you want to do such a thing? I would not want my furnace controlled by something as flakey as a windows product. Its more then adequate for many things, but this is not one of them in my estimation. Bob Peterson T #### terrance This micro controller can be stand alone unit, to control based on the look up table create in your uP. Also PC can able to inttreupt at any time to change the parameter, if you set your PC as web server then you can access from any where in the world T #### T. Connolly One thing that your home thermostat has in it that may be extreemly difficult for you to implement if you don't have a great deal of experience in controls is a mechanism called the heat anticipator. In a mechanical thermostat a small current is passed through the bimetallic coil to very slightly heat it up while your furnace is running, thereby compensating for the lag between the spring temperature and the surrounding air temperature. Your furnace is factory adjusted to provide this current on the wires to the thermostat. More sophisticated electronic tstats have an adaptive heat/cool anticipator for both heater and AC. When you first install one of these you'll notice yor furnace or AC cycles frequently at first, then gradually for longer more regualar times as the thermostat "learns" your home. Since even really nice programmable thermostats are less than$100 I wouldn't consider controlling a home furnace from a PC "inexpensive" no matter how you roll it (oh and add in the energy cost of running the PC 24/7/365). Last time I touched my programmable tstat it was to change the backup battery over a year ago. Otherwise, we leave it as programmed, in auto, and enjoy the comfort without thinking about it. There is something to be said for that.

.15kW * 8766hr/year * $.06/kW-hr =$79/year - about the cost of your programmable tstat, provided you leave the PC monitor off.

W

#### Wes Crucius

I did a control system retrofit to a six zone hot water base board and underfloor radiant heat for my parents and they love it. They used to have nothing but simple thermostat and relay logic controls. They had constant problems with the boiler overshooting, boiling and introducing air into the system. This typically happened if the boiler was still running right up to the point when the last zone shut off. By adding a Micrologix, I was able to put time delay logic in the shut off the boiler and kept at least one zone running for a minute or so to prevent the overshoot. Another problem they had was that with the hot water heat, the air conditioning was a completely independent system with no interlock capability, so when the temperature was just right they would end up with the two systems fighting each other if they were careless and left both systems enabled. By combining the control of the AC into the PLC, it was trivial to interlock the systems. Also, those old Honeywell zone controllers failed regularly, while the Micrologix system has been in for four without any issues at all yet.

C

#### Curt Wuollet

Well, to start with, you need an OS that will run 24x7x365 for direct control. If you are using Windows, I would offload the task to a fail-safe standalone controller like a PLC or one of the home automation controllers. With Linux, you would be reasonably safe using an inexpensive DAQ
card and thermistors for sensing and driving relays for the standard 24VAC NVAC thermostat wiring. This involves a few lines of code to be called periodically by cron. This is preferable to having your software loop as it is inherently self starting and fault tolerant. The program should first kill any other instances of itself to prevent deadlock on resources in case of power glitches, lightning and the like. Then it should sample temperature amd react accordingly. Using thermistors with their high sensitivity and low thermal mass and a small amount of hysteresis, maybe 2 degrees, will overcome the problem of short cycling that the crude anticipator system is there to solve. If drafts are a problem, averaging the last 5 readings or so will prevent the system from responding to short term changes. There is no need to linearize the thermistors as you only care about very small range of values and they are consistant within that range.

If you are really low budget, you can skip the DAQ card and use a joystick (game) port which translates resistance to time values then measures the time. This works really well for this purpose as the thermistors, chosen properly, show a large change in resistance for small changes of temperature near the setpoint. The relay would then be run from the parallel port using schemes well documented in the Linux Coffee HOWTO. The accuracy of this method is more than
adequate to the task as the "system gain" near the setpoint is high.

So for single zone control, you would then need your PC running Linux a thermistor, and a relay plus a couple of connectors. This assumes
you already have a game port which is a pretty safe bet. If you can find an old 386 or better machine for free you can dedicate it to this purpose and have a reliable, sophisticated, infinitely programmable system for about the price of a cheap setback thermostat and some hacking. Linux and the tools are of course, free.

For multi zone control the game port has 4 analog channels and the parallel port can handle 8 relays. The software for this would be a little more complicated, but the rules are usually not rocket science. You do need to understand your HVAC hardware.

I can help you with the hacking. Linux is great for this as all the timing and scheduling stuff is already built in (cron and at) and it will run reliably 24x7x365. If you lose power, the machine will clean up the mess and automatically start cron and at, which are extremely reliable and trusted services under Linux. The amount of code you need is very small and can be well understood and easily tested. It could probably be done with a perl or shell script as there is no need for complex constructs. The cron and at scripts are well documented and robust. Every UNIX system does it's housekeeping and other repetitive tasks this way so the confidence factor is high. This is why I use Linux for automation, everything you need for automation tasks is in the box. No checkbook required.

The Windows folks could probably tell you how to do this method under Windows, but I'll bet it's much more complicated and the likelyhood of your pipes freezing much higher.

Regards

cww
--
Free Tools!
Machine Automation Tools (LinuxPLC) Free, Truly Open & Publicly Owned
Industrial Automation Software For Linux. mat.sourceforge.net.
Day Job: Heartland Engineering, Automation & ATE for Automotive
Rebuilders.
Consultancy: Wide Open Technologies: Moving Business & Automation to
Linux.

B

#### Bruce Durdle

But the energy used to run the PC all goes to heating the home anyway - unless it is cooled by an external system!

Bruce

L

#### Lewis Bodden

If the key word is inexpensive then the answer is none. You might try "www.X10.com":http://www.X10.com . They have a ThermoStat Set-Back Controller (ONLY $19.99). With other products they sell you can interface it to your PC. (ActiveHome Kit ONLY$49.99)

A

#### Anonymous

I prefer the X-10 solution. I setup an old 386 PC on the house LAN running activehome. The PC has an ethernet NIC and I control it remotely with AT&Ts VNC software (free from AT&T). I have activehome automatically loaded at boot time. I have the PC reboot itself once a week at night when no X-10 timers are scheduled to trigger. It also runs Tardis to keep it's clock accurate. I have 5 thermostat schedules setup as activehome macros. I enable/disable them based upon day of week and family work schedules.