I have had a (PIC based) PV-to-Immersion-Heater system running for nearly a year now, and have experimented with different algorithms for efficiency.
Basically my current system reads the Grid cable power over one cycle (120 samples) calculates the PV surplus and fires the Triac as appropriate over the next 15 cycles (i.e. 30 Half-Cycles at 100W each) , giving a maximum of 3 kW with full sun. This works fine and, in summer, gives us several days worth of hot water (we have 2 Hot Tanks, with 2 Triacs) with no Grid power usage.
This system gives a flicker rate of about 3 Hz (17 cycles = 340 mS) which is noticable in our two windowless shower-rooms (less heat loss in winter). While not bothered unduly (we are 300 m from our nearest neighbour - who has no "dark rooms") I have tried the odd strategy to reduce the flicker effect while still retaining maximum efficiency, particularly at low (winter) sun levels.
My latest strategy was to space out the Triac firing evenly over the 30 power Half-Cycles, thus 500 W spare power would trigger the Triac at the Following Half-cycles : 1,6,12,18,24 say, of the 30.
Using a 32 MHz PIC, Table look-up etc for this method was absolutely no problem and it did dramatically reduce the perceived flicker - however ...
It caused the Inverter (Sunny Boy SB3800) eventually to drop out (displaying "Mains Disturbance") and it took some minutes to come back on line. Looking at the mains voltage on a scope it was somewhat spiky and distorted, even with the zero-cross switching, while the equivalent effect with a same power but continuous block of Triac switching is remarkably clean.
This made me think - are there any long-term effects on our Inverters with the varying voltages we are imposing on them with these systems (including the Commercial systems) ? - Has anyone any comments ? My Sunny Boy always hums & groans on a sunny day, and I can detect a 3 Hz pattern when the Immersion system is working.
Could we reduce the effects with some (large !) capacitors near the Triac or Immersion Heater ? Generally I believe mains & large caps are not too good an idea.
Re: What about our Inverters ?
I've never noticed any odd effects from our Nedap inverter when running a Mk2 PV Router (aka diverter) in any mode. In burst mode with anti-flicker measures in place, the operation of a diverter system is no different than slowly turning a 3 kW kettle on & off. In phase-angle mode, it's no different than a bank of bulbs on a conventional dimmer switch. Even in its original mode, with a flicker rate of up to 12 Hz, the inverter never complained, nor did our immersion heater.
When running in burst-mode with anti-flicker measures in place, the rate at which surplus energy is cycled to the dump load is determined entirely by the supply meter. Most meters allow a window of 3600J, which is 1.2 seconds' worth at 3 kW, but some only allow around a third of this.
Having a rapid response time allows the diverter to cycle (flicker) as slowly as the meter will allow. Any pipeline delay, such as predicting the next 300 millisecond's worth of activity, will serve to increase the flicker rate, otherwise you'll be running the risk of straying outside the all-important penalty-free zone.
3 Hz is a very fast cycle rate, and the effect will be very noticeable at nearby lighting outlets. None of the AF algorithms that I've posted operate at anything like this rate.
Re: What about our Inverters ?
"Looking at the mains voltage on a scope it was somewhat spiky and distorted, even with the zero-cross switching,"
That leads me to think that your zero-crossing trigger may not be working correctly. Is the first half-cycle of a block still correct, or is that "spiky and distorted" too? Do you still see "spiky and distorted" when the inverter is turned off? - If not, then it seems that the inverter is trying to correct for dip that caused by switching the load.
Re: What about our Inverters ?
The zero-crossing seems to work fine when switching a long consecutive block of power, e.g. switching at each of 7 half-cycles when 700W is available. In fact looking at the mains voltage adjacent to the immersion there is a perfect entry at the first switch on and a very slight "tail" at the end of the block - but no spikes - it is remarkably clean.
I don't know why the intermittent Triac firing at, say, every 5th or 8th Half-wave was so messy. It certainly smoothed out the flicker, causing (on 16W 2D fluorescent lights) a very slight, relatively high frequency, pulsing which was hardly noticeable. However I shall probably not pursue this any further - I had my doubts when I first simulated it.
I use MOC3041 optos firing BTA41 Triacs.
Incidentally I use a small 8 pin PIC micro (all 85 p's worth) as the overall system zero-cross detector.
This runs at 32 MHz, doing continuous ADC sampling of the mains voltage (i.e. 12v AC - AC transformer) and outputting two pulse trains. One oscillates 0v to 5v with the Positive and Negative mains cycle, transitioning at the zero cross point, and the other gives a positive pulse spanning +/- 20v either side of the zero-cross point.
Thus my main processor dosn't have to worry about any of this, just using simple polling to see which part of the mains cycle it is in, when it's hit a zero-cross and when to "enable" the Triac.
I have also built a basic power monitor which watches the flashing LEDs on three mains meters (PV output, House usage, Grid In/Out) and confirms the operation of the Immersion system - showing a small export for safety.
Re: What about our Inverters ?
I use MOC3041 optos firing BTA41 Triacs.
Incidentally I use a small 8 pin PIC micro (all 85 p's worth) as the overall system zero-cross detector.
The MOC3041 trigger has an internal zero-crossing detector so the processor needs to know nothing about such details. It only needs to know when a new mains cycle has started so that the trigger can be armed accordingly. It gets this timing information from the existing stream of voltage samples so no additional polling is required. I've yet to understand what your PIC is doing.
At 50% power, are you diverting your surplus energy in alternate half-cycles? That would have a large DC-content which could possibly upset your sensors which continuously 'float' towards the point of minimum DC.
Re: What about our Inverters ?
Good point, Robin. This: "I don't know why the intermittent Triac firing at, say, every 5th or 8th Half-wave was so messy." [my emphasis] does indeed seem to imply that rectification is a possibility. He needs to fire for complete cycles, and stay off for complete cycles, to assure that rectification does not happen. Otherwise, apart from his inverter getting upset, the Power Company might join in as well.
Re: What about our Inverters ?
A couple of years ago, when I needed a zero-cross detector for another mains project I breadboarded some of the comparator and discrete component systems but found them somewhat unsatisfactory.
I then programmed a PIC 12F1822 8-pin chip and used this as a simple, single component, "black box" in the project - which also used the MOC3041 & BTA41. The PIC program is very simple but reliable and puts out, via just 2 pins, the three "vital" parameters for any mains Triac system. It even puts out some real-time RS232 data covering max, min & offset values to a laptop if required.
When I later started looking at the PV-Immersion system I just started off using the 8 pin PIC to supply the zero-cross parameters as a foundation, since I had it, to reduce the workload and complexity of the main program. Obviously there are many ways to skin a cat - I went this way.
The main processor does not now need to test any of it's ADC readings for polarity, to establish the cycle end points, or to check for the +/- 20v Triac enable point.
The system currently reads the Grid cable power over one cycle (taking 120 samples), calculates the PV surplus as so many 100W "chunks" and then fires the Triac as appropriate over the next 15 cycles (i.e. 30 Half-Cycles at 100W each for a max of 3kW). Thus a PV surplus of 1300W will trigger the Triac for the next 13 consecutive Half-Cycles, and then not trigger the Triac for the next 17 consecutive cycles.
Thus total elapsed time is 17 AC cycles, or about 1/3 sec giving a very fast response to other mains activity like kettles, or clouds across the sun.
The attached traces show the sampling (blue block) then 700W being switched and then another sampling and 600W being switched. The Traces show current from the CT on the Grid cable and also voltage at the Immersion.
It all works fine. I have Temperature sensors on the tanks so the system can switch between tanks on a sunny day, and I also have a RTC chip so I can set up a timing period to heat the tank from the mains the morning after a dull day to ensure we always have hot water at minimum cost.
If PV power is available I heat the top tank to 65 C but if heating from the mains it only takes it up to 48 C. Both tanks have the usual foam insulation and we have added about another 6 - 8 inches via plastic bags filled with rockwool fluff.
Re: What about our Inverters ?
Thus total elapsed time is 17 AC cycles, or about 1/3 sec giving a very fast response to other mains activity like kettles, or clouds across the sun.
During 17 mains cycles at 50Hz, a 3kW appliance will consume 1020 Joules. Some meters have a range of only 1250 Joules before penalties are applied. This combination seems likely to have difficulties when conditions change.
But it will no doubt be fine for most of the time :)
Re: What about our Inverters ?
And I reiterate the point I tried to make above: 13 half-cycles on and 17 half-cycles off is imposing a dc load. I'm not saying this is the problem, but saying "it works fine" does not mean it is blameless.
Re: What about our Inverters ?
I have 4 sunnyboy inverters (4000 TL 20) and none of them make any noise at all. I run 2no 3kw and 5no 1Kw loads with a version of Robins diverter.