Emonlib and ADS1115 on Wemos

Sometimes a picture (or two) helps… :wink:
Here’s what a clean sine wave should look like:
Note that this is an ideal sine wave. The mains voltage waveform isn’t quite this “clean” i.e
it is distorted, and the amount of distortion varies depending on several factors.
image

If the sample rate of an Analog to Digital Converter is too low, the waveform gets distorted.
This is the picture from post 23 in the thread I referenced:
image

Compare that to the “clean” waveform above, and it’s easy to see the distortion.

If a clean sine wave gets mangled like that, a current waveform like dBC’s
compact fluorescent lamp load (the red trace)
is definitely not going to get reproduced correctly. Result, poor accuracy.
image