Mathematical Calculation of Current with ACS712 20A

I am trying to find out what is the linear equation that the ACS712 20A Current Sensor uses. I have attached the code below.

Let me start with an example: The LM35 Temperature Sensor data sheet has said the Linear Response Equation of this sensor is : T0C = 100*VDT; where, VDT is the DC voltage coming out of its signal pin when the ambient temperature is T0C. This response equation has been derived based on known 2-point responses which are also given in the data sheet. These 2 points are: A(1500C, 1500 mV); B(250C, 250 mV).

For the ACS712 sensor, the data sheet has not given any values regarding 2-point responses. The data sheet has only said that the sensor will make an output between 66mV to 185 mV when there is a load of 1A in the hot circuit. Therefore, it is responsibility of the user to derive the Response Equation of the ACS712 Sensor before it is used in a measurement circuit. The procedures are:

1. Connect 500 W Load (5x100W/220V Filament Bulbs) to the primary of the sensor. Measure the output voltage; it should be between 150mV to 420 mV. Record the voltage as VD1.

2. Connect 300 W Load (3x100W/220V Filament Bulbs) to the primary of the sensor. Measure the output voltage; it should be between 90mV to 252mV. Record the voltage as VD2.

3. Now,find the Response Equation (y = mx + c) as follows based on:
A(500, VD1), B(300, VD2), C(W, VD).

==> (VD1 - VD2)/(500 - 300) = (VD1 - VD)/(500 - W)
==> VD = k*W + C //This is the Linear response equation of ACS712 sensor.

Now, you have to model (tailor) it with respect to whatever Arduino you use. This is the job of expressing VDT in terms of the ADC value of the ATmega328P of Arduino UNO.

4. Take VREF of the ADC as 1.1V INTERNAL.

5. When input is 1.1V, the ADC value is 1024. Therefore, when the input is VD, the ADC value will be (1024/1.1)*VD. So, ADC = (1024/1.1)*VD. From here, we get: VD = (1.1/1024)*ADC. That is: VD = (1.1/1024)*analogRead(A0);.

6. The original response equation: VD = k*W + C
==> (1.1/1024)analogRead(A0) =kW + C ;
In this equation, all factors known; so, we can always compute the almost correct value of the present (arbitrary) load (W). Because, the voltage is also known(220V), we can find the current and display it on the monitor.