In this article, I’ll show you how to take a regular 5000W electric heater and turn it into a smart heater using a low-cost WiFi smart switch and a relay.
I recently insulated my detached garage and bought an electric heater to warm the space. I’m not in my garage every day, so it would be unnecessary and expensive to keep the space heated constantly. Therefore, on days when I want the garage warm, it will need to be heated from a fairly low temperature. Since it will take a little while to get up to a comfortable temperature, I want to be able to turn the heat on/off from the comfort of my house.
Initially, I thought it might be nice to use a line voltage smart thermostat. I already have a Mysa thermostat connected to an electric baseboard heater in my kitchen. It looks good, it’s very reliable, and I would happily purchase another for my garage. However, the 5000W garage heater is beyond the capacity of the Mysa and all other smart thermostats I found.
Another option would be to buy a heavy duty smart switch that can handle the load ( the 21 Amps of the heater is too much for any standard smart switch). However, all those heavy duty switches come with an enclosure. I prefer to put all my components inside the heater enclosure. So for my purposes, the included enclosure is an unnecessary added cost.
Ultimately, I decided to go the DIY route. Here’s how I did it:
Project plan and wiring diagram
First, I am going to connect a regular smart switch to the coil of a contactor (basically a big relay). The contactor terminals will be connected to the heater. When the smart switch is turned on, the contactor switches will close and the heat will turn on (see wiring diagram below).
If wiring diagrams aren’t your thing, don’t worry. I included step-by-step wiring instructions below.
Second, I’d like to power the smart switch and the contactor from the same power source as the heater. That way I only need to plug one wire into the wall.
Third, I’d like to enclose the Sonoff and the contactor inside the heater so the whole install looks nice and clean.
3 Major components
Here is an explanation of the requirements for the three major pieces of this build:
Most electric heaters will work for this. The main thing is that you need to be able to set the mechanical controls to the “on” position. That way, when the power is turned on, the heat comes on:
heater switch in “on” position >>> power applied >>> heat
You don’t want a digitally controlled heater that requires you to press a button to start the heat:
power applied >>> screen comes on >>> press start >>> heat
Also, my heater is 5000W, but you could buy one with more power if necessary. You just have to make sure that the contactor you buy can handle the power (see below).
There are 3 features to consider when you buy your contactor:
Current rating – The contactor will do the heavy-duty switching. Therefore, it needs to be able to handle the full current of the heater. The heater is 5000W running on a 240V outlet which means I can expect the heater to draw about 21 Amps (5000W/240V). I have to make sure my contactor exceeds this, so I will choose a 30A contactor.
Switch type – The contactor is DPST (double-pole single-throw). What that means is that it controls two circuits (double-pole), but can only turn them either both on or both off (single-throw). In the US, 240V electricity has two “hot” wires (both 120V). It is preferred to have a double-pole switch so that you can switch both “hot” wires.
Coil voltage – The contactor coil should be 120VAC. This will allow you to connect the smart switch circuit to one “hot” wire (120VAC).
I decided to use a Sonoff Basic for my smart switch. I used it because it’s what I’m familiar with, and because I have spare ones laying around. You can use any switch you like, but consider the following:
Current rating – You might be thinking, “You can’t use the Sonoff for that! It’s only rated for 10A. You’re gonna blow up your Sonoff and burn down your garage!”
The Sonoff will not be connected to the heater’s load. The Sonoff switches the coil for the contactor which only requires a minimal current nowhere near the capacity of the Sonoff.
Any 120VAC smart switch with a 10A rating will be more than enough to handle this task.
Wireless protocol – I would like to have a WiFi smart switch (Sonoff is WiFi) to control my heater. I have Z-Wave and Zigbee devices (with a SmartThings hub) in the house, but the garage is too far for the signal to be reliable. However, I used a powerline adapter to extend my WiFi to my garage so that signal is strong.
DIY – The smart switch should have easily accessible wire terminals. You don’t want a fully enclosed smart switch that is designed to be plugged into an outlet. The Sonoff is easily disassembled. The circuit board can be easily accessed for attaching wires.
List of tools and materials
Here is a list of what you’ll need to complete this project:
Heater – I used a ProFusion 5000W heater from Menards, but there’s lots of models that will work.
Sonoff Basic – The smart switch for this build can be purchased by itself or with quantity discounts.
30A DPST contactor w/120V coil – There are many variations of contactors so either be sure of what you need, or buy this one.
Wire Stripper and connectors – You can do this project without a wire stripper, but having one makes it easier. If you don’t have one, the kit in the link is a great deal. The included connectors in this kit will be useful for this build.
10/3 wire– You will need about 1 foot of 10/3 wire (in addition to wire for the cord). I already had 15 feet of wire for the heater cord. The cord was plenty long so I just cut 1 foot from it.
16 gauge wire – The Sonoff terminals are too small for 10 gauge wire so I used 16 gauge wire for the contactor coil circuit. Hopefully you have some laying around because you don’t need much.
Wire clamp – Make sure to get the correct size for your knockout.
Self-tapping screws – You’ll need something to mount the contactor and Sonoff to the heater.
Alright, let’s get started!
Open your heater and find an appropriate place to mount your contactor and smart switch.
Make sure that the screw holes for the components will be in a safe place. You don’t want them to come through the other side and damage something.
2. Remove knockouts
Your heater should have some circular indentations (knockouts) on the case. These are designed to be removable in order to allow wiring to pass through. Find the knockout that is in the most convenient position for efficient wiring and remove it.
My knockout did not come out easily. In fact, I nearly destroyed the heater case and threw it out the window in the process of removing it. Luckily, a few choice words and some focused breathing prevented me from doing something I regretted.
Breathe, Eric. Relax, and just breathe…
I ended up needing a wire snips, a pliers, and a tiny bit of patience (compared to my normal amount of zero) to get the job done.
3. Install wire clamp
The wire clamp will provide a clean point of entry for your electrical wires and also hold them in place.
Install the clamp in the hole from the knockout you just removed. Place the screws for the wire clamp on the inside of the case. This will provide a cleaner look. Also, make sure the screws face a direction that is accessible with a screwdriver.
To tightly fasten the wire clamp to the heater case, use a screwdriver and small hammer.
4. Fasten smart switch and contactor to case
I used 1/2″ #6 self-tapping pan-head screws.
Again, make sure when your screws poke through the other side, they are not going to damage anything important.
NOTE: Before fastening the components make sure you can easily access all the wire terminals. If not, you may want to wait until the wiring is done to permanently fasten them.
5. Connect your ground wire to GND on the heater
If your heater doesn’t have a clearly labeled GND terminal, you can drill your own hole and attach the ground wire anywhere on the metal case.
6. Connect L1 and L2 to contactor input
Your L1 and L2 wires should be the black and red wires. Trim the wires to the appropriate length and strip about 1/4″ off the end. Fasten the stripped ends using the screw clamps of the contactor.
NOTE: L1 and L2 terminals on the contactor are arbitrary. If they are not labeled, just assign one to be L1 and the other to be L2.
7. Connect L1 and L2 of contactor output to L1 and L2 of heater
For each connection, measure the appropriate length of 10 gauge wire. Strip about 1/4″ off each end and fasten using the screw clamps.
8. Connect Sonoff L input to L1 of contactor input
Cut an appropriate length of 16 gauge wire. Strip both ends and insert one end into the L input terminal of the Sonoff. Attach a spade connector to the other end of the wire. Plug it into the L1 spade terminal of the contactor.
9. Connect Sonoff N input to neutral
Cut an appropriate length of 16 gauge wire. Strip both ends. Insert one end into the N input terminal of the Sonoff. Connect the opposite end to the neutral wire (white) using a wire nut.
10. Connect Sonoff L output to contactor coil A
Cut an appropriate length of 16 gauge wire. Strip both ends. Connect one end to the L output terminal of the Sonoff. Connect the other end to a spade connector and plug it into the spade terminal of contactor coil A.
NOTE: The contactor coil terminals are located on the side of the contactor. They may not be labeled. If they are not labeled, just assign one to be A and the opposite side to be B. Polarity does not matter.
11. Connect Sonoff N output to contactor coil B
Cut an appropriate length of 16 gauge wire. Strip both ends. Connect one end to the N output terminal of the Sonoff. Connect the other end to a spade connector and plug it into the spade terminal of contactor coil B.
12. Plug in and set up Sonoff
The wiring is done! Now, plug the heater into the wall outlet so that the Sonoff has power. Use the mobile app (eWeLink) to setup your Sonoff. You may want to leave the case open to allow for a better wireless signal.
13. Close heater and test signal
Once the Sonoff is setup, try closing the heater and see if the wireless signal still works. If it does, you’re good to go. If not, you may have to relocate the Sonoff to the outside of the heater case. It’s also possible to add an antenna to the Sonoff, but I haven’t needed to do that yet.
14. Set heater to desired settings
Set the mechanical switches and dials to your desired settings so that the heater turns on when the power is applied. My heater has several different heat intensities as well as a thermostat dial.
15. Add desired automation
Okay, the hard part is done. Now, the fun part.
I use Alexa for nearly everything. Therefore, I named my Sonoff “garage heat”. That way I can say, “Alexa, turn on garage heat.”
I know this is a fairly simple project, but it’s one of the most useful smart home projects I’ve done. I hope you find it useful, too.
This works great for an electric heater, but there’s no reason the same method couldn’t work for other heavy electrical load applications.
Feel free to suggest any modifications/improvements in the comment section below. Thanks for reading!