A newcomer – three phase, but it's a bit complicated

I'm new to this, but fascinated by the possibilities of this technology.  I'm happy to turn my hand to most things, but I would appreciate a steer.
We have a UK three phase domestic supply.  Our heat pump runs off three phase, but most of the other usage is currently on L2.  We have three 4KW sets of PV panels, each feeding a single phase through an inverter.
I want to be able to separately monitor consumption and generation on each phase so that I can make better use of the electricity we generate, but it’s all guesswork at the moment as I have one import meter and two generation meters so insufficient data to do any analysis.
The problems:
1) We have two single and two three phase distribution boards, so the only way we can realistically work out our consumption is to measure and record a) the flow (which may be import or export) in the incomers at our import meter and b) generation at the three phase board that is fed by the inverters.
2) These two points (a & b) are less than 10 metres apart, but in different buildings and at best there is one 600mm stone wall between transmitters and receiver.
If I’ve understood the answers to previous questions correctly, I’ll need an AC input from each phase, plus a CT on each phase of generation and a CT on each of the three incomers.
My questions:
1) Will I need three emonTx to achieve this
2) If so, should I have a) one emonTx at the generation board measuring L1, L2, L3 current plus AC voltage on say L1, and b) two emonTx at the incomers to measure L1, L2, L3 import/export current and AC voltage on L2 and L3?  ….or is this wrong, or is there a better way?
3) Can I expect the wireless signals to pass through a 600mm stone wall?
4) Can the emoncms software report on the three phases separately?
5) Should setting this up be within the capabilities of an enthusiastic novice?

I hope that was clear.  I'd really appreciate some help.

Andy

Robert Wall's picture

Re: A newcomer – three phase, but it's a bit complicated

Ouch! I don't think the wireless has the remotest chance of getting through 600 mm of stone. With luck, I might be able to test that next week! If I have any success, I'll let you know.  Before I draw a diagram of your set-up, I think you need to look at Martin Robert's "full fat" solution, if you've not already done so: http://openenergymonitor.org/emon/node/1170. This uses 3 emonTx V2s and should do all you ask, but you will need to bring the three generation c.t. cables through your stone wall for that to work. Some users have done this successfully, some have had problems, so it might not be plain sailing.

The problem with 2(a) is you can't realistically use the voltage measured on one emonTx in another because the phase relationship can't be maintained. Note, there's only one voltage input on any of the emonTx range. So you will be measuring the voltage on L1 and assuming the voltage on L2 and L3 matches that on L1, and that might or might not be the case, leading to a potential inaccuracy. You'd need to have exactly the same on both the incomer and the generation infeed, so two emonTx's.

Now the easy bits: 4 - Yes, you decide what you want to show; and 5 - it should be possible. You'll have help from these forums when you need it.

ofarm's picture

Re: A newcomer – three phase, but it's a bit complicated

Many thanks Robert,  I'd previously looked at the full fat solution.  So is bringing together all the CT outputs the only realistic way to make it work?  If the wireless problem is the biggest one, there might be a way round that, but I think I'd better sketch out the setup to explain it better.

Robert Wall's picture

Re: A newcomer – three phase, but it's a bit complicated

Bringing all the c.t's to one place isn't absolutely necessary, but I was looking for the best engineering compromise that might be acceptable.

If you want to measure real power and the direction of energy flow (as I think you do), you must have voltage and current in the same place. If you have three phases, for accuracy you need voltage as well as current for each phase. If you are content to assume that the voltages of phases 2 & 3 accurately match phase 1 voltage, you need only measure one voltage, and you use the approximation 3-phase sketch that stores the voltage and uses it delayed to calculate the power for the other two phases.

So here are your options as I see them:
3 x emonTx on the incomer + 3 x emonTx on the PV infeed, accurately reading power.
3 x emonTx on the incomer (or PV infeed) with long cables on the 3 c.t's from the other, accurately reading power.
1 x emonTx on the incomer + 1 x emonTx on the PV infeed, each reading accurate power on L1 and approximate power on L2 & L3
2 x Arduino with Tinbum's front end - see http://openenergymonitor.org/emon/node/2674

[Edit - added 4th option, courtesy of Robin]

