New hardware for Mk2 PV Router

[Updated on 7/3/14]

I started this thread some months ago to introduce the new hardware that I was developing.  If you're interested in this new platform, which has an integral PSU and RF module, please check out www.Mk2PVrouter.co.uk .  It's all there, and my Shop is now open for business :)

Robin Emley (calypso_rae)

*     *     *

To date, most PV Routers have been based on an Arduino Uno or an emonTx.  These platforms are fine, but various additional items are required in order to obtain a complete system.  This all takes time to assemble, and involves direct contact with Live wiring, with safety implications.

Since posting my original design, I have trained up as a Domestic Electrical Installer, primarily so that I can install Mk2 Router systems in my locality.  To minimise the build-time for each unit, I am developing a pair of PCBs that will mount directly inside the enclosure that I intend to use, without need for any additional fixings. 

The smaller PCB is for the output stage, and is essentially a re-work of the one that Rich can supply.  The main PCB (see below) is for everything else: a mains transformer (2 x 6V) and fuse-holder, a simple 3.3V PSU, an AC voltage sensor, two AC current sensors with protection diodes, an Atmega 328 plus peripheral components, an RFM12B. the FTDI connector, the trigger control output, and the connection for a mode-control switch.  There will also be a socket for a ribbon cable which feeds a front-panel display, and space for the associated series resistors.  An image of the assembled board, as created with PCB Wizard 3 , is attached.

The front-panel display is an inexpensive 4-digit type which relies on persistence of vision, each digit being activated for just a few mS in turn.  By use of integer maths, there is plenty of time for this housekeeping to be done by the main processor.  The display shows how much surplus energy has been diverted today.  To obtain an accurate value, a second CT is fitted inside the enclosure; this is a small bobbin-type one which slips around either of the switch Line conductors.  The processor now has three analogue sensors to sample rather than the usual two, but this can be achieved by careful use of the ADC.

I/O pins for this design are tight.  If the RF chip is required, there are not enough spare to drive the display.  To get around this difficulty, I've added a couple of logic chips which reduces the number of control lines that are needed.  If the RF chip is not required, those five driver lines can be used instead to drive the display.  In this case, the two logic chips can be replaced by a handful of wire links, as indicated on the silk-screen layer.  These links can be soldered directly to the board, or onto headers that are pushed into the DIL sockets. 

The display unit requires series resistors on 8 of its 12 lines.  To maintain flexibility, I've provided space for a resistor on every line; the four that don't need them can just have a wire link fitted.  If the RF chip is not required, the series resistors are R11 - R21; if RF is required, then they are R16 - R27.  I'm confident that this arrangement will work, it's easier to do that describe.

I've had this kind of display running for some weeks at home.  It's good to see exactly how much surplus energy has been diverted each day, and to compare this with the total shown on the inverter.  On a chilly November morning, today's values are not encouraging (photos are two posts down this thread) but the sunshine will surely return.  Until some surplus power has been diverted each day, the display shows a 'walking dots' pattern.  The data resets each night, at a set period after surplus power was last detected.  This simple arrangement avoids the need for a real-time clock.

The RF chip can be used to send whatever data is required.  Although none of my previous Mk2 sketches have included this feature, it has appeared in other more recent sketches so will definitely be available to accompany the new hardware.

The completed unit needs to be capable of passing various standard tests that an electrician would apply.  Essentially, the box needs to be capable of looking like a continuous length of "final circuit" wiring, with no hint of electronics.  By careful use of mains switches that are mounted on the sides of the box, this setup can be achieved.  With the enclosure that I intend to use, there will be ample space for making connections to two T&E cables.  The ABS version costs around £15 inc VAT.  A polyester version with better thermal properties is also available for about £3 more.  Any alternative type of enclosure could of course be used, but the PCBs will fit into this one very nicely.

Once the design is finalised, I intend to start building these units for my own use.  At that stage, I will be happy to sell the various component in kit-form for others to assemble.  I may also be able to provide pre-assembled and tested boards, as well as enclosures, heatsinks etc.   For this purpose, I have started the website  www.mk2pvrouter.co.uk .  I hope to be open for business around February/March 2014.

