Mk2a PV Router (lean, mean and fast!!)

With my Mk2 thread bursting at the seams, it must be time for a fresh start.  Just in time for Christmas, here is the goody-filled Mk2a.

This version is well suited to hardware that has independent voltage references, such as emonTx.  That's because it has two independent HP filters rather than the single LPF that I used in Mk2.  Because the secondary coils of both input sensors are free to adjust their balance points according to the waveforms that they are monitoring, I think it's best for their outputs to be filtered independently.  Having said which, the prototype Mk2 rig in our garage still works fine, weather permitting.

The speed of this new version has been greatly improved.  Apart from the user-interface, all floating point arithmetic has been replaced with integer maths which is many times faster.  By this means, the time taken up by general processing has been reduced by around 60%. 

The big breakthrough came when it was pointed out to me (thanks Jörg!) that useful processing can take place while ADC conversions are in progress.  With all general processing now being hidden away within ADC conversion periods, the regularity of the sampling process has been much improved.  The code is at least 50% faster than before, its speed now only being limited by that of the ADC sub-processor.  The Arduino is now idle for around 50% of the time, and is much more tolerant of Serial operations.

A new feature with this version is TALLYMODE.  This is a pre-processor option which can be #defined in or out at compile time.  Although intended to supply high-quality data for test purposes, this mode of operation makes calibration of the system very easy.  The user enters a value for the run-time (in seconds, for up to 10 mins) and also the Min and Max power values to be recorded. The system then runs as normal except that the energy content of every half mains cycle is monitored or 'tallied'. 

After the run has finished, 'tally' data is sent to the Serial monitor.  By this means, the effect of balancing surplus PV power against a dump load (or anything else of interest) can be examined in detail.  TALLYMODE data is easy to import into a spreedsheet.  An Excel workbook + graph are attached to show some results when monitoring a 2kW room heater on each of its three power settings.

Calibration still uses the floating point variable, powerCal, which has exactly the same effect as before.  For most rigs, its value is likely to be around 0.05.  Its tiny value is because a small number of Amps normally correspond to a large number of ADC steps.  Full details about calibration can be found near the top of the sketch.
  Regardless of its state of calibration, you can feel confident that the Mk2a Router, just like its predecessor, will continue to divert power reliably :-) 

For efficient use of integer maths, certain aspects of the code have been changed.  The energy bucket no longer has a fixed capacity of 3600J.  Previously, every individual energy contribution had to be re-scaled, which was a terrible waste of processing time.  Now, it is the capacity of the BUCKET which is pre-scaled using powerCal; just once, at startup.

The safety margin has been removed because it didn't seem to have any useful purpose.  As supplied, the sketch is in TALLYMODE mode because I feel sure that this feature will be of benefit to most users.

19/12/12: Sketch updated to Rev2 to fix a couple of bugs.  SPEEDCHECK mode added, details at top of sketch.

03/01/13: Sketch updated to Rev3: simplified treatment of DC offset, and anti-flicker mode added. The rev3 sketch is at http://openenergymonitor.org/emon/sites/default/files/Mk2a_PV_Router_rev...

 

richmc's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Good stuff Robin, although I know jack about programing the Arduino I will upload the new code in the next day or two. As a dick h**d is there anything else I need to know?

PaulOckenden's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Don't suppose it'll (in time) also feed a GLCD+gateway, as well as doing the mk2 stuff?

There seems to be a lot of 'hybrid' work going on at the moment, and it appears to be the way forward (it seems to be the holy grail many are looking for).

P.

JBecker's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Very nice structure, very clear code and very well documented!

A real christmas present for the community.

Congratulations, Robin!

calypso_rae's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Hi guys, and thanks for the positive feedback.

Oh dear, the first bug in my code hasn't taken long to appear: the on-screen formula which explains the scaling of the energy bucket is wrong!  So much for my last-minute attempts to be helpful.  The calibration term should be should as (1/powerCal), then the numbers will match.

A revised version of the code will appear soon.  There are no doubt a few other refinements which could be usefully included.  All feedback welcome.

calypso_rae's picture

Re: Mk2a PV Router (lean, mean and fast!!)

is there anything else I need to know?

Well Rich, I'm sure you'll glad to know that the Mk2a code operates on the same hardware as before; I don't think I'd actually mentioned that detail anywhere.  More importantly, is there still time for PCBs by Christmas ???

I'm pleased to report that the new code does indeed appear to behave as intended.  I'd not actually tried it out for real before posting - it's far too chilly in the garage!   First trial results are at: http://youtu.be/epozcslYPRs

 

