Project: ISO Example Home HVAC Thermostat Control Schematics and Design Info - Page 1
Forum section: electronics / projects

author: thakidd
author_rank: Regular Contributor
timestamp: October 15, 2010, 05:07:16 am
content: I am currently interested in building a project to replace my home thermostat. How does a home thermostat control a home HVAC unit? I have run into plenty of schematics that can control a HVAC window unit, walk in freezer, water temperature, etc. However, using a circuit like those on a unit as expensive as a HVAC unit is just nuts as far as I am concerned if I do not know where to start. Winter is coming and I would not want to replace my heater...plus the circuits I have run into do not take care of all possible operations that a normal thermostat provides.The question I seek an answer to: How do you build a complete home thermostat? A device that protects and is built to ensure no damage is ever done to the HVAC unit. I am planning on buying a cheap $10-20 thermostat just to tear it apart and study the board in detail in a few weeks if I cannot find any other answers.My current home HVAC unit uses a 4 Wire Heat/Cool setup which is referenced on page 17 (10 on adobe reader) of this thermostat installation manual:http://www.ritetemp-thermostats.com/60XX/images/6022_installation_guide.pdfConnections are as follows:W - Heater Control LineY - Cooler CompressorRH - Heater/Cooler PowerG - Fan ControlC - Optional Thermostat Power (which I have)One note to point out...Both heater and air condition systems runs off of electric.What kind of control does this device use? Is it 1-wire? Where is the GND connection? In addition to this wire diagram, the unit also provides C which powers the thermostat itself ensuring no batteries are required. I wish I could tear this unit apart right now but do not have another thermostat to put in its place until I get paid.If you can help/point me in the right direction, I would be much appreciative.

author: PetrosA
author_rank: Frequent Contributor
timestamp: October 15, 2010, 05:29:13 am
content: Generally speaking all a thermostat does is act as a switch on a low voltage AC line (12V-24V). If you have a heat/ac t-stat, the basic setup is one power in, two out - one turns on the heat, the other the ac. More advanced will have a + and - to power the t-stat or to run emergency backup heat of some sort. How it does those things (especially regarding heat) may differ from one system to another. In some, it will turn on the main control which starts the heater (forced air systems) in others, it may control a zone valve or zone relay. Either way, it's all low voltage AC power unless you have electric baseboard heat, which it doesn't sound like you do.Also, check from page 15 as it seems to give a pretty good description of what the different setups do.

author: JohnS_AZ
author_rank: Frequent Contributor
timestamp: October 15, 2010, 05:31:05 am
content: Of course your thermostat may be different but every one that I've ever looked at worked the same (and your color codes pretty much indicate an industry standard setup).Think of the thermostat as nothing more than three switches.The "RH" is your common.If you short "RH" to "G", your blower fan will turn on.If you short "RH" to "Y", the air conditioning compressor will turn on.If you short "RH" to "W", the heater system will turn on. This could be a gas burner solenoid, or relays to energize resistive electric heaters. If the unit is a heat pump, it will turn on the air conditioning compressor, but it will also energize a reversing valve that will make the freon run the other way around (kinda).Obviously you need to ensure that the "G" and "Y" leads are NEVER turned on at the same time.You also need to make sure that the eater system can not be turned on with the blower off.Also, you need to make sure that when the compressor turns off, it is not allowed to turn back on for some time (10 minutes? don't know the time limit for sure).Also, higher quality thermostats keep the blower running for some time after the compressor (or heater) has turned off to suck every last Btu out of the system before shutting down.

author: thakidd
author_rank: Regular Contributor
timestamp: October 15, 2010, 12:45:56 am
content: Excellent...thank you. Just what I was looking for...I also found this link on the web:http://www.hometech.com/kb/questions.php?questionid=53#nonhpIt pretty much describes the same thing and between your extra advice in your posts and that manual, I got it now. I think I was just having a horrible Google Search moment or something.So question for you guys. Suppose the power fails or the unit fails. Is there any type of circuit I could include which would turn off/protect the HVAC unit if all else fails?Also I have a fifth wire for thermostat power. I am guessing C is +24V or whatever and R/RH is GND?

author: thakidd
author_rank: Regular Contributor
timestamp: October 15, 2010, 06:45:12 am
content: I grabbed my trusty DMM and confirmed that W, Y, G, and C all measure 30VAC+ when tested against RH GND. When the system is running, G drops to 0.05 for both heat and cold (meaning the fan is running). W drops to 0.05 if the heater is running. Y drops to 0.05 if the Cooler is running.I still need to research the appropriate timing for cooler/heater shutdown and subsequent start-up.If anyone can think of any additional circuit protection outside of what you all noted, please let me know. I am interested in adding a fail safe to the circuit design in case the unit fails. Not sure if relays in default-off positions during power outage would take care of business or not. Either way, I do plan on providing battery backup to the project just in case (i.e. detect power failure, disable/shut off all controls).

