Measuring current more precisely with the ATMEGA328P

Hello everyone!

I started working on home automation a few months ago.
To do so, I am currently using “MySensors” (an open source home automation protocol) and “HomeAssistant”.
The sensors I build are based on ATMEGA328P microcontrollers and RFM69W radios.

Willing to follow my power consumption, I found the OpenEnergyMonitor project which really looks good! :slight_smile:
I plan to build an energy monitor with a CT current sensor and an AC / AC adapter to measure the voltage.
The CT sensor I will be using is the “YHDC SCT-013-000”. I will use the right burden resistor so that the ATMEGA328P can measure a current up to 100A.

I have an “issue” though: I’m not very happy about the resolution I will get with such a setup :stuck_out_tongue_closed_eyes:
Indeed, I live in France and it is common here to have electric radiators / water heaters.
As a result, our power consumption is “not that high” during summer but can be very high during winter.

I have been searching for ways to make the measured current more precise and I found by chance that old “forgotten” blog post which seems to be exactly what I want: High Accuracy Current Measurement Over a Wide Range - Blog | OpenEnergyMonitor
I haven’t found any reference to that article in the documentation / forum posts (via Google) which surprised me.

My questions are:

  • Has any of you done this kind of setup?
  • Why has the idea been abandoned / not mentioned in the “learn” documentation?

Cheers!

Welcome, Encrypt, to OEM

Not that I know about.

Rather than “abandoned”, I don’t think it was ever proceeded with. I suspect - I don’t know - that a “single chip” solution was the overriding consideration.

If you want high accuracy monitoring, I don’t think I would start with the Atmel 328P. There are now many dedicated energy monitoring I.Cs that offer superb performance.

It is not appropriate to document in ‘Learn’ a technique that we do not use. As it is, there is so much information available here that many users - me too sometimes - find it difficult to find what they want.

The Atmel data sheet that the link refers to fully documents the hardware, and gives flow charts (but not code) for the software.

What performance do you think you require? EmonLibCM seems to give much better accuracy at low currents/low powers than our “discrete sample” library (“emonLib”) and the errors of the YHDC c.t. at very low currents do become apparent with that library.