richmc's picture

Re: Mk2a PV Router (lean, mean and fast!!)

I do have some "non work" days before Christmas, and have components for three built up board sets, and can brave the garage to etch more boards if needed, so anyone who is eager can PM me to make an order. I have had to add some P&P to cover costs.

PM me for availability -

Price options for the Mk2 unit.

Two etched and drilled boards £10

Two boards and kit of parts £35 +pp £3.70

Two built up boards £45 +pp £3.15 +pp £3.70

The made up boards are the no soldering option and have flying leads for the Arduino and an LED to work with pin 13, and a pre wired jack socket for the CT. No hardware, Arduino CT etc will be supplied with this option but I can point you in the right direction to source them.

I must add that what you do with this device is up to you, I cannot endorse connecting it to your domestic system
or using it to save shed loads of cash off your energy bills.

calypso_rae's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Hi Rich, mi old mate, how's business these days?  Nod nod, wink wink, know wodda mean ...

PaulOckenden's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Business? I can't believe Rich is making a profit for hand made kit at those prices.

P.

richmc's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Too right Paul I do it for love, and enjoyment of putting them together. Works out at 15 customers, 22 units of one type or another. One nice guy with a three phase water turbine is my star customer (I think you know who!).

And I can confidently say my Mk2 has been paid for.

Thank you all for the orders and input and Robin for his inspired design. Have a great Christmas and a prosperous and FIT new year.

Series530's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Don't suppose it'll (in time) also feed a GLCD+gateway, as well as doing the mk2 stuff?

There seems to be a lot of 'hybrid' work going on at the moment, and it appears to be the way forward (it seems to be the holy grail many are looking for).

P.

 

It's work in progress Paul .... or it will be when the bits arrive and I find the time.

calypso_rae's picture

Re: Mk2a PV Router (lean, mean and fast!!)

I've just posted a Rev_2 version at the top of this thread, so do please use that one.  The original .zip file is still there, but is no longer 'listed'.

- The size of the energy bucket is now displayed correctly.

- A bug with the Min power level to be recorded in TALLYMODE has been fixed (int changed to long).

- A flag-based mechanism for checking whether processing has been completed within the ADC conversion time has been added.  Although the detection side of this logic is always active, the results are only processed and displayed if the pre-compiler flag, SPEEDCHECK, is #included.  If the code ever needs to be changed, this facility will provide a sensitive indication of whether the underlying timing has been disturbed.

- A few general comments have been updated.

I think that's all for now :-)

Robin

 

theproff's picture

Re: Mk2a PV Router (lean, mean and fast!!)

hi Robin

is there anyway of displaying some useful data on an LCD, like the current energy bucket size, maybe also the power consumption used and/or exported to the heater. 

i have a graphics display connected to the Arduino, but uncertain of what parameters you have that could be used..

thanks

tony

richmc's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Hi Tony there are threads where others have melded the Mk2 with displays, but robin taught me one great thing, if the LED is off there's not enough to export, if its flashing it's exporting, if it's solid on it's done its job and the stat is open. All you need to know. But have a look around the threads there are a few around. All you will end up doing is staring at the display instead of watching TV.

Series530's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Tony,

My fusion sketch does pretty well all of the things that you have requested and some more besides. ... but it used GLCD which may or may not be an issue for you.

 

Ian

 

theproff's picture

Re: Mk2a PV Router (lean, mean and fast!!)

thanks for the info Richmc, i'll spread my wings..

theproff's picture

Re: Mk2a PV Router (lean, mean and fast!!)

that sounds great Ian, thank.  i use the GLCD library files now, where can i find the Fusion sketch..

 

edit: i found it Ian, very complex, brilliant system though

calypso_rae's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Hi Tony, when you talk about displaying "the current energy bucket size", I presume you mean its level - how full it currently is, rather than its maximum capacity. 

That variable used to be called energyInBucket, and was the value in Joules.  With integer maths, the scaling is entirely different.  I think the equivalent variable is now called energyInBucket_long.  The capacity of the bucket itself is displayed at startup to the Serial monitor.

As it stands, the Mk2a version does all of its processing within the two ADC conversion periods per loop.  There seems to be quite a bit of spare processing time at present, so some additional display code could presumably be added without disturbing the underlying sequence routine measurements.  The SPEEDCHECK option should reveal at each stage whether new code is running entirely within the ADC periods or not.

