Select Page

# Theory

5A Module 20A Module 30A Module
Supply Voltage (VCC) 5Vdc Nominal 5Vdc Nominal 5Vdc Nominal
Measurement Range -5 to +5 Amps -20 to +20 Amps -30 to +30 Amps
Voltage at 0A VCC/2
(nominally 2.5Vdc)
VCC/2
(nominally 2.5Vdc)
VCC/2
(nominally 2.5VDC)
Scale Factor 185 mV per Amp 100 mV per Amp 66 mV per Amp
Chip ACS712ELC-05A ACS712ELC-10A ACS712ELC-30A

## ACS712 Module Pin Outs:

• Always connect load in mentioned direction for positive output.
• If you will connect as illustrated below, the output will be positive ans above 2.5 volt .
• If you will connect it in opposite direction as illustrated in below picture, the output will decrease from the 2.5 volt.
• It will give 2.5 volt when there is no current flowing through it. # Coding

/*
Arduino Acs712 DC Current Sensing
Function: Sense the DC Current and Display on the Serial Monitor
Website: http://www.Kraj.in
*/

double Voltage = 0;
double Current = 0;

void setup(){
Serial.begin(9600);
}

void loop(){

// Voltage is Sensed 1000 Times for precision
for(int i = 0; i < 1000; i++) {
Voltage = (Voltage + (.0049 * analogRead(A0))); // (5 V / 1024 (Analog) = 0.0049) which converter Measured analog input voltage to 5 V Range
delay(1);
}
Voltage = Voltage /1000;

Current = (Voltage -2.5)/ 0.185; // Sensed voltage is converter to current

Serial.print(“\n Voltage Sensed (V) = “); // shows the measured voltage
Serial.print(Voltage,2); // the ‘2’ after voltage allows you to display 2 digits after decimal point
Serial.print(“\t Current (A) = “); // shows the voltage measured
Serial.print(Current,2); // the ‘2’ after voltage allows you to display 2 digits after decimal point

delay(1000);

}