Fuelly
Showing posts with label Dump load. Show all posts
Showing posts with label Dump load. Show all posts

Wednesday, April 27, 2011

Dual Power Immersion Heater

The automatic load controller for my immersion heater has been working pretty well.  It turns on and off with the varying power of the Sun.  But it left something to be desired when the battery was starting the absorb cycle.

The battery consumed quite a lot of power, but not all of it.  The immersion heater needed 650W to run, so couldn't.  The result was a period of under utilised solar power in the late mornings, with a trace that looks like this:

Click to view bigger
By modifying the step down transformer supply for the heater, I created a dual power heater.  I step down the AC Voltage from the solar inverter with a 4kVA "tool transformer".  It outputs 110V AC from the 230V AC input.  This runs the 3kW heater element at just 650W.
Under software control from the PC load manager, the first relay turns the heater on and off, while a new second relay selects the power level of the heater, depending on the solar power available.

I added a pair of 6A diodes in parallel (for power handling, as the peak current when the heater is on is about 8.4A).  This converts the 110V AC into half-wave rectified DC.  The diodes are rated at 600V so they are pretty bullet proof.  This has the effect of reducing the power consumption of the heater from 650W to just 350W; measured with an AC plug-in power meter at the 230V AC input to the transformer.

The thermostat switch on the heater ordinarily wouldn't like DC power, as it would cause arcing when the contacts open, and this would soon destroy the thermostat.  But as this is half-wave DC, it still has the periods of zero Voltage in each 50Hz cycle, so the thermostat contacts can open and close as normal without arcing.

I then had to modify the control software to take advantage of the new dual power heater.

I decided to ditch the purely light level & system power level threshold system, for one that attempts to estimate the array power available for driving the heater loads (at two power levels).

Click to view bigger

It has a seed value that is the expected array power (the "system size").  It then applies a self tuning modifier to that base value (plus/minus 200W) and then multiplies that by the measured light strength from the new sensor (as a percentage).  This gives me the estimated "array power".  The "system power" is the real measured output power from the Morningstar charge controller log data.  This includes all loads: battery charge load, other loads (e.g. the fridge), as well as the heater load (if it happens to be on).

By comparing the real power output during times when the battery is likely to be fully loading the array with the estimated "array power", the self tuning parameter adjusts the estimate up or down, so that the estimate gets better.  It has some limits set in the routine, so that it does not tune the estimate at very low light levels that would never be enough to drive the heater load.  It also has some fuzziness in the tuning so that if it is within 1% of the real power, it stops hunting.  If the tuning parameter gets bigger than 200W variance, it starts to modify the base assumption about the "system size", saving the change in a config file for next time the program runs.

Most of the estimate tuning happens in the MPPT bulk charge phase, as that is when the battery will absorb all the power the array can muster, and so the "system power" should equal the estimated "array power".  The idea is that the tuning parameter will compensate for the distributed orientation of the panels (some are East-West, some are South, some are at steep angles, some at shallow angles).  The system will also "learn" how dirty the array is (if there has been no rain for a while, and dust has collected on the panels).

The final step is that when the battery enters the absorption phase, the program looks at the estimated array power and subtracts the current "system power", which includes all non-heater loads plus charge demand, and calculates the "available power" for running the heater load.  If the "available power" is greater than the low (350W) heater setting, but less than the high (650W) heater setting, it turns the heater on, and selects "low power" mode (the diode bypass relay is energised and the normally closed contacts change to be open).  If the "available power" is higher than the high power setting, the diode bypass relay is de-energised, the contacts revert to the normally closed position, and the heater receives the full 110 V AC power.

The resulting power utilisation is more even, with the heater able to use low levels of available power and maintain the tank temperature. 350W is enough to very slowly heat the water, or at least compensate for losses through the insulation.  It all helps.  When it's sunny enough, and the other loads are low enough, the heater can run at full power (650W).

Click to view bigger
The above trace also shows the water heater interacting with the cyclic load of the fridge freezer.  While the recorded system power varies considerably, note that the battery is given priority in attaining full charge and holding a steady float Voltage for as long as possible.