As Rich and others have pointed out, watching the level of the bucket may be a novelty, but this value is not really of much practical use.  If you want to know how much energy has been diverted, just count the number of times that the triac has fired.  At 50Hz, an unsigned int would hold this value for 20 minutes.  A 'long' should be good for a lifetime, well almost.

theproff's picture

Re: Mk2a PV Router (lean, mean and fast!!)

thanks Robin, im going to try and integrate some of Ian's code into your new code and maybe come up with a solution, i want   Ians Fusion but without the EmonTx board. ill get there with the help of you guys..

tony

 

calypso_rae's picture

Re: Mk2a PV Router (lean, mean and fast!!)

theproff im going to try and integrate some of Ian's code into your new code and maybe come up with a solution, i want   Ians Fusion but without the EmonTx board. 

I wonder what particular displays you are looking for?  If you're only interested in monitoring "real power" - which is what the meter displays - then the amount of extra code that would need to be added to my Mk2a sketch should be minimal. 

calypso_rae's picture

Re: Mk2a PV Router (lean, mean and fast!!)

My Mk2a code is now at rev3.  This includes an anti-flicker mode as per the tool I posted on another thread.  A video showing the operation of this facility, in the latest Mk2a code, is at: http://youtu.be/BcZON8YFabw

For the purpose of calculating real power, it turns out that there's no need to remove any DC offset from the current stream.  Providing that DC content is correctly removed from one of the components (either V or I), any fixed offset in the other stream gets nicely cancelled out in the maths when taken over each whole cycle of the mains. 

For the rev3 version, DC offset in the voltage stream is identified using a LPF that is updated once per mains cycle, and then subtracted from each raw voltage sample.  This is just as in my Mk2 code except that the HPF has been omitted.  Preventing the LPF output from straying too far from the 512 mid-point works just as well and is much simpler.

A nominal DC offset of 512 is subtracted from each current sample.  This prevents the system from becoming over-sensitive to noise or any imbalance.  The precise value, however, is not important.

The SPEEDCHECK facility confirms that all general processing is still reliably hidden away within the two ADC conversion periods per loop.   Using a pair of delayMicrosecond() statements, it appears that the main processor is idle for around 100uS during every loop.  With the code as posted, I have never seen SPEEDCHECK to fail.   Short of moving to an interrupt-based approach, I believe the sampling process is now as regular as it can be.

The anti-flicker mode uses two thresholds for the energy bucket, these being at the 20% and 80% levels.  Once activated, the triac remains on until the lower threshold  is reached whereupon it always goes off immediately.  Whenever the upper threshold is reached, the triac is activated provided that a sufficient duration has elapsed since the previous activation event.  As posted, this minimum duration is set to 5 seconds which is a very stringent requirement.   Any value above approx 3 seconds is likely to cause the bucket to overflow (>100%) with consequent loss of surplus power to the grid.  The on-board LED (pin 13) now indicates whenever the energy bucket overflows; it is no longer used to show when the triac is on.

Accurate calibration is **essential** when operating in anti-flicker mode.  Thankfully, this is really easy to achieve when using the TALLYMODE pre-compiler option.  This works just as before except that it now records the power content in whole mains cycles rather than half cycles.  Half cycle data is only meaningful if DC offset is accurately removed from both sample streams.  When using non-invasive sensors, this is easier said than done.  

Unless any bugs appear, this could well be the final release of my "Mk2" code.  As a self-standing item, the Mk2a PV router now seems to be working as effectively and comprehensively as it can.  I look forward to hearing how other developers are able to modify it for their own purposes.  Just make sure than SPEEDCHECK is enabled, and watch out for any numbers other than zero.

 

 

 

PaulOckenden's picture

Re: Mk2a PV Router (lean, mean and fast!!)

With the new anti-flicker mode, now that the switching frequency is so greatly reduced, does the panel think that it has at last become feasible to use RF rather than a cable between the CU and the immersion heater?

It's the running of a big fat mains cable (or even a thin data cable) that's a big obstacle for many people, so doing it via RF seems like an attractive option.

I know the question was asked previously, and always met an answer of "No, it won't keep up, and you'll flood the area with RF". Perhaps that's changed now?

I'm guessing it would need an SSR at the immersion end to guarantee zero point switching, as the latency of an RF connection would be too much for a simple triac circuit to cope with.

Or am I peeing in the wind here....

P.

calypso_rae's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Here's some footage of the latest Mk2a code (Rev3) working for real with the proper dump load.  With no real PV available, I needed to resort to the simulated equivalent.  But to all intents and purposes, the kit works just the same in both cases - it's just that solar power is free.

