ACS758 current sensor

Your value of 530 with no current looks out of tolerance to me. The offset voltage at zero current and +5V supply is supposed to be +/-5mV typical at 25C, and you are reading (530 - 512)/1024 * 5V = 88mV.

  1. Do you have a 0.1uF decoupling capacitor between Vcc and ground of the device, as specified in the data sheet?

  2. Are you powering the Arduino from the USB port or from an external supply? A computer USB port doesn't the most stable source of power.

  3. Are you certain that you are reading from the correct analog input pin?