Introduction: Space Heater Controlled by Digital Thermostat

This instructable shows you how to use an off the shelf digital programmable thermostat to control an inexpensive space heater.

Most cheap space heaters have only an analog knob to coarsely set the temperature; even the fanciest models only allow you to set them to turn off automatically after a preset number of hours.

This project allows you to set the room temperature according to the time of day and day of the week, giving you much needed flexibility to save energy and avoid waking up to a freezing house! You can save energy by programming the thermostat to lower the room temperature at night, but still get out of bed to a toasty room in the mornings.

Step 1: Materials and Safety Warning

You will need the following materials for this instructable:

- A digital programmable thermostat. I found a used one on ebay for about $15. It is a Bryant and was originally used in a commercial building. Commercial thermostats typically don't have battery backup, something to keep in mind if you plan on moving the heater around and don't want to reset the clock. Commercial thermostats are also typically cheaper than name brand consumer models. Make sure you get one that is programmable, many digital models are not, shocking considering the minimal effort in adding the feature and the energy savings in a typical home!!

- A relay with a 24VDC coil voltage and around 700 ohms coil resistance. The contacts should be rated to at least 15 or 20A at 110VAC minimum. $3-$5 at your local electronics surplus store.

- A 110V to 24VAC transformer. My transformer was rated at 36VAC, 65mA on the secondary, and maintains about 20VAC under load between one end of the secondary and the center tap. 20VAC seems to be within the input supply range of the thermostat, the exact voltage is not critical. Another electronics store find - $3.

- An enclosure, power cord and AC receptacle. I gutted a fax machine power conditioner and got all three for about $2.

- Some parts you might already have in your junkbox - a 1k resistor, 1n4001 diode, 100uF capacitor. A terminal strip or some perfboard.

- And I almost forgot - a space heater. Mine is a Bionaire MicaThermic Convection Console Heater - about $40 (in store price) at Costco.

Read this!!
Safety warning:

Space heaters typically consume on the order of 1500W, or roughly 15A at 110VAC. All wiring needs to be sized appropriately to handle these currents. Undersizing the wire gauge used or poor connections could lead to a fire! Also, operating a space heater while you are not home is probably a bad idea. I recommend unplugging the space heater before leaving it unattended for an extended period of time. Be safe!

Step 2: Schematic

Here is a rough schematic of the circuit (also my first experience with Eagle!).

Only the W1 output of the thermostat is used.
C is the common terminal, some thermostats may not have this. Mine uses it to power the backlight and digital functions since it has no battery.
R is return and completes a circuit with the W1 terminal when the thermostat activates the heater.

C1 should be rated ~50VDC. The exact value is not critical.

The thermostat needs to be on the unswitched side of the relay so that the thermostat always has power. The hot wire should be switched for safety. The ground wire is not shown and just passes through the box from the cord to the receptable. If the enclosure is metal (not recommended) it should be grounded.

Step 3: Assembly

Assemble the 1k resistor, diode, and 100uF capacitor on a terminal strip or perfboard. The purpose of this circuit is to convert the output of the thermostat, which is AC, into a DC signal to drive the relay. There is a fair amount of flexibility in this circuit - these are just parts I had in my junkbox.

The thermostat uses a triac to switch the heater on and off. Triacs only work with AC signals, they can't be used directly to switch DC because they will "latch" on and not turn off until power is removed. The 1k resistor in the circuit ensures that a small amount of AC current can pass through the triac and avoids the latching problem.

Step 4: Assembly Continued

Assemble the remaining parts and complete the wiring. The thermostat is attached to the top of the box by its original wall-mount with three screws, and can be popped off to make the necessary connections. Be sure to use heatshrink or put tape on all 110VAC connections to reduce the chance of electric shock or shorts!

The pinout for the relay can be determined by the diagram on the top of most relays, or with an ohm meter.

Step 5: Final Assembly and Testing

Before you close up the enclosure, do some preliminary testing. With nothing connected to the AC receptable, plug in the power cord. Verify that the thermostat powers up. A test lamp or small wattage light bulb connected to the outlet should be off.

