So, if my calculations are correct and your meter is to be believed, the sensitivity of your device is only about half what it should be. Are you sure you have the 50A version and not the 100A version of the ACS758?

While writing this, I noticed that you were dividing by the number of samples after taking the square root instead of before. That explains a factor of 10 in why the sensitivity appeared to be incorrect.

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

i've made further testit seems that with a sensitivity of 0.034/2 it works from 4A to 12A quite well.0.034 seems ok, because my supply is 4.7V, sensitivity should be 0.03824 +- 5mV (Electrical offset voltage from datasheet)but i've to use half of it.

p.s checked also my multimeter and it has no problem.

have you any suggestion, or anyone here that can test my code on other chip?