reading through the forum, this sensor seems to cause a fair number of people problems, mine doesn't seem have been discussed though. I'm fine with the fact that it jumps around a bit, being a hall sensor i was expecting it. my issue is that it drifts over time, and while some have posted they have that issue over minutes, mine drifts over days. i have a little over 5 days uptime on it right now and it has drifted up around 0.2A. when i have my laptop plugged into the arduino the readings go back to normal (and even ready about 0.1A lower then when its not plugged in. Given that, I though i probably need a pull down somewhere, but that doesn't appear to be an issue with the module. The only other solutions I have found is to buy a another set of sensors (i have 3 hooked up) from a different batch or supplier.
The ACS712 is a ratiometric device which means the output voltage is affected by the supply voltage which in your case is probably drifting downwards.
Essentially you need to work with the ratio of the output voltage compared to the supply voltage, instead of just using the output voltage for your calculations.
What is powering Arduino when it is NOT plugged in to USB? What is your AREF voltage after the sensor values have drifted up for a few days? What is AREF voltage after plugging in to laptop?
I suspect you're running off batteries and as the Vcc voltage falls, the AREF voltage (taken from Vcc) drifts down so the sensor voltage appears to drift up.
You might do better to take AREF from the 3.3V pin, depending on which of the 10 or 12 Arduino types that you have.
Using 3.3volt Aref would defeat the ratiometric relationship between Arduino and sensor.
Better find the cause of the problem.
We don't know which ACS712 you're using (there are three different ones),
how you have connected it, what you're measuring, how you power the (unspecified) Arduino, and the code you're using.
Read the "how to post" sticky that's on top of every main page.
Leo..
Its a hall-sensor, it is affected by magnetic fields in the vincinity - my bet is something is changing magnetically
in the environment.
As its ratiometric, it should not be affected by drifting supply voltage, so long as that supply voltage
is the self same one used by the Arduino ADC (ie you have Arduino Vcc as the sensor supply voltage)