author: TechGuy
author_rank: Regular Contributor
timestamp: October 15, 2010, 06:37:15 pm
content: Quote from: thakidd on October 15, 2010, 06:45:12 amUnless your using latching relays, the relay will also revert to its default state. You just wire up the relay terminal so that its off in its default state. If the power goes out, so will your heating system. if the thermistat losses power, it won't have any power to energize the HVAC relay that turns on the component. So its naturally a fail-safe configuration.

author: thakidd
author_rank: Regular Contributor
timestamp: October 16, 2010, 01:49:45 am
content: Ha ha, that was a stupid question. I already knew that.I think I have made a decision on the design for the thermostat side of things. I am thinking of using 3x Solid State Relays -GA8-6D05(3-32VDC In and 5A 280VAC Out) to control the Heat, Cool, and Fan functions of the HVAC unit. I am also thinking of using aKBL404GBridge Rectifier along with theLM2595TADJGstep down switching regulator to convert the thermostat power to 5VDC for the micro. I included a pic of the PSU circuit I am looking to build.Do you all see anything that could go wrong with this setup?Also, should the VDC positive and gnd coming out of the bridge rectifier connect with the regulated power (+/-) after passing through the LM2595? I circled the ones in question as i am not sure about that one.

author: DJPhil
author_rank: Frequent Contributor
timestamp: October 16, 2010, 05:03:35 am
content: I might be misunderstanding but I think I see an issue.30VAC will rectify to ~42VDC minus the diode drops in the bridge (looks like ~1.5V), which is dangerously close to the 45V absolute max of your regulator and well above the max of your relay (if you had planned to drive them from unregulated DC). At 33VAC your rectified DC peak will be over 45V, and that could happen with line voltage variations and normal surges. Most of the transformers used in HVAC where I live are tied right off the house mains with little or no protection. You could go with a different regulator with a higher input voltage rating (don't know what exactly to suggest, but with such a large voltage drop a switching supply is a good idea) or consider using a small PCB mounted step down transformer with a 3:1 ratio. You might even consider winding your own transformer, as this would be the perfect sort of application to learn on. That's what I'd try, but I'm cheap.Quote from: thakidd on October 16, 2010, 01:49:45 amNo! Unless I'm misunderstanding somewhere, that would be very bad.Vdc in your diagram is at ~42VDC and connecting it to the output would . . . I'm not sure exactly. That would effectively bypass the regulator and dump 42VDC or so on the unregulated line, probably destroying all downstream circuitry as well as the regulator and probably the schottky (40V breakdown). Essentially Vdc on your diagram shouldn't be connected to anything. The ground connections are correct as far as I can tell. All the regulated 5Vdc will comethroughthe regulator. So far you don't need more current than the 1A that the regulator provides (3x16mA relays and a micro), so you're good to go.Hope that helps.

author: thakidd
author_rank: Regular Contributor
timestamp: October 16, 2010, 05:13:17 am
content: Ahh, I was wondering what the rectifier would spit out. Now that I know that, I need to rethink the circuit to power the mpu for sure. Would upping the Solid State Relays and the LM2595 be the better way to go or would the transformer route work better? My main goals are circuit protection and then longevity.QuoteI figured that was the case with VDC. Did I misunderstand you concerning the GND? Should that be connected before and after the LM2595 or should those also be separated?

author: thakidd
author_rank: Regular Contributor
timestamp: October 17, 2010, 12:07:43 am
content: maybe I am looking in the wrong place or have the wrong circuit...What is the best way to convert 30VAC to 5VDC? I cannot find a rectifier/step down switching regulator that will work. May I get some help?

author: DJPhil
author_rank: Frequent Contributor
timestamp: October 17, 2010, 07:46:12 am
content: Quotes have been reordered to hopefully make for easier reading.Quote from: thakidd on October 16, 2010, 05:13:17 amThe two marked grounds in your drawing should be connected, you are correct. A simple way to think of it would be Rectifier -> Filter caps -> Switching supply -> DC out, with each connected by two wires, ground and positive. The ground reference stays the same, but the positive is smoothed and then stepped down to 5VDC and smoothed again.Quote from: thakidd on October 16, 2010, 05:13:17 amQuote from: thakidd on October 17, 2010, 12:07:43 amMy explanation from here was getting long, so I drew a picture. Your original idea should work ok if you use an SPMS controller with a higher input voltage capacity. Take a look atFairchild's page for the LM2595. In the also recommended section there's the LM2591HV, with a 60V input limit. You can use their tools to tinker around with the design until you're happy. There's lots of info and neat ideas on there.The other way to go would be a second transformer and a linear supply, but that's got it's own ups and downs. It's a more simple circuit with less that can go wrong but you have to find (or wind) a transformer. Once that's done then it's easy, just swap the SMPS section with a7805circuit and you're done.Sorry if this doesn't make much sense, I'm thinking through a headache today.Hope that helps.

author: cybergibbons
author_rank: Frequent Contributor
timestamp: October 17, 2010, 05:28:20 pm
content: US heating/cooling systems are clearly very different to the UK.But is that 30VAC always going to be 30VAC? If you replace your boiler or AC unit, could it be 48VAC?Most thermostats and heating control systems here have volt-free contacts (i.e. raw, relay based contacts), and take their power supply from a separate mains feed or batteries.

author: thakidd
author_rank: Regular Contributor
timestamp: October 17, 2010, 06:02:18 pm
content: @DJPhil: Your drawing is exactly what I was envisioning. Did not realize that Fairchild had the LM2591HV. That looks like the perfect component to fix the issue. Guess I should have checked out their website before posting.Could you give me some more details on a transformer circuit? Easier and safer sounds like the way to go.Hope you feel better. Thx for your post.@cybergibbons: Volt-free contacts make the most since. Wish that was the standard here. As far as the voltage change, I am not too worried about it. In fact, it is probably a standard voltage. I am planning to use solid state relays with a 24-280VAC rating. In case the voltage ever does increase, I should have plenty of room to work with. What I am worried about though is if I move. Apparently some systems here can have up to 5 wires and most thermostats have up to 11 contacts for different types of heating systems (hot water, heat pumps, gas, etc). I need to definitely spend some time thinking about all of that before I get a board printed as I would hate to have to rebuild the circuit a few years down the road.Again, thx for all the help!

author: DJPhil
author_rank: Frequent Contributor
timestamp: October 18, 2010, 06:04:37 am
content: Quote from: thakidd on October 17, 2010, 06:02:18 pmNo worries. There's almost always a part for what you need, especially if it's likely to solve a common problem, it's just a matter of finding it!Quote from: thakidd on October 17, 2010, 06:02:18 pmThe whole thing hinges on the transformer, but it's fairly simple otherwise. I changed the previous picture to show the difference. I probably shouldn't have mentioned it, as it's not a very good idea unless you're just tinkering for fun. I think you'll find that it's more trouble than it's worth if you just want a power supply that works so you can get on to the microcontroller programming.Now you could skip the extra transformer, but a linear regulator is more efficient when it's input and output voltages are close. Dropping from 45VDC (too high for a 7805, but I'm sure there's a HV version) down to 5VDC means that for every watt (5V @ 200mA) you draw through the regulator it must dissipate about eight watts (40V @ 200mA) in heat! This is a bit oversimplified, but you get the idea. This is one of the reasons SMPS are so useful. The extra transformer is used to step the voltage down to something that's closer to the regulator's output.The standard linear regulators to use for 5VDC output are based on the 7805. National (just to keep it consistent) has both a full 7805 (LM7805) and a low power version with less output capacity in a smaller package (LM78L05). Take a spin through the datasheets and work out your power needs. When you know how much power you'll need (16mA per SSR plus the micro and support circuitry, plus any display, etc.) you can work out which is better to use and how much heatsinking you need (most likely a small clip on heatsink or copper plane will do).There's lots of info out there on linear three terminal regulator circuits. A datasheet search website likedatasheetcatalog.comwill have dozens of hits for 7805, and you can learn a good deal looking at the application circuitry from different manufacturers.As for the transformer, you'll probably have a hard time finding something that's intended for 30VAC to 8VAC at say 200mA. You can search for something similar that's designed for 50-60Hz and has a turns ratio of about 3.75:1, or try and wind your own. That can get somewhat involved, but it may be your only option to get what you need. There's a few good resources out there if you want to try, I'd just hit google and jump right in. Small, low power transformers don't regulate well, meaning that their output voltage changes a great deal depending on load.Finally, it may not be necessary to reinvent the wheel. If you have access to one or a few older thermostats that have micros in them (or lcd displays, it's a giveaway that there's a micro inside) see what they used to get their power. It's entirely possible that they were designed for low power use and run entirely off batteries, or perhaps they have a nice charging system to keep the batteries topped off. They might even have a small transformer in them that you can pillage. You can also simply recreate the exact circuit they use for power and save yourself the design headaches, assuming you don't need more power than it's designed for.I hope I'm being more helpful than confusing. There's a lot of background info in some of these concepts and I'm too often long winded.Hope that helps.

author: thakidd
author_rank: Regular Contributor
timestamp: October 20, 2010, 01:22:45 am
content: Thx DJPhil! That answers my questions. I just bookmarked that site. What a great resource.I think I will hold out on the transformer at this point. I do like the 'scavenge from thermostat' idea though.