A friend and myself are currently working on a project which is about current sensing. We are using a non invasive current sensor in combination with arduino software to get our data, everything is based on this widely used example:
The problem is that we are using an Arduino Uno, which uses a 10 bit ADC with a range of 0-1023 and thus limits our accuracy. We are planning to increase this accuracy through the use of oversampling, which would be based on this example:
This results in the usage of the Emonlib & eRCaGuy_AnalogReadXXbit libraries.
To make this work we would have to implement a bunch of references from one library to the other, and since we don't really have any experience with this (in general our arduino experience is limited aswell) we aren't sure how to get this done.
Is there anyone around who does have experience with this and is willing to give us a few helpfull tips? Anything is welcome!
Why do you think you need more than 10 bits in your measurements? In principle, that gives better than 1% precision, which is roughly equivalent to the measuring tools available to most hobbyists (e.g. a good multimeter).
You can certainly get a bit of extra precision out of the Arduino ADC using oversampling under the right circumstances, but the 10-to-21 bit blog you linked is mostly wishful thinking, if not simply nonsense.
With any A/D , the absolute accuracy is defined solely by the voltage referance that the A/D uses, and all the oversampling on the planet wont improve the accuracy.
If you want better than 1% accuracy, you will need a precision voltage referance similar to something like this.
Oversampling can't help you on this. To measure AC correctly, you need at least 20x sampling rate above Nyquist, so it's about 2000 Hz (50 Hz mains) and 2400 (60 Hz). Even you may drive arduino ADC at 76 - ksps, its still provides 2.5 bits via oversampling, and taking in account that arduino's ADC unipolar, you will have 9 + 2.5 = 11.5 bits.
There is "Analog device" 's application notes on power measurement, that's explain why do you need 17-bits, in summary to cover 10 mA - 10 A range 60 dB, plus to have 1% accuracy at the lower end - 40dB more, overall 100 dB.
Your options:
PGA, programmable gain amplifier from x1 to x500 (may be x200);
ADC 16-bits or more, with sampling rate above 2 ksps.
The problem is that we are using an Arduino Uno, which uses a 10 bit ADC with a range of 0-1023 and thus limits our accuracy. We are planning to increase this accuracy through the use of oversampling, which would be based on this example:
Nope, not the problem.
AC Current Sensor (SKU: THM105C4B): Non-linearity ±3%
Here's some test results on the sensor ... distortion 5%, phase error 10 deg, ratio error 8.5% and more:
Hi, for anyone still interested.
In my experience, inaccuracy is more related with the hardware (mainly resistors) used.
By improving on these basic things, like getting 1% tolerance parts, I improved the precision of my project well within my expectations.
Regards
Paulo