With the anti-flicker parameter reduced to 3 seconds rather than 5, energy is no longer lost due to bucket overflow.  And with the triac's cyclic rate being never greater than 0.33Hz, this outcome will hopefully satisfy all users.

At 18 mins, this video is somewhat longer than I intended, but hopefully covers all the relevant points.  The rather shaky original has been greatly improved by Youtube's post-processing facility - I'm impressed.  Needless to say, there are a few deliberate mistakes on the sound track ...

As always, any feedback will be most welcome.

http://www.youtube.com/watch?v=BcdDrFkTOt0&feature=youtu.be

 

calypso_rae's picture

Re: Mk2a PV Router (lean, mean and fast!!)

With the new anti-flicker mode, now that the switching frequency is so greatly reduced, does the panel think that it has at last become feasible to use RF rather than a cable between the CU and the immersion heater?

An interesting point, my gut feeling is "yes".  The triac/SSR at the remote end could presumably still be operated by the same zero-crossing trigger, so there should be no difficulty with synching its operation to the mains.  If the moment of switch-on/off were to be delayed by a cycle or two due to latency in the RF control link, I don't see that as being a problem.

The rest of "the panel", however, may of course think otherwise ...

RobP's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Hi Robin

I guess you have to try it. Not being on 'the panel' I cannot comment as well as others on the technical feasability. But as a potential user (and one with a very distributed system - inverters >25m from DNO connection and immersion somewhere in the middle) I would consider this option most desirable.

Having said that and after much cable pulling I've almost got it all wired up now!

Thanks for your excellent documentation, informative videos and willingness to share this fascinating work.

Robert Wall's picture

Re: Mk2a PV Router (lean, mean and fast!!)

I think the obvious place to do the split is between the Arduino output and the driver IC input. The most critical timing (the zero crossing) is then independent of vagaries of the rf transmission path and, well, if you gain or lose a cycle of energy in a few seconds worth, then so what? I suspect that to reduce the amount of rf traffic, you'd need to issue "on" and "off" commands and latch the state in between, presumably then the controller should reissue the command (because it can measure to know whether it has been acted on) if the transmission fails to get through. The rf packet can be very small - if you read the JeeLabs documentation carefully there are 9 bytes of overhead, so with a 1 byte payload, and with the transmission rate of about 50 k bits/sec, the transmission should take 1.6 ms. At that, you could afford to send three messages and go by the majority vote in the receiver.

Methinks feasible.

calypso_rae's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Not being on 'the panel' I cannot comment as well as others on the technical feasability. 

Panel?  I thought the idea was that we all just chip in to help move things along.  Perhaps the official invitations are still on the drawing board ;)

ljfaragher's picture

Re: Mk2a PV Router (lean, mean and fast!!)

This is my first post on this forum thread.  I have PM some contributors including  Robin.   Details about me are in my profile.
I have had a MK2 prototype running on breadboard for many months now.   I originally ordered PCB's from Rich but was disappointed they were not Arduino Shields.  I hooked them up initially to a UNO but then took a different approach due to my background.   I followed all the discussion on the forum but carried on regardless.  
My approach was that I did not want to tie up an Arduino for each project so I breadboarded the MK2 design with just the Atmega328p chip.    That has been running faultlessly for months.  Well done Robin for the work and stablecode (sketch).   I have the latest incarnation from Robin and will try the interrupt driven sketch in  good time.    I added hardware connector  to allow "Arduino USB serial light" adapter to upload to breadboard prototype.    This uses the original PCB mounting transformer to supply 5v to Atmega328 chip and the other 9v winding as AC voltage sensor.  All works well even though I have only estimated PHASECAL.
I avoided the Phase Angle version as I am a Radio Amateur and know what RF interference can occur when controlling large loads on mains with phase angle control.  (Also know havoc can be caused by mains Ethernet controllers!).    I had commented to Robin that RF control of remote zero crossing Triac would flood that RF band when flickering.   With the advent of ANTI-FLICKER mode it's a different story (well done Robin again.  You have my deepest respect for your ideas)..
With ANTIFLICKER mode in mind I have been looking at RF control.   I have many ideas and it is early days yet.   Ideally I'd like Wireless so that each Arduino can talk full duplex (acknowledge that instruction has been received and change of state has occurred), To be able to talk to and or get data back to a PC, etc etc.  Cost is a limiting factor and for this project, cheapness is a priority.   With all this in mind I have ordered several really cheap RF modules from a big Chinese electronics company (when I say cheap we are talking £0.77 each when you buy 10 [inc postage!]).  Aerial is on PCB so may well be naff but I hope to rectify that  with a small wire aerial if range is too limited.   I ordered one module with a small external[rubber duck] antenna.  At £7.70 this could be a solution for anyone not wanting to modify the cheaper module.
I am designing a PCB for all this, and a few other simple requirements I have.
For example my Solar Inverter consumes 50watts even during the dark.  That equates to approx. 200 KWhrs per year of needless power from the grid.   I have breadboarded a Light Dependent Resistor (LDR) and  a Solid State Relay (SSR) [25amp from China] to switch inverter on/off at dawn/dusk.   Again stand alone Atmega chip design.  Working seamlessly.

