Expandable 6 Channel ESP32 Energy Meter

I wanted to let this community know about The Expandable 6 Channel ESP32 Energy Meter. It allows you to measure 6 current channels and 1 voltage channel (up to 2 per board). It can be expanded via add-on boards to measure up to 42 current channels on one ESP32!

It now has its own version of EmonESP to send data to EmonCMS, and an updated MQTT system available here.

Let me know what you think!


Nice! Having done the stm32 side of things and learnt a bit more on the details of active/reactive power calculation, I can see the appeal of an energy monitoring IC. The modularity is a winner too. The ‘remote board’ is an interesting idea too. Have you used that yet?

Thanks! These ICs can output a ton of metering data. They’re actually designed for 3 phase systems with 3 voltage ADC’s, but they are all linked together for this application.

I’m still testing the remote board, but it uses a micro hdmi cable to connect the current channels to the board.

My colleague @Bill.Thomson pointed me towards your other page for this (as I can’t get my brain around Github).

I noticed a couple of points of concern:

  • Measurement Error: 0.1%

As Dan intimates that you’re using an energy measuring I.C., that looks very much like the accuracy of that. To it, you must add the (in)accuracy of the c.t. and the v.t. to get a meaningful value for what the user can expect. In particular, the SCT-013-000 has it’s linearity specified from 10% to 120% of rated current, outside that range no accuracy is specified at all, and there’s absolutely no value given for the phase error. And increasing phase error as the operating current falls is inherent in any c.t. And for some of the other c.t’s on your list, all I can see is a blanket unqualified single number as an accuracy claim. That is highly suspicious, and I’d take that to be a spot value only at the rated current.

And I can’t see any accuracy given for your v.t. - again highly suspicious. The reality is an a.c. adapter is designed down to a price as an isolated low voltage power supply, it is not a measurement transducer.

  • Dynamic Range: 6000:1

Again, that figure can only be for the energy measuring I.C. itself. You will find that pickup and crosstalk, both on your pcb and in the external wiring, and digital noise on the supply will all, to varying extents, degrade that number.

My feeling is that to avoid claims of false advertising, you might want to make it clear that both those only apply to the energy meter itself, as both are likely to be degraded in a practical application.

One further point you might want to look at in the future: you’ve made it very expensive - if I’ve read your data correctly - for European users where 3-phase is widely used for domestic supplies as well as industrial (whereas in the UK, the normal supply for domestic and light commercial premises is single phase), as they appear to need an expansion board to measure all three voltages.

Actually, I think this is the project that originally had the big divot in the V signal. @jdeglavina, were you able to resolve that?

If the v.t. is also the power supply, that’s inevitable, given that it’s powering Wi-Fi as well as the STM. And it’s the reason the emonTx needs a 5 V power supply for its Wi-Fi option - the a.c. adapter itself is well capable of providing the power, but it’s internal impedance means that the current pulse to charge the reservoir capacitor makes an unacceptable dent in the recorded wave, thus damaging the accuracy of the measurement.

A while back somebody sent me a pointer to this claim that your meter only measures apparent power. I’m almost certain that’s not correct, but I’ll leave it to you to take it up with the author… good luck with that.

Hey @Robert.Wall ! Yes, you are correct, those figures are for the ICs. I should change this to the overall accuracy between the CTs and VT.

To do 3 phase with 1 main board, you would need to calculate power in software, since power factors would be wrong for any CTs not in phase with the VT. All 3 phases could be read with an add-on board, but the main voltage also goes to the first 3 CT channels. So you’d have 6 CTs on the 1st phase, 3 on the 2nd, and 3rd.

That being said, I am working on a true 3 phase meter. :slight_smile:

Different project, but similar idea. The divot is not there with this meter because it uses a full wave rectifier before the SMPS instead of a half wave on the split single phase meter. It took me a while to get this right! The input voltage is also higher.

Contrary to an assertion by a compatriot of yours, European supplies are mainly 3-phase 4-wire at nominally 230 V (but historically 220 V) line-neutral, but there are older systems (I think in parts of Belgium, and in Norway) that are 3-wire with 220-230 V line-line, and I believe the lines are 127-132 V to earth. My 3-phase PLL sketch for the emonTx treats the latter as a 2-phase system with the third line treated as the neutral (i.e. the voltage is measured L1-L3 and there’s no c.t on L3).

Definitely not correct. The author of the video did the power calculation in software, which is probably why this was stated. The newest ESPHome integration includes active, reactive, and power factor. EmonESP can output all of that plus apparent and fundamental power.

I had noted that - and he called it “watts”, which of course was also incorrect - that scalar product is VA.

That’s confusing! Thanks, I wasn’t aware of how the older systems were set up. What I have so far uses a very similar IC (ATM90E36A) that has an optional neutral line measurement. It can be set to 3 or 4 wire 3 phase systems.

Not all that confusing, in the 3-wire system you don’t have access to the star point voltage, and that affects the phase relationship between the voltage you can measure and the line current. But I’m quite sure Atmel will have got it right. I thought I should mention it so that you were aware.

Dwelling briefly on history, the UK voltage used to be 240 V ± 6%, when we joined the EU and in order to avoid replacing probably tens of thousands of final distribution transformers, the specification was changed to 230 V ± 10%, so almost the same upper limit, and the lower limit of 230 V is conveniently 220 V - 6%, so the same as continental Europe’s lower limit.

The approach I’ve gone for is to have a “meter module”. Each module is 1xV+12xI channels and those I channels are hardwired to that V channel. Then you can have 0, 1, 2 or 3 meter modules. Each meter module is completely isolated from the others (not even a shared neutral) so the end user can wire them up however they like. Hopefully that covers both types of 3-phase. You can even wire all 3 modules to a single phase if you want, and have a 36 channel meter.

@jdeglavina what is in fact the approach at phase error correction at low currents with this IC?

This is kind of what the add-on boards for this meter do, but they always share the main voltage on the first IC. A second voltage can be optionally measured on the second IC.

The IC has registers to adjust for phase error, but it’s a bit difficult to get exactly right without an expensive calibration bench. It also has adjustments for temperature.

On what basis?
Having read the app.note, it’s clear that there’s only one value of phase adjustment per channel. I have even more serious doubts now about the fellow in the video - he clearly didn’t know what he was talking about. I can write that with reasonable confidence because both the v.t. (at least our “Ideal”) and c.t’s generally exhibit a phase error that’s dependent on the amplitude of the quantity being measured. If your user is prepared to spend somewhere not far short of the price of a board on each v.t. or c.t., then the error itself is small and the variation is minimal, but with the low-cost transformers that we use, the adjustment really needs to be a two-dimensional variable, dependent on both voltage and current.

Were you looking at 3.9 EXTERNAL COMPONENT COMPENSATION on page 27?