During the absorption and float stages of battery charge, the heater decision process also includes some "array power" estimate tuning.  If the heater repeatedly has to reduce power to low power, the tuning parameter slowly drifts downwards.  If the heater has to be shut off due to low power, the parameter decreases more quickly.  As a last resort, if the battery Voltage actually drops below the float threshold set in the load controller, then a much more severe adjustment of the parameter occurs.  This behaviour means that on clear sunny days, the heater is given priority and has a tendency to stay on.  On days with very changeable weather, the heater progressively errs on the side of caution, becoming less and less likely to turn on and more likely to turn off or remain in low power mode.  This favours maintaining the battery charge level.

Use of a half-wave rectifier at high power (350W is a significant load) is normally frowned upon, as it presents a very non-linear AC power load (only half the cycle is used).  The plug-in AC meter did show a very bad power factor (PF = 0.5).  This would result in power being wasted in the wiring and generator as reactive power (current out of phase with the Voltage).  But the 3kW inverter is stable into any power factor load (inductive or capacitive), and in the end, the source of the power is a DC battery or solar panel.  With the very large capacitors in the inverter input (for surge delivery), the DC source is not aware of the non-linear AC load, and merely sees a useful reduction in load.  The "bad" AC load does consume more of the available VA capacity of the inverter than a good power factor load would, but provided the total VA load is less than the permissible load, no harm is done.

Thursday, May 20, 2010

The Story So Far... (part 3)

Having gotten bored of running up the stairs to turn on and off the water heater, I started looking around for a way to do this automatically.

The answer came in the form of a Velleman kit from Maplins called snappily a K8055 USB experiment interface.  It allows a PC to read switches and sensors and then output signals or turn on / off relay switches.  You can get them either pre-made or in kit form and you have to solder it together yourself.  I chose the kit version as it's £10 cheaper.


After putting it all together, it looks something like this...

The inputs are the terminal blocks on the left (two analogue inputs of 0-5V and four inputs for switches).  The kit actually included little press buttons to test it with but I didn't bother installing them.  On the right are the outputs (8 on/off outputs with LEDs and two analogue outputs of either 0-5V or PWM of 0-100%).

The latter could be used to dim a light or even a heater by varying the duty cycle of power to the load and using thyristor to chop the power.

A CD comes with the board that has the Windows DLL that makes it work and an example program in various languages.  I had an old copy of Visual Basic 6 sitting around and it works fine with this.  To make my program to control the heater, I just took the demo program and modified it a bit.

In order to control the heater so that it only used spare solar power and not battery power, I needed to measure several things:

  1. The voltage of the battery bank.
  2. The mode of the charge controllers (whether they are charging or finished).
  3. How much power the system is generating for loads (including the battery bank).
  4. How bright the sunlight is (to estimate how much solar power is available).
Most of this information is available via the Morningstar charge controllers.  They record this information and it can be read as data via their communications port.  The TriStar MPPT-60 additionally has an Ethernet port so it can be networked.  The main computer in the house is upstairs (conveniently near the water heater) but the solar stuff is downstairs on the other side of the house.

I didn't want to run Ethernet cable all over the house so I used a pair of Ethernet over Power plugs.  These just plug into spare power sockets and then carry data over the house wiring.  Very handy.  This then plugs into an old 10Mbit hub as I also have a couple of computers in the living room and an IP CCTV camera outside.


One of the computers is an old Toshiba laptop that I bought at a car boot sale a couple of years ago for £5.  It works and with a new battery bought off the internet, it even runs better than new.  It only has Windows 98 but I managed to find an old Ethernet card for it - would you believe from another pair of laptops I bought at a car boot sale for £5.  Those laptops were a bit broken but work now and the Ethernet card was free.  The Toshiba can't use modern cards as it isn't Cardbus compatible so I had to find an antique card to use in it.


The Toshiba is plugged into the two charge controllers.  The Ethernet of the TriStar and directly into the serial port on the MPPT-15.  The Morningstar data logger software then records the output and battery state from both controllers and saves it in a CSV file on a network file share (on the PC upstairs).

This data file is read by the program I wrote using the K8055 demo software.  I combine the two sets of output figures for charge Amps from the two controllers and then multiply that by the battery voltage to give a figure for total power generated.  The system records these values every 15 seconds so a graph can be drawn (again by the Morningstar logger software) like this:

The load manager program then takes an input from a light sensor to measure how strong the sunlight is.  The power graphs above only tell you how much power was used, not how much was available.


At first I tried using a light dependent resistor to measure the light but it was too sensitive (they are commonly used to measure how dark it is for dusk to dawn lights).

I tried to cut down the light reaching the sensor by putting it inside a sea shell as these are white and nearly opaque so that they cut out most of the light.  I sealed the sensor inside two such shells with waterproof polyfilla.

Unfortunately, after a couple of weeks, the sensor broke and stopped working so I had to come up with another idea...

This time I used an old miniature solar panel from a AA battery charger and put it in a waterproof box.  I connected it to a 100 Ohm resistor as a load so that the USB A/D input would read the voltage produced as a measure of the power produced and so the strength of the sunshine.

Finally, the K8055 program reads the charge state from the charge controllers (MPPT, Absorption, Float, Equalize, or Night) and uses all this information to try and estimate when there is enough solar power available to charge and keep the batteries full while turning on the water heater.

Here you can see all the information about the solar input (sun strength), power produced by both charge controllers combined and the battery status, along with the information that the water heater has been running for a total time of just over two hours today (it was a bit cloudy).

The output of the K8055 interface card drives a miniature 12V mains relay that just fitted inside an extension lead socket so that the heater (via its 230V to 115V transformer) just plugs into the controller.

I installed a digital thermometer on the water tank (cutting though the foam insulation to glue the sensor on the tank itself about 1/3rd the way down from the top).  For every 10 minutes the water heater runs on solar power, it conveniently increases the tank temperature by 1'C.  Some days in May, the heater can run for almost 6 hours, raising the water from 15'C to over 50'C.

Tuesday, May 18, 2010

The Story So Far... (part 2)

Originally, I just wanted to run my work laptop on solar power.  I thought, "How hard can it be to power a 30W load for 8 hours a day, every day?".  Turns out the answer is, "pretty hard".

The problem is that solar power is very variable and unreliable.  Some days you get loads other days you get nearly nothing.  The batteries help but they are fragile beasties and if not kept charged up fully will soon die (like in a matter of days if left completely flat).  So you are always balancing using the stored solar power in the batteries with not using so much that you kill them.

One thing this leads to is any big constant loads like the water heater are very difficult to run.  Even if you've got enough solar panels installed to run it, you will almost never know if you've got enough solar power coming in to run it.  If not, then the batteries start to drain and you risk not having enough power for the night.

The first problem is that water heaters use an enormous rate of power consumption (typically 3kW).  I've only got 1.8kW of solar panels.  The answer was to reduce the power used by the heater.  The easiest way to do this is by reducing the voltage fed to it.  At 230V, the heater will use 3kW of power.  At 110V, it will only use about 650W.  It will of course take much longer to heat a tank of water at this rate but in the summer, you can count on up to 6 hours of solar power on a good day... More than enough to heat a tank of water to 55'C.

I found an old tool transformer at a car boot sale (I love car boot sales - why buy new when you can buy randomly old?).  Conveniently, this does just what I need; converting 230V solar power to 110V.  So now I only need 650W of reliable solar power to run the water heater.

It wasn't as bad as it looks... Honest.  Just flaky paint and some external rust.  The guy let me have it for £15, not bad considering it was a custom wound 4kVA unit - more than man enough to run a water heater continuously without getting hot or catching fire or 'owt :)


With a bit of Hammerite, things were looking a lot more ship-shape (or at least transformer-shape).

And then off it went to its new home in the airing cupboard.

That leaves you with problem number two...  You could turn the water heater on and off by hand while watching the power levels and the window for clouds to appear and spoil your fun.  I did this at first but quickly grew tired of running up the stairs to the airing cupboard.  So what was needed was an automatic way to measure the solar power, the condition of the batteries and then turn the water heater on and off so that you keep the batteries charged up and only use incoming spare solar power to heat the water.  In off-grid living, this is called a dump load controller.  Something that takes all the spare energy and dumps it somewhere useful (water heaters are the usual dump load of choice).

Coming up in Part 3... A whole lot of bodgery involving a kit from Maplins, a doorstop laptop, some retro 90's software development, seashells and polyfilla...