http://embedded-lab.com/blog/a-brief-overview-of-allegro-acs712-current-sensor-part-2/
http://henrysbench.capnfatz.com/henrys-bench/arduino-current-measurements/acs712-arduino-ac-current-tutorial/
The cool thing about an ACS712 is that current is measured in two directions.
좋은점... about an ACS712의 ...은 전류가 측정된다는 점이다. in 쌍방향으로.
What this means is that if we sample fast enough and long enough,
we sure to find the peak in one direction and the peak in another direction.
With both peaks known, it is a matter of knowing the shape of the waveform to calculate the current.
In the case of line or mains power, we know that waveform to be a SINE wave.
Knowing that allows us to apply a basic electronic formula to yield a decent result.
This tutorial will show you how this is done.
Finding the RMS Value
In most cases, an expression of AC current will be in a value known as RMS. In order to use the ACS712 current sensor to measure AC current, it is important to understand how to calculate an RMS current value from the device readings.
The formula that is applied here is very basic and is right out of any basic electricity or electronics manual.
RMS는 Peak치에 0.707을 곱하면된다.
▼참조링크
https://www.electronics-tutorials.ws/accircuits/rms-voltage.html