Set the thermostat for heat mode and increase the set temperature above the room temperature as shown. Make sure the relay closes and 110VAC appears at the outlet, or the lamp turns on. If it checks out, test it with a real space heater, and allow it to run at least half an hour on your bench. Turn it off and inspect for any overheated wires or hot components.

If everything checks out, congratulations! You now have a digitally programmable space heater!


immaculatelation made it! (author)2015-03-01

I used a PCB relay from Jameco. I got the transformer, PCB, capacitor, terminal block, and resistor from Radio Shack, along with the wire for the thermostat. I used a household switch/outlet combo so I can turn the whole thing off and plug in any heater I want on the same piece of hardware.

immaculatelation (author)2015-02-24

Thanks for creating this! I'm using this to control the heat in an outdoor, insulated cathouse--or perhaps I should call it a cat-cabin!

immaculatelation (author)2015-01-08

Are you saying that all digital thermostats use triacs?

globrite (author)2013-07-11

Very useful article. A nice and safe alternative may be to use a Wattstopper power unit which is UL approved, has zero voltage switching and as a bonus has DC output at about 150 mA to power your controller. One such unit (B-120 EP) is available from Amazon for about $15. - Enjoy.

H3xx (author)2011-10-30

I know this instructable is old as dirt, but I was wondering if this could be modified to work with a car's a/c and heater. i.e. set it to 70 degrees and never have to touch it again, save to turn on the defrost. or just leave it on defrost and cool/heat your car that way.

ssbt (author)2010-01-09

 $32 at amazone... programable!... I'm not trying to be a jeark but I just don't get it... 

ssbt (author)2010-01-09

  this is a great idea. However, I wonder... why not simply use a line voltage thermostat?

ssbt (author)ssbt2010-01-09

 $10 on

mightyohm (author)ssbt2010-01-09

Because that thermostat (and most like it) don't have a timer.  The whole idea behind the project was to set the heater to turn off at night while I'm sleeping, and then turn on before I get up so the room is nice and toasty in the morning.

Thanks for your comment!
- Jeff

manicmonday (author)2009-12-24

Here's an idea that I don't think anyone has thought of yet. A relay has two states, normally open, and normally closed. You can use both of those at once if you want to switch between two different things.

You can take advantage of this idea without any modification of the circuit. You only have to make sure that you connected your hot wire to the relay so that the "Normally Closed" terminal has power when the relay is not activated. Then you would run that hot wire out to appliance #2.

Maybe you want a heater running if it's below the set point, and you want a fan running if it's above the same set point. Maybe in your greenhouse you want some bright (and hot) lights on if the temp is below the set point, or some not so bright (but cooler) lights running if the temp is higher than the setpoint.

manicmonday (author)2009-12-14

I don't understand your scematic. Can you explain it in more detail? I don't see how the relay turns on the heater. What part of the scematic is the relay? What does the capacitor do? Thanks

mightyohm (author)manicmonday2009-12-14

The relay is labeled K1.  The heater is connected to the switched 110V terminals labeled in the schematic.  The terminals of K1 complete the circuit to the heater when the relay is in the "closed" position (the contact marked C).

The capacitor, resistor, and diode are part of a circuit that converts the AC control voltage from the thermostat into a DC voltage used to switch the relay.  Most relays need a DC voltage on the coil and won't work with AC. 

manicmonday (author)mightyohm2009-12-14

Oh, now I see. The relay is drawn twice. Now makes more sense.

I know you can convert ac to dc using a bridge rectifier using 4 diodes. I guess just one diode will block 1/2 the voltage so that what comes through is 1/2 strength dc.  What do the resistor and the cap in that circuit do?

Thanks for making that more clear for me.

mightyohm (author)manicmonday2009-12-16

The relay is drawn once, but it has two parts, the coil and the contacts.

A bridge rectifier would be more efficient but requires more parts.  The single diode will output the same voltage but as a series of pulses instead of a constant level.  The capacitor smoothes out the pulses into a DC level. 

manicmonday (author)mightyohm2009-12-23

