Problems with ACS712-30A when reading AC current for different kind of loads.

I have been trying to use an ACS712 - 30A to monitor AC current, but the sensor has behaved differently for inductive loads and resistive loads. For a resistive load(bulb lamp) that the current would be 0.19A it’s fine, but when I change it to an inductive load(fluorescent lamp) that was supposed to consume .15A, it reads .28A. Do you guys know if there is any problem using that sensor for AC with an inductive load? The code that I’m using on the Arduino UNO is the following:

float CurrentSensor(){
 
 unsigned long ACcurrent=0;
 unsigned int count=0;
 unsigned long prevMicros = micros() - Interval;
 


while (count < samples){
 
  if (micros() - prevMicros >= Interval){
   
    rawValue = analogRead(Pin)-zero;
    ACcurrent = ACcurrent+(rawValue*rawValue);
    count++;
    prevMicros += Interval;
  }
}

float rms = (sqrt(ACcurrent/count))*5.0/(1024.0*0.066);


return(rms);
}

It’s based on what I have found on online forums.

Thank you all in advance.

Your sensor can not see what kind of load u've got. There is a filter to set bandwidth,.. external cap. The fluorescent can introduce harmonics or it simply needs .28A !?

Thank you for answering me :D ,

I compared the value that I got using the sensor and the code above with the value that I got with the ampere meter, but the meter says 0.15A and the code returns me 0.28A. Unless there's a problem with my code, I think that a difference of kind of loads would be the reason for such error. Do you think that my code is wrong?

..and you trust your meter? code seems OK. The sensor may not be perfect.

Yes, it's a Fluke 322 and I tried to use other acs712 and it behaved the same way. I might try to use another model of sensor to monitor the current. Would you have any specific suggestion of current sensor?

does your fluke support more modes than true RMS - then try. If the sensor measures maximum..divide by sqrt(2) You won't find an inexpensive sensor of lab quality.

use a scope to see whats going on..

later added: instrument reads average.. +/- 1.8% +/- 5 counts 1.8% of 40A range is 0.72A ..which means the Fluke isn't very accurate at this low current

I guess the sinwave is distorted by 3rd harmonic which also may influence readings

You're right; thinking about the maximum reading that difference wouldn't be so significant. I'll probably buy a ECS1030-L72 or a SCT 013-030. Have you heard about them? They seem very accurate according to what I have read.

U'd get a more accurate reading. At theese low currents an ordinary multimeter may be the best choice.