Description
ACS712 provides economical and precise solutions for AC or DC current sensing in industrial, commercial, and communications systems.
Features
- Low-noise analog signal path
- Device bandwidth is set via the new FILTER pin
- 5 μs output rise time in response to step input current
- 80 kHz bandwidth
- Output voltage proportional to AC or DC currents
- Factory-trimmed for accuracy
- Extremely stable output offset voltage
- Nearly zero magnetic hysteresis
- Ratiometric output from supply voltage
Getting started with the 20A range Current Sensor Module ACS712 Module
Sensing and controlling current flow is a fundamental requirement in a wide variety of applications including, over-current protection circuits, battery chargers, switching mode power supplies, digital watt meters, programmable current sources, etc. This ACS721 current module is based on ACS712 sensor, which can accurately detect AC or DC current. The maximum AC or DC that can be detected can reach 20A, and the present current signal can be read via analog I / O port of Arduino.
Step1: Hardware required
Step2: Connecting the Hardware
Step3: Upload the sample sketch
void setup() {
Serial.begin(9600);
}
void loop() {
float average = 0;
for(int i = 0; i < 1000; i++) {
average = average + (.0264 * analogRead(A0) -13.51) / 1000;//this is
//for the 5A mode, if 20A or 30A mode, need to modify this formula to
//(.19 * analogRead(A0) -25) for 20A mode and
//(.044 * analogRead(A0) -3.78) for 30A mode
delay(1);
}
Serial.println(average);
}
Step4: Testing the circuit
open your serial monitor by clicking on the icon in the right top corner(like search icon)