Positive offset on both solar production & home consumption

Yep no change. After a shutdown and power unplugged it just returns to the same state: VRMS is fine and totally plausible - 237 ish, power on the CT I have sitting on my desk is fixed at 23-25. (reset button doesn’t work).

Things I might investigate: updating emonSD to the latest, getting a different Pi (this one’s an old Pi 2 Model B Rev 1.1) - though I guess that’s unlikely to be the issue, potentially something wrong with the HAT?

I only tested mine for a few minutes last night, so I can’t comment about any drift or anything like that. And as I’ve said, there’s been no change to the front-end software that I’m aware of, so moving to the '19 version is not likely to affect this. The area that I would question next is the d.c. power supply - if that’s particularly noise, then it will affect the noise level seen by the inputs.

Thanks Robert - I don’t think it’s the DC supply as I’ve used two so far with very similar results (ones a fairly chunky one from an iPad, the other a smaller one built into an MK socket).

FYI here’s the trace for the last hour - it’s pretty stable but with a few ‘drops’ down to the true value of 0 (NB the CT is still hanging free on my desk at the moment).

I can try a third DC supply but suspect it won’t change much

I wouldn’t be too sure. See Not all USB power supplies are created the same - Blog | OpenEnergyMonitor

Try a different cable. Not all cables are equal!

Hmmm now this is interesting - too early to say it’s solved but…

You can see the point where I rebooted and started to use the power from a USB socket on the back of an Apple Monitor. I’ll keep an eye on it for awhile and see what happens. I’m really amazed though - the DC sources aren’t cheap ones really (one build into the socket might be I guess but the other one is an Apple 12W supply, you’d have thought it was moderately OK).

I’ll have a look to see if I can find another USB mini cable - don’t have many of those around though, they all seem to be micro these days

Did you get it from the shop? If so should be fine. Looks like the PS.

No I found in the draw where I keep lots of old cables! No idea where it came from. Does seem to point to to a problem with (both!) power supplies though - or possibly some sort of interaction with the cable.

No, but they’re intended for battery charging, not supplying an ADC measuring millivolt signals.

(The sums: 25 kW ≈ 1.1 V at the ADC input, 25 W ≈ 1.1 mV.)

So a bit of an update. With some interim conclusions.

  1. Having the VT connected makes a small difference as you’d expect but is not the cause of the problem.

  2. I’ve tried six different DC sources - 2 integrated into sockets made by MK and some other company, 2 iPad 12W apple chargers, 1 amazon branded one probably from a kindle, and one 5W iPhone apple charger. All behave identically and give a 25W base line power measurement (with VT connected) - without VT it jumps to more like 32W.

  3. The only DC source that doesn’t do that is using power from a monitor - which gives 3 to 4W (can’t remember if that was with VT or not now but either way it’s fine).

So it’s not a problem with a specific DC source - might be that all of them don’t have the necessary tolerances though I’m a bit surprised given that they behave so similarly.

What I’m going to do.
i) I’ve ordered a new mini USB cable (turns out I only have one)
ii) Might have to get a proper DC source - any ideas? I guess I should look in the shop.

Edit just to add: also tried powering it from a 5V chunky USB power bank. I assumed this should be a cleaner DC source without the high frequency ripple in AC>DC, the mean offset is slightly inproved 18W down from 25W but actually fluctuates more.

Just plugged a spare CT into both an emonTX and an emonPi, neither have a ‘special’ DC source (IKEA 3 way) nor a special cable and in neither case did it report anything when not connected.

@Robert.Wall, could it be the CT itself?

Most unlikely, I think.

1 Like

Have you used the header to move it well away from the Pi itself? Clutching at straws…

I think that’s the measure of it - all of those that give high noise levels are intended or expected to be used as battery chargers. The fact that the monitor gives you a respectable 3 - 4 W “noise equivalent” indicates to me that there’s nothing wrong with your Pi V2 nor the emonPi Shield.

Yep I agree. Thanks for all the help. I’ve ordered a power supply from the shop so will see how I fare with that. I’ve been wondering - since the issue I see is a constant offset, does that indicate that it’s not so much a fluctuating DC input but rather a value that’s too low/too high? Anyway, I’ll report back when I’ve got the new power source. Failing that other options are: 1) just subtract a constant in the feed, 2) Loop the PV wire through the CT a few times (e.g. 3 times) and divide the power by 3 - should increase my signal to noise.

I would say neither - it’s a constant d.c. with a constant, probably quite high frequency, alternating noise component superimposed on top of it. That noise is finding its way into the ADC, probably via the ADC reference voltage which is the 3.3 V supply rail, and the reference isn’t steady. In effect, it’s the ADC that’s adding the noise to the signal it’s trying to measure. If you want a mechanical analogy, think in terms of measuring the length of something with an elastic tape measure - while the tape measure is stretching, you’re not reading the true length.

If the new supply doesn’t help, I’d go for (2) first, then (1) as well if (2) wasn’t good enough. If you’ve only got less than 3A, you can have a lot more than 3 turns for your primary winding of the c.t.

Right I’ve tried a few things and have an update on this - there’s some progress but not perfect. TDLR: I’ve got the constant offset down from 25W to 17W.

  1. I bought a new USB mini lead - as expected no change
  2. Updated to the Oct2019 SD image - also as expected no change
  3. Switched the old raspberry pi 2 for a zero - no change to the offset, though the zero works really nicely, the wifi signal is actually much better than the pi2 with a usb adapter. I’ll stick with the zero.
  4. New power source from the shop has improved things a bit - dropped the constant offset from 25W to around 17W. It’s probably not quite as clean a 5v source as computer but is clearly better than all the other adapters.

I don’t think I’m inclined to spend time trying to filter the 5v line - so instead will probably opt to loop the solar wire through the CT a few times.

Though one thing I’m keen to know is if this is likely to be be a constant offset regardless of power or if it’s a more complex function. I’d guess at the very least I’m seeing both a constant offset and some multiplicative error factor. In which case I could improve things quite a bit by subtracting the constant 17W.

You obviously will do the maths for your final panel count so, depending on wire size, put as many turns as possible through the c.t. so that the ampere-turns is less than 100, then put a multiplier of 1/(turns) in the inputs process list.
Make sure you use a wire size that’s rated for well in excess of the actual maximum current, because you have to derate the wire on account of it being many turns bunched together - down to about 50% for 8 turns, 65% for 4 is my estimate. The important point is it must not get so hot inside the c.t. that the insulation deteriorates.

That should reduce the noise also by a factor of 1/(turns).

Power? Which power? It’s likely to vary with the current drawn from the 5 V, if that’s what you meant, though probably not markedly. If you want to remove the effect, adding -17 to the process list first is going to be the thing to do. After that, you can try adjusting with a multiplier to get the calibration correct.

I don’t think you answered this. Just wondering if the shield doesn’t like being too close to the Pi.

Ah yes I forgot to mention that - moving it away didn’t seem to make any difference either. That said I was already using the plastic standoffs and the header extension, so it wasn’t possible to move it much further.

Re. ‘power’ (I’m not sure how to use quotes on here). I meant house power consumption i.e. current measured from the CT. If the offset I see with zero current is just a constant regardless of measured current then it would be easy to subtract out. Though in another post you thought it was likely to be a more complex - potentially nonlinear - function. I think I’ll settle with looping the cable through - thanks for the pointers on the max number of turns and cable rating.