ACS712 current sensor readings are getting crazy

Iam currently using ACS712 current sensor, I followed some codes in the internet .I actually had a result but sometimes they went crazy,like even if the sensors are not conected to a source there are still readings are sometimes it's getting up to some undesirable measurements like negative values like -.0658 or even -1.00 and so.I tried using another code ,the Arduino uno has some good results ranging from .1to.2 when not connected from a source but when I tried the Arduino Mega it will start from 5.81 then the following readings are getting normal and after a 5 interval reading,it will display a 5+ reading and getting to normal reading again ranging .10 to .13.Is my Arduino Mega deffective?or is this even normal?

thank you

Seems like you have a problem, it could be the program or the wiring. Please post the details for what you would like help with looking at.