Control my immersion heater.

OK, this is probably a bit of a weird one. I'd like to switch on my immersion heater depending upon how much power is being generated by my solar panels. But I'm not sure about the best way to switch something as high load as an immersion heater. I'm also going to need to figure out how to interact with my solar array (using bluetooth), but this should not be too much of a big issue as software exists that can handle this for Windows. I might have to ask Sunny Boy, who are the manufacturer if they can offer any pointers. I'm thinking of learning Python for this project, but I'm already pretty good with Perl so it might be better to stick with that. I've been wanting to learn Python for years though, so a great opportunity. The reason this makes sense, is because on the current electricity tariff, we get paid for 1/2 the power we generate regardless of how much we use. Can anyone give me pointers as to the best thing to hook up a relay that can handle, at a guess, around 16 amps (might be 13). I'll need to check.As an aside, I'll get it to store the historical data for my solar array so I can see how much I'm generating. Perhaps I'll plug that into Cacti or similar for graphs, rather than trying to re-invent.

Lots more questions to follow, but I think I'll stop for now.

Many thanks in advance. I'm just looking for general advice right now, so that I know where to start reading and what works / doesn't. Should I be looking at USB relays, or something else?

You will almost certainly have to use a relay as an immersion heater is a high current load, a typical UK immersion element is 3Kw which is 13A current draw. An immersion heater typically has its own thermostat to prevent over heating the water so essentially all you will be able to do is essentially switch the supply off when the solar panels are not producing the amount of power you desire.

You will need a high powered relay that would be controlled by a darlington driver or similar. For this kind of task, unless you want to control it remotely over ethernet the Pi is somewhat overkill and perhaps a simple microcontoller like an Arduino or PicAxe would be the more sensible option.

I suspect those plugs cannot be able to sustain the 3000w load for long. I believe Immersion heaters need to be hard wired to meet build regs as well. I have seen (e.g. done recently) melted a 13 amp socket from constant 2800 w load.