ofarm's picture

Re: A newcomer – three phase, but it's a bit complicated

I don't think that measuring voltage on one phase will be good enough, although it might be a good place to start.  We are supplied from a small transformer feeding about 10 properties in total and I don't imagine the load is well balanced.  I've no idea how heavily loaded it is.  I ought to check the voltage data that the inverters have recorded.

I've attached a sketch to show our setup - I hope it makes sense.  The distance from the incoming board 0 to board 3 is about 5m and from board 3 to 4 is about 6m.

Your first option - if I mounted three emonTx adjacent to board 3, I could pick up the voltage from that board, but could I run the CT sensors 5m from the incoming board (0)?  What sort of cable would be required?

You've mentioned three emonTx to monitor the PV generated current.  Is this because of the need to relate these currents to the voltage too, so another set of three voltage measurements?

Robert Wall's picture

Re: A newcomer – three phase, but it's a bit complicated

From what you say about the local distribution system, I think you're right in needing to measure the three phase voltages.

"What sort of cable would be required?" Ordinary twin twisted screened ("microphone") cable. Earth the screen at the c.t. end, don't connect it at the emonTx.

"Is this because of the need to relate these currents to the voltage too, so another set of three voltage measurements?" Indeed. (If you use one emonTx per phase and long cables, we hope that the voltage difference between boards 0 and 3 will be negligible, which should be the case unless you have a big load on boards 2, 3 or 4.)

ofarm's picture

Re: A newcomer – three phase, but it's a bit complicated

I've checked the voltage readings, and found all three phases to be around 250v +/- 3v during the time the inverters are active.  I only have readings every 10 min from two of the phases so can't be sure of instantaneous discrepancies between phases.  I guess there may be some phase shift as well as voltage variation with changes in load which I assume could all throw out calculated power measurements if I'm relying on just one phase for the AC.

OK, I think I've decided on a plan.

I shall start off with one emonTx on generation and one emonTx on the incomers, both linked to L3 because that's easiest.  I'll try wireless connection and see how that goes.  If I mount the incomer emonTx close to board 0, I can use an extension for the AC rather than the CT sensors.  If the wireless can't cope, I'll extend the CT sensor leads.... or is installing an SMA RF connector and an extension to a remote antenna an option?

I'll develop this system depending on how the readings compare with the measured import and generated power.

So my shopping list:

  • 2 emonTx
  • 6 CT sensors
  • 2 AC-AC adapter/sensor
  • 1 rasp pi
  • 1 expansion board
  • 1 preloaded SD card
  • 5v USB power supply + micro USB lead

Does that sounds reasonable?  Is anything missing?

Robert Wall's picture

Re: A newcomer – three phase, but it's a bit complicated

What's the next step? If you think you might be going for three stacked emonTx's, then the V2 is the one Martin used. I've not looked at how the V3 might stack, it could well be not easy. If you have the V2, you need 2 more 5 V USB power supplies and leads. 

Or instead of three emonTx's, you could have one Arduino and Tinbum's front  end board.

I'm a bit concerned that you might be heading up a dead end.

Obviously there's provision for an SMA connector on the V3. I don't know about one for the V2, you'd need a very neat termination at the RFM12B end to maintain the impedance matching. I've no idea what cable length would be possible, but if you need only 600 mm plus a bit to get to the other side of the wall, I wouldn't anticipate a major problem.

I don't know exactly what you need to go with the RPi.

ukmoose's picture

Re: A newcomer – three phase, but it's a bit complicated

If you're going for the  V2 I'd also  suggest getting a http://shop.openenergymonitor.com/programmer-usb-to-serial-uart/

Robert Wall's picture

Re: A newcomer – three phase, but it's a bit complicated

Oops - sorry, I missed that. Thanks, Mark.

Andy, have you seen Lighning's Raspberry Pi shield? http://openenergymonitor.org/emon/node/3877
I don't know a price for the shield. It could be a more economical way to go, and worth looking at if you haven't already done so.

 

ofarm's picture

Re: A newcomer – three phase, but it's a bit complicated

Sorry for the delay in responding; it's been a busy week.