I used a 1.1k resistor, instead of the 1k. Also used a 100uF 160v capacitor. How will this effect the circuit?

I just measured voltage from line 1 of the transformer, and then to both sides of the resistor. The unmodified reading was 21.4vac, and the reading across the resistor was 21.1vac. Does that sound right to you? If so, why do we need a resistor at all for such a small voltage change? Just wondering cause I thought the voltage change was gonna be a lot more.


mightyohm (author)manicmonday2009-12-23

Very good question.  The reason the 1k resistor is there is because on my thermostat, without the resistor the relay would get stuck on never shut off.  Not all thermostats are the same, so you can try removing it on yours and see what happens...

21VAC should be fine, as long as everything works, don't worry about it.

manicmonday (author)mightyohm2009-12-23

Sorry, I didn't mean to bother you. Just wanted to learn a little bit about how/why this circuit works.

I've heard of voltage drops with resistors. I looked it up on wikipedia. It gave me a lot of info, but nothing to tell me how a resistor works. Like "What does 1.1 K mean?" "What does 1/2 w mean?" If I use different values how does it change the overal circuit?

You are right. If what I have works, then I shouldn't be asking any questions then, right?

Again, don't mean to be a bother.

mightyohm (author)manicmonday2009-12-23

1.1K means 1.1 kilo ohms, or 1100 ohms.  An ohm is a measure of resistance, that is, a way to describe how the resistor affects (slows down) the flow of current through itself.

1/2W is 0.5 watts.  A watt is a unit of power.  The resistor turns some of the electrical energy flowing through it into heat, and the wattage rating describes how much power the resistor can handle before getting too hot and burning up.

The reason the resistor is there is to allow current to flow in both directions through the triac switch inside the thermostat.  If the resistor wasn't there (or was too large), then the diode in the schematic would only allow current to flow in one direction through the triac, keeping it from turning off.  If the resistor was too small, the output of the thermostat would get shorted and the relay would never turn on.  I chose 1000 ohms because it's a good middle of the road value (a guess), and it seems to work ok so I never changed it.

If you want to learn more (for example, what a triac is), here's a link to my favorite beginners guide to electronics:

I highly recommend that you pick up a copy and start reading.  There are many resources for learning electronics online and in print, but I think Forrest Mims' book is a good place to start.

manicmonday (author)2009-12-20

This is a great instructable. It's easy to build, the parts are not expensive, and it helps a person save power, and therefore save money. It's great that you are so helpful when a person trying this runs into a snag. Only weak point is that the schematic is not very clear where it comes to the relay, but then you explained in the comments.

I gave you a 5 Best Instructable Ever.

Just wondering though, if you (mightyohm) is the author, why does it list P914 as the author?

Thank you for the great instructable, and your help with it.

mightyohm (author)manicmonday2009-12-20

Long story short, I wrote this instructable a very long time ago under a different username.  I don't use p914 anymore and use mightyohm instead.

sparkyskarts (author)2009-10-21

Awesome Set up, and Idea!! Thanks for sharing!
  Have you tried this in "Cooling" Mode, and plug in a portable air conditioner instead? I'm sure it is possible, just not sure how the wiring currently controls it all. Does it bypass the Controllers cooling portion, or is it one in the same?
Please advise, as I have a real need for a portable air conditioning controller. Your work is perfect!!
Thanks again!

mightyohm (author)sparkyskarts2009-10-21

I haven't tried using it for cooling, as I don't own an air conditioner.  However, simply moving the E/W1 wire to the Y1 position will convert this heating controller into a cooling controller instead!  Of course, while the terminal names are fairly standardized, your thermostat may be different.  Check your thermostat's user manual to make sure the wiring is correct for you.

manicmonday (author)mightyohm2009-12-20

For cooling wouldn't you do the exact same thing, but at the thermostat connect to the cooling screw? If you wanted one of these that did both heat and cool, then you would either jumper the heat/cool screws, or build a seperate relay assembly and run that off of the cooling wire from the thermostat. Do you think I am correct?

sparkyskarts (author)manicmonday2009-12-20

