ADS1115 and sampling speed

The idea behind 1480 samples was, it was a whole number of mains cycles for either a 50 Hz or 60 Hz system, and gave a reasonable number of cycles over which to average the current so that any “end effect” of an incomplete cycle wouldn’t introduce to large an error in the rms calculation.

So you need to see how many samples you measure per mains cycle, then decide how many cycles you’d like (emonTx ‘discrete sample’ sketch does 10, but when measuring voltage it knows where a cycle starts - I’d suggest 20 cycles) and calculate the appropriate number of samples to replace the 1480.

Would half a second or thereabouts (20 cycles) be fast enough?

Otherwise, yes, you can of course check between samples - but that will mean you do not measure the waveform as accurately, and if you check between batches of samples, you will sample at irregular intervals and the answer will be inaccurate again.

In the emonTx, this type of problem is solved by having the pulse trigger an interrupt, and provided the interrupt routine does very little, it doesn’t materially affect the timing.

I cannot see a mention of a 4 ms or 8 ms delay in the data sheet - what is that?

1 Like