As a complete beginner, I've concluded that I should go for as simple a solution as I can, even if it gives approximate rather than precise values.  The key thing for me is going to be whether I'm importing or exporting, phase by phase, together with an indication of how much and the ability to record this.  If I can achieve an accuracy of +/- 10%, I'll be content to start with.  I also want to minimise the number of possible problem areas in the event of malfunctions.

For these reasons I think I need to go for ready-built parts that provide me with a reasonable development path without too much redundancy.

Given these constraints, what would you suggest?

Andy

Robert Wall's picture

Re: A newcomer – three phase, but it's a bit complicated

I'm away from home too at the moment, I'll try to put a scheme together for you by the end of the week.

Robert Wall's picture

Re: A newcomer – three phase, but it's a bit complicated

If you want to stay with ready-made parts, but you are prepared to compile and load some sketches, and you're prepared to accept some inaccuracy; then the cheapest and simplest starting point is an emonTx V3 on the grid connection and the same on the PV infeed. Each would run the approximation three-phase sketch and have one ac adapter for power and voltage monitoring, and three ct's for the three phase currents, from which real power per phase can be calculated. So the data available to you would be the true voltage for L1, the true line current for all 3 lines, the accurate real and apparent power and power factor for L1, and the approximate real and apparent power and power factor for L2 and L3 (though apparent power and power factor for generation is largely meaningless as it depends on the power factor of the national grid at your location, which you cannot influence).

To record this data, you need an emonBase. The established and proven unit is the NanodeRF used in conjunction with emoncms.org (and a connection to your router and the Internet of course). The alternative is a Raspberry Pi with the RF module, that can either be used to forward your data to emoncms.org, or with the addition of the emoncms software and a hard disk drive can store your data locally. This second option requires a knowledge of the RPi and is less well established.

If you're going re-program the emonTx V3, or program a NanodeRF, you'll need a programmer.

Unfortunately, the development path isn't a direct one. The neatest solution for 3-phase monitoring of both grid and PV is Martin Robert's "full-fat" scheme. That would mean building 3 emonTx V2's and your two V3's would be redundant. The alternative, using your two V3's would be to add a third V3 and link the power supplies and serial lines, but unfortunately that is not easy as one serial line shares a pin with the CT4 input (if I've read the schematic correctly), so I wouldn't recommend it if you're not happy doing a serious modification to the pcb.

So it does look very much like Plan A plus a programmer to start with, but I can't make a firm recommendation for the upgrade path.

Robert Wall's picture

Re: A newcomer – three phase, but it's a bit complicated

"3) Can I expect the wireless signals to pass through a 600mm stone wall?"

I thought the answer was a firm "no", but it might well be a yes. Last week I installed an emon system (for now, an emonTx V2 and emonGLCD, working at 868 MHz) at a friend's Scottish farmhouse. The emonTx is behind glass in a barn window, which is about 18 m across the garden from the kitchen. The GLCD is fixed to the inside face of the 600 mm kitchen wall that faces the barn, but nowhere near a direct line of sight, it is about 600 mm away from the lower corner of the window.

The two ct's are each on the end of 10 m of twin screened microphone cable, with the screen earthed at the ct end.

