Controlling 240VAC Line Voltage Heater With Arduino

So I have this old baseboard heater in my mobile home that I'd really like to hook up to the internet. The only issue is smart thermostats are expensive and rarely run on line voltage, so I figured I'd make my own. I have an electrical conduit running two wires with 240v potential from my heater to the spot I'd like to mount the thermostat. Both wires are independently charged with 120v of opposite polarities, and when the two wires are connected the circuit closes and the heater comes on. (I'm sure most of you understand line voltage heaters but I wanted to be thorough.)

Controlling the heater is easy. I found a great Solid State Relay that is more than capable of handling the voltage and current to power the heater. What isn't as easy (at least for me) has been finding a way to power the arduino, no other power wires are nearby and I know enough about electronics, to know I don't know enough about electronics to mess around with 240V AC power without talking someone considerably more knowledgeable than myself about electrical. Would just a normal 240v AC to 12vdc power supply be fine regardless of the fact that both wires are electrically charged? Would the power supply close the circuit, rendering the relay useless?

Another option considering my lack of experience working with AC power, is a 2 in one Relay/transformer like this one on amazon. https://amzn.to/2FUgnwR I'd be fine paying extra to make sure I don't die/burn my house down due to my ignorance. But the electrical for this confuses me more than the two wire setup above. Units like this output 24VAC R.C.W. power intended for smart thermostats. How would I go about powering the microcontroller and controlling the heater? Is it the exact same setup as before just with idiot friendly voltages? Thanks for reading and any and all safety tips would be greatly appreciated, there’s no such thing as too thorough.

Likely that thing produces only enough 24 VAC to close the relay and not much more.

Paul

So you have 240 VAC split phase (120V - 0 - 120V). Does the 240 VAC include a neutral or is it just line to line?

You also mention you want control over the internet? So does where you wish to control things have WiFi on 24/7?

There are several ways to do what you want to do. Since you have 240 VAC you can use a 240 VAC wall wart or if you have a 120 VAC line to neutral the same is true. I have 120 VAC (US) outlets I can turn On/Off over the Internet as well as a few relays which operate on 7 ~32 volts AC or DC which can be used to control any number of things. I use Amazon Alexa but I also use Smart Life and eWeLink. The latter two are free apps.

So it's a matter of you defining in detail exactly what you want to do? Did you plan on using a Arduino to control a temperature set point as in like a thermostat?

Ron

The Amazon relay that you linked to is a very good solution, it can control a heater up to approximately 5000 watts (240v, 22 amps).

You can power the esp32 or 8266 from just about any 240 volt input to 5 volt USB output power supply.

There's no neutral, just the two hot wires. So would a relay and power supply in parallel do the trick? I thought it might be that simple but what keeps the heater from switching on due to the power supply closing the circuit? Is there just not enough current running through those wires to affect something that uses as much power as my heater?

These two wires you speak of, are they connected to the existing thermostat?

No, just the heater

There’s no neutral, just the two hot wires. So would a relay and power supply in parallel do the trick? I thought it might be that simple but what keeps the heater from switching on due to the power supply closing the circuit? Is there just not enough current running through those wires to affect something that uses as much power as my heater?

If there is no neutral available, there is no easy way to get low voltage for your arduino.
The best approach is to see if you can somehow install a separate neutral wire along the two other Phase wires so that you can power a small Mains power supply for your arduino.
I wouldnt advice any other approach using the two live wires.

If there is no neutral available, there is no easy way to get low voltage for your arduino.

Sorry in the UK I have no experience of a split phase 120-120 supply; ( we have 3 phase 240) however,

if (as I suspect) the two 120's have a phase difference of 180 degrees, then the voltage between them is 240 - and you can use a 240V PSU to power the circuit. Perhaps best to make your own with a 240V transformer and additional components to get the votage/s you need, as you dont get a schematic with a wall wart.

