Current sensor (ACS712) with arduino

@Wawa identified a number of problems using a ACS712 with the unstable reference voltage of the UNO etc

ran a test using your code of post #1 with a couple of lines added to print the power supply voltage

Serial.print(" Supply Voltage = ");
Serial.println(5/1023.0*analogRead(A1),2);

a run for a few seconds (power supply voltage 2.23 current 68mA)

11:56:41.074 -> Voltage = 2.49 V	 Current = 77.07 mA Supply Voltage = 2.24
11:56:42.409 -> Voltage = 2.49 V	 Current = 76.88 mA Supply Voltage = 2.24
11:56:43.775 -> Voltage = 2.49 V	 Current = 79.35 mA Supply Voltage = 2.23
11:56:45.141 -> Voltage = 2.49 V	 Current = 78.90 mA Supply Voltage = 2.23
11:56:46.469 -> Voltage = 2.49 V	 Current = 79.40 mA Supply Voltage = 2.23
11:56:47.828 -> Voltage = 2.49 V	 Current = 78.25 mA Supply Voltage = 2.23
11:56:49.193 -> Voltage = 2.49 V	 Current = 76.98 mA Supply Voltage = 2.23
11:56:50.525 -> Voltage = 2.49 V	 Current = 76.67 mA Supply Voltage = 2.23
11:56:51.886 -> Voltage = 2.49 V	 Current = 78.08 mA Supply Voltage = 2.23
11:56:53.239 -> Voltage = 2.49 V	 Current = 79.79 mA Supply Voltage = 2.22
11:56:54.605 -> Voltage = 2.49 V	 Current = 78.35 mA Supply Voltage = 2.22
11:56:55.960 -> Voltage = 2.49 V	 Current = 76.91 mA Supply Voltage = 2.23

some sample results taken over a range of voltages

meter       UNO
V    mA    mA     V
0     0     7     0
.59   12    18    0.57
1.55  40    48    1.51
2.56  64    74    2.52
3.57  92    103   3.51
4.76  120   129   4.38
6.98  184   197
10.2  275   290
15.9  417   430

you could do a calibration run to read the UNO measured current with 0 current flowing (7 in the above result) and subtract it future readings
however, if you require milliamp measurement with two or three places of decimals a better measurement device is required
I did use a ACS712 some years ago to measure the current taken by an extruder ram - when the current reached a set level (indicating ram was reaching the end of the extruder) the ram would be stopped and withdrawn - however, the current measured was several amps and great accuracy was not required