I have the below portable electric heater, but I would love to control it's start AND stop time using an Arduino. As-is, it does not come with a stop feature. SO, I have a burning question. How can I get an Arduino to start and stop this heater at specific times of the day?

As you can see, it does have a start time, but it does not have a stop time. The power button is a simple push button. I suspect I would need to 'interject' into that and the board by using a switch? Apologies if the terminology is off, but I'm very green. Where would a noob begin?

-EDIT- The unit is always off when it's plugged back in. That likely means I cannot put a timer on the power cord.

enter image description here

  • 1
    One important point to clarify: if you plug it out then plug it in again to main power (with the power cord), in which state is it, on (heating) or off (waiting for someone to push the on button)? – jfpoilpret Mar 19 '14 at 6:54
  • A lot of newer devices with soft switches like this, unfortunately, don't work when turned on. A step backwards. – Cybergibbons Mar 19 '14 at 8:01
  • @jfpoilpret The unit is always off when plugged back in. I've update the question. – Jose Leon Mar 19 '14 at 11:06
  • 1
    Off when power returns is a failure mode with safety in mind. It would be wise to make sure your timer device replicates this behavior. – Dennis Williamson Mar 19 '14 at 13:48
  • Easiest: External relay or solid state relay. Relay defaults on. A' (Arduino cct can detect current draw, turn relay off/on, be programmed to either stop time or run time). || Set external A' timer to desired time. A' sets relay ON. | Set heater to desired start time. When heater start A' sees current and starts timing, or in time of day mode just turns off power at correct time. || This keeps all circuitry external. – Russell McMahon Feb 20 '15 at 23:59

Would or should begin? Don't fiddle with the internals of the heater.

Set its switch to the always on position and control switching on and off with an external relay. Make a box that has plenty of room (you can reduce size at a later moment), a power cord, a mains adapter for your Arduino and a mains outlet in which you can plug your heater.


  • an RTC (real time clock) breakout to keep accurate time
  • optionally a 7 segment display to display date/time. Just make sure it has a driver chip on it so you don't need your Arduino to multiplex the individual LEDs
  • couple push buttons to configure the device
  • a relay rated for the maximum power of the heater to turn it on/off, that can be driven from 5V. Possibly needs a transistor and flyback diode to be controlled from an Arduino GPIO line.

And be very careful when experimenting with mains power, it can be leathal.

  • The unit is always off when plugged back in. This is likely why a timer on the outlet won't work. I've updated the question. – Jose Leon Mar 19 '14 at 11:07
  • Opto coupled relay would be safer. Or use something like this from spark fun sparkfun.com/products/10747 – lxx Jan 1 '15 at 7:43

I don't know if that heater will work for sure with this approach because the buttons are weird. However, I am 99% sure this will work.

(From http://keshavsaharia.com/2012/12/01/coffeeduino/)

Basically here's what you do:

  1. Disassemble the control panel to find the PCB where the buttons are mounted. Find which button you want to simulate a press of.
  2. Find the solder joint where the button meets the PCB.
  3. Solder a wire to the two terminals that are connected. Some buttons have three or four terminals: look at the traces on the PCB to see which buttons are connected.
  4. Wire the relay with the two wires connected so the relay acts as a switch.
  5. Make the proper connections to the Arduino board to control the relay.

In code, you can just turn the relay on for a quarter of a second or so. Then, the IC on the heater will react like you pushed the button.

Make sure to seal all of this up and make sure you don't accidentally short out any of the wires. I would say to also isolate the Arduino and relay to make sure that you don't electrocute yourself at all if something goes wrong.

  • +1 This is (probably) a good solution if you are competent at delving inside mains powered gear. It may void your home insurance :-(. – Russell McMahon Feb 21 '15 at 0:22

Use the Arduino to set the start and stop time. Always leave the heater switched on and use something like the 'Mains Switch widget' from SF innovations to control the mains. This unit has a mains relay, is fused to protect against fire and is enclosed in a plastic case. http://www.sf-innovations.co.uk/mains-switch-widget.html

  • Thought about this, but this particular heater does not remember it was left ON. Therefore, each time it gets unplugged I even have to reset the clock (since it has time based turning off/on). – Jose Leon Sep 17 '14 at 23:54

To be safe use a device like the power tail from spark fun(basically a sealed relay unit, ready for you to connect to the arduino)

Much easier and safer if you don't have any experience working with 120V/240V

uses a 3-12 input to switch 120v up to 15A https://www.sparkfun.com/products/10747

  • Thanks. I did consider this as well and would be a good solution in some cases. With this particular heater, it always starts as OFF when its plugged in, regardless if it was ON before power was cut. Therefore, the Power Tail would not work here. It is a good product and I am considering it for other projects. Thanks for the recommendation! – Jose Leon Jan 11 '15 at 23:59

The following will work and meets the requirement that the heater does not auto turn on when powered up. You need to turn the heater on manually, so no different from existing, and this then allow you to either

  • Power it down at a preselected time of day, provided the Arduino is able to keep track of time, or

  • The Arduino will turn it off a set period after it has started to heat.

The latter is easier to do and meets the need well enough.
The only technical requirements are

  • Able to sense current drawn by heater.

  • Able to turn a heater control relay on/off

  • Able to set or select a time delay on Arduino.

Of these, the current detection is hardest and even then, not very hard. Possible means include:

  • Current transformer connected to heater lead.

  • Opto isolator with LED in series with lead with suitable parallel resistor across opto LED to drop enough voltage to trigger opto on voltage peaks when heater is on, and backwards diode across opto LED for reverse mains cycles. This provides a series of pulses to Arduino when heater is on.


Arduino controlled external relay or solid state relay.

Some means of detecting that heater is drawing current - timer mode only.


Arduino cct can:

  • Detect current draw.

  • Turn relay off/on

  • Be programmed to either stop time or run time.

  • Drives external relay or solid state relay.

  • Optional: Relay defaults on.


Set external Arduino timer to desired time.
Arduino sets relay ON.
Set heater to desired start time.
When heater start Arduino sees current and starts timing, or in time of day mode just turns off power at correct time.

This keeps all circuitry external.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.