new to arduino - wish to have a wifi controlled water tank heater

Hello everyone, its been a while im wondering about the arduino and wish to find some time to try something with it. I have no experience with arduino, but have some knowledge in electricity and good knowledge in programming. i have in my home an electric water heater (for shower, i belive its a 2500W device), which i wish to turn on/off without actually being at home. i can also make a small app for my phone to send my router a signal that will be forwarded to a specific ip, of my water heater, thats no problem. but what equipment and what are the steps i need to do in order to have such a setup? as im very new to this area, can you help me figure out the equipments and items needed for such a thing? doing something i really need would be the best first experience for me, but also the hardest one, so please advice

thanks

I think you'd start with the heater, a thermostatic switch to turn it on when the tank was cold and off when the tank was hot enough, and a fused power supply with a switch. These parts should all be standard commercial off-the-shelf components. Perhaps you already have this. If not, set this up before you go any further.

The part you add to this is a PowerTail or similar mains switch capable of handling the very large current taken by the heater. Depending what mains voltage you have, this could be anything from 10A to 25A. It would be installed between the existing manual mains switch, and the heater/thermostat assembly. Due to the high currents involved and the fact you'll be wiring in non-standard components that must be rated correctly, I suggest that the wiring up should be done by a competent electrician.

The digital control to your PowerTail or similar will come from an Arduino with a WiFi shield, running a sketch which you will write. I'd suggest implementing it using a simple web server (no fancy web pages needed, just minimal HTML) that lets you find out the current state of the switch and turn it on and off. You might like to include a temperature sensor so that it can report the actual temperature of the water. This would also give you the option of configuring the set point that you wanted the water temperature to be maintained at.

I'd suggest that you design the Arduino sketch so that the heater will be turned off automatically after some period.

I'd suggest you include some form of authentication to ensure that only you can control it. It won't be possible to make it very secure, but you can at least prevent random surfers fro taking control.

Note that if you do add a temperature sensor to the Arduino this does not replace or remove the need for the thermostatic switch. The thermostatic switch is a safety measure which ensures that nothing the Arduino does can overheat the water to a dangerous level. Without that, the Arduino itself and your sketch on it would become safety-critical and that's something you absolutely must avoid.

Well, adding temperature sensor to the story makes too complicated i assume Im not sure even where to start, meaning, what board should i use? can you guide me a little further? the powertail you suggested, i saw it supports current up to 15A. will it suffice? is it actually for wiring the arduino with the wires leading to the boiler? as a protection mechanism, i though maybe having the ability to turn it on but with timer, like 15-30-60 mins and then it auto stops. but its far beyond my knowledge at the moment, as im not familiar with this framework and tools at all. Maybe I should buy all the parts i need for the boiler project, but try it for something much smaller, just to "mess around" and feel its abilities first.

e-r-a-n: Well, adding temperature sensor to the story makes too complicated i assume

A little more complicated, but not a big deal in the scheme of things. Even without that feature, this project is going to be quite complicated and something that you will probably want to work up to in stages.

Really? Its going to be that complicated? because of my complete lack of knowledge with arduino at the moment? its just on-off switch with timer :~

What are you actually trying to do? I assume that your water heater already has a thermostatic switch to prevent it overheating and it sounds like you have power to the heater already controlled by a timer, presumably so you have hot water in the morning.

Do you want the arduino to override the timer?

the boiler has it own thermostat, of course, so it stops heating when reaching some temp i also have an on/off switch i wish to extend the on/off switch to be wifi controlled, so that i can turn it on before i get home, to have hot water immediately without the need to wait half an hour for it :-) if i can get the device to listen on a specific port, with port forwarding and the right packet data, i can turn it on and off remotely that is my intention

Hi,

maybe you should start smaller before you target the heater project.

The Arduino has 5V outputs and at each pin there can be something like 25mA (Milli Ampere). This means you can not just connect your boiler with the Arduino, you would simply fry it if even 1A of current would flow through it.

This means you need something like a relay. The relay is just like a mechanical switch that you press, but instead of physically press it, you can let the Arduino do this job. For this, you need to be able to switch the relay with 5V from the Arduino. This means first you will need to find a suitable relay depending on what comes from you wall socket (110V,220V). Add a safety margin to the relay, so maybe 20A allowed max current. Then you connect the cable from the wall socket to the relay on one side and the heater on the other. Whenever the Arduino sets a pin to 5V (high), the relay closes, which closes the electrical circuit and heating begins.