Although no formal approval of this product is envisaged, I feel sure that properly-assembled units will be capable of working safely and reliably, and will inspire confidence.  Various prototype units were on show at the recent MadLab event.  Safe installation will, of course, remain the user's responsibility. 

PS. The system won't accept my 200kB ZIP file, photos will hopefully appear when I've found out how to delete some old stuff :(

An easier workaround was to start up a new account via which comes with extra space.  Here is the proposed layout of my main PCB (click the image for a better view).  Rather that soldering the RFM12B module directly to the board (which I've always found very awkward to do), I'm intending to make these connections with short wires.   The module could be loosely held in place by a some suitable means while the wires are attached.  This would allow it to be easily replaced at some later stage, e.g. for a change of frequency.

solar's picture

Re: New hardware for Mk2 PV Router

Hi Robin

This seems a really good idea. I have already built, with much valued help from this forum, 2 Mk.2 PV routers with RFM12B modules, which work very well, and look forward to seeing your new designs.

 I would just like to wish you all the best for your new venture

calypso_rae_2's picture

Re: New hardware for Mk2 PV Router

Hi solar, thanks for the support.  It was good to get your Mk2 Router project back on track earlier this year by focussing on the basics.  However complex the data processing side may be, the sensor circuits need to be right.

Using this new account, I will hopefully be able to upload some more files ...

TrystanLea's picture

Re: New hardware for Mk2 PV Router

Hello Robin, this is really fantastic, I wish you the best of luck too. The PCB and complete box looks very nice!

I've increased your total max total files upload setting from 20MB to 50MB.

calypso_rae's picture

Re: New hardware for Mk2 PV Router

Thanks Trystan.  Unless you want to delete it, my other account can now sit there quietly in the background - just in case!

Clive S's picture

Re: New hardware for Mk2 PV Router

Hi Robin,  I met you at the MadLab in Manchester,  I was impressed with your demo and kit I do wish you all the best in your new venture.  Clive

calypso_rae's picture

Re: New hardware for Mk2 PV Router

Thanks Clive, the "formal" demo after lunch was a bit more organised than the one you got.  When I'm looking for volunteers to try out the new boards, I may give you a call :)

morris8cars's picture

Re: New hardware for Mk2 PV Router

Hi Robin

I have successfully built your MK2i rev5b  and have an RF unit running flawlessly for last 4 months. This new circuit will be good especially with the display unit and pic looks good. I assume there will be a new code for this. I keep meaning to add a "30 min boost" push button toggle on/off to the original for when a quick override is required (e.g now). Can I request your thoughts (where/how to add in code ?) and say this may be useful in your revised version. At present have just done a manual switch but that's prone to be left on.

Will the original boards be capable of using the new code if so we only need to add a sub board for display

Keep up the good work & good luck

Dave

calypso_rae's picture

Re: New hardware for Mk2 PV Router

Hi Dave,

It's always good to hear of a Mk2 Router that's running flawlessly, especially when the load is controlled via RF.  With the Mk2i_rev5 code, the RF payload is essentially just the on/off status of the remote load, but some extra data content could easily be added for displaying on an emonGLCD or whatever.

Any new code of mine will certainly be able to run on existing hardware.  With a Uno, getting access to spare i/o pins is easy because they're all in straight lines.  But with the emonTx, they're all over the place.  To access enough spare pins for use by the 4-digit display is a real pain.  Here's a pic of the least complex wiring harness that I managed to devise for this purpose;  the one in my own rig is similar to this.  This arrangement may be OK for a one-off, but is far too time-consuming for any kind of volume production.   With the new hardware, all spare pins are routed to a ribbon-cable connector, so connecting this to the back of the display is simple.

For a 30-minute boost function, you'd need some kind of timer.  This easiest way to achieve this would be to count mains cycles.  30 minutes is 90,000 mains cycles which exceeds the capabilities of a 2-byte integer, so you would need to use a 4-byte 'long'.

There would also need to be a boolean flag to indicate whether the boost is currently 'on' or 'off'.  When the flag is "on", the state of the timer would be checked each mains cycle.  When the max count has been reached, the boost flag would be turned off.  While the boost flag is active, the triac would be forced to come on; otherwise, it would behave as normal.  You would need some reliable means of detecting when the "boost" button has been pushed.  The Mk2i_rev5 code already has a routine for detecting the change of state of an external switch. 

A good way of adding this kind of feature might be to develop the new code in a separate sketch, purely as a test platform.  Then, once it's working to your satisfaction, the new code can be moved directly into your main sketch with a minimum of disruption.

PS.  If there are any spare pins, I'll keep the idea of a boost function in mind.  Maybe one of the Serial pins could be used for  for this purpose.

calypso_rae's picture

Re: New hardware for Mk2 PV Router

The prototype "main" boards that I ordered from Ragworm have arrived, and the one that I have assembled and tested is working nicely.  All functions are behaving as expected: the power supply, DC voltage reference, AC voltage source, two AC current sources, the processor with its crystal, the RFM12B, the logic for a 4-digit display and the display itself.  A few of the hole sizes are rather tight and will need to be adjusted for the next run.

I'm assembling a pair of clean-build boards and hope to post some photos of these soon.  Both of these boards will support a 4-digit display but only one will have the RF module fitted.  The one with the RF module requires the two extra logic chips to be fitted; the one without the RF just requires some wire links.

I've also designed a 'slimline' PCB for the output stage, and these prototypes appeared today.  This PCB can be mounted using one of the existing mounting points in my chosen enclosure.  The slot allows for some flexibility in the triac's location.  As with Rich's original design, I've used wider tracks for the high-current paths.  There is a second slot under the trigger chip which provides the necessary degree of "creepage distance" between the HV and LV sides as described by Robert about half-way down this page.

A novel feature of this board is the optional use of solid copper wires to boost the current-carrying capacity.  These wires thread through the PCB in the manner of a staple.  Having bent these wires into place, their ends can be adjusted until they are a tight fit against the component legs and then soldered into place.  With these extra wires installed, the tracks on the underside of the PCB carry minimal current.  The solid copper 1.5 mm2 earth core from 2.5 T&E 'Ringmain' cable is perfect.

Power can be fed to the triac in three ways.  The first option is via a high-current PCB terminal block.  This has a 10mm spacing so the tracks can be well separated.  A pair of standard 0.2" terminal blocks can also be used, as per Rich's design.   High power connections can also be made feeding flexible wires through the board and soldered their ends directly to the copper underside.   In practice, these wires would also be soldered to the adjacent copper 'staple'.

The control signal can be applied via a standard 0.2" PCB-block with screw terminals, or via a SIL strip with 2 pins on 0.1" spacing.  This is my preferred method, the wire from the processor board can then just push into place.  This control wire will span the heavyweight T&E mains wiring so needs to be easy to remove and replace.

Various photos of these trigger boards are attached.  A few adjustments will be needed for the next batch, but the prototype version does work and it fits into the box nicely.

Bill Thomson's picture

Re: New hardware for Mk2 PV Router

VERY nice, Robin!

Best of luck to you with your new project.

Regards,

Bill

Simon's picture

Re: New hardware for Mk2 PV Router

Excellent work.  

My 4 load "wired" system based on the MK2i is working very well, but still very Heath Robinson.

I'm watching your progressive with real interest.  My next stage is to make some nice remote 'switches' packaged for loads in domestic areas, so far I've hidden it all away in cupboards.

All the best

Simon

calypso_rae's picture

Re: New hardware for Mk2 PV Router

Thanks for those encouraging comments. I think my second PCB for the trigger & triac could be of use to many constructors.  Being so small, it should be cheap when I can order decent quantities.

Here are some photos of the main PCB as assembled in each of its two forms (spot the difference!).  The first three photos show my alternative way of connecting the RFM12B  which I found much easier to do than soldering it directly to the board as on the emonTx V2.  Before the first wire is attached, the RF chip needs to be held in place by a piece of double-sided tape or similar.   To connect each of the pins that are active, I used 0.4mm kynar wire (stripped).  Although this wire is very fine, the chip sits nice and firm once all 7 links are in place.  The RFM12B works fine with just a simple aerial.  I've not tried fitting coax but all the holes appear to be in the right places for this, including a pair for strain-relief labelled "co-ax fix".

The two PCBs are displaying the same value on the 4-digit display, albeit with different sketches.  The board with the RFM12B fitted has insufficient spare pins to drive the display, so two extra logic ICs are needed.  The board without the RF chip has no need for this logic; instead it requires some links to bridge across these locations (as shown on the silk screen).

When laying out this PCB, I overlooked the fact that the outputs from these logic chips appear at fixed points which cannot be changed in software.  Consequently, these tracks don't appear at the ribbon connector in the right order.  As a temporary fix, just for these prototype units, I'm using an adapter at the remote end of the cable; this rearranges the lines into the correct order for the display module.  With this adapter in place, the optics work fine, just like Hubble!  This bug will be sorted out before any more boards are ordered.

If anyone would like to provide a good home for any of these prototype boards, feel free to send me a PM.  Otherwise, I intend that the mature versions will become available for sale in various forms around February/March.

calypso_rae's picture

Re: New hardware for Mk2 PV Router

Last photos for a while, for each version of the main board, slightly better that the previous ones.

calypso_rae's picture

Re: New hardware for Mk2 PV Router

Someone has kindly pointed out that the screen-print image on my trigger board is incorrect.  The 6-pin IC should of course be shown as MOC3041 rather than LM358. 

Guess I could do with a break ...

stuart's picture

Re: New hardware for Mk2 PV Router

This is looking really good.

 

Congratulations on your new venture!

calypso_rae's picture

Re: New hardware for Mk2 PV Router

My website at www.mk2pvrouter.co.uk now has a couple of extra pages to show how the new hardware is coming along.  One of these shows an output board being assembled using a new PCB that I've commissioned.

In due course, I intend to sell Mk2 components direct from the website.  In the meantime, if anyone would like to avail themselves of these items, please send me a PM.  Their cost is:

PCB only - £5

PCB + all components (triac, trigger, 6-pin DIL header, resistors and all connectors - £13

As above, but pre-assembled and tested - £16

When shipping a pre-assembled board of this type, it's probably best for me not to solder the triac in place.  I'll need to find some other way of testing it.  The user will then be free to mount the triac at whatever height is best for their heatsink.  Also, the postage will be a lot less.  When fully assembled, Royal Mail regard this 16-gram payload as a "small parcel" :(

PS.  I still have a few of Rich's equivalent PCBs available, now price-matched to the above (i.e. £5 rather than £8)

Paul Reed's picture

Re: New hardware for Mk2 PV Router

Well done Robin. Now that you are head of design, chief programmer and company director, I hope that you'll not become a stranger in the forum?

All the best mate.

Paul

Bill Thomson's picture

Re: New hardware for Mk2 PV Router

Here's one of Robin's prototypes at work dumping excess energy into a 55 gallon drum of water. Even on an overcast day, the unit still managed to divert nearly 2 kWh to my dump load. This one is connected to a 240 Volt, split-phase, 60 Hz system.

 

Bill Thomson's picture

Re: New hardware for Mk2 PV Router

Here's that same prototype near the end of a sunny day...

 

calypso_rae's picture

Re: New hardware for Mk2 PV Router

Nice one Bill!

The 'mature' PCB for this board has now appeared and appears to be working as intended.  So I look forward to lots more happy customers once the weather over here improves.

A couple of safety points: the prototype board that I sent you didn't have a cover over its fuse-holder, but the kits that I intend to supply will include this feature.  I must send you a replacement unit which would look better in any future photos :)  

I would recommend including an Earth connection for the mains feed.  When working in an area with 30 mA RCD protection, this would reduce the risk of injury in the event of accidental contact with the Line connection.  In your 120V environment, this risk is presumably less than in the UK.

Have you received a PCB-based adapter plate for your display?  I sent it to you on the 5th.  This should be a direct plug-in replacement for the strip-board version that is so prominently featured in your latest photo.

Last night, I was trying to get a decent photo of brown 22pf capacitors against a similarly coloured PCB.  With its bright blue ceramic caps, your photo may well end up in my Build Guide!

Business Plug: I'm still intending to have PCBs and kits of parts available within the next few weeks.  There will also be a comprehensive Build Manual, parts lists, and installation guidance.  Various sketches and supporting diagrams will be available for download.  And there needs to be a 'shop' page, and an FAQs, and ...

For anyone who is interested in this new hardware, your patience is greatly appreciated.  Much is happening behind the scenes. 

 

Umski's picture

Re: New hardware for Mk2 PV Router

Looks really good - and really glad to see it put into 'production'! Had I known about the availability of the PCBs separately I would have jumped on one - I just spent the last few days drawing out an output board on a bit of copper-clad board. A bit Heath-Robinson but hopefully it will etch ok! If not I will be in touch ;)

Great job on the simplicity side of things - makes for an easy install I expect! I am still battling with which type to go with and then sorting out calibration!

Clive S's picture

Re: New hardware for Mk2 PV Router

I would like to give a big thank you to Robin for his help and advice. I purchased one of his proto boards and the output board and installed them in a box.  It works just as it says on the tin. He supplied me with a log file of the pre testing as well.

I must say that these boards are beautifully made and are a credit to him, I wish him every success in his venture.

I would like to point out that the heat sink is from an old pc and that I have put a switched fused spur on the input and a double pole switch at the immersion heater.  The heat sink is earthed but not shown in the pic.   Just waiting for the sun now.

   ..Clive

 

PS.  Just a quick update When I installed the system on the 20th Feb. until today 3rd March it has put 39.8Kw to my immersion heater. which is not bad for the time of year.

I use the gas boiler to bring the temp up to 35C and have the immersion set to 70C which is very hot, I do have thermostatic showers though.

Well chuffed.   Thanks again Robin.

calypso_rae's picture

Re: New hardware for Mk2 PV Router

Nice one Clive,

This Spring sunshine is most welcome.  My emonTx-based system has reached its maximum temperature a couple of times recently. 

All being well, my website with the new hardware will be open for business within the next few days ...

Robin

calypso_rae's picture

Re: New hardware for Mk2 PV Router

Ladies and Gentlemen, I am pleased to announce that my website, www.Mk2PVrouter.co.uk is now open for business :)

This purpose-built version of my Mk2 PV Router has three new circuit boards.  Each of these is available in kit-form, or pre-built and tested, or as a bare PCB.  For those who wish to source their own components, a parts list and circuit diagrams are available.  A revised version of the Mk2 sketch for this new hardware, loosely based on Mk2i code, is also available for download.

There is a comprehensive Build Guide with plenty of photos, and a Shop which can supply all the necessary items.  The most comprehensive version of the Router includes a 4-digit display which shows the total amount of diverted energy each day.  It also has an RF facilty, the aerial being wired out to an SMA mounting point ready for an external aerial.  In kit form, including postage, this version sells for £98; the basic version is £77.  I'm hoping to sell plenty of complete kits because everything packs inside the ABS enclosure really nicely.

With its on-board power supply, the main board could provide a convenient platform for any general processing application.  The RFM12B is fully tracked, and most of the processor's IO pins are routed to easily accessible connector points.  A pair of these boards could be used to provide an RF link between any two locations where mains power is available.  Perfect for a movable remote load facility for your PV diverter.  But there must be plenty of non-PV uses too!

The output board can be used for any application where a processor needs to control a mains load.  The kit of parts for this board is £14, or I can supply it in a pre-built and tested state for an extra £4.  

For anyone who already has most of the parts, but has yet to assemble their Router into a box, there is a Misc H/W Pack which includes all those awkward-to-find items.  Various other components are available, and I will always be happy to help out with non-standard requirements if possible.

My price list includes several pre-built versions of the complete system, but in practice I may find it difficult to provide a rapid turnaround for such orders.  It all depends on how much of my time is taken up with other things during this initial phase. 

I'm intending to operate the website via a pair of "Just Mail" email accounts which form part of my Easily.co.uk package.  These accounts, as mentioned on the Shop page, are proving to be "interesting", so please bear with me if I appear to be struggling - I probably am!

 

Bill Thomson's picture

Re: New hardware for Mk2 PV Router

Looks good, Robin. Thanks for the plug re my system.

Best of luck to you in your new venture!

Bill

 

calypso_rae's picture

Re: New hardware for Mk2 PV Router

Since opening my online Shop on Friday, I've taken just one order.  That was for a complete RF-ready system, which was assembled and tested over the weekend, and dispatched to a customer in Cornwall yesterday. 

If anyone is thinking of purchasing any items from me, now would seem a good time.  Everything is here and ready - even the nice weather.  For the last couple of days, our DWH has reached its max temperature by midday, so we've not needed to run the boiler at all.

Robin

 

 

 

Sergegsx's picture

Re: New hardware for Mk2 PV Router

Hello calypso, first of all congrats on a great proyect and wish you the best. Things could start slowly but im sure people will get interested. Unfortunatly I can not benefit from it in my rented appartment, if not I would buy one for sure.

I would like to make a modest recommendation. Make your website a little more visual. It has amazing information, very technical, just what I would like to see, but I think there is missing some visual content to make it more attractive to a wider audience.

I would suggest creating something like the module diagram for the home page on openenergymonitor.org, the diagram with the emonlcd, emonbase, emontx, smartphone and computer.

Also making the shop section more visual. create kits and put an image with all the included parts of the kit. 

hope any of this helps. good luck.

calypso_rae's picture

Re: New hardware for Mk2 PV Router

Thanks, Sergegsx, you're not the first person to point out that my website - especially the Home page - lacks that certain touch of magic which is generally required to sell things! 

Rather than spending more time in preparation, I thought it best to concentrate on getting all the necessary hardware together, and opening Shop early in the new season.  If business continues to be less than brisk, I'll be able to spend more time doing other things, including improving the website's presentation - and a host of other things that need to be done.

I'm not intending to push my new product here any more.  If anyone wishes to contact me, they should have no trouble in doing so via the other place, or just send me a PM. 

Regards to all,

Robin

calypso_rae's picture

Re: New hardware for Mk2 PV Router

Having never before posted a Mk2 Router sketch which supports datalogging, one is now available on my website.  Although this code is intended to be used with my new PCB, it should work with only minor changes on an emonTx V2.  The new sketch is attached, as are two files of results, with annotations.

The first set of results was taken yesterday in a simulated environment when no PV was available.  My source of 'PV' was a 1.25 kW heater, and the load was a 3 kW heater.  Data was captured from the Serial Monitor as it was being transmitted.

The second file was taken today in a 'live' environment where surplus PV was being diverted to a 3 kW load.  It demonstrates how the net flow of energy at the supply point is held close to zero while the total amount of diverted energy steadily increases.  The difference between 'normal' and 'anti-flicker' modes can be clearly seen.  On this occasion, the data was captured at the receiving end of the RF-link. 

For compatibility with emonCMS, all values are sent as integers:

typedef struct {
int msgNumber;
int powerAtSupplyPoint;
int divertedEnergyTotal;
} Tx_struct;

I intend to post this code soon in a form that is directly compatible with an emonTx V2.   This will use the conventional pins for the input sensors and won't include any code for a 4-digit display which requires two additional logic chips.  As this new code has many similarities with the Mk2i rev5 sketch, it will probably appear on the Mk2i thread as rev6.

The circuit diagram for my 'main' MK2 board is also attached.

calypso_rae's picture

Re: New hardware for Mk2 PV Router

For some time, there has been talk about how an SSR can be driven from an Arduino or an emonTX on this thread.

I've finally got around to trying this out using one of my new PCBs, and it is indeed very straightforward.  Although the regulated supply (3.3V) is insufficient to drive the SSR reliably, the unregulated supply (~9V) can be used for this purpose via a simple transistor switching stage.

By omitting the RF module but including the pin-saving hardware (two 74HC logic chips), 5 spare IO pins are available at the J1-5 connector.  These can all be used to drive additional loads via SSRs.

On the test rig that I've assembled, all five of these spare pins have been wired to a piece of strip-board on which there is an LED for each.  Two of these lines have a transistor stage in place so they can also drive an SSR.

To access the unregulated supply, two holes need to be drilled through the PCB.  By choosing the right location, these pins can be soldered directly to the adjacent tracks so no extra wiring in required.  If I ever get to re-layout this board, I should provide a means of accessing this point, and maybe include some transistors too.

A multi-channel CAT5-linked version of my Mk2 Router sketch will shortly be appearing on my website.  This will be similar to the Mk2i Rev5 code already released here, but without the RF overhead.

 

Comment viewing options

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