I am trying to come up with a good solution for the AC714 30A current sensor. I have read a few different sites and their formulas come with different results. I need to figure would which is right/acurrate way.

This site

http://embedded-lab.com/blog/?p=4529Says the Sensitivity changes if the Vcc changes, is that right?

The calculations shown above considered supply voltage Vcc = Vref = 5.0 V. Interestingly, the final equation relating I and Count remains the same even the power supply fluctuates. For example, suppose Vcc fluctuates and becomes 4.0 V. Then, the sensitivity of the ACS712-05B also changes to 0.185 x 4/5 = 0.148 mV. If you repeat the above calculations with Vcc = Vref = 4.0 V and sensitivity = 0.148 mV, you will end up with the same equation for I and Count. This was possible because of the ratiometric output of the ACS712 sensor.

This site

http://www.lucadentella.it/en/2011/11/29/sensore-di-corrente-con-arduino/float average = 0;

for(int i = 0; i < 1000; i++) {

average = average + (.0264 * analogRead(A0) -13.51) / 1000;

delay(1);

In my case .0264 would be .0074 since I have the 30A version.

Finally this site

http://arduino.cc/playground/Main/CurrentSensing int Sensitivity = 66; // mV/A

long InternalVcc = readInternalVcc();

double ZeroCurrentVcc = InternalVcc / 2;

double SensedVoltage = (RawADC * InternalVcc) / 1024;

double Difference = SensedVoltage - ZeroCurrentVcc;

double SensedCurrent = Difference / Sensitivity;

This takes into account of the Vcc dift but do I need to if the sensor has ratiometric output? If so I need to adjust the sensitivity? I tired with and without adjusting sensitivity and didn't change much

I adjust by doing this

(Sensitivity*InternalVcc/5)/1000)

What I don't understand is with nothing going through the sensor shouldn't I get straight 512? Or is 512-510 normal for nothing passing through it?

The example from arduino.cc varies a bit. My goal after I get a good formula is to average it out and to log power usage over time.

Thanks for any help you can provide.

I have this sensor

http://www.pololu.com/catalog/product/1187Datesheet

http://www.pololu.com/file/0J196/ACS714.pdf