So all this plus MK2 on a pcb without need for £20 Arduino.   If all goes well the whole MK2 should cost not a lot more than £20.

If anyone has any further ideas I'd be only too happy to oblige.

Schematic and PCB design are done with open source tools and will be freely available.

My main motivation is not to save costs but to maximize use of renewable energy and minimize consumption of non green energy.   I am not interested in making a profit but only to cover costs of manufacturing PCB.  My time I give willingly and freely. I openly embrace the Open Source philosophy.   I am passionate about renewable energy and preserving resources/recycling.

Laurence

Keith Walker's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Hi Laurence,

A very interesting post.

I might be able to help with one of your comments.

"For example my Solar Inverter consumes 50watts even during the dark.  That equates to approx. 200 KWhrs per year of needless power from the grid."

I've seen this mentioned before. Some folks think that it's inductive current and is not consuming any real power.

See http://talkingsolar.co.uk/index.php/forum/4-circuit-discussions/531-inveter-power-consumption-night for a discussion about this.

Cheers, Keith

 

 

 

 

 

Robert Wall's picture

Re: Mk2a PV Router (lean, mean and fast!!)

If you monitor both current and voltage, the emonTx with the "emonTx_CT123_Voltage" sketch will show you pretty much everything you need to know to work out the amounts of Watts, VA and vars (assuming there's enough to measure with reasonable accuracy).

calypso_rae's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Hi Keith,

Please could you remind me of my username for the 'other place'.  It won't let me in, and there is something that has been written (about me!) that need to be corrected.

Thanks, Robin

ljfaragher's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Glad you found my post  "interesting" Keith.   I hate to bore people accidentally.  I like to do that deliberately if needed!  They tell me I have a good sense of humor and people often laugh at my quips so I can't be as boring as my kids would have me believe.   So that's a little more of my background to put everything into perspective (yawn).
Interesting extract by markcarter10.  I understand power factor. I have insufficient technical details of my inverter to inspect and no longer have the tools (Scope etc) to quantify the power factor of this "night time" mode.   Suffice it to say that irrespective of if I am being charged for this night time usage, it is power that is unneeded and not green"  I reiterate, my prime motivation is use green/renewable energy, any cost saving is just a bonus.
I came across the OpenEnergyMonitor and Robins MK2 while looking for a system to not only monitor but also to control charging of devices.    I have an all electric car and initially used this to charge my car.   It works as I expected but of course does not measure the actual surplus solar generation but simply makes a reasonable guess.   My 4 Kw Solar installation (by my design) has W S and E facing panels.  I get a good spread of power throughout the day but the LDR for this device only points in one direction.
I was considering building an OpenEnergyMonitor system and building and integrating some RF controlled mains switches using the measured excess power when I came across this solar monitor and mains controller which did almost everything I wanted.   I have past  experience with  Chinese components and lack of quality control but I took a gamble and bought one.  After a hickup and an exchange of unit with updated firmware the device works as expected.  I have 10 sockets / rf switches and it works.  It has no mains AC reference, being powered by 5v DC and only has the two CT's measuring Solar and House power so this night time "wattage" may well have low PF if it is a result of the EMC inductive filters.   I have had lengthy discussions with this and other Chinese electronics companies lately and if I was younger and in the market, I would start trading with them as they have come on leaps and bounds in recent years.  They appear to be receptive to my ideas and feedback. 
Robins MK2 is the icing on the cake using every last drop of renewable energy out of my PV system.  The financial icing on the cake (making it all financially viable) is the fact you get the FIT payments even if you use all your surplus.

I hope to develop a generic PCB and only populate it with the components that are required at each location.  My thought to date are:
MK2 controller with RF to remotely control load(s).
Remote Load(s) controller to receive RF instructions.  Also with temperature sensors to measure HW tank.
Display to do do all sorts.  Such as , relay the electric meter import pulses, display how much hot water and how hot.  Display how much solar PV has been "routed".  etc etc.   Display could be LED's or LCD.  By remote loads I will be controlling convection heating and HW. 
I'd be interested to hear anyone elses' ideas or desires.

The real difficulty is deciding when everything is final and committing to PCB.  I seem to get new ideas almost daily for this and other projects.
 

Laurence

calypso_rae's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Robins MK2 is the icing on the cake using every last drop of renewable energy out of my PV system.

Providing a super-efficient DIY alternative to a woefully inadequate "professional" one is, for me, what's it's all about :-)

