The Allegro AC/DC Current Sensor ACS712 is based on the principle of Hall-effect. Dr. Edwin Hall discovered this Hall-effect back in in 1879. According to this principle, if you place a current carrying conductor into a magnetic field, this will generate a voltage across its edges.
The output of the AC/DC Current Sensor ACS712 has a positive slope when an increasing current flows through the copper conduction path (from pins 1 and 2, to pins 3 and 4). The ACS712 device comes in three variants, providing current range of±5A (ACS712-05B), ±20A (ACS712-20B), and ±30A (ACS712-30A). The ACS712-05B can measure current up to ±5A and provides output sensitivity of 185mV/A (at +5V power supply). Hence for every 1A increase in the current through the conduction terminals in positive direction, the output voltage also rises by 185 mV. The sensitivities of 20A and 30A versions are 100 mV/A and 66 mV/A, respectively.
At zero current, the output voltage of the AC/DC Current Sensor ACS712 is half of the supply voltage (Vcc/2). You should note that the AC/DC Current Sensor ACS712 provides a ratiometric output, which means the zero current output and the device sensitivity are both proportional to the supply voltage VCC. This feature is particularly useful when using the AC/DC Current Sensor ACS712 with an analog-to-digital converter. The precision of any A/D conversion depends on the stability of the reference voltage used in the ADC operation.
In most microcontroller circuits, the reference voltage for A/D conversion is the supply voltage itself. So, if the supply voltage is not stable, the ADC measurements may not be precise and accurate. However, if the reference voltage of ADC is same as the supply voltage of ACS712, then the ratiometric output of ACS712 will compensate for any error in the A/D conversion due to the fluctuation in the reference voltage.