I thought about that too. The 'Y' connection works great for A/C. When you get your Thermostat, it will have a Pin out for each item. Mine did NOT use C, because it has it's own battery power. It had 2 connections for 'R' (Rc & Rh), which were jumpered together from factory. I left the jumper in place, and used 'Rc' and 'Y' for Cooling, and it works great. The Temp Controller actually had about 5 different ways to connect it up, depending on your system! I would say  build a separate Relay assy, for the Heat, since the trigger for each is different.
Good Luck!

mightyohm (author)manicmonday2009-12-20

Yep, while I've never tried it, I think you are correct!

sparkyskarts (author)mightyohm2009-10-21

Perfect!! Thanks soo much! I was hoping it would be as easy as that. I am not at all familiar with the pin out of a Temp. controller. I'm sure I can get it to work that way now, Great Instructable, I'll try to do my first instructable on the A/C version, as someone might still want to cool some rooms, it has been in the Low 90's around my house still, and will here and there all winter. Of course, you get all the credit!!
A++ Idea

manicmonday (author)2009-12-16

I printed this page out and took it with me to the electronics store. I thought I would have all the info I needed, but they started asking my lots of questions. They asked me how many watts/amps for the resistor and the capacitor. I didn't know what to tell them. I see now that there is more "Parts" info on the next page.

I got: a pack of 1.1k 1/2 watt 2% FP resistors. I have no clue what the 2% or FP means.

I got a 100uf 25volt electrolytic capacitor.

Will these work?

mightyohm (author)manicmonday2009-12-16

The resistor should be 1/2W or larger.

The capacitor should be rated for 50V as I wrote in the instructable.  25V might work fine, but you ideally you want a 2x voltage overhead between the rating and the actual voltage on the capacitor.  I would use at least a 35V capacitor.

Please be careful building the circuit, as you are playing with line voltage and high currents thru the relay, so incorrect wiring or shorts can cause fires and personal injury.

manicmonday (author)mightyohm2009-12-16

I was just guessing at what I might need, since I had just grabbed the info I "Thought" I would need and ran out the door.

Looks like my resistors are fine. I just went out to my garage and pulled a cap off of a circuit board I had laying out there. It's a can type that says 100uF 160volt. I'm guessing that will do :) The leeds are very short, but a little creative soldering should fix that.

I am used to dealing with home electricity, so yes, I will be careful. When I connect my wires to my relay it will be tight. I will use slide on type crimp on connectors that have rubber insulators. If that doesn't do well enough I will use liquid tape and put a good coating of tar on everything. :)

I hope you can see the image I uploaded. I can see that (R) goes straight to the transformer, and (W) goes to the relay, but how do I give my thermostat constant power for it's internal functions?

Thanks for being so helpful.
Robert in TX

mightyohm (author)manicmonday2009-12-17

That is a great question.  Usually the 'C' connection would be to provide a return path for current that powers the thermostat.  Does your thermostat have batteries?  If so, it probably doesn't need power from the transformer.

manicmonday (author)mightyohm2009-12-19

I have completed the project, and it is working. No C connection required with this thermostat. Just the R and W. The thermostat steals power from that connection even when it's "Open".

It works perfectly except my $5 programmable thermostat I got from Goodwill, the display doesn't work correctly (some of the bars are missing), so I have to guess at what the display is really saying!!! :(

mightyohm (author)manicmonday2009-12-20

Awesome!  Glad to hear you got it working.

You might be able to take the thermostat apart and fix it.  The LCD probably sits on a flexible contact block that could be cleaned with alcohol as well as the PCB pads the strip connects to.  But then again sometimes this can make it worse instead.  Proceed at your own risk.  :)

sparkyskarts (author)2009-12-10

Hello again! I have a question please....I love the circuit, I use it for an A/C system, pumping cold water thru a Heater core. EVERYTHING Works great, EXCEPT one major issue............the transformer(s) keep getting HOT, even without a load, or the system in "A/C Mode". I have even tried placing a heat sink with fan on it, but after a few hours it still gets hot.
   I think (and I could be wrong) my set up draws too much current (5 watts, according to my Kill-a-watt meter) while idle. When I have it in the "A/C mode" it only draws 86 watts. The only part of the circuit getting hot is the Transformers. I already fried one, lol!
   Do you, or anyone else have any ideas why this would happen? Are there any circuits I could use to lower the current draw while plugged in?
