The ACS712 can
measure fairly high current using a built-in hall effect
sensor. It can also withstand very high voltages that you find used in
mains outlets (actually it can withstand a lot higher voltage ~2kV
It is a very compact device package in an 8 lead SOIC, unlike the bulky ACS758.
It comes in a range of current measuring capabilities ±5A, ±20A, ±30A (choose the correct chip!).
So you can measure quite high current using this small device.
Since a magnetic field is used to detect the current (the hall effect
part reacts to the magnetic field strength), it means that there is no
direct electronic connection from dangerous high voltage to the low
voltage microprocessor interface. Thus galvanic isolation is built in,
and this device can safely measure current in the presence of high
The actual sense resistance in the circuit is a tiny 1.2mΩ so it
won't affect the "sensed" side of the system very much at all i.e. the
sensor voltage drop will be low.
This magnetic interface provides automatic isolation or voltages up to 2100VRMS. However you must take all high voltage safety
precautions when using voltages over 30V. If you are not experienced in high voltage safety don't do it.
The lowest specification device can measure ±5A - this is the one usually
found on breakout boards.
 Factory trimmed for zero output.  Occurs when device is subjected to high or over current.  The device is Ratiometric.
 Choose a different chip type for ±20A ±30A versions.
Warning: This device does not operate below 4V5!
Other types of device such as the ACS758 or INA219
do operate to 3V0. However, the ACS758 is difficult to use for power
levels below 30W (the current barely registers!), it is for very
measuring high currents only.
ACS712 Block diagram
How the ACS712 Works
The ACS757 generates a voltage proportional to the magnetic field
caused in a conductor using the "hall effect". The output voltage is set
to VCC/2 to indicate zero current flow. Changes in the magnetic field
cause this value to rise or fall indicating positive or negative
current. In this way large d.c. or a.c. currents can be measured.
The ACS71x devices are ratiometric meaning that as the power supply
changes so the ouput changes by the same ratio. This is why the zero
current output sits at VCC/2 i.e. the output does not depend on the
supply voltage value.
ACS712 Filtered Output
Usually you add a a series capacitor and resistor to ground at the
output to give a low pass filtered signal. However this forms a
resistive divider with the following circuit that reduces the signal
level. The ACS712 provides a filter pin to the internal opamps just
after the gain amplifier and just before the output buffer opamp.
This means you can filter the signal without affecting the output level.
You add a capacitor to filter pin 6 according to the following table (see block diagram above):
This lets you set the bandwidth of the device.
The basic accuracy of the device is ±1.5%
The sensitivity of the device is 185mV/A, so every Ampere change
results in a 185mV output change. The resolution should be determined by how
many bits your ADC can measure but also see "Effect of noise on resolution".
If you use the Arduino ADC (10bit) then the resolution of the ADC
device assuming a 5V reference is 5/pow(2,10) = 4.88mV. So the basic
ampere resolution will be:
The only reason for using an ADC other than the Arduino ADC is for better gain and offset characteristics.
Effect of Noise on Resolution
Hall elements seem to have quite high noise output due to thermal and
shot noise, so the effective resolution is limited by this noise.
Dividing the noise by the sensitivity provides the smallest current that
can be measured by the ACS712:
Smallest current resolution = Noise/Sensitivity
Smallest current resolution = 21/185 [mV]/[mV/A] = 0.113A
Warning: The smallest current this chip can measure is 113mA.
Note: Other ACS712 chips have different noise/sensitivity values.
The INA219 has far better resolution for lower currents (3.2A ~ 15A). However the INA219 can not measure with voltages higher than 26VDC.
The ACS712 does not operate with 3V so the key to using it in a 3V
system is to scale the output voltage using a resistive divider.
Note: You must power the chip from 5V for 3V0 divider operation.
The output defaults to 2.5V for zero current measured and for a ±5A
device the sensitivity is 185mV/A so the maximum excursion of the output
2.5 + 185e-3*5 = 2.5 + 0.925 = 3.425.
The ratio to divide down by is to be less than:
3.0/3.425 = 0.88. // Maximum divide down ratio 0.88*maxV = 3V0
Using a 2k2 resistor from the output to the middle of the divide and
10k from the middle of the divider and to ground gives a ratio of:
2k to 10k ratio : 0.82
Max Divided Output Voltage
Tacking the voltage at the middle of the divider, for an input of 3.245V (from the ACS712) the voltage you now get is:
3.425*0.82 = 2.81V // Max excursion
This is the maximum voltage at maximum current. Minimum current falls
Center point voltage
Center point voltage is now 2.5*0.82 = 2.05V
New Sensitivity value
The sensitivity is now 185e-3*0.82 = 151.7mV/A
Check results (check max current):
Delta change / New sensitivity = Amps
(max_excursion - center_point)/sensitivity
Max Amp reading = (2.81 - 2.05)/151.7e-3 = 5.01A
So you can use the above divider and still use a 3V0 ADC or connect
to a 3V0 circuit without going above 3V (if the load stays within range -
the chip should not).
You may need to insert a buffer amplifier to the divider output to
drive the next circuit properly. You could also insert a clamp
opamp/diode to prevent over voltage - this could happen if the current measured is higher than expected.
TIP: Use a resistive divider at the output to operate with 3V0 devices.
The ACS712 can easily measure current in the presence of very high
voltage whilst still providing galvanic isolation - making it safe for
use between high and low voltage circuits.
It has quite a good resolution of 113mA and with a bit of fiddling can be made to output a 3V0 compatible voltage. Its isolation voltage is 2100Vrms so it can withstand huge voltages!
You can get this chip in three ranges of current measurement ±5A, ±20A, ±30A (each
version has a different resolution capability). For 240V mains you can
measure 0.8kW, 3.3kW, 5kW. For 120Vrms systems these are halved to
0.4kW, 1.6kW and 2.5kW.
If you want to measure higher current then use an ACS758 (but it has lower resolution).
If you want more accuracy and need lower current capability (still respectable from 3.2A ~ 15A) the use an INA219. This chip can accurately measure voltage, current and power in the connected circuit up to voltages of 26V.