• Hi,

    I was wondering if anyone could help/make suggestions.

    I have a solar setup on the roof which, via the inverter, sends data to a portal giving me information on generation, power import, power export, and self consumption. The PV installer sold me on the ability to measure this data internally via a modbus interface. This is partly true in that I can measure the solar generation, but the import/export meter can only send data to the portal, or provide data via modbus, not both.

    I've looked at the price of an additional meter is £200, plus wiring it up, and configuring. But I also have a few original espruino and a few picos hanging around, so why not try myself?

    A CT (current transform) clamp is about £15, so one wrapped around my electricity meter (one external, one internal) should give me the data I need (....I think).

    I guess I'd get the espruino to convert analogue current measurements to digital, calibrate with my portal data, and then just log somewhere (probably socket connection to home server).

    Has anyone done anything like this? Any suggestions about where to start - apart from buying the clamps :)

    Cheers, Lloyd.

  • Hi!

    Just wondering, is the portal connected to the inverter via modbus? If so you might be able to use an Espruino with a Modbus adaptor to just 'snoop' on the traffic between the two?

    But if not then yes, what you'd planning should work. You'll get an AC signal out of the current transform clamp (I'd check what kind of voltage it outputs just to see if it's safe to connect direct to the Pico or if you need to use some resistors to divide it down).

    Since it's AC, you'd want to put two resistors between the 3.3v and GND to give you a 1.65v signal that you could connect one side of the clamp to, and then connect the other side to the Espruino's ADC.

    To get a basic reading you'd want to find the peaks (although to to it properly you'd want to use the Waveform class at maybe 1000Hz and then use E.sum and E.variance on the result). I guess simply you could do something like:

    var hi = 0, low=1, r;
    while (r=analogRead(AC) > hi) hi=r;
    while (r=analogRead(AC) < low) low=r;
    var power = hi-low;

    I think commercial offerings measure the voltage and the current at many points over the AC waveform, then multiply them together and sum them all (because just looking at current it's actually very difficult to tell which direction the current is flowing). It's possible with Espruino but is probably a bit heavyweight and means fiddling with mains.

    Another option (if you have access to the wires from the PV converter) is to put something like this in-line: https://www.ebay.co.uk/itm/Reading-Energ­y-Meter-LCD-5-30-A-Single-Phase-DIN-Rail­-Kilowatt-KWH-230V-BI042/162894990103?ep­id=16016024547&hash=item25ed4c4b17:g:nRg­AAOSwnsRafddf

    Cheap, and it has a really simple isolated output on it. Basically it shorts out for a fraction of a second for every 500W/h of energy going through it, so all you have to do is count the times it shorts out - it's super easy, safe, and calibrated.

  • Thanks Gordon, I'll take a look (and try and remind myself about all this stuff).

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Measuring household import/export with the grid (CT clamps)

Posted by Avatar for lloydwatkin @lloydwatkin