Another solution (more dangerous?) could be to use several relays in parallel to meet share the load. 10 amp relay are cheap and easy to come by and a 4 relay board for the ardunio and other microcontrollers is available with optoisolators. What do others think about this? (needs to be properly insulated.

The solution I'm using is a 240VAC / 25A solid state relay which switches the power between my existing 16A mcb at the fuseboard and the existing wiring so no problem with overload or meltdown of 13A plugs.

These relays are fairly cheap, I.m using one from Crouzet, but you can get alternatives on-line for £20 ) [http://www.tmswebshop.co.uk/buy/Solid-State-Relays-SSRs.html?gclid=CJeV59qo5rACFSghtAod3lPFvA#aPROSWITCH_23_23LC].

Because these relays operate from low voltage DC (mine is working on 9V) and consume almost no power, they are pretty safe, so all I need to do now is sort out the control..

I'm experimenting with a current sensor and a small op amp, but was wondering how to connect two current sensor outputs (amplified by the op amp) to a PI so I can compare generated power with consumed power and then switch the excess to my immersion via the relay??

take a look at the Yocto-Amp Product its AC up-to 17amps and can switch a lower rated Yocto-Relay to switch a Higher rated Contact say a 240V coil 16amp Contact should you not wish to install a 24V or 12V transformer these can all interact with each other with little programming

how ever it is worth noting right now RPI are trying to Fix there USB issues before the module can work correctly," Yoctopuce modules " work on all Versions of Linux on every platform Except the Raspberry Pi the Foundation are a little slow in solving the issue we made them aware of nearly two months ago now, but once fixed this makes for a cheap way to control things like your immersion heater.

I'm new to this forum, but have been looking to find out who makes this box. The owners of the house weren't in when we were doing some wiring, but this thing controls a standard 3kW immersion heater directly. The panels are only 2kW capacity, so my guess is that some electronics must turn down the mains to the heater element. There is nothing between the box and the immersion heater, which is rated at 3kW.

How can you run a 3kW heater with a 2kW solar panel, and still not draw grid power? Beats me.

But anyone know who makes this little unit?

cheers,

fred

Solar Immersion heater controller box, taken with my phone- sorry about the quality...

domesday wrote:You will need a high powered relay that would be controlled by a darlington driver or similar.

I just searched Farnell, and there are quite a few cheap relays capable of switching loads of 16A, 20A, 30A etc. with a 5V coil. They tend to require 180mA onwards (though lower for 16A) to energise, but could easily be driven from GPIO with a transistor.

I've seen darlington drivers mentioned before in relation to GPIO + relays - is there any particular reason why? I'd have thought there are enough transistors capable of driving 5V coils, even limiting base current to ~3mA. I could be missing something here.

You could use a transistor with an appropriate current rating to switch the coil but a darlington driver is easier in many respects because the base current requirement is tiny and something like the ULN2003 or ULN2803 has the clamp diode built-in. If you want to control more than one relay, having this in a convenient package is tidier than a handful of transistors and diodes.

While overseas (From memory, I don't have the details with me in UK) a few months ago , I used ebay to look up solid-state relays to drive immersion heaters. Mine were supplied from Hong Kong. General advice seems to be to use one able to handle at least twice the standing mains load and mount it on good finned heat sink (from the same ebay source). Mine was for a 40A load (the mains voltage is 110V) and was direct-driven from the GPIO pins of an Arduino. The heater was powered via a dedicated circuit-breaker.

The best solution to achieve this is to use an affordable and dedicated immersion control switch like one from http://solarimmersionheaterswitch.co.uk . The Mark II version of the solar immersion heater control switch monitors both the PV output and the house load via a single clip on sensor clipped on the grid lines. The switch calculates the net difference between the production and export to turn on the load based the settings. From what i understood, the load trigger settings on the switch could be adjusted from 500W - 10kW. I have one of these installed and really happy. It will turn on my immersion when I'm exporting 1kW and turns it off immediately if i turn on a kettle or a washing machine. I also use the 3 kW power reducer from http://powerreducer.co.uk to reduce by 2 kW immersion to a 1.5 kW . attached the pic of the unit take from website

domesday wrote:You will need a high powered relay that would be controlled by a darlington driver or similar. For this kind of task, unless you want to control it remotely over ethernet the Pi is somewhat overkill and perhaps a simple microcontoller like an Arduino or PicAxe would be the more sensible option.

Hi, sorry to take so long to come back. Wouldn't an Arduino cost about the same as a rPi anyway, and not be able to handle the bluetooth (needed to talk to the SunnyBoy Solar) + producing the historical graphs?

domesday wrote:You will need a high powered relay that would be controlled by a darlington driver or similar. For this kind of task, unless you want to control it remotely over ethernet the Pi is somewhat overkill and perhaps a simple microcontoller like an Arduino or PicAxe would be the more sensible option.

Hi, sorry to take so long to come back. Wouldn't an Arduino cost about the same as a rPi anyway, and not be able to handle the bluetooth (needed to talk to the SunnyBoy Solar) + producing the historical graphs?

and the Rpi can present a webserver so you can control over the internet/smartphone

I used to use a debian server using a bluetooth to connect to my SunnyBoy 3600TL. Their scripts then pulled off the current power, and I used my script to pull this info out of the syslog. If the power was over 1800W then the 1Kw immersion is switched on. If its below 1200 then it switches off. It also adds up the "time on" and then another cron job sends an email later on in the day to tell me how much free hot water I have had that day.

Unfortunately the server used its smoke chip I now have a Pi on order, and will implement the same thing again, but on a much lower power device!!!

If anyone is interested then I can post the final scripts I use on the Pi here.

I'm the OP and personally I have just fitted a basic 16A timer to the immersion and it comes on at 10:00 every day and goes off at 16:00. I know this is not the most efficient method, but this does give me enough hot water... I think on days like this, if I was relying on generating over X Kw to turn on the immersion, I'd be having a cold shower and the kids would not have a bath for most of the winter.

I know what I've done is not much of a "hack", but it does server my needs and over the summer months I'm getting loads of free hot water (well, perhaps not so much THIS summer just gone). I think on balance this is the best solution for myself.

# Now to add the time up.# Check file as power could have gone over 1500 but now 1400.if [ -f /tmp/on ]then echo "0.25" >> /tmp/on_time mail -s "On "$power keith@email.co.uk < /home/keith/emailfi

Its pretty simple. The sma tool brings all the info into the syslog. There are lots of temp files used, so I could check on the progress. The line...echo -e "\xFF\x01\x01" > /dev/ttyUSB0.. switches the immersion on, and the line with \x00 in it switches it off.

#!/bin/bash# To calculate the total power for the day, then email out, and zero the file`value=`cat /tmp/on_time | awk 'BEGIN{total=0} ; {total += $1} ; END{print total}'`# echo $value# make emailecho The immersion was on for $value hours today. > /tmp/email

# Now to emailmail -s "Free hot water for "$value keith@email.co.uk < /tmp/email## return the score to zero for the next dayecho 0 > /tmp/on_time

# and delete the "on" time filerm -f /tmp/on

If you want anymore info then please reply.

Once I get the Pi going then I will post the scripts. I will get the cron job going every 5 minutes, and change the "add time".

Also this assumes that the following is setup, bluetooth, email, smatool, ip addresses, etc, etc...

# Now to add the time up.# Check file as power could have gone over 1500 but now 1400.if [ -f /tmp/on ]then echo "0.25" >> /tmp/on_time mail -s "On "$power keith@email.co.uk < /home/pi/emailfiroot@raspberrypi:/home/pi#

root@raspberrypi:/home/pi# more email.sh#!/bin/bash# To calculate the total power for the day, then email out, and zero the file`value=`cat /tmp/on_time | awk 'BEGIN{total=0} ; {total += $1} ; END{print total}'`# echo $value# make emailecho The immersion was on for $value hours today. > /tmp/email

# Now to emailmail -s "Free hot water for "$value keith@email.co.uk < /tmp/email## return the score to zero for the next dayecho 0 > /tmp/on_time

# and delete the "on" time filerm -f /tmp/onroot@raspberrypi:/home/pi#

I just need to get the Pi into the loft and connect the USB relay, test it out and update the script is the USB port is wrong. Then I will have the the "free" automatic hot water again. I have also left the cron job at 15 minutes. I might tweak it later.