ACS712 data sheet
After all, the module requires just 3 connections: +5 Vcc, ground, and analog voltage out. The problem is that measuring AC current with the ACS712 module yields a sine wave centered around 1/2 Vcc; the greater the current, the greater the peak-to-peak magnitude about the center line. Thus, the average voltage will always be 1/2 Vcc regardless of the current draw. This type a signal is not easily processed by the microcontroller's A/D function. Fortunately, with some signal conditioning, we can get a VDC signal that's portortional to the AC current drawn.
Please see YouTube video regarding how the signal conditioning works. I strongly recommend viewing the video before building this project
Results. The completed project allows AC current to be easily measured as a VDC signal and a microcontroller.
Props. Signal conditioning circuit original design by Lewis Lofin