Transformer: 18VAC large 10A Radio Shack
Relay: 24VDC coil voltage at 500 ohms coil resistance
Diode, Resistors and Caps are of correct voltage, and rating.
(Picture of Transformer and Project attached)
Thanks in advance for all your help, as in the past!!

mightyohm (author)sparkyskarts2009-12-11

Your picture didn't come through, maybe you can try posting it again?

What voltage do you see at the output of your transformer?  Is it actually 18V or something else?  What kind of digital thermostat are you using and how much power is it supposed to consume?

You may want to try a different transformer.  Mine is rated for only 65mA and works fine, yours is 10x that.  I am not an expert on power transformers, but I know that transformers will dissipate some energy as heat.  It's possible that by using an oversized transformer for your supply, it is operating very inefficiently with such a light load and getting hot.

Definitely fix this problem, a transformer fire is not something you want to deal with.  None of the components in this circuit should ever get more than warm to the touch.

sparkyskarts (author)mightyohm2009-12-12

 Hello, and Thanks for the response!!
  "What voltage do you see at the output of your transformer?  Is it actually 18V or something else?  What kind of digital thermostat are you using and how much power is it supposed to consume?"

I am getting 19.3 VAC on the Transformer, going to the controller. My Honeywell RTH221, rated @ 1 Amp, 24 VAC MAX Load, said not to use connection C, so I did not. Also, This transformer (my first, slightly smaller one one got way too hot) I am not using the CT, only the outer 2 connections. Could this cause a problem? Could it be the 24 VAC requirement? I am too low, and it draws too much, trying to get the 24 VAC?

  "You may want to try a different transformer.  Mine is rated for only 65mA and works fine, yours is 10x that.  I am not an expert on power transformers, but I know that transformers will dissipate some energy as heat.  It's possible that by using an oversized transformer for your supply, it is operating very inefficiently with such a light load and getting hot."

I will definitely do that, Bigger is NOT always better....:)   Time to find a smaller one!

  Yes, I expect some heat, so I was carefully monitoring the set up, and it was fine for the first 3 - 4 hours, even days. I would unplug it when I did not need it. When I started leaving it plugged in for long periods, it started to warm up. Placing the fan helped a ton, but one day, even that was not enough. Got too warm, and I had to unplug it all.
  I re posted the pics, hope they come thru, Thanks again!!

mightyohm (author)sparkyskarts2009-12-13

Using the two outside wires on the transformer secondary should be fine.  And 19V sounds good too, this means the transformer isn't being shorted or too heavily loaded either. 

Your thermostat is battery powered.  This is why it doesn't need the C wire connected.  It shouldn't be drawing any power from the transformer at all.  (I wish it was easier to measure AC current, because then you could actually measure it!)

I'm stumped.  Apart from checking your wiring again and switching transformers, I'm not sure what to do.  If you disconnect everything from the secondary side of the transformer and leave the primary plugged in for an hour or two, does it still get hot?

sparkyskarts (author)mightyohm2009-12-18

Hi Again, and Thanks for responding so quickly! I swapped out transformers, as you mentioned, and like you said, it is too large. This will save on energy costs too! So I found the perfect Donor, from an old Scanner power supply. It put out the 24 VAC/DC I needed. I actually tried a lower voltage transformer, but my relay would not activate, so I had to scrap that idea. Not into replacing the Whole circuit just yet! Since I had a Bridge rectifier, I used it to see if it would help. Finally a Transformer that does NOT get hot! Of course, I tested thoroughly along the way, each step checking for heat, to discover any issues. And I've been testing for a couple of days now, NO issues. Of course, it does get heat, and you can feel it a little, but nothing like the old ones. Not sure if my choice of Controllers had something to do with it either. So, to be safe I put a heat sink on it. I also give it plenty of ventilation (Not bury it under the relay, or in a box without air holes) just as you should any "plugged in" device.
   Thanks Again,
      Happy Holidays to you!