I once put down a deposit on an electric car.  Then, someone challenged me via a forum to demonstrate that my electric car (when charged by electricity that was made from coal) would be more eco-friendly than running a small petrol engined car - as was claimed on their website.  When I did the sums, it turned out that my correspondent was correct, and the website was wrong.  The electric car only makes environmental sense when you can get that electricity from a low-carbon source.

When I put the case to the car supplier, they recognised their error and refunded my deposit.  They also changed their website very soon afterwards.  Somewhere I have copies of both versions, just a few days apart.

Keith Walker's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Hi Robin,

"Hi Keith,

Please could you remind me of my username for the 'other place'.  It won't let me in, and there is something that has been written (about me!) that need to be corrected.

Thanks, Robin"

I'm sorry to hear that, I will moderate the offending posting if you give me details.

Your user name at http://www.talkingsolar.co.uk is Robin. Let me know if you need the password resetting. But I can't do it  now because I'm at work and any admin functions seem to get caught by the firewall.

I'll still using your Mark 2 circuit (I plan to move to Mark 2a when I have some time to play). Thanks again for an excellent system.

 

Cheers, Keith

 

calypso_rae's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Thanks Keith,

Rich has reminded me of my user details, and will PM you about what else I would like to be changed.  One point that I wanted to be corrected is that the phasecal algorithm was not my invention, it's been part of the standard OEM library code for as long as I've been around.  That one has already sorted.

Glad that hear that Mk2 is still doing the business for you.  I trust you'll be impressed with the Mk2a and Mk2i streams, they are so much more efficient than the original version.  Having said which, they all heat up water much the same when the sun appears!

Robin

Keith Walker's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Hi Robin,

I've made the changes to http://www.talkingsolar.co.uk/index.php/robin-s-mk-2-energy-bucket.

Can you have a look and see if it's what you're after?

Mk2i, I further behind than I relaised !!

I've never loaded the Arduino, I got a pre-loaded one from Trader9 running your Mk2 sketch. My laptop runs a version of Linux, Ubuntu, and I'm not convinced that the software I've loaded is going to work. So I keep putting off the update. lol

Cheers, Keith 

calypso_rae's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Thanks Keith, that looks fine now.  If you've never delved around inside the Arduino's code, I reckon you're missing half of the fun.  But it's good to know that your original Mk2 rig carries on doing the job reliably.  Our water is still heated using my original breadboard lash-up (with one of Rich's PCB versions waiting in the wings!)

I use a powerPC-based PowerMac (not the Intel version) and a Windows laptop, neither of which are cutting edge.  The code runs on both OK except that their Serial behaviour often seems to be different.  I've yet to devise a simple 'p' for pause and 'g' for go system which works reliably on both platforms.

 

ljfaragher's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Seems to have gone a bit quiet or is there discussion somewhere else?

I'm having some reliability issues with RF controlling the triac but it is work in progress.  I'll get to the bottom of it as sending data reliably via RF is the crux of some of  my Arduino projects.  A family member pointed out this which seems remarkably familiar.  

Laurence

calypso_rae's picture

Re: Mk2a PV Router (lean, mean and fast!!)

Hi Laurence,

I'm not intending to do anything more with the Mk2a line.  Mk2i works that bit better and has several new features.  My own RF offering was posted there earlier today.  The RF code that I'm using seems to be working nicely.  Send me a PM if you're having difficulties (though I'm no expert!)

Robin

calypso_rae's picture

Re: Mk2a PV Router (lean, mean and fast!!)

An upgraded version of the latest Mk2a code is now available as Mk2a_rev3a, as attached.  This is to fix the long-standing (minor!) error which has affected Tallymode data ever since I added that facility.  The new version, as copied from Mk2i_rev5b, now displays power data in Watts, rather than in tally numbers which is much easier to understand.

Regards to anyone who may be using it ;-)

Robin

Comment viewing options

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