The only (minor) issue is getting a ground - which you can easily do with an earth spike; you need an earth for your heater anyway.

I've done something similar - more info here

grapher456: So I have this old baseboard heater in my mobile home that I'd really like to hook up to the internet. The only issue is smart thermostats are expensive and rarely run on line voltage, so I figured I'd make my own.

I can recommend two methods that are not dangerous: a) buy a 433 Mhz remote controlled plug and a 433 sender then control the radiator remotely. Advantage: you usually buy the RC plugs by 3 pieces and can also control other things with the same Arduino.

b) if the radiator has a thermostat, just tape a indicator glow lamp under the thermostat. When you light the lamp, it will heat up the thermostat and by reaction reduces the temperature. You have aperfect insulation, do not need to fiddle with a lot of electronics and don't even need to program an own temperature regulation.

[

johnerrington: The only (minor) issue is getting a ground - which you can easily do with an earth spike; you need an earth for your heater anyway.

Would the metal plating behind the conduit not serve as a ground?

WattsThat: The Amazon relay that you linked to is a very good solution, it can control a heater up to approximately 5000 watts (240v, 22 amps)

Would you be able to tell me how to wire The Arduino up to the 24 vac produced by the Amazon relay? This seems like a much safer option considering the varied responses I'm getting regarding my two phase 240, no neutral mains. and if smart heaters are able to use this for both power and control I'm sure the Arduino can as well.

Most basic simple wall warts are designed around 90 to 240 VAC 50 / 60 Hz input. all you need is an everyday off the shelf wall wart with a 5 VDC output. You can find them with 5 volt 2.0 amp outputs which well exceeds your needs. That will power your uC. Any digital out from the uC of logic high (5.0 volts) will turn on your 240 VAC solid state relay.

Now as to remote control that is up to you. If internet is available it becomes easy. Just make sure you include overload protection like a circuit breaker at your heaters. Here in the US I would include GFCI which I believe goes under a different name in Europe. Also make sure you use adequate gauge wiring. Since I have no idea of your location make sure any national or local codes are abided by.

Ron

I been using these for a few projects: MEAN WELL MDR-60-5 AC to DC DIN-Rail Power Supply 5V 10 Amp 50W, https://smile.amazon.com/gp/product/B005T6SAJI/ref=ppx_yo_dt_b_asin_title_o09_s00?ie=UTF8&psc=1.

Input voltage (vac): 85 to 264

They make a model that is not 3 wire input.

There you go, 5 volts 10 amps with a wide input voltage range. Comes in at $20 USD.

Ron

For all those suggesting that the OP should purchase a wallwart or similar mains power supply:

My understanding of the setup is that only the phase wire is available .

See #4 !

How is he going power the power supply if no neutral is available?

Why do you need neutral?

240VAC to 5VDC converters are readily available: https://www.digikey.com/product-detail/en/cui-inc/PSK-S3-5-L/102-5926-ND/9838239 https://www.digikey.com/product-detail/en/cui-inc/PSK-S5B-5-L/102-5171-ND/9817103

Why do I need a neutral? If the RMS voltage between L1 and L2 is 220 or 240 VAC? Does a 240 VAC heating element require a neutral? Does a 220 VAC motor require a neutral? It matters not if one line is neutral or the lines are L1 and L2. I did suggest the end user comply with any local or national codes and I haven't a clue where the end user is located. Anyway 220 or 240 VAC RMS is just that. That is why I was not concerned with a neutral.

Ron

Would the metal plating behind the conduit not serve as a ground?

Well - if its grounded yes - its not enough that its metal.

In the UK we require an earth WIRE. It USED to be enough to connect to a water pipe; (even a gas pipe!) but since plastic pipe was introduced you cant rely on even a copper pipe as a connection - in case its at some point repaired with a plastic section.

Switch the 24vac relay with another, smaller relay that is controlled by the Arduino. Any of the “Arduino compatible” blue Chinese relays on a pc board will do the job just fine.