You can obviously operate this wireless.

If you now have a temperature sensor in the tank, you can control the maximum temperature, e.g. tell the Arduino to keep the relay closed as long as temperature X is not reached. Then you would not need a timer. Then after Y minutes the Arduino can check agian the temperature and so on. The temperature you set is obviously lower than the max. allowed temperature from your tank. I guess the max allowed temperature is something below boiling point + safety margin (80C?) and you usually only need (60C).

But isn't this integrated in the heater? It must be, otherwise the heater would overheat constantly! So your only benefit from having a temperature sensor would be knowing the temperature and maybe have it displayed on your smartphone.

First I would not worry about the wifi part and make it work with the pc connected to the arduino, connected to the relay, connected to the electrical circuit.

if i can get the device to listen on a specific port, with port forwarding and the right packet data, i can turn it on and off remotely that is my intention

Then PeterH nailed it in reply #1. You don't need to bother with temp sensing or worries about overheating though.

thank you for all your explenations, bob & Peter, you made it pretty clear to me what i need, which is the on/off switch which is the relay. and an arduino kit that eventually will connect to the relay, that will do the on/off switching. How can i tell which relay should I buy? The powertail suggested by Peter is capable of 15Amps, how can i tell if its enough? also, which arduino kit should i buy?

e-r-a-n: thank you for all your explenations, bob & Peter, you made it pretty clear to me what i need, which is the on/off switch which is the relay. and an arduino kit that eventually will connect to the relay, that will do the on/off switching. How can i tell which relay should I buy? The powertail suggested by Peter is capable of 15Amps, how can i tell if its enough? also, which arduino kit should i buy?

You need to know the voltage across the on/off switch and the current that runs through it to make sure the relay is bulky enough.

so i guess its either buying a multimeter or knowing the model/specs of my boiler.
i understand that if the relay is 15Amps whereas the boiler is 25Amps, it will fry it and wont be able to switch on/off,
but what happens if the relay is 25amps and the boiler is 15amps?

i have in my home an electric water heater (for shower, i belive its a 2500W device)

This should be ~21A, for a 120 line, or ~11A for a 240 line.

As I live in Israel, which works with 220V, so according to you its 11A+-? So 15amps will suffice?

I don't know relays, so I can't give advice to that but from classical electronics I=P/V where I is your current P is your Power and V is your voltage.

edit: With that said, if this were a fuse for your fuse box you typically only want the fuse to be at 80% capacity, I can't imagine relays being much different. So in this case a 15A fuse would only be at about 75% capacity for your water heater. Again I'm not an export, and I would get confirmation for that.

yes but i dont know for sure its 2.5KW, its an assumption i will just measure both i & v with multimeter but i dont want to wait too long, can i buy a 25Amps relay and get it working even if the boiler uses lower current?

e-r-a-n: yes but i dont know for sure its 2.5KW, its an assumption i will just measure both i & v with multimeter but i dont want to wait too long, can i buy a 25Amps relay and get it working even if the boiler uses lower current?

Yes you can, in fact a conservative engineer always 'de-rates' the specification he uses when obtaining relays and such as you would normally never use a 10 amp contact rated relay on a 10 amp load, but rather use a 20 or 30 amp contact rating for longer lifetime.

Lefty

yes but i don't know for sure its 2.5KW, its an assumption

Use a better assumption and assume it has to use less current then the fuse in your fuse box. I'm not sure of the standards in Isreal, but that we be a 15A fuse in the states. If you can look in your fuse box, find the fuse for the circuit your water heater is on, I would imagine it is on a single circuit, and get a relay rated for that current. If it tried to draw more current the fuse would go first.

e-r-a-n: so i guess its either buying a multimeter

Having a multimeter is always a good idea.

Ok. well, assuming the worst case if its indeed 25A, will such a product be the one im looking for? http://www.ebay.com/itm/Solid-State-Relay-SSR-40DA-40A-250V-W-I-O-3-32VDC-24-380VAC-Heat-Sink-/200879972574?pt=LH_DefaultDomain_0&hash=item2ec56120de Im new to this, so im not 100% sure of how to should even look like.

Also, for wifi capabilties, do i order a specific arduino board, or is it just an accessory i plug? can i use the starters kit for my needs?