And it's all working fine. I didn't check the grid c.t. against the revenue meter, but having calibrated the PV ct and voltage adapter against my multimeter, the emonTx was within 50 W of the inverter display at 2 kW. (And that's a lot closer than his Efergy display.)

 

ofarm's picture

Re: A newcomer – three phase, but it's a bit complicated

At last I'm getting round to ordering the kit for monitoring just import/export to start with; I'll add the generation side once I've got this working.  Being unfamiliar with everything, I feel more comfortable with this approach.

ofarm's picture

Re: A newcomer – three phase, but it's a bit complicated

The kit has arrived.  I understand that the Tx V3 already has the firmware loaded.  There's an enormous amount of information, but what exactly do I need to do with the Nanode?  I will be measuring current on all three phases and voltage on L2 which carries the highest load, so I'll be using the approximation method of working out voltage on L1 and L3.  I have Arduino IDE and the libraries installed on my PC.  Could someone let me have step by step instructions, or point me to which instructions I need to follow?  I'd be very grateful.

Robert Wall's picture

Re: A newcomer – three phase, but it's a bit complicated

First, your emonTx won't have the three-phase sketch loaded, but let's not worry about that for now. It won't make any difference until you set up your feeds and customise emoncms.

I assume you will be using emoncms.org?

You need to create an account at emoncms.org, customise some software for your Nanode, then load it. Connect the Nanode to your router with an Ethernet jumper cable, and see if the data appears as inputs at emoncms. Those are the big steps.

The little steps are:

1. Test the radio link between your emonTx and the Nanode. To do that, take my test sketch (attached), change the frequency if necessary - it's set to 868 MHz as it comes - and load the sketch. It should give a steady red LED if nothing is received after 20 s, or a green flash every time something is received. You can see what is received if you plug in to the serial output.

IT DOES NOTHING WITH THE ETHERNET - so there is only the one level of confusion!

2. Create an account at emoncms.org. Do all the usual stuff, then go to Input and Input API Helper. On that page, you'll see two API Keys. You need the READ & WRITE one to give your Nanode permission to write into the database.

3. Go to Github and get the appropriate sketch: https://github.com/openenergymonitor/NanodeRF/tree/master/NanodeRF_multi... (all 3 files, put them in a folder of the same name in your Arduino Sketchbook). Edit the main file and put your R&W Apikey where it says "YOURAPIKEY". I think everything else should be OK.

4. Load the sketch into the Nanode, connect the Ethernet and hope! It may take several tens of seconds to negotiate with your router and establish the connection. If you don't eventually see "OK recieved", then it's not working.

My "full" guide is the second attached file, with all the gory details and what you expect to see.

At your account in emoncms.org, you should see a few inputs pop up, matching the values sent by your emonTx. If that works, you can then load the 3-phase sketch and get that going too.

 

ofarm's picture

Re: A newcomer – three phase, but it's a bit complicated

Thanks for those very helpful instructions.  I managed to follow them and now have data appearing in emoncms.  I've attached what I'm seeing.  The voltage seems reasonable although it's slightly high compared with what the inverter is showing (254v).  I have set the Tx to read voltage on L2 and current on L1-3 at a point where I would expect the load/output to be about the same across all three phases.  Is there something else I should be doing to read power in emoncms or is there something amiss?

I've tried placing the Tx about 8m and two thick stone walls from the Nanode and managed to get a signal across, although it seems to struggle if I increase the distance slightly and add another wall in.

On a slightly different subject, I recognise that if I'm going to place a CT some distance from the Tx, I need to replace the lead with a longer screened one.  I've realised that it may be better to extend the AC-AC power supply lead and place the Tx at the main incomer.  Would extending this lead to feed from a convenient 13A socket cause problems?

Robert Wall's picture

Re: A newcomer – three phase, but it's a bit complicated

OK, so the system is working, you're just not measuring the right things in the right way.

First, there's absolutely no problem with extending the "9 V" ac feed from the adapter.

I presume the sketch in your emonTx is still the default one - emonTxV3_RFM12B_DiscreteSampling. Obviously (or perhaps not!) that is for single phase only, so you need to get the 3-phase version. That is "emonTxV3_3Phase_Voltage" and it's in the EmonTx V3 - RFM12B - Examples folder on Github. Please read the comments at the beginning, they describe how it operates and what you need to do to calibrate it. It presumes the phase sequence is 1-2-3 and the voltage reference is on Phase 1. You need to connect it as Voltage and CT1 to your L2, CT2 to your L3 and CT3 to your L1.

The default output to emoncms is the four real powers (on L1, L2, L3 & L4, and the rms voltage.

The serial output for debugging is much more detailed. First the Voltage, then for each of the 3 (or 4) CTs you get rms current, real and apparent powers, and power factor. If you wish, you can send more details. (CT4 power will be zero unless it is enabled.

If you get negative powers on phases 2 & 3, the phase sequence is wrong and you need to exchange them.

ofarm's picture

Re: A newcomer – three phase, but it's a bit complicated

I thought that all the communications were working OK.  I found the right sketch and loaded it, but haven't done any calibration.  I wondered about the sequence of the phases and tried changing them but wasn't sure the result was better.  Had I better get on with the calibration?

Later.....The heat pump has just started and I'm seeing positive figures on L2 and L1, but negative on L3.  Switching the CTs round doesn't remove the negative, it just moves it.  At the moment I'm seeing 1477 on L2, -2341 on L3 and 462 on L1. 

What is the signage convention for import/export?

Robert Wall's picture

Re: A newcomer – three phase, but it's a bit complicated

Our convention is import is positive, since this is monitoring energy use. Robin's convention with his energy diverter is the converse, export is positive. You change the sign by flipping the c.t. on its cable, but if they're all wrong, you can flip the adapter on the AC-AC adapter instead. I shouldn't answer questions while I'm watching Countryfile and Antiques Roadshow! You're right, swapping 2 & 3 won't change the sign. Because of the way the voltage is shifted, it's fairly important to get the calibration right, so I do suggest you try to calibrate it as best you can, especially the phase.

Robert Wall's picture

Re: A newcomer – three phase, but it's a bit complicated

Just a thought: I wouldn't push your luck with trying to go through too many walls. While they are dry, it may be OK, but it could well be a different matter when they are wet, as you'll have a film of water that is electrically conducting and it will act as a mirror.

ofarm's picture

Re: A newcomer – three phase, but it's a bit complicated

I'm still not seeing meaningful values, and have a few questions.

I've tried the first steps in the calibration, but I'm getting a message when I load the sketch "avrdude: stk500_getsync(): not in sync: resp=0x00"  Should I be concerned about this?  If so what should I do about it?

Why do I need to adjust Vcal and Ical?  Are these not set correctly in the library sketch?

The calibration notes read "Connect a pure resistive load (e.g. a heater) to L1 and adjust Phasecal1 to display a power factor of 1.00".  Where do I display the power factor?

Presumably this is an iterative process of loading the sketch, observing the result, adjusting the values and reloading.

Thanks again for your help.

Andy

Robert Wall's picture

Re: A newcomer – three phase, but it's a bit complicated

"avrdude: stk500_getsync(): not in sync: resp=0x00"  Should I be concerned about this?  If so what should I do about it?

Indeed you should be concerned. It means you are not talking to the emonTx, and you have not loaded the sketch. Did you follow the instructions for setting up your Arduino IDE here: http://openenergymonitor.org/emon/buildingblocks/setting-up-the-arduino-... ?

(The instructions for Windows, OSX and Linux are different - which are you using?)

Vcal and Ical should be close if you are using the recommended ac adapter and current transformers, but they are still subject to component tolerances. If you have the means to do so, it would be better to at least check the values, and if necessary adjust them slightly.

You should be able to see the Power Factor on the serial monitor - that's when you have solved the connection problem of course.

Yes, adjusting the Phase calibration is iterative, but it is is fairly linear so by noting the values each time, you can get a fell for how much to change it to home in on unity.

ofarm's picture

Re: A newcomer – three phase, but it's a bit complicated

I'm on Windows 7.  Yes, I did follow the instructions and I've set up the folder structure as described and installed the libraries .  I can see everything in the sketchbook in Arduino IDE.  Everything was OK on the communications test you described, but the error is occurring with the three phase sketch which compiles OK but comes up with the error when installing.

What do you mean by the "serial monitor"?

I should be able to check the values.  I can at least compare with the readings I get on the inverters when I'm not consuming anything, and I can independently check the voltage on a multimeter.  So the suggestions in the calibration process are a starting point and iterate from there?

Robert Wall's picture

Re: A newcomer – three phase, but it's a bit complicated

Have you successfully programmed the emonTx before? When you plugged the programmer in to the emonTx, did you match up the GND pins? (I say that because the shop programmer is component side down when plugged in to the emonTx V3.)

The Serial Monitor is reached with the magnifying glass icon in the top right corner of the Arduino IDE. That is where you see the result of the "Serial.print( ... )" statements in the sketch.

ofarm's picture

Re: A newcomer – three phase, but it's a bit complicated

That's much better.  With the programmer plugged in correctly, I've loaded the sketch and I'm getting sensible results. Schoolboy error?  I've even managed to calibrate the voltage correctly.  Next step is to move on to current.

Robert Wall's picture

Re: A newcomer – three phase, but it's a bit complicated

"Schoolboy error?" - possibly. It could also be an under-developed sense of cynicism and a paucity of experience in the effects of the Law of Natural Perversity. ;-)  At this point, I could launch a scathing attack on the choice of an unpolarised connector, but it seems to be an inherited problem, not one of OEM's making.

A blob of paint on the GND pin end of each connector half helps.

Unless you've got a separate accurate (better than 4%) clamp ammeter, I suspect your best way to calibrate current is going to be after you have done the phase calibration, and adjust it so that the power matches what your inverter is telling you. Bear in mind that you're calibrating the CT and the input together, so you can swap the CT and the cable, but not the CT and the input, in order to calibrate the one(s) not on the PV infeed.

ofarm's picture

Re: A newcomer – three phase, but it's a bit complicated

Yes, but I should have spotted that it could go either way round and checked which was correct.

It was easy to plug a heater into two of the phases (as the only load) and L2 (the phase with the voltage measurement) was reading 0.99 and L3 was 1.02.  Is that close enough on the basis that there'll be some fluctuation, or should I be looking for bang on 1.00.  I'll have to install another socket to check L1.

I don't have a clamp ammeter, so I've done a bit of calibration using the power being displayed on the inverters.  They're reasonably accurate now, but it's been a very grey day today, so the current has been quite low.

Robert Wall's picture

Re: A newcomer – three phase, but it's a bit complicated

You could probably get closer but as the phase shifts in the transformers are dependent on the voltage (ac adapter) and the current (CTs) that's probably good enough. You'll probably keep an eye on it and compare the numbers you log with your supplier's meter readings and the generation meter, so if there's a glaring discrepancy you can do small  tweaks over time to trim the calibration values. People have got to within about 1% with that method.

Are you now pretty much all set up and running hardware-wise, and now looking to set up emoncms?

ofarm's picture

Re: A newcomer – three phase, but it's a bit complicated

I've moved the CTs and emonTx from where I was testing the setup, to the incoming board.  The calibration still looks OK and so I'm now measuring phase by phase import/export.

My three phase import meter was replaced about 18 months ago so should treat import/export correctly, summing the power across the phases to effectively work as if all generation and consumption is on a single phase as described in the attached document:

http://www.meteroperators.org.uk/assets/documents/Reverse%20running%20me...

In fact, the example described on p7 is similar to my set up.

So to report import/export, firstly I need to sum the power on the three phases to give total power, and then separately sum the positive and negative values over time to give me the total import and total export.

Err, how do I do that?

 

Robert Wall's picture

Re: A newcomer – three phase, but it's a bit complicated

You need to get to grips with emonCMS. First, I'm no expert, and second, the usual advice is to jump in and find out how it works for yourself. There is documentation, but - shall we say - it seems as if the development is going faster than the documentation can keep pace with.

The basic system is: You send the data and it pops up as an Input. You then add processing to that input (e.g. scale it, accumulate it) and write to a Feed. Feeds are what is stored in the database. You can then continue processing if you wish and send more intermediate results to more Feeds. The last thing you do is a Log to Feed (the value running through the calculation isn't saved until you Log to Feed). Having got the data into a Feed and into the database, you can use a Visualisation or a Dashboard (or several) to display it. The present value can appear on a dashboard as numbers or as a dial or as a graphic (or all three). Historical data appears graphically.

Plenty of dashboards are public and you can look at them for inspiration. Emoncms Showcase

So the specific answer to your summation problem is "+ input" to add the other 2 phases, then "allow positive" and "log to Feed" to show Import. You then do "allow negative" which wipes everything out, followed by three "+ input"  and "allow negative" (maybe followed by "x -1") and "Log to Feed" to show Export. (It does need a little ingenuity at times!)

 

That's a very useful paper about meters & generation - I've noted it. Thanks.

ofarm's picture

Re: A newcomer – three phase, but it's a bit complicated

Dashboard up and running and the calculations look to be right.  I'll have a chance to compare my figures with the import meter now.

Thanks for all your help.

Comment viewing options

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