Checking the operation of my Mk2 Diverter

[This comment was originally posted under "Robin's Mk2 Code variants and associated tools."  by happyf
As the question is not about the code variants and tools, but about operation of the diverter, it has been deleted from there.  Moderator - RW]

Hello everybody,

As a French user of Mk2 based code, I need some help.

I have "home made" a board for diverting surplus, the differences with MK2 hardware is the using an SSR instead of moc+triac for the output, and actually not using display (ic2 wired, but not use for the moment) so different pins in out.

I don't use anti flicker mode and display utilities, so it's not in the code.

That system works, I just have a problem, the export is too high.

The monitoring is done with 4 power meters, PV prod, consumption, surplus, load. (I can  follow what's happened)

That shows me, that works, but the consumption while diverting surplus is not 0,  so I want to fix it.

I try a lot of thing in the code, but I didn't solve the problem.

Robert Wall's picture

Re: Checking the operation of my Mk2 Diverter

Is your controlled load (water heater?) able to absorb all the PV power?

Is your SSR working correctly?

Is your installation single phase or three-phase?

Robin's diverter is designed to work by measuring only the nett power at your grid connection. That is the only quantity that it needs to work correctly. Which of Robin's sketches are you using?

You write "The monitoring is done with 4 power meters, PV prod, consumption, surplus, load."   Do you mean that you are measuring these 4 quantities and then adding the numbers together? If you are, I think this is where your problem lies. You can have all the other quantities to display for your information, but you must not use those in the calculation. You must use only the nett grid current to control the load, because the sketch works by controlling the SSR to balance the power to zero. Have you followed Robin's instructions about where to place the current transformer to measure the power? - see Part 8 of "Diverting surplus PV Power, by Robin Emley".  In his diagram "Consumer Unit" is the UK name for a fusebox or distribution board.

To be clear:

House load > PV Generation:  Energy is imported, Controlled load is OFF.
PV Generation > House load & PV Generation < (House load + Controlled load): Controlled load is switched ON/OFF to balance.
PV Generation > (House load + Controlled load): Controlled load is ON, surplus energy is exported.

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

Hi Lemonnier,

I agree with all of the comments that Robert has made. 

The simplest Mk2 Router sketch is called Mk2_PV_Router_mini_3.ino  There is a link to this sketch on my Summary Page   This sketch has no display or anti-flicker mode, it just diverts all surplus power so that no energy is exported.

Regards, Robin

happyf's picture

Re: Checking the operation of my Mk2 Diverter

Hi,

my explanations are not good, so you can see in this picture what is really happened.

First graph is the load (1500w heater), second is power meter on surplus (exported power), the third is power meter on consumption.

What i wanted to say is that the consumption is never at 0, so too much diverted surplus, however there is little export.

Strange, isn't it ?

 

Robert Wall's picture

Re: Checking the operation of my Mk2 Diverter

I am sorry, we need more information about where and how you measure your power. We cannot help you if you do not answer the questions.

happyf's picture

Re: Checking the operation of my Mk2 Diverter

For more informations,

-my installation is single phase

-the SSR is a D2425, and it seems work well

-the load is a 1500w water heater

-tests voltage and current are ok

-for the monitoring , all power_meters are plug to a "web energy supervisor"

-the MK2_PV_Router_mini3 is the first code i try, same reaction.

-tests with a 60w bulb are about 66w in the load (it is probably the problem)

So the problem maybe calibration,

i 'm trying again the bulb test with calibration powercal_grid set to 0.05 (instead of 0.0435), it seems work better (60w max in the load) but not sure that fix the problem.

Just a question for Robin, in the MK2_bothdisplay code, what is the better way to reduce a little the diverted power?

Thank

happyf's picture

Re: Checking the operation of my Mk2 Diverter

yes of course Robert,

more details:

the ct1 is on phase just before the power_meters at grid, in the good way and the system start at the good time.

the ct is a SCT013

the board is in 5v, the voltage is taken from a coil of a 2x6v transformer, the  arduino is a nano board

a picture of the installation, the ct1 is on the right, the other ct is plug to the supervisor on the load (but no really used)

The Mk2 is were you see the lcd, the SSR is next the plug.

For driving the SSR , i recently modify the wire(it was wired like triac output, active low), and reverse the output logic , active high (but it was not a problem).

i will show the schematic diagram soon.

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

happyf, the sketch that you are asking me about, Mk2_bothDisplays ..., has not been released on this forum.  If you want to ask questions on this forum, you should be using one of the many Mk2 sketches that I have released here, such as Mk2_PV Router_mini_3.  Then the other readers will know what you are talking about.

If you want to ask me about any of the sketches that are on my website, you are welcome to do so using the email addresses on my Shop page.  Those email addresses are intended for customers of my website.  The sketches on my website are intended for use with the PCBs that I have designed.

My standard powerCal figure of 0.0435 is only correct for a particular arrangement of hardware.  It would not be the correct value to use for an Arduino which is operating at 5V.

 

 

happyf's picture

Re: Checking the operation of my Mk2 Diverter

You're right Robin, sorry for that mistake,

this code is  particular for your PCBs.

I will focus to the Mk2_PV Router_mini_3 code, the float "safetyMarging_watts" can help.

 

Robert Wall's picture

Re: Checking the operation of my Mk2 Diverter

Happyf,
I think part of your problem might be the way that your meters work and the way that the diverter works are interacting. To understand fully, you should read in Building Blocks about Energy Meters. Briefly, if your energy meter uses a smaller energy packet than the diverter, then you will register an energy flow even though the overall nett flow over a longer time will be zero. Even if the meter's energy packet and the diverter's energy bucket are the same size, if they loose synchronism for any reason you will see a small amount of energy registered.

Secondly, although the diverter will work with very small loads - like your 60 W lamp - it was not designed for that purpose and you will see much better performance with your real load, the standard UK water heater is normally 2500 W - 3000 W. Robin's published circuit schematic expects your current transformer to be a SCT-013-000 - if you are using a different one to this, that might also reduce the sensitivity of your unit and give rise to balancing errors. To put it a slightly different way: if you cannot measure the current accurately, you cannot balance the current accurately.

If your 5 V supply is stable, then I think your system should work correctly. If you think the problem you have is with the diverter interacting with the meters, then you might find it necessary to reduce the size of the diverter's energy bucket:
int capacityOfEnergyBucket = 3600; // 0.001 kWh = 3600 Joules
although if you do reduce it, you will increase the switching frequency and that might give rise to annoying flicker for you and anyone else who shares your electricity supply.

happyf's picture

Re: Checking the operation of my Mk2 Diverter

thank you Robert for these explanations,

it probably corresponds to observations.
If I watch the two meters (surplus and consumption) when the MK2 is on, they do not blink at the same time of course, but they blink. The recording  data, there is export and consumption and at the same time. (a little over consumption)
The problem is probably that these meters (identical) do not have the right response, bad interaction as you say.
The current transformer is a SCT -013 - 000

Test with bulb , the 60w simulate  a surplus, it's just a test to see what's happen with the load (load is always the 1500w water heater)
The heating resistors in France are usually the same size as yours, but mine is the extra resistance of a thermodynamics.

The results are not significantly different according to the used codes and multiple tests, so the problem may simply be that the energy bucket is not in agreement with these meters.
This is something that I had not thought of. this is a good way to work.
The system works, I must just make the consumption meter does not count when the MK2 is on (some little export is not important). I currently have PV 1Kwc with very little surplus, but I want to go to 2Kwc, so ...

The true power meter of my energy provider is 100m from the house, and model is different from those in the house, impossible for me to know how it react.

As I said, I'll start from zero with mini3 code to begin with, and with your guidance, to ensure that it works the way I want, and later adapted to my needs for lcd (I2C) and monitoring.

The works of Robin are excellent, thank you for that.

thank you both, and sorry for my bad English (Robin certainly recognized me, isn't it?)

Robert Wall's picture

Re: Checking the operation of my Mk2 Diverter

The only meter that matters is the one that belongs to your energy provider. If you have the diverter in balance, that is, it is switching the load on and off every few seconds, then your supplier's meter should be reading zero import and zero export. (Maybe the LED will be on continuously.) When that happens, it does not matter what your own meters read, because what you pay is not determined by those.

happyf's picture

Re: Checking the operation of my Mk2 Diverter

The meters in home are just different models, but they are use by provider as mines (in france just 2 or 3 models are generally used at this time, Sagem and Landys, but a new generation is coming soon,  Linky)

a sort of serial communication is used in france called "Téléinfo" witch show the different "index"and informations of the meter ...

...ok, it's difficult to explain my installation, so look at my home : IP=90.92.203.8,  user="guest"   or   "invite" , no password (tell me if there is problem)

I can not be more transparent, lol

The meter of provider works with index (like one in the houseand other on pv) the one wire in export way react in pulse.

The provider program the meter for different way to bill ,is it deferent in UK??

My provider meter is unfortunately "defective" , the link is not good, not suitable.

i think it will better i post the schematic diagrams soon.

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

If I watch the two meters (surplus and consumption) when the MK2 is on, they do not blink at the same time of course, but they blink. The recording  data, there is export and consumption and at the same time. (a little over consumption)

If these meters are connected in parallel series, one in each direction, that behaviour could be correct.  

The simple Mk2 sketch, Mk2_PV_Router_mini_3.ino can only work in 'normal' mode, so the load will cycle on/off very quickly when there is any surplus power.  If your test meters completely ignore any current that flows in the reverse direction, then each meter will measure an equal amount of forward flow.  But if they each have a sweet-zone, then they should not record anything because the energy state is only moving up and down by a small amount.

happyf's picture

Re: Checking the operation of my Mk2 Diverter

Here are schematics diagrams, it's wired like that:

The CT is clamp before the export meter.

Robert Wall's picture

Re: Checking the operation of my Mk2 Diverter

I think that is all correct, and as Robin writes, with the import and export meters wired in series, then when the diverter is "in balance" I would expect to see both meters reading the same (or very nearly the same) because equal amounts of energy are transferred every few seconds between import and export so as to maintain a long-time balance of zero. Again, going back to the "Energy Meters" page, if each meter has an energy packet ("sweet zone") that is smaller than the diverter's "Energy Bucket", then each will register one or more units as the energy level in the bucket rises and falls, even though the bucket never empties completely nor fills completely.

happyf's picture

Re: Checking the operation of my Mk2 Diverter

Yes , i have read the" Energy Meters" page. so i have to check what 's happened to the provider meter when MK2 is running. This meter is not the same,  maybe his "packet" is different. As you say, it' the most important .

About the meters inside, i will try to check sweet zone, it's interesting.

For the energy provider one, it's more difficult (too far), but i have to.

merry Christmas

 

 

ianjm's picture

Re: Checking the operation of my Mk2 Diverter

Hi everyone - a merry Christmas to you all

My setup uses an SSR to control my divert and has been running well for a long time - the software is a variant of full flicker mode (I don't get any flicker).

When I was testing I found that the SSR was very hit and miss if you tried to set the control at the zero crossing point.  This was even worse if the control was switched to off during the negative cycle.  I found that I had very bad leaking as the SSR was missing the trigger point and staying off.

My solution was to move the decision point on whether to fire the SSR to 10% before the end of the negative cycle.  I also removed the off switch on the negative cycle.  The effect is to pre-arm the SSR and it switches at the zero voltage point.  Worked perfectly after I made the change.

Have a great new year everyone

Robert Wall's picture

Re: Checking the operation of my Mk2 Diverter

That sounds as if your SSR, Ian, wasn't playing by the same rules! Robin did start his development with an SSR, but changed to the MOC3041 trigger. He does in fact arm the trigger during the positive half cycle, so it fires (or turns off) on the negative-going zero crossing. Could it be that your SSR always wanted to fire on the positive-going crossing only?

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

Yes, for the early Mk2 sketches, the trigger was armed when the voltage level had reached a particular voltage value beyond the zero crossing point, e.g. 50V, which involved a voltageCal parameter.  Later, I realised that it's simpler to do the arming when the sample count within each mains cycle gets to a particular value, such as 3.  The effect is just the same in that the trigger is armed during the +ve half of the mains cycle so the triac will fire (or not fire) at each negative crossing point.  My Mk2 code only changes the state of the trigger every mains cycle, so the triac will only change in whole cycles too.  This prevents the introduction of any DC component.

ianjm's picture

Re: Checking the operation of my Mk2 Diverter

Since SSRs have there own zero crossing detect circuits it seemed sensible to me that pre-arming prior to reaching zero was the simple solution and it works.

I never tried switching on the negative cycle but it should work as there is nothing in the SSR spec that says it should not.

ianjm's picture

Re: Checking the operation of my Mk2 Diverter

Happyf

You are using the same SSR make and model as my setup. You have a Crydom D2425 and I am using a Crydom 2450 the only difference is the maximum current handling.

It would be be easy for you to test if your switch on signal in the positive cycle are arriving too late for the SSR.

Set up the following - using a light bulb as a load

In your sketch comment out where you switch your SSR on/off
In the negative cycle switch off the SSR at >75% of the cycle count
in the positive cycle switch on the SSR after the the startup timer has elapsed - the same place as you are doing it now would be ok.

If the light is solid on after the startup period then your problem is not with the SSR

If the light does not stay full on then you have the same problem as I found - your on signal is coming after what the SSR thinks is the zero switching point.  My bulb flickered but was never solid on.
To test this - in the negative cycle after the startup timer has completed - switch on the SSR at 90% of the cycle count (make sure the >75% off does not interfere with the 90% on).  This should give a solid on light.
I fixed my code by checking for switch on/off at 90%. of the cycle.

With an SSR you could set the ON for the SSR at any time it will only switch the mains at zero - however it would be best to avoid using mains half cycles - i.e. restrict your on/off code to one half of the cycle you will then get full cycles of on or off.

Hope this helps

Ian

happyf's picture

Re: Checking the operation of my Mk2 Diverter

Thank you Ian,

i 'll test how react the SSR as soon as possible. This SSR works like yours, so certainly same problems.

I 'll also make an output board with the MOC and the triac, as it had to be at the beginning. And i'll try to put a LDR to the provider meter (far 100m), not sure that will work.

thank you for help

Franck

 

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

If the output stage is not behaving quite as intended, it may not actually matter.  Provided that the control circuitry can turn the load fully off and fully on when required, the overall performance should be OK. 

If the load does not come on during a particular (half or full) mains cycle as intended, this may not affect the overall performance because no power will have been diverted hence the level of the energy bucket won't change.  That energy can then be consumed at some later stage.  Providing that the "sweet-zone" of the meter is never exceeded, the overall operation should remain penalty-free.

Some months ago, I was sent a variant of the Crydom D2425 which had different terminals and slightly different electrical properties.  When I spoke to Farnell about this, a replacement item was sent which behaved just as expected.

Robert Wall's picture

Re: Checking the operation of my Mk2 Diverter

If your SSR has a zero crossing detector built in, then you should not be attempting to command it at or very near to the zero crossing, but some time before. Near the preceding peak voltage, ¼ cycle before the zero crossing, would be a good time.
The MOC3041 family work by preventing the triac from firing until the voltage across it has fallen to a small value, so that too needs to receive the "fire" command well before the zero crossing. You can apply the firing signal when the mains is > 20 V (on the data sheet: "Inhibit voltage"), and it will fire on the next zero crossing.

dBC's picture

Re: Checking the operation of my Mk2 Diverter

then you should not be attempting to command it at or very near to the zero crossing

Do you mean for successful diversion, or is that a general rule for all such SSRs?  My pool controller uses a zero-crossing SSR but the controller has no knowledge of the mains cycle, and turns it on "randomly" in relation to the mains cycle.  I assume they're ok with that?

Robert Wall's picture

Re: Checking the operation of my Mk2 Diverter

If you want to be sure of firing at a particular point - yes. Otherwise, no, when you don't care whether it fires on this (half?) cycle or the next - which will normally be the case for something that is not all that time-critical. In the case of your pool controller, I presume you don't care to within 20 ms when it turns on, therefore you can leave the decision to the SSR. If the firing signal arrives on the zero crossing, presumably it will react immediately, otherwise it will hold off for up to 10 or 20 ms and then fire. (And if it's really intelligent, it ought to either fire and turn off on the same direction zero crossing, or remember which one it fired on and not turn off until the same one following the firing signal going away, so as to avoid rectification.)

I'm guessing that Ianjm's problem was that he was trying to fire it too close to the zero crossing and just missing it some of the time, so it randomly held over to the next.

The important point is the SSR needs to be quite accurate with regard to timing, as it doesn't take missing the zero crossing by much to generate a lot of harmonics and RFI. So the decision is best left to it.

Tinbum's picture

Re: Checking the operation of my Mk2 Diverter

I use all Crydom SSR's of various types (zero crossing) for all my AC load switching and have had no problems with them at all using

if (samplesDuringThisCycle == 5) for arming

Robert Wall's picture

Re: Checking the operation of my Mk2 Diverter

So you're arming the SSR about 30 ° into the cycle, when the voltage is about 150 V. That sounds a good place to me.

ianjm's picture

Re: Checking the operation of my Mk2 Diverter

I was finding that my SSR was not firing it was sometimes waiting and triggering at zero in the negative cycle - hence the flicker. I was using a free running sketch - switching of in the negative cycle and setting my trigger as soon as a positive cycle was detected.  I would be doing in excess of 90 samples per cycle so the gap from calculated zero would be very small.  I was using a standard sketch with a standard voltage transformer - perhaps mine is slightly out compared to standard.

Isn't firing a Triac at 30 degrees going to produce a lot of noise?

Tinbum's picture

Re: Checking the operation of my Mk2 Diverter

Isn't firing a Triac at 30 degrees going to produce a lot of noise?

The SSR's are all zero crossing.

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

Isn't firing a Triac at 30 degrees going to produce a lot of noise?

When using the MOC3041 "zero-crossing" trigger that is recommended for this application, the triac will only be activated at the next zero-crossing point.  Hence, there is no problem with EMC noise.

The trigger is always armed at the same point in each mains cycle, so the triac will be either on or off for whole mains cycles.  Hence there is no problem with DC.

Although the arming point has been determined by various different methods, the output stage for all Mk2 sketches of mine have operated in exactly the same way.  All, that is, except the one with phase-angle control where the exact moment of firing the trigger needs to precisely controlled.  In this case, unless EMC filtering is applied, there would indeed be a lot of noise.

 

Robert Wall's picture

Re: Checking the operation of my Mk2 Diverter

"Isn't firing a Triac at 30 degrees going to produce a lot of noise?"

Tinbum didn't say "firing", he said "arming". There's a big difference between arming and firing.

Does your SSR have a zero-crossing detector in it, or not? You need to know. If it's designed for phase control, it won't have, and in that case I'd suggest you have the wrong type, because a free-running sketch will never consistently get close enough to the zero crossing to avoid the generation of substantial harmonics. You'd be surprised at how little you need to be away from the zero crossing to generate substantial interference. For example, the MOC3041 inhibits at < 20 V, that's 3.37° and if you've got 90 samples per cycle, you're going to be outside that at least some of the time.

For this application, you really need a SSR that detects the zero crossing for itself, and which you can arm prior to that, somewhere around the middle of the preceding half-cycle. It will then fire consistently and reliably at the zero crossing generating minimal noise and harmonics in the process. From what you say, it sounds as if that is what you have, and if so, I think you need to review your strategy.

richmc's picture

Re: Checking the operation of my Mk2 Diverter

For information this is what the AC waveform looks like with a MOC 3041 and triac.

happyf's picture

Re: Checking the operation of my Mk2 Diverter

Happy new year !!!

I' try again with mini_3 code, and various capacity of energy bucket, the problem still the same, the 2 meters inside are flashing. approximately at same rate, (not at same time)  Faster when i decrease.

I think i mis something, I just reverse states ( so ON 1, OFF 0) to be active high for the SSR, and PowerCal still set to 0.06. capacityOfEnergyBucket=1000 for test;

i don' have actually LDR, but i will. to calibrate;

happyf's picture

Re: Checking the operation of my Mk2 Diverter

Bad start of the year, I have finally built my output board with the MOC and the triac, but when I turned it on, the two resistors were burnt, lol

I hope that the triac and moc are not destroyed.

 

Robert Wall's picture

Re: Checking the operation of my Mk2 Diverter

Which resistors?
Check that you have identified the triac leadout correctly and that you have exactly followed the circuit diagram. How have you constructed the output switch?

This is nothing to laugh at. If you are not sure of what you are doing with mains electricity, DO NOT RISK YOUR SAFETY and stay with the SSR you bought.

happyf's picture

Re: Checking the operation of my Mk2 Diverter

Don't worry Robert, electricity is a big part of my job. And i take care.

the resistors (360 and 330R) are between moc and triac, For the triac, A1, A2, G

The board is done with a little piece of a prototype board (double face), so i can make  another.

The diagram is same as Robin.

I obviously made a mistake, so i 'will built another board when i got new resistors.

I have been using the SSR, because i have it from work, but at first, it had to be MOC+triac.

Robert Wall's picture

Re: Checking the operation of my Mk2 Diverter

"Don't worry Robert, electricity is a big part of my job. And i take care."
I didn't know that, of course. It's been my job for nearly 50 years and I'm still here, so I must have taken care too!
My guess is you had MT1 & MT2 crossed over, so the MOC fired but the triac did not, therefore the supply voltage appeared across those resistors for a long time. There is a single-sided stripboard layout on Robin's write-up, be sure to cut the board away underneath the opto-trigger so as to maintain creepage distances between the mains side and the Arduino/emonTx side.

happyf's picture

Re: Checking the operation of my Mk2 Diverter

Sorry Robert,

i'am confuse, i don't understand (my English isn't so good), what do you mean MT1 and MT2?

I think, as you said, the moc fired but not the triac, so maybe a bad soldering (or something like that) on pin 4 of the moc.

I'm not really proud of this Work, but I put photos.

 

Robert Wall's picture

Re: Checking the operation of my Mk2 Diverter

The main terminals of a triac (the ones that carry the heavy current) are called MT1 & MT2, or A1 & A2 (sorry, I did not check, and I drew the diagram here - see http://openenergymonitor.org/emon/mk2/build) [You may not need the snubber components - 39 Ω & 10 nF]

To fire the triac, you connect the gate (G) to A2. If you connect the gate to A1, the triac will not fire, but the MOC 3041 is turned on, therefore a low voltage between 6 & 4, so the mains voltage is now on the 360 Ω & 330 Ω in series.

I am not happy with your prototype board, there is not enough space between the connections carrying mains voltages. On the stripboard design on that page, ALL the copper except the tracks in use has been removed on the high voltage side,  I thought I had a photo of the assembled board (copper side), but I cannot find it. The pictures are the assembled 4-channel switch (for 3 water tanks + 1 spare), and the part-prepared stripboard for 2 channels.

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

happyf, at the top of the Photo Gallery page on my website, I show a photo of the two series resistors being burnt, and explain why this has happened. 

Fully assembled and tested output boards are available from my Shop page.  I can supply both types of PCB, either my own "long thin" design or Rich's "square" design, same price for either type (£16 + £6 air mail postage to France). 

There is an email address near the top of my Shop page if you are interested. 

happyf's picture

Re: Checking the operation of my Mk2 Diverter

The diagram is exactly like that (without 39R and 10nF).

I Locate the problem, bad welding on the gate.

i'm agree with you, about the space between the connections, i will built a bigger board in that way.

Thank you Robert.

 

happyf's picture

Re: Checking the operation of my Mk2 Diverter

Yes Robin, i saw the photo on your website.

I'll buy you a complete system for a friend in few months.

 

happyf's picture

Re: Checking the operation of my Mk2 Diverter

Robin, could you please advise me, about what sort of LDR can i used for monitoring pulses from a supply meter .

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

I just used a basic LDR from eBay (3 for 99p), with the circuit that is shown at the top of some of my early Mk2 sketches.   This is from Mk2_PV_Router_mini_3.ino :

/*
Circuit for monitoring pulses from a supply meter using checkLedStatus():
 
                  ----------------> +5V
                  |
                  /
                  \ 8K2
                  /
                  |
             ---------------------> dig 2
             |       |
        -->  /       |
        -->  \       _
        LDR  /       -  0.01uF
             |       |
             ----------------------> GND
*/

With this type of passive interface, the detector is polled by the sketch every mains cycle.  Other types of detection, which have an active photo-transistor, use interrupts.

happyf's picture

Re: Checking the operation of my Mk2 Diverter

Yes, It's that i will follow,  so a basic LDR is appropriate, not a specific one.

Thank you Robin.

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

The LDR and the series resistor form a potential divider.  When the illumination on the LDR is varied, its resistance will change so the voltage at the "mid-point" will change.  The 8K2 resistor that I've suggested works well with the LDR that I used.  With a different LDR, a different value of resistor may be needed.  The capacitor just provides some damping, its value is not critical.

For the cost of the postage, I can send you an LDR which is exactly as I have used.  There were three in the pack, two of which have never been used.  Send me a PM if you are interested.

 

happyf's picture

Re: Checking the operation of my Mk2 Diverter

I'm sorry to know  that to late, i have purchased earlier this afternoon. (FW150). i chose that one  because it is flat.

I think i will try first with a 8k2 resistor, and if isn't suitable, with a variable one and adjust.

If i had known that before, i took yours.

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

No problem.  As long as your sensor can tell the difference between the LED in your electricity meter being "on" and "off", you should be OK :)

happyf's picture

Re: Checking the operation of my Mk2 Diverter

Another question,

with an LDR on the provider meter ( at 100m), what is a good wireless solution to mimic?

It's another problem for me, but this meter is the most important, and the most difficult to check.

There is a pair of wire usable by the connection to the home global heater (maybe french protocol,that works with my heater but not with my monitoring unit, corrupts send by the meter), so it can be used for a few tests. But it will be better with a wireless tools on the flashing of this meter..
 

happyf's picture

Re: Checking the operation of my Mk2 Diverter

i'am searching a wireless solution between that meter and the MK2.
i just need to transmit the LDR signal, so just need one input emitter/receiver but up to 100m distance.
There is many solutions, but i want the simplest, and the low cost one.
With your guidance and experiment, you could maybe help me.

Robert Wall's picture

Re: Checking the operation of my Mk2 Diverter

2 x Jeenodes?

If there are no buildings between transmitter and receiver, those might work.

I did think that it might be possible to use a radio (RFM12B) attached to your Arduino, but it might be difficult to merge the code. The easiest is to wire the output of a Jeenode to the input pin where Robin connected the LDR on the Arduino.
You also need a Jeenode at the meter, with the LDR connected to an input.

Then in the Jeenodes you have a pair of sketches: At the meter, you continuously check the LDR (say every 100 ms) and when it changes, you send a message "1" or "0" as appropriate, and at the Arduino end you listen for a received message, and when it says "1" you turn the output on, and when it says "0" you turn the output off, and with no messages, you don't change it!

happyf's picture

Re: Checking the operation of my Mk2 Diverter

Thank you Robert, you have well understood what i want to do.
i didn't know the Jeenodes, very interesting for many jobs.

For doing this, i was searching about something very simple, for just one signal. Something like that:

http://www.seeedstudio.com/wiki/index.php?title=433Mhz_RF_link_kit

But i don't know if it is reliable. Jeenodes are certainly better.

 

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

with an LDR on the provider meter ( at 100m), what is a good wireless solution to mimic?

The LDR that I've used in the earlier Mk2 sketches is part of the Router's hardware, and is powered by it.  If you are looking for a wireless method for monitoring your meter, you would need some source of power at the meter end to power the RF transmitter and your optical detector.  That is a quite different problem than I was tackling, and nothing really to do with a Mk2 Router.

Maybe this topic should be on a different thread?

happyf's picture

Re: Checking the operation of my Mk2 Diverter

You are right Robin, it is too distant from MK2, So i'll open a different topic .

Robert Wall's picture

Re: Checking the operation of my Mk2 Diverter

The Seeedstudio website is still publishing some quite wrong information about the YHDC split-core CT, so read any information from that source with caution.

Also, Robin points out that his meter flashes for only 38 ms, so you need to look much more frequently than 100 ms, alternatively you could connect the LDR to the interrupt pin and wake the processor on interrupt. Then check to see whether the LED is on or off, and send the appropriate message. That scheme could well be better suited to battery power, as the LDR is a very high resistance in the dark.

I have not checked, Martin Harizanov's site could well be worth looking at. Also of course JeeLabs.

happyf's picture

Re: Checking the operation of my Mk2 Diverter

Now, i had built a little PCB for the LDR, with Robin diagram, it works well with the LDR FW150 (if that could could help someone)

and the output PCB was repaired and sound (and drill a little, with Robert 's advice), but not tested yet.

I had tried that sketch :MeterAnalysisTool, it works perfectly. So hardware is ok with the power-meter inside.

What i want to do next days  is:

- calibrate Powercal with my hardware and suitable (and compare with that meter)

- define capacity of energy bucket with that meter (and the provider one after)

I don't know diference beetween power-meter in England and in France

So, advices, métodes to help me are welcome.
With step by step.
Few month ago, Robin has tell me something like that "you try to learn English, surplus power, and arduino at same time", yes it is, and it is so hard with an English like that, lol.

and for today, i need to say to you  "i'am Charlie", with ...don't know how to say...

happyf's picture

Re: Checking the operation of my Mk2 Diverter

Today, I did some tests

-output with moc and triac is ok and seems to work good

-I remade a V and I test with the RawSampleTool sketch, it seems that is not good and it's probably the problem that my MK2 not balancing correctly.

The PCB is in 5v, the votage transorfmer is 2x6v, the load is 1500w resitor, and the the CT are SCT013-000 (clamp in the oposit way for that test)

So, there is a problem with my hardware, and the waveforms are not read properly.

 

Robert Wall's picture

Re: Checking the operation of my Mk2 Diverter

"and the waveforms are not read properly."

The voltage wave should be larger in amplitude, but otherwise they look OK to me. The divider (100 kΩ + 10 k&Omega: on the transformer output is designed for a 9 V transformer having a no-load voltage of about 11 V. If you have a 6 V transformer (which I think you have), it will have a no-load output voltage somewhat larger than that, but not 11 V rms. You can easily reduce the value of the 100 kΩ resistor so that you have approx. 1.5 - 1.6 V rms at the voltage analogue input.

Similarly, the current wave is approx 25% of maximum, but that should be fine with Robin's diverter. You could make it a little larger (by increasing the value of your burden resistor), but it might not be a good idea to make that amplitude very much bigger because it must never clip when measuring the maximum load.

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

I remade a V and I test with the RawSampleTool sketch, it seems that is not good and it's probably the problem that my MK2 not balancing correctly.

The purpose of my RawSamplesTool sketch is to record the actual ADC values that are taken during one or more mains cycles.  This can show you how your voltage and current sensors are behaving.  This sketch has nothing to do with balancing import and export which is what the Mk2 code does.

My advice would be to concentrate on one aspect at a time, and only move on to the next stage when you are satisfied that that the previous stage is working to your satisfaction.  Trying to get everything to work at once is unlikely to succeed.

 

happyf's picture

Re: Checking the operation of my Mk2 Diverter

Yes, Robin you're right, but it 's why i decided to restart at zero.
Test all inputs (LDR, voltage sensor, current sensors) and see how they are read, before all, to be sure there is no problems with hardware. It's why i remade that test.
Of course, it's nothing to do with balancing export and import, but how the arduino read the inputs, it's important to be sure that values are correct at first.

I want to proceed step by step because there is probably something i missed.

i have also tested the new output stage (moc and triac instead of SSR), and today let my MK2 work alone (i wasn't at home)
with the mini_3 sketch. Without any modification (original one), just inputs/outputs for my hardware, that's all.
I didn't could make some other thing today, but i saw that the result is the same as usual, and still not balancing correctly.

The waveforms seemed to me suspicious, and it's why i had post the result. Not sure there is a really problem on that.
And Powercal seem around 0.085.

So, i'm going on, i didn't find the real problem at this time. I hope the LDR could help me.

Robert Wall's picture

Re: Checking the operation of my Mk2 Diverter

"I saw that the result is the same as usual, and still not balancing correctly"

Is that really true? Can you swap your import and export meters and do you still see the same imbalance? If you cannot swap them, are they both calibrated correctly?

Assuming it is true:

If your sketch is not balancing, there is only one basic reason: as measured, the energy exported is not equal to the energy imported.

It cannot be the triac / output stage, provided that it is turning on and off. That's because it is all one big feedback loop, and if the triac misses a few cycles and turns on late, it will simply stay on for longer. Equally, if it stays on for too long, it will stay off for longer.

Therefore, how can there be an imbalance? Some points to check:
1. Your calibration is too sensitive and the 'energy bucket' is either overfilling or over-emptying. If you are not using the anti-flicker, I don't think this can happen because it means the bucket hits full before the triac turns on or empty before it turns off.
2. Your inputs are not sensitive enough and your measurement is disappearing under noise. (This is a physical thing, not a software calibration thing, and if those RawSample results are typical, it is not the problem.)
3. Energy import and energy export are measured differently, i.e. the power calibration is not equal in both directions. [I'm not sure how this might happen.]
4. You are not measuring all the power going in one direction or the other. [I'm not sure how this might happen, you must think how it might happen, and check.]

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

how can there be an imbalance? Some points to check:
4. You are not measuring all the power going in one direction or the other. [I'm not sure how this might happen, you must think how it might happen, and check.]

This would seem the most likely reason why your system is not balancing correctly.  If either of your sensors is too sensitive, it may be 'clipping' at the peak of each mains cycle.  If this happens only in one direction, the system would be non-linear so would not work correctly.  What is the rated value of your load for surplus power?

Is it possible that your system is actually working correctly, but you are expecting to see something different than what is actually happening?

happyf's picture

Re: Checking the operation of my Mk2 Diverter

First, thank you both for your help.

 

how can there be an imbalance? Some points to check:
4. You are not measuring all the power going in one direction or the other. [I'm not sure how this might happen, you must think how it might happen, and check.]

It seems is the case. don't know yet how it could be possible.

 

What is the rated value of your load for surplus power?

 

The load is a 1500w water heater (around 35 Ohm)
The main voltage between 226 and 234 V ( seem not a really stable value but i don't think it is a problem)

 

The 3 power meters on my first electric board are the same, one for PV, one for import power, and one for export power. I chose them because they are mostly installed by energy provider (and i bought to someone who makes them in place for the provider)
It seems that there is no calibration to do on them, just program for "info" output

Is it possible that your system is actually working correctly, but you are expecting to see something different than what is actually happening?

What i see is that the two power-meters inside increment while the MK2 is running (i didn't check provider one yet, but i will when it will possible)

i use a 2x6v transformer for voltage sensor, but the PCB is powered by 5v, is it possible that is really the problem?

Robert Wall's picture

Re: Checking the operation of my Mk2 Diverter

"What i see is that the two power-meters inside increment while the MK2 is running"
Which two - Power Imported and Power Exported? I would expect those to increment while the Mk2 is running, but I would also expect them to increment by exactly the same amount, to within a small proportion of the total energy that passes through.

"It seems that there is no calibration to do on them, just program for "info" output"
You think that is true! In reality, we have found that meters that appear to be identical can be programmed by the manufacturer to have quite different characteristics. I am not saying that yours are different, but it would be good to prove that they are the same. This is why I suggested you physically exchange them, if that is possible, to be quite certain that the problem is the Mk2 and not the meters.

It is likely that your 5 V supply is damaging the waveform that you are using to measure the power. The circuit that you are using draws a large pulse of current near each peak of the voltage wave as the reservoir capacitor charges. This will cause the peaks to be lowered, and that will be reflected through the transformer action into the voltage measuring winding. That will make the voltage measurement wrong by a small amount, but it should affect both the imported and exported power equally, so it should not affect the balance.
(If you look at the circuit diagram for the emonTx V3, that uses a resistor to limit the peak current so that the dip it causes is limited. You probably cannot do that with your circuit, as you don't have enough spare voltage to lose across the resistor.)

happyf's picture

Re: Checking the operation of my Mk2 Diverter

Which two - Power Imported and Power Exported? I would expect those to increment while the Mk2 is running, but I would also expect them to increment by exactly the same amount, to within a small proportion of the total energy that passes through.

it's what i expect to, that should operate like that.

i can exchange the power meters for few hours, it's not easy to do it, so when i 'll do that , i must be sure that the sun is with me.

That will make the voltage measurement wrong by a small amount, but it should affect both the imported and exported power equally, so it should not affect the balance.

Yes i think the same thing, nothing to do with the balance.

So the  day that the sun really appear, and i'm at home, i will check what's happening from the provider meter. Then i will exchange de insides power meters to check that.

It is not a good season to do tests !

if i can, i will make videos.

happyf's picture

Re: Checking the operation of my Mk2 Diverter

There is no sun, so i 'am working on PCB.
i use a nano arduino board on my hardware, there's 3.3v available, and it doesn't use.
So to be more suitable, i can easily modified the pin 3 on the LM358 ,
in order to improve the  sensors.
Any others suggestions?

happyf's picture

Re: Checking the operation of my Mk2 Diverter

Hello,

Some sun yesterday and the service in MK2 without any modifications. And running with mini_3 code.
I have not been able to reverse the energy meter, it was not easy to do (without penalizing the family during the weekend)
I let MK2, and now I look at how the different energy meters have reacted this period.
Over the period or MK2 was activated (a little less than two hours):
-Energy imported: 221Wh
-Energy exported: 73Wh
-Energy in the load 644Wh

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

If your load is being switched on and off when the sun is shining, it seems likely that your Mk2 system is "balancing correctly".  Your load is being actively controlled so that the net flow of energy at your grid supply point is exactly zero.  This is how the Mk2 system has been designed to work.

If you have some other measurement equipment which is giving different readings, you will have to decide which system to believe.  The Mk2 mini_3 sketch spends all of its time taking V and I measurements so that the flow of energy at your grid point is always known.  

Does your other equipment work in this way? 

happyf's picture

Re: Checking the operation of my Mk2 Diverter

It's not that simple to believe a system or another, i have  to be sure that the provider meter doesn't increment while the MK2 is working. It is why I'm working on a repeater for it.

My other equipment works like that:

-Import meter , the index is stored every minutes (energy meter is a Sagem C1000)

-Export meter, the numbers of pulses per minutes is stored , one pulse per Wh (energy meter is a Sagem C1000)

-Load meter , same method, but the meter is little one , one pulse per Wh (Saia ALD1D5F10)

So i' got csv files every day, the time base is the same, minutes per minutes, and when i extract the data in the same file, i got this.

If there is sun next week end , I'll be able to check that my provider energy meter doesn't move ( or very litle) when MK2 is in activity. It is the most important point.

(energy meter of provider is a Landiy&Gyr L16C6 with often faulty data by his serial port, it's the reason why i have another energy meter inside the house to monitor my energy consumption)

dBC's picture

Re: Checking the operation of my Mk2 Diverter

According to:  http://support.sagemcom.com/site/mo/metering-18/c1000-547/ your import and export meters are capable of displaying instantaneous power on the LCD.  Setting both of their displays to that mode while diverting might reveal some more clues.

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

It's not that simple to believe a system or another, i have  to be sure that the provider meter doesn't increment while the MK2 is working. It is why I'm working on a repeater for it.

(energy meter of provider is a Landiy&Gyr L16C6 with often faulty data by his serial port, it's the reason why i have another energy meter inside the house to monitor my energy consumption)

When the sun is shining, and plenty of surplus power is being diverted by your Mk2 Router, it should be easy to check whether the displayed value on the L&G energy meter of your provider is being incremented or not.  At the end of the day, if you have a tankful of hot water and the displayed value has not changed, your Mk2 system must be balanced correctly.

Near the end of your spreadsheet, your load appears to be drawing power again.  This is many minutes after your Mk2 system was turned off.  Did you turn the Mk2 back on again at 12:45?

happyf's picture

Re: Checking the operation of my Mk2 Diverter

That day, i let the MK2 power on (never turn off), so what is happened near 12:25 in the spreadsheet is that my wife  had turned on  the oven, so there is no more surplus power at that time, and near 12:45, the MK2 had started again to divert energy, surplus power is  back again at that moment.

The MK2 seems always starting to work at the good time, so it can itself indicate me when surplus is appearing. So, i'm sure that system can working as i want to, and as you said , Robin, maybe it is, but i can't prouve it. The observations and recording data indicate are in contraction with the logic.

 

-When the sun is shining, and plenty of surplus power is being diverted by your Mk2 Router, it should be easy to check whether the displayed value on the L&G energy meter of your provider is being incremented or not.

I can only have surplus power between 10:00 and 14:00, and most of time i had to force it appear by turn off some circuits of my house (heater for exemple) . Surplus power can be short or long in time, and more or less important, so i have to see at the same time if the MK2 is on activity (shown by the led on-board = triac states), and the activity on the main energy meter which is 100m far away.
And ideally, make it wired on my energy supervisor to get a csv file (instead of the surplus one, for example, or the load power meter).
That will give me at first, if that main energy meter react when MK2 is running, en then, if that reactions are same as the import meter inside. It's why that repeater could really help ( and without running on the road , every 5min)

Maybe i will could make some few tests tomorow...

(and sorry again for my English, i'm not sure to be clear for you)

 

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

So, i'm sure that system can working as i want to, and as you said , Robin, maybe it is, but i can't prouve it.

happyf, I think it's now clear that your Mk2 system is actually working in a "balanced" way as it is intended to do.  While your Mk2 system is operating in "normal" mode, your supply meter will hopefully be ignoring its activity because the range over which the overall energy state is changing will only be small, probably no more that 200 Joules.  This should be well within the range that is permitted by your meter.

To demonstrate that your Mk2 system is working correctly by using additional equipment is not an easy task, as you are finding.  If you had an analogue electricity meter, you should be able to see the disc moving backwards and forwards like this.  This behaviour would show that the overall energy state, as controlled by your Mk2 PV Router, is indeed "balanced".

Now that your Mk2 system no longer seems to be at fault, maybe it would be possible to change the title of this forum thread. 

How about "Checking the operation of my Mk2 Diverter".

Thanks.

 

happyf's picture

Re: Checking the operation of my Mk2 Diverter

Not a problem to change the tread name, i had not chose it , but it seemed correct for me at first.
"Checking the operation of my Mk2 Diverter", it is a good name for me, so the moderation could change it, no problem with that.
i'm not be able to check my provider energy-meter by the way i wanted to because of a bad connection, so (if if there is sun tomorrow) I'll do in a visual mode, with vidéo.

Today, i had let again the Mk2 running, but i have only observe it few minutes.
i made a video, but it's too bad to understand, i will do a better one.

The Mk2 is balancing, with itself, that is a good point, i mean, it seems working well but not according to the real situation.
Maybe just a sort of decallage (tow many traduction,lag, gap, shift, i don't know, sorry), that i have to accord.

I unfortunately don't have analog electricity meter, but in all case, i have to accord the MK2 to my provider energy meter.

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

Thanks, Lemonnier,

I trust that one of the moderators will pick up on this point and change the name of this thread as suggested above :)

Robin

happyf's picture

Re: Checking the operation of my Mk2 Diverter

i'am agree with that, certainly most adapted with that title
That will not change anything for me, but it is more suitable, you 're right, Robin!

Franck

 

happyf's picture

Re: Checking the operation of my Mk2 Diverter

Good news

by checking my provider energy meter, and try to monitore the flash led, i had discovered is:
- the flash led  blink when the MK2  operate, so adjustment is needed
- i could not be able to compare it the rate with the import power meter inside
- but in that testing, i found a big problem on surplus power meter

The surplus meter data are monitored by pulses output, the problem is here, the pulses are not all recorded . (i will fix that problem later)
So, in reality, the tow energy meters (import and export, inside) have very similar data
While the MK2 is running, i observe a difference around 8% between them (8% more for import, for a hour)
THe MK2 is balancing quite correctly, that is the good new (but you have no doubt about it)

i'm confused, and furious against my faulty data, that have lost my time and my mind.

Now, next step.
The fact is, wile MK2 is running, the energy meters are counting around 100-110 watts per hour.
That means, for an hour, 100wh i pay, 100wh i give (according to that meters)
i' will try to adjust "energy bucket", when the sun will come again
but in a precedent test, it's seemed that the rate of the flash led (import power) is increasing when i decrease the energy bucket.
I still use mini_3 sketch.

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

My mini_3 sketch always operates in "normal" mode.  There is only one energy threshold, so your immersion heater should be cycling on & off very quickly. 

In "normal" mode, the size of the energy bucket does not make any difference.  The energy state will always be held close to the mid-point of the energy bucket, regardless of how large that bucket has been defined to be.  Changing the size of the energy bucket will just determine how quickly the system will start to divert energy when surplus power first becomes available.

The only meter which is important to you is the one which determines you much money you pay for your electricity.  If you switch everything else "off" in your house on a sunny day, you should find that the tank is heated using surplus energy, and the number that is shown on your supply meter will not change.   It is possible that the meter may blink, but the number should not increase.

Extra meters that you have fitted yourself for "import" and "export" may be working in a different way.  Those meters may not ignore the flow of energy in the reverse direction, so their numbers may be confusing. 

 

happyf's picture

Re: Checking the operation of my Mk2 Diverter

The situation is actually :

- The  energy-meter of provider increase while my MK2 is running, , that is checked, no data of that, just some visual test that the index increment.
- This meter and the tow others (inside),don't increase if the power is reverse
            -the surplus energy meter increase  if there is no surplus
            -the import energy meter never increase when there surplus
 (in that cases, no led on, no led pulses, not increases, no activity)
I'm sure about that., It's how i's working without the MK2

You're right, i try different size of energy bucket, that seems reacting the same way.

What i want is (i know that will hurt you, :) ), i don't take care of my provider energy meter for the moment, (because, i 'll certainly ask for make it change, because of faulty output)

So, i forget it, for the moment, and take the inside import meter as  like as  it's the provider. By the way, my Sagem C1000 energy-meters are one of the most implanted by the provider in France.
I know you will tell me that is stupid, but i want to work on that meter at first, like i said, the import and export meters are the same.

I think, that i need a sketch where i could have a energy bucket with limits.

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

@happyf.  The various Mk2 sketches on this forum are freely available for you to use however you wish.  I will not be hurt however you decide to use them or your various energy meters.  I am pleased, however, that you agree that your Mk2 Router is now "balancing correctly".

As I mentioned before, the size of the energy bucket will make no difference to the way that mini_3 works because that sketch always operates in "normal" mode.  For later sketches, which can also operate in Anti-Flicker mode, the size of the bucket is very important.

 

happyf's picture

Re: Checking the operation of my Mk2 Diverter

Hi, i'm here again,

the sun is  here now, and i try again to setup correctly my MK2.
Using MK2i_rev4b in normal mode.
I don't understand why, whatever i do on the sketch, this is never working properly
So i think, my MK2 is not accorded with my energy meters.
i have try to change many values of :
-powercal
-voltcal
-joules_per_watt_hour
-thresholds (in AF mode)

In all cases, it is balancing correctly  but exceed the sweet zone of energy meters
I didn't succeed to accord, and i don't find where could be the problem.

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

Have you tried using one of my simpler Mk2 Router sketches which can only run in normal mode?  This will stand the best chance of working correctly with your meter.  I would suggest trying Mk2_PV_Router_mini_3.ino

Apart from the IO port allocations, you should not need to change anything.

happyf's picture

Re: Checking the operation of my Mk2 Diverter

Yes Robin,

Mk2_PV_Router_mini_3.ino is the sketch i was using until now, the problem is the same,

i was thinking that a sketch with thresholds and different capacity of energy bucket help me to adjust, but it's not.
The energy meters show me that is balancing correctly, that is the good point, they blink one after the other.
i just want to reduce that blinking, to be more efficient.

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

happyf:  I am pleased to hear that you have been using that sketch. 

A couple of weeks ago, you said that your Mk2 system was "balancing correctly" although you were not able to demonstrate this using your own test equipment at that time.

Today, you have said that "The energy meters show me that is balancing correctly" which appears to be an important step forward.

You say that you want to "reduce that blinking, to be more efficient."  Now that your system is "balancing correctly", I don't see how it could be working any more efficiently than it already is. 

When you say that "the problem is the same", can you please explain exactly what you believe the problem to be.

happyf's picture

Re: Checking the operation of my Mk2 Diverter

An exemple to explain "the problem":
i reset the 2 energy meters lcd, the MK2 operate with mini_3 sketch, the energy meters (import and export) increment one after the other, on a period around an hour, i get approximately 100Wh on each lcd. During this time, i'am in front of my fuse box, and check to be sure the MK2 is running, without changing loads in the house.

So, i think my MK2 is not accorded with the sweet-zone of my energy meters.
In theory, the MK2 has to be transparent, it is not the case for me.
I juste want to find a balancing point which is nearly transparent for my energy meters.
Is it more clear? (i know that my explanations are often bad)

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

Is it possible that your import and export meters do not have any sweet zone?

It may be worth trying the phase-angle version.  While conditions remain constant, this approach should fix the energy state very tightly, so that every mains cycle will be in balance.  The sketch is called Mk2_PV_phaseAngle.ino and there is a link on my Summary Page  

The only hardware change is to use an immediate acting trigger such as the MOC 3021 instead of the the zero-crossing MOC 4041.

happyf's picture

Re: Checking the operation of my Mk2 Diverter

"Is it possible that your import and export meters do not have any sweet zone?"

i hope not, this model is one of most used by the energy provider in France.
What is the better way to be sure of that?
I had not thinking about that until now, because it seemed to me that all energy meters have a sweet zone.
i had thinking my MK2 just exceeds a little that sweet zone, and my energy meters adds that excess and increment.

 

I'm actually use the D2425 SSR, so the Mk2_PV_phaseAngle.ino sketch won't work, i guess, because it is a zero-crossing built-in. But i will take a look on that solution.

 

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

I have sold at least three Mk2 systems to customers in France.  As far as I am aware, these diverters are all working correctly with their owner's meters.

When you use the sketch Mk2_PV_Router_mini_3.ino, your load should be cycling on and off too quickly for you to see (quand le solleil brille!).  The standard burst-mode Mk2 system is reactive, not predictive, so there will always be some overshoot.  The reaction time is around 30 ms so the energy fluctuations are only small, maybe 100 Joules in total.

With phase-angle control, the triac is activated when it is predicted that exactly the right amount of energy will be consumed to maintain the state of balance.  Under constant conditions, phase-angle control will hold the energy state much more tightly than burst-mode.  This may be helpful for your meter.

happyf's picture

Re: Checking the operation of my Mk2 Diverter

I plan to redo my prototype a little better, so in my order of material, I'll order a MOC3021 to do this test.
Robin, thank you for your guidance.

no sun now for further testing, and I confess I do not understand and do not know what to do, so maybe my energy meters have no sweet-zone.

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

I confess I do not understand and do not know what to do, so maybe my energy meters have no sweet-zone.

If your meter has very little sweet-zone, you may have to operate your Mk2 system in phase-angle mode.  When your MOC3021 arrives, you will be able to do this by using my phase-angle sketch. 

It may be helpful to run this sketch in a test rig first, just as I have done in the video.  If you use a bulb in parallel with your test load, you should see the brightness slowly changing just as if you are increasing and reducing the brightness using a dimmer switch.

When you are happy with the system in a test rig, you can then change the CT connection so that you are monitoring the whole house.

It may be helpful to record the minimum and maximum values of the energy bucket every few seconds (in Joules).  When running in phase-angle mode, the difference between these two values should be very small.   Hopefully, the meter will not record these small fluctuations in energy level.

 

happyf's picture

Re: Checking the operation of my Mk2 Diverter

I'm currently testing the phase_angle code with the MOC3021,
the result is really in the right direction.
The import energy metter does not increment.
The export one increment a little.
I'm really close to the operation I want.
May be just correcting export (safetyMarging_watts in neg value?)

Robin thank you for pointing out this other way

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

happyf, if your 'import' meter increments with "normal" burst-mode operation, but does not detect phase-angle diversion, that is very interesting feedback.  Thank you for sharing it with us.

I look forward to hearing of any further refinements that you make to the phase-angle sketch.

happyf's picture

Re: Checking the operation of my Mk2 Diverter

i use the original version of that sketch actualy, and it suit to me with my first "prototype"
i wish make integrate the CT2 to that sketch to calculate the energy diverted, and just a LED to show the actvity (which is not according to PA-control actualy)
And maybe a temp sensor (DS18B20) on the triac heatsink to start a fan.
The new hardware i'm working on, will be just more compact, and with some few options.

wiop's picture

Re: Checking the operation of my Mk2 Diverter

happyf, I'm also very interested in your force to integrate phase-angle in diversion sketch. I think with phase-angle it is more accurate to control balance of in-/export and the better way to prevent messing grid. Load variations of burst mode are not good for grid stability (variations of frequency and voltage). Thanks to keep us up-to-date.

 

happyf's picture

Re: Checking the operation of my Mk2 Diverter

My new hardware is built and the next step will testing how it to react like the first . (the first is destroyed, unlucky)
But i have made it with the possibility to use it with the classic output (ssr and moc 3041+ triac) in external

or/and in internal with moc 3021+ triac (or internal moc 3041, is a choice)

the Phase_angle sketch seems to be good with my test energy meters.

What is my new hardware...? little description
-all in a rail_din box (output level included, that is the first challenge)
- so the heatsink is small, so there is a 5v fan on board, with temp sensor
-voltage sensor is on board (2x9v, 2x1.25VA) a coil for power system, the other for sensor
-two current sensors inputs
-input pulse (or the French protocol from our energy meters)
-two programmable led

-a mode switch
-one programmable output (for SSR or other)
-serial link for my needed monitoring

this work has been made in the most with what i found in this web site and the Robin work (thank you again for your work and advices)

Now for me, it will the moment for programming what i need.
i 'm  newbie on that, very hard to me to understand
it smell like a long work !!!

if it works, and someone is interested, i will created a tread on that way

 

Tinbum's picture

Re: Checking the operation of my Mk2 Diverter

I've not been on here for some time- other projects taking my time but I'm interested in what your finding.

As I have mentioned previously on here I have meter that I just can't get to work at all with an energy diverter. Whatever I do it will always measure some import unless I set the energy diverter to export more than my largest diverter load. It won't even work in phase angle mode.

happyf's picture

Re: Checking the operation of my Mk2 Diverter

i'm still using the phase angle sketch with my new hardware with the moc 3021,
and that works good; maybe adjusting calibration, there is a little more export
but i will test again the mini_3 sketch soon with an SSR on the other output because i want to check something, a mistake i could have done in my first prototype.
before trying the phase angle sketch, i couldn't be able to do anything with my energy metters.
So i'm happy to have a suitable work now,
i'll could work on the options, specially on the temp sensor and fan control.

happyf's picture

Re: Checking the operation of my Mk2 Diverter

 high, here again,
my new hardware seems to not working as the first. i check out but i didn't found.
The system seems balancing correctly, but the difference is about the import power, and sometime a little activity at night (when the import power is very poor, less than 150w)

With the first prototype and phase_angle sketch (original, without  any change), I had few export, but no import when the system was running. That is, what i'm looking for.

The second prototype has no real changes. But reacts with difference. And the import comes back.

However, the 2 hardwares are not very different:
-the UC is Atmega 328 (uno boot) instead of nano board
-I am using a 2x9v transformer for V instead of 2x6v
-no changes for CTs (sct13-000) and 150r burden resistors
-a mistake on design, so the the trigger is activ high (it's reversed on the sketch by the "define")

I tried many "Powercal" value, it was logic because the the transformer is not the same. V&I samples seems ok; and with the DigitalMeterEmulator sketch (and report on a led of the pulses of my import energy meter) I got a good rate with powercal around 0.0545

So i check all I know to have the same results as I had before.
But it doesn't work perfectly.
Maybe i missed something...?
The phase_angle  seemed to be the good  way for me against my energy meters, but now it is not the case anymore and reacts are likely others sketches, so I think I made a mistake somewhere.

happyf's picture

Re: Checking the operation of my Mk2 Diverter

new tests today,
i upload again the original sketch (phase_angle)
and that works fine.
So i had probably upload a bad sketch before.
I'm working on a sketch with some dataloging on the serial port, and check the temp sensor for start the fan.
That sketch based on the original phase_angle sketch seems to take too many time in the loop, to have the accurate functionality for diverting power.
I confess I do not know how to not disturb the basic function, and add the options I need, I'm working on it

Franck

calypso_rae's picture

Re: Checking the operation of my Mk2 Diverter

The sampling mechanism in most Mk2 sketches may be disturbed if there is too much Serial activity (too many print statements).  Temperature sensing will definitely upset the sampling mechanism - that's why I have never included this feature before.

The only Mk2 Router sketches that are not affected by these activities are the ones that I posted in February for use on the emonTx V3.2 and v3.4.  The structure of that code has been changed so that the fast control mechanism is entirely separated from any slower background activities (RF, Serial and OneWire sensor).

Hope this helps.  I believe that all my posted sketches are fit for purpose when used in their original form.

happyf's picture

Re: Checking the operation of my Mk2 Diverter

Thank Robin, it's helpful.

I have  taken a look quickly  on your emonTx v3.4 sketch, and it's seem to be exactly what i need.
I have to introduce the phase-angle control (I don't know where and how, yet)

I will try next week.

Franck

happyf's picture

Re: Checking the operation of my Mk2 Diverter

hi,
i need help again,
like I said before, I'm not good with arduino code (and also in English , ;)),
i have to add the  parts of the Phase_angle_control in the EmonTxV3_4 sketch,
but i don't know where it's suitable, to have a good work, without penalty.

For the datalog and fan control, i think that will be not a problem. (i hop),

But, there aren't critical points, i think.

 

If I didn't missed something, i have to add only that parts (attached txt),
but i'm afraid to put them at the wrong place.

So advices are welcomes, and I'm sorry to ask help again, maybe it could also help someone else.

Robin has made a lot of incredible works. There are for everyone, which deserves thanks again !
And this forum is very helpful for people like me, thank also for that way, it is not so easily in France.

(sorry again for my bad English, i hope you understand)

For the moment, the original Phase Angle sketch work fine, my pv power is 1kwc, so there is not lot of power to divert. i will take up 2 or 2.5kwc this year.
For the moment, i divert 75 - 87% of surplus power (maybe need to adjust calibration in Phase Angle to be more efficient)

Thank for any help,

Franck

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.