magickaldan (author)2009-12-16

Here's some other ideas that might be easier for some people, Replace the DC relay with a Contact Solenoid for 24v AC should be able to get one at any HVAC store and some hardware stores. Then you can remove the Capacitor, Diode, Resistor next to the relay.

Or use a 120v Thermostat. Something like this

Just some ideas to throw out there.

proximac (author)2009-11-15

This is great, thanks.  I have one question - I've used a Drayton Digistat +2 for a purpose similar to this (electric heater control).  It works, but the only problem is that the Drayton (while it does support electric heat), is really designed for central heating control.  As such, it tries to minimise the number of power cycles per hour, so for a set point of say 20.0C, the room temp may go down to 18.8C before it comes on, then up to 21.2C, say, before it goes off.

I wish there was a digistat that simply called for heat if the temp was below the exact set point, and stopped calling for heat exactly at the set point.  It doesn't matter if that results in a power cycle every minute or two, as far as I'm concerned.  Anyone got any ideas?

mightyohm (author)proximac2009-12-11

A PID controller could be set to achieve this, but I don't recommend it as the resulting oscillatiion in temperature could quickly wear out whatever switching component you use.  I would stick with the existing behavior if possible.

peterlutz (author)2009-11-13

 I have a question.  I found a capacitor that looks very different that the one pictured.  It's 100 uf, at  6 volts.  But it looks much smaller, will this still work?

mightyohm (author)peterlutz2009-12-11

No, 6V is too low.  The working voltage of C1 should be at least 25V, preferably twice that to have a safety margin.  That's why I specify a 50V cap.

markj11 (author)2009-12-04

 Just what I was looking for.  I have gas logs that have on/off(light switch) on the wall that I want to replace with a thermostat.  Thanks. 

sentinel0 (author)2009-11-06

 I bought a digital thermostat at home depot for 20$ it uses batteries for the lcd how much will that change this project.  I would like to try to get my transformer and relay at radio shack does anyone know which parts # would be acceptable if any and if not what vendor and part numbers would be.  Thanks.

mightyohm (author)sentinel02009-11-13

Unfortunately I can't help you with specific parts as I do not shop at Radio Shack.  I would spend some time learning about thermostats and how this circuit works so that you can safely design a similar circuit that does what you want with the parts available.  Just keep in mind that 15 amps at 110V is a serious amount of power and needs to be handled carefully.  For example, using a relay that is too small or not rated for the correct voltage could cause a fire.

gregoryheller (author)2009-11-13

It occurs to me that you probably do not want to measure the temperature at the floor of your room, but rather somewhere around 4 or 5 ft off the ground. Could you just extend the thermostat wires and hang the thermostat on the wall?

mightyohm (author)gregoryheller2009-11-13

Yes, or do what I did and set the thermostat/relay box on top of a bookshelf or tall chair.

J5 (author)2009-10-29

For those of you looking for cooling as well as heating and maybe aren't the best do it yourselfers, I was about to start this project, but found a "cheap" alternative:

Works pretty well, there is a minimum temp of 45 degrees, but if you type in model: win100 at amazon you can find a bunch of reviews and see if it works for you.  Great job on the write up though, very detailed.  I just finished my house and couldn't afford whole house ac/heat and I have to admit I am too lazy right now to start another project!

J5 (author)J52009-10-29

My other link only works if you copy and paste, hopefully this one is better.

musicelect (author)2009-01-28

I've been thinking about building a device like this. Great job.

I'd like to suggest an easier way to accomplish the same thing. I was at my local hardware store and saw a programmable digital thermostat that was designed to control baseboard type heaters. It is capable of switching 16A 120-240V so all you have to do is insert this thermostat in-line on the hot leg and it will turn a heater on and off according to the programmed schedule. It costs as little as $30 and is just slightly larger than a regular thermostat.

About This Instructable




More by p914:Space heater controlled by digital thermostat
Add instructable to: